Repository navigation
Wire native detached Auto Review runtime #56
Description
Current Status
State: Ready to implement, with scope narrowed after agent review and old Auto Review friction review.
#55 is complete via PR #60, so native Auto Review now has codex-auto-review storage for run records, finding records, freshness classification, bounded summaries/details, schema validation, and safe IDs.
This issue is now the native runtime proof only: explicit detached /review should run through existing Codex review machinery and persist its structured result to codex-auto-review. Do not include background scheduling, app-server read APIs, TUI surfacing, Code Bridge, or model-context injection in this slice.
Implementation direction:
- Reuse existing
ReviewTask,ReviewTarget,ReviewOutputEvent, and app-serverreview/startdetached behavior wherever possible. - Add only the minimal option/metadata path needed for core to know a review is a manual detached review whose output should be persisted.
- Construct
codex_auto_review::AutoReviewStorefrom the activecodex_home; avoid a broad new service unless the call path proves it is necessary. - Capture branch, head SHA, base SHA when available, and worktree path at launch so freshness does not depend on parsing review prompt text.
- Persist after a structured
ReviewOutputEventis available; persist cancellation/failure if the runtime has a clear terminal status. - Treat storage failures as non-fatal diagnostics, not review-turn failures.
- Keep the parent/active thread clean. Existing review-thread rollout entries may remain in the detached review thread; do not write review chatter back into the parent thread.
Agent review consensus:
- The first PR should wire manual detached persistence, not automation.
- Background triggers/debounce/cancellation are product orchestration and need a separate issue because old Auto Review friction came mostly from automation timing, stale state, noise, and responsiveness.
- Use Codex-native thread/review/app-server primitives and small protocol deltas; do not copy Every Code plugin systems.
Finish Line
Native Codex can run an explicit detached review, persist its structured terminal result as an Auto Review artifact, classify the run with launch-time git/worktree metadata, and leave the active parent thread clean.
Acceptance Criteria
- Explicit detached
review/startcan persist a nativeAutoReviewRunusingcodex-auto-reviewstorage. - Inline
/reviewbehavior remains unchanged unless explicitly opted into persistence by the native runtime path. - Persisted runs include manual source, review target, model when available, branch, head SHA, base SHA when available, worktree path, started/completed timestamps, terminal status, and stable finding IDs.
- Reviewer success stores structured findings from
ReviewOutputEvent; malformed or fallback review output remains bounded and does not crash the active session. - Cancellation/failure paths either store
Cancelled/Failedrecords or intentionally skip incomplete records with tests documenting the chosen behavior. - Storage write failure is logged/diagnosed and does not fail the review turn.
- Detached review chatter does not enter the parent/active thread history or event stream.
- Existing native review tests remain green, with focused core/app-server coverage for detached persistence and parent-thread isolation.
- No background trigger, debounce scheduler, TUI/app-server read API, Code Bridge wiring, or model-context injection is added in this issue.
Relationships
Child of #53. Follows #55. Blocks Auto Review surfacing work in #57 and the background trigger/debounce follow-up. Related to #35 and #54.
Activity
Merge pull request #63 from cbusillo/code/native-detached-auto-review…
shiny-code-bot commentedon Jun 13, 2026
Completed by PR #63, merged as 1f63b5b.\n\nWhat landed:\n- Explicit detached app-server review/start runs now persist native codex-auto-review sidecars.\n- Inline/default review remains sidecar-free.\n- Completed, failed/no-output, and interrupted/cancelled terminal paths are covered.\n- Persisted runs include manual source, target/git/worktree metadata, timing/status, model when available, and stable findings from ReviewOutputEvent.\n- Storage errors are non-fatal diagnostics.\n- Commit-target freshness now matches by commit SHA so reopened/renamed checkout metadata does not make saved findings disappear.\n\nValidation:\n- just fmt\n- just test -p codex-auto-review\n- just test -p codex-core review\n- just test -p codex-app-server review\n- just fix -p codex-auto-review -p codex-core -p codex-app-server\n- git diff --check\n- PR #63 CI all terminal and green, with CLA skipped\n\nAgent review before merge:\n- Context review: no findings\n- Breaking-change review: no findings\n- Change-size review: no blockers\n- Testing review found missing cancelled-run coverage; fixed and re-reviewed clean.