Skip to content

fix: route explicit state commands to their sibling plan - #833

Open
dtdannen wants to merge 1 commit into
peteromallet:mainfrom
dtdannen:codex/fix-state-scoped-plans
Open

dtdannen wants to merge 1 commit into
peteromallet:mainfrom
dtdannen:codex/fix-state-scoped-plans

Conversation

@dtdannen

Copy link
Copy Markdown

An explicit --state .desloppify/rust/state-rust.json selected the Rust scan state while next, plan queue, and implicit plan mutations still used the root TypeScript plan. This could offer a post-flight scan instead of pending Rust work and modify the wrong plan.

Scope implicit plan reads, writes, and locks to the selected state's sibling plan.json for the duration of the CLI command. Preserve lexical state paths for symlink consistency, retain explicit-path precedence and default behavior, and recognize nested language state directories when inferring the project root.

Validation: 111 focused CLI and persistence tests pass, including actual next, plan queue, cluster mutation, scope restoration, locking, and symlink regressions. The new routing tests fail with the old default-path behavior. Verified against copied real frontend/backend states from a multi-language project. The full upstream suite had 6,691 passing and 165 skipped tests; its three unrelated Bash parser failures also reproduce on pristine HEAD.

Fixes #832.

github-actions Bot added a commit to citizenadam/desloppify that referenced this pull request Oct 10, 2026

This branch has not been deployed

No deployments
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.

next and plan queue ignore the plan directory implied by --state

1 participant