Repository navigation
fix(server): publish ACP replay status before responses - #468
Conversation
|
What The background focused adapter invocation also passed all 186 tests across 3 files. Exact unchanged PR head: Command: Result: exit 0, 3 files passed, 186 tests passed, 198.04 seconds. Both focused invocations are now complete, totaling 372 passing test executions. This supplements the before/after stress proof already linked in the PR; no source change or additional review action. |
|
Luna review round 1 at 7158b8c: APPROVE No blocking or non-blocking findings. Verified the exact head against #244: status is written to a same-directory temporary file and renamed atomically; progress, including an immediately trailing clean runtime exit, is published before the inbound response is sent; strict decoding remains unchanged. The recorded before/after stress probe exercises concurrent reads and response-driven teardown and distinguishes the baseline failures from the fixed result. The upstream-first search is recorded, and the carried fixture has both fork feature registration and allowlist entry. No unrelated changes, version bump, or secrets found. Focused tests and current CI checks are green. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
7158b8c to
056fc3f
Compare
|
What Rebased PR #468 onto fetched Old head:
Replay script is byte-for-byte identical to the previously approved head: both Git blobs are
1: 7158b8c394 ! 1: 056fc3feed fix(server): publish ACP replay status before responses
@@ docs/fork-features.md: only when that file set changes; this is not an exhaustiv
"apps/server/src/device/LocalDeviceHost.test.ts",
## scripts/fork-upstream-edits.txt ##
-@@ scripts/fork-upstream-edits.txt: apps/server/src/htmlRender/publicProxy.ts
+@@ scripts/fork-upstream-edits.txt: packages/shared/src/composerContextLegacy.ts
- # Public research rendering reuses the pinned browser/context owner (#442)
- apps/server/src/preview/ServerBrowserContexts.ts
+ # Launcher test fixture ownership (#157)
+ apps/server/src/serviceLauncher.test.ts
+
+# Atomic ACP replay status publication before response-driven teardown (#244)
+apps/server/scripts/acp-replay-agent.tsOnly the allowlist hunk context changes, moving the #244 addition after main's newly added launcher entry. The implementation and registry additions are unchanged. Proof:
Requirements and who asked: Coordinator requested rebase, preservation of both registries, one focused test run, fork-stack check, explicit force-with-lease and range-diff proof. Pushed with |
|
Luna review round 2 at 056fc3f: APPROVE |
What ACP replay status is published atomically before responses allow the test to tear down its agent.
Why In-place writes and send-before-write ordering expose partial JSON or stale progress to concurrent readers and process teardown.
So what Luna review and CI, then the backlog coordinator merges.
The fixture writes status to a process-specific temp file beside the destination, then synchronously renames it. It constructs inbound frames, commits progress, then sends them; immediately following successful/cancelled runtime exits count in the same publication. The strict testkit decoder is unchanged. The carried upstream fixture is registered under fork maintenance.
Upstream-first: current
pingdotgg/t3codemaineb7b35ac32fb184ec6c8e6e9f84c7ecbba968f4aretains the same broken fixture. Read the complete diff of upstream #20113, closed unmerged at2dfba44a6dc6bbd38051d3eb67430d801740c9ec; this PR ports its response/clean-exit ordering and adds atomic rename. Bounded upstream PR/Issue searches and exact source comparison are recorded on #244.Proof on Linux / Node v26.8.2 (the available runtime; root requests Node 24):
node probe.mjs <agent.ts> 40runs 40 trials for each combination of SIGTERM/SIGKILL and native/1 MiB scenario labels, alternating six-entry mode exchanges and trailing clean exits. It reads concurrently, kills its own child on the final response, awaits exit, then strictly checks the actual status../node_modules/.bin/vp lint apps/server/scripts/acp-replay-agent.ts: pass../node_modules/.bin/vp fmt --check apps/server/scripts/acp-replay-agent.ts docs/fork-features.md: pass../node_modules/.bin/tsc-rs --noEmit --target esnext --module nodenext --types node --skipLibCheck --strict apps/server/scripts/acp-replay-agent.ts: pass.bash scripts/fork-check.sh: pass on the committed head, including carried-file allowlist and unique ownership.git diff --check: pass../node_modules/.bin/vp test run apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts apps/server/src/orchestration-v2/Adapters/GrokAdapterV2.test.ts: 3 files passed, 186 tests passed (258.31 s).Only test infrastructure and its required fork registration change. No user-facing surface, contract, production path, website, version, release or deployment changes. No review requested or run by this implementation task. Full CI and independent Luna review remain with the backlog coordinator.
Requirements and who asked: User requests #244's atomic fixture status, publication completed before teardown-permitting responses, strict decoding, and before/after stress proof.
Deleted: Decoder retries, sleeps, production changes, new tracked probe machinery and version bumps.
Bottleneck: Readers and response-driven teardown can interrupt status publication and make unrelated CI fail.
Checked myself: Complete Issue/comments, origin/main reproduction, upstream main/source and complete #20113 diff, actual before/after stress artifacts, scoped static checks and committed fork-stack gate.
Closes #244
Implemented by GPT-6.1 Sol (medium) in the Codex harness through T3 Code.