Repository navigation
fix: rebuild bounced versions with recorded feedback answers - #472
Conversation
Co-Authored-By: Naru <342599188+fj-naru[bot]@users.noreply.github.com>
Share feedback reference validation across checks and writers, and route open bounce findings to agent rebuild moves. Co-Authored-By: Naru <342599188+fj-naru[bot]@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d5fa1f34e
ℹ️ 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".
| for (const [kind, refs] of groups) { | ||
| const field = `versions[n=${n}]`; | ||
| addAwait(field); | ||
| const writer = kind === 'rig' ? `rig-version ${n}` : `direction write ${n}`; |
There was a problem hiding this comment.
Account for earlier acceptance before recommending a direction rebuild
When a human accepts a direction version and subsequently bounces it, this branch recommends direction write as the sole next move, but that writer immediately refuses with DIRECTION_REVIEW_CLOSED: openReview() in src/direction-writers.ts:24–26 treats any live historical acceptance as closing authoring, even when followed by a bounce. This is precisely the accepted-then-bounced scenario covered by the changed test in tests/next.test.ts, but that test never executes the recommended rebuild. Either make the writer recognize the withdrawn acceptance or surface the required reopen before recommending the rebuild; otherwise the advertised recovery path cannot proceed.
Useful? React with 👍 / 👎.
| command: `rig-create ${writer} ${inputs} ${refs.map(r => `--answers ${r.version}:${r.verdict}`).join(' ')}`, | ||
| act: `build the next ${kind} version with ${writer}, recording answers_feedback ${JSON.stringify(refs)}` }); | ||
| } | ||
| if (moves.length > 0) return { schema: NEXT_SCHEMA, project_id: String(project.name ?? ''), stage, effective_stage: effectiveStage, accepted: false, refusals, awaits: awaitsList, moves }; |
There was a problem hiding this comment.
Preserve the human resume move for paused projects
If a human pauses a project after bouncing its latest rig or direction version, the bounce still produces FEEDBACK_OPEN, so this early return emits only an agent rebuild and skips the existing stage === PAUSED_STAGE branch that requests a human resume. Consequently, next instructs the agent to continue building while the project is explicitly paused and no longer exposes the act needed to restart work. Handle paused projects before returning feedback rebuild moves, or exclude them from this branch until the human resumes.
Useful? React with 👍 / 👎.
Claude review (cross-family)Reviewer: Claude (create tower). Read at head Verdict: approve. The change follows the issue as corrected by its comment.
Findings:
No other findings. The tower runs the page route (bounce through the Review page, ingest, |
After a human bounce,
nextnow names the agent rebuild and the feedback references it must answer.rig-version,direction write, anddirection patchaccept repeatable--answers <version>:<verdict>and validate before writing through the shared feedback validator. Historical records andreview --answers-feedbackretain their earlier target rules.Synthetic tests cover complete rig and direction rebuild loops, missing answers, six invalid-reference cases with byte-identical refusal controls, and unchanged no-bounce records and output compared against main. No contract dates or stage behavior changed.
Validation:
Closes #454