Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Wire native detached Auto Review runtime #56

Closed

Description

@shiny-code-bot

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-server review/start detached 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::AutoReviewStore from the active codex_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 ReviewOutputEvent is 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/start can persist a native AutoReviewRun using codex-auto-review storage.
  • Inline /review behavior 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/Failed records 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

  1. added a commit that references this issue on Jun 13, 2026
  2. shiny-code-bot commented on Jun 13, 2026

    @shiny-code-bot
    CollaboratorAuthor

    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.

  3. added
    plan:donePlan completed or superseded
    and removed
    plan:activePlan is actionable now
    on Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    planDurable planning issueplan:donePlan completed or superseded

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions