fix(status): project segment reads producer fields (name/dirty/ts)#157
Conversation
The project status-line renderer read 'repo' / 'detached', but the Go project producer emits 'name' / 'dirty'. FlattenForTUI spreads producer fields verbatim (no rename layer), and the renderer GATES on 'repo' (`if not repo: return ""`), so the project segment rendered empty in production -- the Go->JSON->Python field-drift class (cf. weather bug #29). Part of issue #155; canonical side is the Go producer (consistent + fixtured + tested), per maintainer decision. - status.py: read 'name' (un-gates the segment); show a '*' marker when 'dirty' instead of the never-emitted 'detached' relabel. - producer_project.go: emit 'last_commit_ts' (committer epoch via `git log -1 --format=%ct`) so the renderer's existing "Xm ago" suffix gets real data; key always present (nil when unavailable) for fixture parity. - ProjectTestFixture + emptyProjectInfo carry last_commit_ts; TestProjectTestFixture_FieldConsistency auto-validates producer<->fixture key parity. - test_status_segments.py: project renders name, dirty marker, and the ago suffix (red->green for name + dirty). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 52 minutes and 22 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Part of #155 (project half; calendar half shipped in #156). Canonical side per maintainer decision: Python adapts to the Go producer.
Bug
The project status-line renderer reads
repo/detached, but the Go producer emitsname/dirty.FlattenForTUIspreads producer fields verbatim (no rename layer), and the renderer gates onrepo(if not repo: return ""), so the project segment rendered empty in production. The "Xm ago" suffix also never showed because the producer never emitted a commit timestamp.Fix
status.py: readname(un-gates the segment); show a*marker whendirtyinstead of the never-emitteddetachedrelabel.producer_project.go: emitlast_commit_ts(committer epoch viagit log -1 --format=%ct) so the renderer's existing "Xm ago" suffix gets real data. Key is always present (nil when unavailable) to keep fixture/shape parity.ProjectTestFixture+emptyProjectInfo: carrylast_commit_ts.TestProjectTestFixture_FieldConsistencyauto-validates producer↔fixture key parity (bidirectional).test_status_segments.py: project rendersname, the dirty marker, and the ago suffix (red→green for name + dirty).Verification
main(segment empty), pass after the fix.TestProject*+FieldConsistencygreen under-race -p 2, 0 zombies.test_status_segments+test_status_live_output+test_data= 57 pass.TestDaemon_ConcurrentStartOnlyOneWinsflaked once under full-package race load (socket-binding timing) but passes in isolation — unrelated to this diff (project producer only).Final follow-up (PR 3) will add the Calendar/Project bridge field-name tests (the #154-class Go regression guards) and close #155.
🤖 Generated with Claude Code