Repository navigation
fix(chat): restore upstream recovery and reconcile Codex sends - #18
Conversation
|
Independent code review completed for commit The review reproduced three findings, all fixed and independently closed:
The existing final-process-read guard tests also caught a regression from receipt lookup. Revalidation now runs after every Codex lookup, even when no anchor is captured; Enter stays withheld when a shell replaces Codex. The guard fixture now stubs store discovery and drains receipt jobs before replacing its RPC spies. Independent closure passed 46 isolated tests: nine reconciliation, 24 agent-only guards and 13 native-file matching tests. Final fast/integration results are recorded in the PR Validation section. No review finding remains unresolved. Native records still provide no Ovis submission ID; the documented independent-identical-input limitation remains, and known ambiguity retains the original warning. |
|
Merge review: CodeRabbit did not run on this fork PR. The independent code-review agent review recorded above stands in for it; all product findings were fixed and closed. A final read-only review of commit Validation after the selector fix: |
## Change After Codex accepts a follow-up sent with **Send now**, Ovis can show the message in Chat and leave the queued copy marked **Not confirmed**. Clear the copy when Codex shows the newly accepted message above its working status. If the terminal check times out, look for a completed user item in the bound Codex transcript. Ovis clears the copy when one new item matches one tracked send and the same Codex process still owns the pane. If the evidence is missing or ambiguous, Ovis keeps the copy. Confirming delivery sends no additional terminal input. This adapts the fix from the MIT-licensed Ovis fork. [Terminal check](christso#61) · [Receipt tracking](christso#18) · [Completed user events](christso#62) Fixes #4465 ## Validation - Reproduced the duplicate with real Codex 0.171.0 on upstream `main` at `e16802a2`. Codex recorded one user message, and Ovis kept one **Not confirmed** copy. [Reproduction and recordings](#4465) - The contract regression checks that a late completed user item clears the copy without sending any more input. Unit tests cover matching text from another send, a process replacement during reconciliation, and a send refused before input. - `bun run typecheck` passed. - All 130 tests in `server/pending-input.contract.test.ts` passed in an isolated Herdr session. - 145 tests passed across `server/codex-delivery.test.ts`, `server/codex-steering.test.ts`, `server/core/codex-reconciliation.test.ts` and `server/pending-input.test.ts`. - 98 tests passed across `server/core/pending.test.ts`, `server/core/pending-agy-send-now.test.ts` and `scripts/changelog-fold.test.ts`. - 285 tests passed across `server/codex-live-rendered.test.ts` and `server/codex-processes.test.ts`. All 25 tests in `server/conventions.test.ts` also passed. - Full integration, browser and native platform suites were skipped locally. --------- Co-authored-by: devswha <[email protected]>
Change
Restore upstream’s original saved-message bubble, “Not confirmed. Check the terminal before sending again.” wording, and Copy/Discard controls.
PendingMessages.tsx, its stylesheet and component tests match upstream exactly. Remove the fork’s raised/compact recovery controls and browser transcript matcher.A Codex Send now can reach the agent even when its immediate-interruption check times out. The backend now captures the bound rollout’s session, file identity, append boundary and server-side send time, then clears the saved warning when a unique new canonical native user record matches that send. It uses the existing
consumedreceipt, including browser/device-scoped recovery after reconnect, so confirmation creates no temporary duplicate bubble and sends no input. Later held messages stay held.Queued and ordinary Chat sends, terminal input-line submissions, and Enter writes with lost replies reserve their possible echoes. Repeated or competing matches, session/file replacement, missing bindings, unsupported record formats and exhausted evidence keep the original warning. Failed reads, missing placement and transient null rollout results get at most three fresh probes. Native confirmation proves delivery, not immediate interruption. Codex exposes no Ovis submission ID, so identical input entered independently in the same native session after capture remains a documented attribution limit.
This keeps upstream Ovis’s recovery UI and extends its existing Pi native-receipt pattern. It follows Claude Code’s explicit queued-input controls without adding another recovery interaction.
Related: #16, #17.
Validation
bun run check fast: passed: 10,644 tests, zero failures, 41 repository skips; typecheck, build, workflow and generated-file checks passed.bun run check run bun test server/pending-input.contract.test.ts: 123 passed on the final product source, including real watcher reconciliation, relayed native confirmation, device/browser isolation, reconnect, interruption guards and no input replay.bun scripts/terminal-autoswitch-demo-regression.ts: passed desktop/phone, light/dark and terminal-return cases.bun scripts/sent-waiting-browser-qa.ts: both desktop/phone cases passed.ui-regression.tsandcomposer-fit-demo-regression.tsscripts passed in an isolatedcheck run;bun run check run bun scripts/pending-pane-switch-regression.tsalso passed. Four exact selectors now use upstream’s “Discard saved copy” label; independent review found no weakened assertions.07b134b4passed all required checks: Fast checks, Integration and browser (both browser lanes and integration tests), and Native Windows install. Native macOS identity, Windows mirrored terminal, Rust PTY, live contract, SSH and bundle jobs also passed. Release was intentionally skipped.machines-browser-qa.ts, and the authenticated live example. Direct auxiliary-script attempts lacked their parent fixtures and were not valid product checks. Tests used isolated herdr sessions or temporary/mock fixtures, never the user’s live pane.ghhas no attachment-upload option; the demo runner generated local screenshots.