Repository navigation
Conversation
Co-Authored-By: Forge <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 9:39 PM ET / August 26, 2026, 01:39 UTC. ClawSweeper reviewWhat this changesThe branch makes SQLite transcript byte preflight use the post-reset or post-compaction replay window and lets locked Codex sessions continue compaction after an automatic-compaction ownership response. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 9 items remain Keep this draft PR open for now, but block merge: it uses a public harness-result string to escape a model-locked compaction path, while current main has later, safer implementations of both central behaviors. The branch also lacks required real behavior proof. Priority: P1 Review scores
Verification
How this fits togetherSQLite retains full agent transcripts for history, while the agent runner derives a replay window to decide whether compaction is needed before model dispatch. That preflight may invoke the native Codex harness or the context engine. flowchart LR
A[Durable SQLite transcript] --> B[Replay-window boundary]
B --> C[Byte preflight]
C --> D{Compaction needed}
D -->|No| E[Model dispatch]
D -->|Yes| F[Native harness]
F --> G[Context engine]
G --> E
Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch lets a public harness result cross a persisted model-selection lock before the provider-side compaction effect. PR surfaceSource +148, Tests +204. Total +352 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main’s replay-window owner and private registered native-compaction capability, then prove that only registered Codex capability can cross the locked preflight boundary. Do we have a high-confidence way to reproduce the issue? Yes, from source: a generic locked harness can return the matching public reason and reach context-engine compaction through the changed fallback branch. Is this the best way to solve the issue? No. Current main uses a private registered native capability for this escape hatch, which preserves the lock boundary without trusting a public result string. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9c30c920feec. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Related: #115904, #115912.
What Problem This Solves
Fixes an issue where users of long-lived SQLite-backed Codex sessions could receive a fatal preflight compaction error on the first ordinary message after
/new. The reset created a small logical context but retained the physical transcript for history, so the byte guard could measure megabytes of pre-reset history and invoke a native compaction path that intentionally hands automatic compaction back to Codex.Why This Change Was Made
The SQLite byte guard now measures the replay window defined by the latest reset or compaction boundary while preserving every durable transcript event. When a model-locked Codex runtime returns its automatic-compaction ownership result for a genuinely oversized current replay window, required byte preflight falls through to semantic compaction and then the guarded
thread/compact/startnative handoff.This is a focused current-
mainintegration of the replay-window accounting shape in #115912 with the locked-Codex preflight path that the earlier candidate does not cover.User Impact
After
/new, the next ordinary message can reach model dispatch even when the retained physical transcript exceedsmaxActiveTranscriptBytes. Genuinely oversized current Codex windows still take the bounded semantic-plus-native compaction path instead of treating expected ownership as a fatal error. No transcript rows are deleted or rewritten by this fix.Evidence
Validated at exact head
805c66e8732b24b5eae4e68eef63cb83e020478c:corepack pnpm exec vitest run src/config/sessions/session-accessor.sqlite-active-events.test.ts src/auto-reply/reply/agent-runner-memory.test.ts src/agents/embedded-agent-runner/compact-reasons.test.ts src/agents/embedded-agent-runner/compact.hooks.test.ts— 344 passed.after_context_enginenative handoff.corepack pnpm exec oxlint --type-aware --deny-warnings <12 changed files>— passed.corepack pnpm exec oxfmt --check <12 changed files>— passed.node scripts/check-kysely-guardrails.mjs— passed.corepack pnpm build— passed.git diff --check— passed before commit.AI-assisted: Forge implemented and validated this change from a deterministic production RCA. Independent live Discord verification remains intentionally separate.