Repository navigation
Conversation
A plan's id came from its file name alone, so docs/specs/auth/design.md and docs/specs/billing/design.md were both plan:design and one hid the other. Strip the plan directory instead: top-level names keep their old id, and nested files become plan:auth/design. Adds a test with two same-named plans.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A plan's id is built from its file name alone (
core/extractors/plans.py:140), sodocs/specs/auth/design.mdanddocs/specs/billing/design.mdboth becomeplan:designand one hides the other — a status set on one applies to both. Fixes #59Root cause
extract()derives the id withpath.rsplit("/", 1)[-1].removesuffix(".md"), dropping every directory component. Plan nodes are keyed by id in the system map, so two same-named plans from different folders collapse into a single node.Fix
New
plan_id(path)helper: when the path sits below one of thePLAN_DIRSroots, the id is the path below that root (plan:auth/design); top-level plan files and repo-root briefs keep their old id (plan:mail,plan:brief), so no existing consumer or stored status key changes.Testing
test_same_name_plans_in_different_folders_stay_apartintests/test_system.py: red before the fix ({'plan:billing', 'plan:design', 'plan:mail'}— both design files collapsed intoplan:design), green after (plan:auth/designandplan:billing/designboth present).tests/test_system.pyfull suite: 43 tests OK (1 pre-existing skip).tests/test_mcp.py,tests/test_sweep.py,tests/test_backend.py: OK.tests/test_worktrees.pyhas 4 pre-existing Windows path-separator assertion failures that fail identically with the change stashed, so they are unrelated to this fix.