feat(dev-backlog): Phase 1c — backlog-doctor scope-disjointness (#293)#305
Conversation
Rewrite the doctor's active_sprint check from "exactly one active" to
track-partitioned disjointness (PRD §5.3), consuming the ONE shared
scopesOverlap() predicate from lib.js:
- 0 active → unchanged (informational between-sprints warn / pass)
- 1 active → pass, exact "Exactly one active sprint …" string (G4)
- N active, scopes disjoint → pass ("N active tracks, scopes disjoint")
- N active, overlap → fail ("Active tracks overlap on scope: <a> ∩ <b>")
- ≥2 scopeless actives → informational warn (cannot prove disjoint)
Per-sprint checks (objectives_check, component_lint, sprint_shape,
in_flight_trace, in_flight_staleness) fan out per active track with
track-tagged verdicts; a single active track keeps today's untagged
single run — old vs new text AND JSON output verified byte-identical
on a single-active fixture. loadSprintState now parses the track's file
directly instead of readSprintState, whose no-selector read is
portfolio-global and throws OVERLAPPING_TRACKS on collision.
Flip GATE_MT_DISJOINT and GATE_MT_OVERLAP to enforced (smoke suite now
172 pass / 0 xfail) and add smoke coverage for portfolio exit code,
track tagging, and the scopeless informational warn.
Refs #293, #289.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab0ba8e460
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| objectives: tagTrack(checkObjectiveDrift({ repoRoot: root, sprintsDir, activePath }), tag), | ||
| component_lint: tagTrack( | ||
| checkComponentRouting({ repoRoot: root, sprintsDir, capabilitiesPath, activePath }), |
There was a problem hiding this comment.
Scope per-track spec checks to the selected track
When multiple active tracks exist and only one track has objective drift or an invalid component:, these tagged per-track calls still run the underlying checkers over the entire sprintsDir. As a result, every objectives_check [track] or component_lint [track] reports the same failure, even for healthy tracks, with details pointing at another sprint file; e.g. a valid billing track is marked component_lint [2026-07-billing] fail because auth has an unknown component. Filter the checker input/results to activePath before tagging, or keep these checks global instead of presenting them as per-track verdicts.
Useful? React with 👍 / 👎.
Summary
Implements #293 (Phase 1c) of the multi-track sprints initiative (epic #289, PRD §5.3): the doctor's
active_sprintcheck becomes a scope-disjointness check, and per-sprint checks fan out per active track.active_sprint check rewrite (
backlog-doctor.js)pass— exactExactly one active sprint …string retained (G4)pass—N active tracks, scopes disjoint.fail—Active tracks overlap on scope: <a> ∩ <b>. …warn— cannot prove disjoint; recommends declaringcomponent:/scope:Overlap detection imports the one shared
scopesOverlap()fromlib.js(no re-implementation), with track ordering matching sprint-state's D4 (started:asc, filename tiebreak).Per-track fan-out
objectives_check,component_lint,sprint_shape,in_flight_trace, andin_flight_stalenessnow run once per active track when N>1, each verdict tagged with its track slug (JSONtrackfield; human lines rendercheck_name [slug]). A single active track keeps today's single untagged run.loadSprintStateparses the track's file directly viaparseSprintContentinstead ofreadSprintState, whose no-selector read is portfolio-global and throwsOVERLAPPING_TRACKS— the doctor reports overlap itself via the verdict.Gates flipped (0 xfail)
GATE_MT_DISJOINTandGATE_MT_OVERLAPdefault to enforced, plus new smoke coverage: disjoint portfolio exits 0 with track-tagged checks; two scopeless actives warn informationally.Verification
bash smoke-test.sh→ 172/172 pass, 0 xfail, 0 xpassnode backlog-doctor.test.js→ 30/30 (new: disjoint portfolio, nested-glob overlap, same-component overlap, scopeless informational warn, per-track tagging, single-track no-tag G4 guard)sprint-init.test.jsExpand test coverage for shared libraries and edge cases #13 is the pre-existing rot slated for Phase 1b: sprint lifecycle track-awareness (init/close/mirror) #292 (unchanged baseline)origin/main) vs new doctor diffed on a single-active fixture — text AND JSON byte-identical, equal exit codes; live-repo (zero-active) output unchangedRefs #293, #289.
🤖 Generated with Claude Code