Surface Codex final answer candidates in activity#90610
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 2:54 AM ET / 06:54 UTC. Summary PR surface: Source +168, Tests +392. Total +560 across 11 files. Reproducibility: not applicable. as a bug reproduction: this PR adds operator visibility for an upstream lifecycle that is established by source, while its real browser behavior still needs exact-head live proof. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one ephemeral Activity-only candidate lifecycle after regenerating the locale metadata and producing exact-head live proof that late work supersedes earlier candidates, successful completion selects only the authoritative candidate, provisional text never reaches chat or channels, and Activity does not persist across documents. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR adds operator visibility for an upstream lifecycle that is established by source, while its real browser behavior still needs exact-head live proof. Is this the best way to solve the issue? No, not yet; the standalone ephemeral Activity surface is the correct ownership boundary, but the submitted head is incomplete until localization metadata and real-setup proof match the implementation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0097363c69af. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +168, Tests +392. Total +560 across 11 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d0fe9a3 to
cb32edd
Compare
2bf4798 to
3318998
Compare
|
@clawsweeper re-review Rebased onto current |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3318998 to
5ea85bc
Compare
|
@clawsweeper re-review Refreshed the generated Control UI i18n metadata at head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
64c084d to
30ead74
Compare
30ead74 to
b84c05c
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Surface Codex final answer candidates in activity This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
b84c05c to
3b9da62
Compare
Co-authored-by: luyifan <[email protected]>
3b9da62 to
7e6cf8d
Compare
Visual proofSanitized deterministic Control UI fixture. Before — empty Activity
After — superseded and selected candidates
Source-blind Testbox E2E: https://github.com/openclaw/openclaw/actions/runs/29559290067 |
|
Merged via squash.
|
|
Really cool to see this land. Surfacing superseded and selected Codex answer candidates in Activity makes long, tool-using runs much easier to understand without leaking provisional text into chat. Thanks for the review and merge! |


Summary
final_answercandidates as ephemeral Activity events with candidate, superseded, and selected lifecycle states.Why
Codex may emit a final-answer candidate, reopen the same turn for injected work or a tool, then emit a second authoritative candidate. Activity should expose that lifecycle for operators without leaking provisional text into chat or messaging channels.
The implementation follows the upstream Codex contract:
MessagePhase::FinalAnsweris the terminal answer for the current turn, while explicit same-turn work can reopen the turn. The regression fixture covers candidate one, late tool work, candidate two, and authoritativeturn/completedselection. A second regression covers candidate one, late tool work, and no replacement.Behavior proof
Tests
node scripts/run-vitest.mjs extensions/codex/src/app-server/event-projector.test.ts— 166 passednode scripts/run-vitest.mjs ui/src/pages/activity/tool-activity.test.ts ui/src/pages/activity/view.test.ts— 9 passednode --import tsx scripts/control-ui-i18n-verify.ts baselineandverify— passednode scripts/check-changed.mjs -- <changed files>— passed on Testboxgit diff --check origin/main...HEAD— passedNotes
hideFromChannelProgress: true.messagesSnapshotor a persistent store.