Repository navigation
Native chat: remove unused journalCheckpoint and setConversationCommand - #30645
Conversation
- The adapter's optional startAnswered hook lost its only implementer in #27925; it was still forwarded through four layers and always read as answered. A start that never answered is read from the child's phase, as the exit already does. - The saved lease's journalCheckpoint is only ever written as null and read only by validation. Records an older build saved with it still load: it joins the retired lease fields dropped at load, so the next write sheds it. - The record store's setConversationCommand had no production caller. The tests that stood in for an older build with it now seed the saved row and reopen the store; three that only re-pinned another test are removed.
📝 Walkthrough
Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f0b1aae7-8110-4424-b511-f672a5835fd6
📒 Files selected for processing: 25
config/scripts/vitest-sqlite-runtime-files.mjssrc/main/native-chat/agent-session-record-test-fixture.tssrc/main/native-chat/agent-session-wire/structured-agent-session-accept-then-deliver.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-forget-status.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-runtime-state.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-queued-gate.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-queued-messages.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-test-harness.tssrc/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.tssrc/main/native-chat/agent-session-wire/structured-conversation-command.test.tssrc/main/native-chat/agent-session-wire/structured-conversation-compaction.test.tssrc/main/runtime/agent-session-conversation-command-record.tssrc/main/runtime/agent-session-record-founding.tssrc/main/runtime/agent-session-record-rows.tssrc/main/runtime/agent-session-record-store.test.tssrc/main/runtime/agent-session-record-store.tssrc/main/runtime/agent-session-reservation-admission.tssrc/main/runtime/structured-agent-launch-parity.test.tssrc/main/runtime/structured-worker-identity.test.tssrc/shared/agent-session-lease-adjudication.test.tssrc/shared/agent-session-record.test-fixture.tssrc/shared/agent-session-record.tstests/e2e/cross-version-wire/agent-session-handle-replacement-downgrade.unit.test.tstests/e2e/cross-version-wire/cross-version-registered-agents.unit.test.ts
💤 Files with no reviewable changes: 15
- src/main/runtime/structured-agent-launch-parity.test.ts
- src/shared/agent-session-lease-adjudication.test.ts
- src/main/runtime/structured-worker-identity.test.ts
- src/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.ts
- src/main/runtime/agent-session-reservation-admission.ts
- src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-test-harness.ts
- src/main/native-chat/agent-session-record-test-fixture.ts
- src/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.ts
- src/main/runtime/agent-session-record-store.ts
- src/main/native-chat/agent-session-wire/structured-agent-session-host-runtime-state.test.ts
- src/main/native-chat/agent-session-wire/structured-agent-session-forget-status.test.ts
- src/shared/agent-session-record.test-fixture.ts
- src/main/runtime/agent-session-conversation-command-record.ts
- src/main/runtime/agent-session-record-founding.ts
- src/shared/agent-session-record.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
|
Native chat still required a saved checkpoint that no running code used. A chat with only that obsolete value missing or malformed could be set aside as unreadable. This change removes that requirement and the unused generic conversation-command writer. Ordinary chats keep their history and resume/send behavior. The full-path review completed three rounds, architecture and performance reviews, the readiness checklist, and a unanimous three-model KEEP ruling. Fixed in place: restored the overlapping hook removal to leave it with #28046, repaired historical decoder fixtures, and added the SQLite test route. The removed queue and compaction tests duplicate surviving contracts; the two historical command tests now seed disk records and reopen the store. The loader retains every previous non-checkpoint check, strips only explicitly named retired lease fields, and still requires ownership reconciliation. Accepting a malformed retired checkpoint is intended. Old builds reject subsequently saved rows without the checkpoint; saved-data downgrade is unsupported, while mixed client/server contracts remain unchanged. A pre-existing optional fence-floor validation defect is tracked separately in STA-11204. Verified on Deferred QA observations: the existing first-restart session-search introduction appeared; workspace sidebar order changed; Codex's unreported effort label disappeared. Their relevant code is unchanged. Saved options and actual turn contexts show no configured model/effort loss; the precise initial label/sidebar trigger remains unproven. The review found no PR regression behind these observations. Manual QA did not cover malformed rows, legacy command records, Windows/SSH, or mixed peers; those rely on automated contracts and source review. Two early backup/hook configuration hash baselines were incomplete and are recorded in the local QA report. For Brennan's review: Codex on main: Codex after upgrading and resuming: Claude on main: Claude after upgrading and resuming: Human judgment points: |




ELI5
Native chat still carries a saved checkpoint that no running code uses and a method that only tests call. Removing both makes chat storage easier to maintain. Ordinary chats keep their current behavior, and chats saved by older builds still open; a chat previously rejected only because its obsolete checkpoint was missing or malformed can now open normally.
What Changed
journalCheckpointon the saved chat lease: remove the type, validation clause and null writers. The existing load-time cleanup drops this retired field before a later save. Old null or{epoch, sequence}values continue to load, and missing or malformed values no longer make an otherwise readable chat unreadable. All other existing validation stays unchanged.AgentSessionRecordStore.setConversationCommand: remove the unused production method and its writer. The two tests that simulate an older build's/clearor/compactrecord now edit saved data and reopen the store. Three redundant cases that used the setter are removed; live command readers, clear handling and compaction behavior remain in place.The
startAnswereddeclaration, forwarding, teardown predicate and test fixture remain unchanged from the base branch. Its removal is handled by #28046.Why
These two mechanisms look active, so people changing native chat have to determine whether they still matter. The checkpoint has no runtime reader, and every production writer stores null; the command setter has no production callers. Removing the inactive paths avoids carrying misleading contracts forward.
For the saved field, the common pattern is to discard retired data during loading. This extends Orca's existing retired-lease-field cleanup rather than adding a migration or another storage mechanism.
Differences, labelled:
Linked Issue
None (maintenance cleanup). The separate
startAnsweredremoval is handled by #28046.Visual Proof
Real Electron QA on the gate-admitted M4Air passed on
be9be12bcbb0454e3bce48406612a1edac56579f: native Claude and Codex chats created on main retained their history, resumed, recalled their previous markers, and sent normally after upgrading. Chat UI was enabled through Settings on main and retained on the branch; all accepted real turns used managed hooks. Malformed retired checkpoint values are covered by the disk regression test.Codex on main:
Codex after upgrading and resuming:
Claude on main:
Claude after upgrading and resuming:
Testing
agent-session-record-store.test.tschecks old null, object and malformed checkpoint values, readability after reopening, and removal of the retired field on the next write.structured-conversation-command.test.tsandstructured-conversation-compaction.test.tsreopen persisted old-build command records and check that sending and command behavior still work.structured-agent-session-restart-witnesses.test.tsandstructured-agent-session-restart-resume.test.tspassed: 2 files, 43 tests, through the machine queue with the explicit Vitest configuration.Review
Full path: this changes saved chat records and their loading, so it does not qualify for the light path. Three review rounds, the readiness checklist, a unanimous design-panel KEEP ruling, both-agent real Electron QA, and the full PR workflow completed on the final head.
Agent skill upstream boundary
Notes
Security: no new credentials or access paths. Cross-platform and remote SSH: retirement happens on the execution host using the existing loader. Mobile and mixed client/server versions: no wire change. Compatibility: old saved chats remain readable; saved-data downgrade compatibility is unsupported. Performance: no new work added.
Checklist