fix: fix: architect should resume session when processing answers on an accepted sprint PR (#436) #449
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#449
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-436"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #436
Changes
AI Review
Critical Bug: Empty RESUME_MODE Breaks agent_run (Regression)
critical
architect-run.sh:192: The callagent_run "$RESUME_MODE" --worktree "$WORKTREE" "$PROMPT"is broken whenRESUME_MODEis empty — which is the common case (non-questions-phase runs, or questions-phase with no SID_FILE).When
RESUME_MODE="", bash expands this toagent_run "" --worktree .... Insideagent_run(lib/agent-sdk.sh:35), the arg-parse loop iswhile [[ "${1:-}" == --* ]]. An empty string fails that test, so the loop never runs. Thenlocal prompt="${1:-}"captures""as the prompt, and--worktree/$WORKTREE/$PROMPTat positions $2–$4 are silently ignored. Claude is invoked with an empty prompt (-p "") andrun_dir=$(pwd)instead of the worktree.This is a regression: the pre-PR call was
agent_run --worktree "$WORKTREE" "$PROMPT"which worked correctly.Fix: use a bash array instead of a string variable:
Medium Bug: Question Detection Regex Can Never Match
bug
architect-run.sh:162: The grep pattern'"body"[^"]*Q[0-9]+:'cannot match Q-prefixed questions inside JSON-quoted values.For JSON like
{"body":"Q1: What approach..."}, matching proceeds:"body"matches the key,[^"]*matches only the:separator (stops at the opening"of the value), andQ[0-9]+:then needs to match"— it never can. The detection always returns 1, soRESUME_MODEis permanently empty and Bug 1 is hit on every run.Fix: pipe through jq to extract the body text before grepping:
Verdict
REQUEST_CHANGES — Two bugs: empty RESUME_MODE string breaks agent_run on every non-questions-phase run (regression), and the grep regex cannot match Q-patterns inside JSON string values (detection always fails)
Reviewed at
c8f1bc5| AGENTS.mdAI Review: REQUEST_CHANGES — Two bugs: empty RESUME_MODE string breaks agent_run on every non-questions-phase run (regression), and the grep regex cannot match Q-patterns inside JSON string values (detection always fails)
c8f1bc5c6bto25433eaf67AI Re-review (round 2)
Previous Findings
RESUME_ARGS=()array withagent_run "${RESUME_ARGS[@]}". Correct approach.jq -r '.[].body // empty' | grep -qE 'Q[0-9]+:'. Correct.New Issues
architect-run.sh:184:detect_questions_phaseis called a second time in theelifbranch, doubling the API calls (3 curl requests × 2) on the non-questions-phase path. Not a bug — logic is correct — but a simple boolean capture (if detect_questions_phase; then _in_phase=1; fi) would avoid the redundancy. Not blocking.Verdict
APPROVE — Both previous findings fixed: array-based RESUME_ARGS and jq-based comment body extraction
Reviewed at
25433ea| Previous:c8f1bc5| AGENTS.mdAI Re-review (round 2): APPROVE — Both previous findings fixed: array-based RESUME_ARGS and jq-based comment body extraction