Skip to content

fix: propagate explicit state through automated triage#646

Open
treygoff24 wants to merge 1 commit into
peteromallet:mainfrom
treygoff24:fix/triage-propagate-state
Open

fix: propagate explicit state through automated triage#646
treygoff24 wants to merge 1 commit into
peteromallet:mainfrom
treygoff24:fix/triage-propagate-state

Conversation

@treygoff24

Copy link
Copy Markdown

Problem

Automated Codex/Rovo triage creates run_desloppify.sh for stage subprocesses, but the wrapper previously preserved only the checkout/interpreter. When the parent invocation used an explicit state file, for example:

desloppify plan --state .desloppify/parent/state.json triage --run-stages --runner codex

the generated prompt commands silently fell back to the default/root state. Self-recording stages such as organize then could not match issue IDs from the selected state.

Fix

Pass the active CommandRuntime.state_path into the generated helper. The wrapper inserts --state <path> immediately after every top-level command, so all stage prompt commands (plan, show, next, and backlog) use the same state as the parent triage run. Default-state runs keep the existing wrapper behavior.

Added an executable regression test that records the helper's argv, including a state path containing a space.

Verification

  • python3 -m pytest desloppify/tests/commands/plan/test_triage_split_modules_direct.py -q — 44 passed
  • ruff check . --select E9,F63,F7,F82 — passed
  • Full desloppify/tests/ run: 5661 passed, 152 skipped, with 3 pre-existing Bash unused-source failures reproduced unchanged on pristine main
  • Replayed the Santoro multi-state repro in a disposable clone: the generated helper included .desloppify/parent/state.json, listed 20 parent review issues, and successfully added the previously unmatched issue pattern to a test cluster

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