Repository navigation
fix: finish accepted ACP replay writes during shutdown - #176015
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Exact reviewed head: 95a4cf9. Full two-file/seven-dataset independent review scoped-clean P0-P2/0.98, final source verification successful. Only a mechanical callback-binding rename followed review to fix no-shadow; final signed production10154fd513e35765a92eb6544ac28597cfb5aac3 and test0106b206fbe0918e6e427535a2c887c4b069944d blobs verified. Baseline two intended regression failures plus three retained passes became five focused passes. Current corrected lint, formatting/whitespace and14-test suppression guard passed. Local36 known dependency diagnostics are disclosed, not called a type pass. Exact-head CI39091064058 completed SUCCESS. Every filter=all check run enumerated: selected runtime and changed-boundary suites, production/test types, lint, architecture/source contracts and browser suites succeeded. All three commit statuses succeeded. The cancelled auxiliary PR-context run117567637421 is superseded by successful same-head117567734198; it is not a missing runtime suite. No actual failed or unfinished check. Reviews and inline findings empty; exact head unchanged and MERGEABLE. No rerun, rebase, confirmation push or inherited-red exception. Using coordinator-authorized Ending10 exact-SHA guarded squash fallback after the recorded twice-failed native startup infrastructure route. Shared dependencies/native locks untouched. This bypasses broken tooling, not CI/review gates. Two net production lines removed,54 test lines added. Admission still closes at stop; accepted replay writes and failure markers finish before existing shutdown closes storage. No SQLite persistence/reopen or live-client claim; owner-level held-I/O proof and hosted CI cover the repair. Phase E standalone session-memory surfaces untouched. |
What Problem This Solves
Fixes: ordinary ACP shutdown can silently discard already-admitted replay updates and leave truncated replay marked complete.
User Impact
Updates accepted before shutdown now finish recording in order before shutdown completes. If an admitted write fails during the drain, replay is marked incomplete so a later session load can use its existing transcript fallback. New work remains blocked after shutdown starts.
Why This Change Was Made
Check stopped state once when a ledger mutation is admitted, not again after it has waited behind earlier storage I/O. The existing stop owner already joins those accepted writes before database/transport teardown. Its private incomplete-marker is only called by an admitted mutation's failure handler, so it must also finish during that drain.
Two net production lines removed (+4/-6),54 test lines added. One existing owner-boundary table holds external ledger I/O to cover successful and failed first writes while a second accepted update waits. No new helper, exported seam, scheduler or custody state. No persisted schema, SQLite durability setting, retention, permission, protocol, config or dependency change.
Best-effort tradeoffs accepted
Evidence
Release-note context: finish already-accepted ACP replay writes and their failure markers during normal shutdown instead of retaining incomplete history as complete.