Skip to content

feat(dev-backlog): Phase 1c — backlog-doctor scope-disjointness (#293)#305

Merged
sungjunlee merged 1 commit into
mainfrom
feat/multi-track-phase1c-doctor
Jul 12, 2026
Merged

feat(dev-backlog): Phase 1c — backlog-doctor scope-disjointness (#293)#305
sungjunlee merged 1 commit into
mainfrom
feat/multi-track-phase1c-doctor

Conversation

@sungjunlee

Copy link
Copy Markdown
Owner

Summary

Implements #293 (Phase 1c) of the multi-track sprints initiative (epic #289, PRD §5.3): the doctor's active_sprint check becomes a scope-disjointness check, and per-sprint checks fan out per active track.

active_sprint check rewrite (backlog-doctor.js)

Active tracks Verdict
0 unchanged (informational between-sprints warn / pass)
1 pass — exact Exactly one active sprint … string retained (G4)
N, scopes disjoint passN active tracks, scopes disjoint.
N, scopes overlap failActive tracks overlap on scope: <a> ∩ <b>. …
N, ≥2 scopeless informational warn — cannot prove disjoint; recommends declaring component:/scope:

Overlap detection imports the one shared scopesOverlap() from lib.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, and in_flight_staleness now run once per active track when N>1, each verdict tagged with its track slug (JSON track field; human lines render check_name [slug]). A single active track keeps today's single untagged run. loadSprintState parses the track's file directly via parseSprintContent instead of readSprintState, whose no-selector read is portfolio-global and throws OVERLAPPING_TRACKS — the doctor reports overlap itself via the verdict.

Gates flipped (0 xfail)

GATE_MT_DISJOINT and GATE_MT_OVERLAP default to enforced, plus new smoke coverage: disjoint portfolio exits 0 with track-tagged checks; two scopeless actives warn informationally.

Verification

  • bash smoke-test.sh172/172 pass, 0 xfail, 0 xpass
  • node 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)
  • All other node suites green; sprint-init.test.js Expand 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)
  • G4 byte-identity: old (origin/main) vs new doctor diffed on a single-active fixture — text AND JSON byte-identical, equal exit codes; live-repo (zero-active) output unchanged

Refs #293, #289.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sungjunlee, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb46e8b7-cf80-43bd-a2c3-3e7abf05ed14

📥 Commits

Reviewing files that changed from the base of the PR and between 2d46ae1 and ab0ba8e.

📒 Files selected for processing (3)
  • skills/dev-backlog/scripts/backlog-doctor.js
  • skills/dev-backlog/scripts/backlog-doctor.test.js
  • skills/dev-backlog/scripts/smoke-test.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/multi-track-phase1c-doctor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +173 to +175
objectives: tagTrack(checkObjectiveDrift({ repoRoot: root, sprintsDir, activePath }), tag),
component_lint: tagTrack(
checkComponentRouting({ repoRoot: root, sprintsDir, capabilitiesPath, activePath }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@sungjunlee sungjunlee merged commit 5effa2d into main Jul 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant