Repository navigation
fix(sidebar): keep proving a Codex finish its task_complete dated again - #2136
Conversation
Part of #1430 (accuracy follow-ups from #1342): item 4. Codex dates the last assistant turn again when its task_complete lands (server/codex.ts sets end_ts), and the answer fingerprint the DONE dot is proved with includes that time. When the chat read finish N once before the pane counted as presented (scrolled away, covered, a retained hidden renderer) and task_complete then moved end_ts, every later read of the same finish compared the whole fingerprint and was refused, so the dot stayed until the next finish. `ConversationFinishEvidence.accept` now treats the same finish's answer as unchanged when only its completion time moved (same source, history, turn start and final text), as the next-finish comparison already did. A different answer for the same finish is still refused.
…art time
Review of the previous commit (Codex MEDIUM, omo LOW): a turn with no
start time (ts: null, as OpenCode writes when time.created is missing)
fingerprints as source, history and text alone, so an older reply with
the same text ("Done") could prove the current finish. The same-finish
relaxation now needs the final answer's native start time; otherwise
only an exact fingerprint match proves it, as before.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging bbe4100: omo-native-code-reviewer and Codex both pass this head (LOW notes only), and the required checks are green. Fast checks first failed on a timing assertion in |
Change
Part of #1430 (DONE dot accuracy follow-ups from #1342): fixes item 4, and maps every other item to where main already stands.
Codex dates the last assistant turn again when its
task_completelands (server/codex.tssetsend_ts), and the answer fingerprint the DONE dot is proved with includes that time. If the chat read finish N once before the pane counted as presented (scrolled away from the end, covered by a sheet, a retained hidden renderer) andtask_completethen movedend_ts, every later read of the same finish compared the whole fingerprint and was refused. The dot stayed until the next finish.src/lib/panePresentation.tsConversationFinishEvidence.accept: for the same finish id, an answer whose proof identity (source, history, turn start and final text) equals the known answer still proves the finish when only its completion time moved, provided the turn has a native start time. The next-finish comparison already ignored the time this way. Without a start time (ts: null, e.g. OpenCode withouttime.created) two replies with the same text are indistinguishable, so only an exact match counts there, as before. A different answer for the same finish is still refused.src/lib/panePresentation.test.ts: a Codex answer accepted atend_ts00:00:05 and read again at 00:00:06 is still accepted for finish 3, and another answer is not; withts: null, an older reply with the same text is not taken for the current finish.changelog.d/done-dot-codex-late-completion.md.Where the rest of #1430 stands on main
output-recoveringframe)ChatView.tsx)Still open from the smaller notes (filed as a follow-up, not changed here):
Finishes.status()stats the herdr socket on every status frame;clientSnapshot()reads again without a bound when the epoch changes mid-read; the phone's masked password field hides during recovery; no browser regression for the masked-prompt detection during recovery.Verification
bun test src/lib/panePresentation.test.ts: the new case fails with onlypanePresentation.tsat main ("Expected: true, Received: false" on the second read) and passes with the change.src/lib/panePresentation.test.ts,src/lib/sidebarActivity.hook.test.ts,src/lib/seenFinishes.test.ts: 74 pass, 0 fail.ts: nullcase fails on the first commit's implementation (21 pass, 1 fail) and passes on the second.src/lib/panePresentation.test.ts,src/lib/sidebarActivity.hook.test.ts,src/lib/seenFinishes.test.tsat the head: 75 pass, 0 fail.dori heavy … bun run check run --build bun scripts/sidebar-activity-demo-regression.ts: 44 PASS, exit 0.bun run check fast: workflow syntax, generated files, typecheck, build ok; unit tests 7,874 pass, 0 fail at the head (bbe4100).Reviews
ts: null) is fixed in the second commit; LOW-2 (the remembered answer keeps the pre-task_completefingerprint) was checked to leave the next finish correct; LOW-3 is style.ts: nullcase, reproduced); PASS on the second commit.