Fix session reset files and ACPX orphan reaping#82459
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. by source inspection: current main rotates Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land a focused branch that rewrites or drops stale generated reset transcript files, preserves true custom Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main rotates Is this the best way to solve the issue? No, not as-is. The reset and ACPX direction is right, but the branch should handle already-stale generated transcript paths, preserve the session-entry shape contract, and add real reset-flow proof before merge. Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against df0d061c7a9c. Re-review progress:
|
bcabb1a to
9dae606
Compare
2a3560a to
453b08f
Compare
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
* fix gateway reset transcript rotation * fix acpx orphan adapter reaping * add changelog for pr 82459 * fix ci session metadata normalization * preserve canonical session ids in store reads * fix session metadata id normalization
Summary
Fixes #82364
Verification
env CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 node scripts/run-vitest.mjs extensions/acpx/src/process-reaper.test.ts extensions/acpx/src/runtime.test.ts --run --reporter=verbosegit diff --checkcodex review --uncommittedrun_01d90f447321run_0101eefa2e9afor Bug A reset transcript proofrun_12fb81ab2664for Bug B live Codex/auth plus orphan reap proofReal behavior proof
Behavior addressed: Bug A reset transcript rotation and Bug B ACPX/Codex orphan process cleanup for #82364.
Real environment tested: Raw AWS Crabbox Linux leases with Node v22.22.2 and pnpm 11.1.0 installed directly on the lease; Bug B used a real
OPENAI_API_KEYforwarded through Crabbox env-profile redaction.Exact steps or command run after this patch: Bug A ran the focused gateway reset regression for
sessions.reset rotates generated topic transcript files with the new session id. Bug B ranacpx codex execwithOPENAI_API_KEYandACPX_AUTH_OPENAI_API_KEY, then started the real plugin-local@zed-industries/codex-acplauncher/platform binary, forced the platform adapter into the observed PID 1 orphan shape, and invokedreapStaleOpenClawOwnedAcpxOrphans.Evidence after fix: Bug A Crabbox run
run_0101eefa2e9apassed the reset regression. Bug B Crabbox runrun_12fb81ab2664observed live Codex outputOPENCLAW_BUG_B_LIVE_OK, then observed orphan candidate{"pid":3640,"ppid":1,"command":"$PWD/node_modules/@zed-industries/codex-acp-linux-x64/bin/codex-acp"}and reaper result{"inspectedPids":[3490,3640],"terminatedPids":[3490,3640]}.Observed result after fix: Bug A persisted a reset topic session with a new session id and matching topic transcript filename; Bug B ended with
remaining targeted processes after reap: []andBUG_B_LIVE_REPRO_PROOF_OK.What was not tested: This did not replay the original Telegram production incident end-to-end; Bug B proves live Codex auth plus the orphaned ACP adapter cleanup path rather than the exact original failed-initialize timing.