[codex] Branch 9O Commander result review gate#104
Conversation
|
@codex review the Branch 9O Commander result review gate |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e96ded6a23
ℹ️ 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".
| "result-review-preview", | ||
| "opencode-result-review-dry-run", | ||
| "result-review-dry-run", | ||
| "opencode-result-review", | ||
| "result-review", |
There was a problem hiding this comment.
Add no-start coverage for short review aliases
These new short aliases are whitelisted, but the headless no-start detector in agentcore/tui/src/launch.ts only recognizes /opencode-result-review*, /result-review-packet, and /result-review-summary. When a local/E2E script uses /result-review-preview, /result-review-dry-run, or /result-review as the documented alias for metadata-only inspection/write flows, buildHeadlessSnapshot takes the normal pre-command refresh path and the real client can auto-start the runtime before running a no-start result-review command, which violates the documented result-review metadata no-start behavior and can fail or launch unexpectedly in status-only contexts.
Useful? React with 👍 / 👎.
|
@codex review the Branch 9O Commander result review gate |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d038048ad5
ℹ️ 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".
| return this.opencodeResultReviews | ||
| .filter((item) => !reportId || item.report_id === reportId) | ||
| .filter((item) => !sessionId || item.session_id === sessionId) | ||
| .filter((item) => !launchId || item.launch_id === launchId) | ||
| .filter((item) => !decision || item.decision === decision) |
There was a problem hiding this comment.
Honor all result-review list filters in fake runtime
When the TUI is backed by FakeRuntimeClient, /opencode-result-reviews disposition=..., projection=..., or next_step=... accepts those filters in the command parser but this projection only applies report, session, launch, and decision. In fake/headless runs, filtered review lists can therefore show records that do not match the requested disposition/projection/next step, unlike the real runtime path.
Useful? React with 👍 / 👎.
|
@codex review the Branch 9O Commander result review gate |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91ce403341
ℹ️ 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".
| || trimmed.startsWith("/result-review-dry-run") | ||
| || trimmed.startsWith("/result-reviews") | ||
| || trimmed.startsWith("/result-review-latest") | ||
| || trimmed.startsWith("/result-review-show") |
There was a problem hiding this comment.
Wire the short review-show alias before marking it no-start
When a headless script uses /result-review-show, this no-start detector classifies it as a read-only inspection command, but the alias is not registered in keyboard.ts's runtimeCommands or dispatched in runtime-effects.ts (only /opencode-result-review-show is). In that scenario the parser falls through to treating /result-review-show ... as a user message instead of calling runtime.get_opencode_result_review, which can start/submit work rather than perform the intended read-only review lookup.
Useful? React with 👍 / 👎.
|
@codex review the Branch 9O Commander result review gate |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bb2f84e4d
ℹ️ 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".
| const opencodeResultReviewGateCommands = new Set([ | ||
| "opencode-result-review-preview", |
There was a problem hiding this comment.
Route gate command failures to result-review state
These new gate commands are added to a separate set, but the error catch path still only calls isOpenCodeResultReviewEffect, which checks the old packet command/effect set and records failures on the legacy opencodeResultReview/generic runtime error state. When a user mistypes args such as /result-reviews limit=abc or the runtime throws while handling /opencode-result-review, opencodeResultReviews.commandError is never populated, so the new result-review panel does not surface or clear the failure consistently with the command.
Useful? React with 👍 / 👎.
|
@codex review the Branch 9O Commander result review gate |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19892dad78
ℹ️ 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".
| const raw = optional(value) | ||
| if (!raw) return fallback | ||
| if (["none", "prepare_research_ingestion", "request_revision", "request_followup", "ask_commander_question", "escalate_to_human", "inspect_artifacts", "inspect_tests"].includes(raw)) return raw as OpenCodeResultReviewNextStep | ||
| return "unknown" |
There was a problem hiding this comment.
Reject invalid result-review next steps
When an operator supplies an unsupported next_step on /opencode-result-review (for example a typo like next_step=prepare-research-ingest), this returns unknown and buildPreview does not add any blocker, so a non-dry review can be durably recorded with next_step=unknown. That silently drops the expected recommendation for cases like decision=accepted and makes list/summary filtering by next step inaccurate; invalid explicit next steps should fail closed, with the default used only when the field is omitted.
Useful? React with 👍 / 👎.
|
@codex review the Branch 9O Commander result review gate |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
result-review-packet-summary/runtime.opencode_result_review_packet_summaryso/opencode-result-review*owns the new 9O gate./result-review-*aliases, fake-runtime list filtering for disposition/projection/next-step filters,/result-review-showalias authority/runtime wiring, 9O gate-specific command-error routing, and fail-closed validation for invalid explicitnext_stepvalues.Result review model
OpenCodeResultReviewDecision,OpenCodeResultReviewDisposition,OpenCodeResultReviewNextStep, andOpenCodeResultReviewProjectionStatetypes.opencode_result_review_recordedevent per successful non-dry review.Decision/disposition/projection behavior
acceptedmaps toaccepted_as_evidence,reviewed_accepted, andprepare_research_ingestionas a recommendation only.rejectedmaps torejected_as_evidenceandreviewed_rejectedwithout failing the mission.needs_revision,needs_followup,inconclusive,needs_human_review, anddeferredmap to their bounded review dispositions and projection states.next_stepvalues fail closed; defaults are used only whennext_stepis omitted.Relationship to 9N result reports
report_id; validates the linked planned session and launch.Launch/result/evidence anchoring behavior
session_id,launch_id, and linked progress/watchdog/question/guidance/delivery/wake IDs.Preview/dry-run/record/list/latest/summary behavior
runtime.preview_opencode_result_reviewvalidates eligibility and returns the bounded would-be record.runtime.record_opencode_result_reviewdry-run appends no events; non-dry appends one review event through the metadata write path/run lock.list/get/latest/summaryrebuild from durable events and are no-start read surfaces.Duplicate behavior
Event persistence/redaction behavior
Fake-vs-real runtime behavior
Runtime commands/API surface
runtime.preview_opencode_result_reviewruntime.record_opencode_result_reviewruntime.list_opencode_result_reviewsruntime.get_opencode_result_reviewruntime.latest_opencode_result_reviewruntime.opencode_result_review_summaryTUI result-review surface
/opencode-result-review-preview,/opencode-result-review-dry-run,/opencode-result-review,/opencode-result-reviews,/opencode-result-review-latest,/opencode-result-review-show,/opencode-result-review-summaryplus aliases.opencodeResultReviews.commandErrorinstead of the legacy packet state.No-mission-completion guarantee
mission_mutated=falseis persisted and rendered.No-researchdb-ingestion guarantee
research_db_written=falseis persisted and rendered.No-checkpoint/follow-up-mission guarantee
checkpoint_created=falseandfollowup_mission_created=falseare persisted and rendered.No-provider/no-OpenCode-prompt/no-process-control guarantees
provider_called=falseis persisted and rendered.Authority registry update
safe_readand non-dry review as metadata write./result-review-show, in the registry/whitelist consistency check.Targeted validation output
Full regression status
Secret/redaction behavior
Explicit out-of-scope list
Notes about Branch 9P research.db ingestion / research promotion gate