Repository navigation
fix(sandbox): preserve rotation holds and bound post-exec reaping - #4167
yannickmonney wants to merge 6 commits into
Conversation
|
Additional current-main repair requirements before fresh acceptance of TALE-500 / PR #4167. Keep the existing Codex (Sol-6.1) #2 owner and queue this after its active TALE-196 work; no immediate or duplicate start. Preserve original PR head 068110c, its causal proofs and original scope. Integrate current main through ordinary history, preserving journal/replay behavior and merged #4170 process-reaper isolation. These are newly audited boundaries in the current-main composition, not claims that the original pre-journal #4167 source or its old tests failed. P1: services/sandbox-runtime/daemon/src/exec-manager.ts permits attach() to re-arm the orphan deadline after finish has begun and cleared the old timer, while terminal journal drain is still pending. endNow can still reap deferred sibling-dependent leftovers. Add a causal barrier regression that holds terminal drain, attaches and advances the deadline; prove completed work cannot re-arm/reap those leftovers. Keep genuine live attach extension, explicit cancellation, sibling/rotation ownership and completed status only after durable journal drain. N4: the same producer calculates durationMs with Date.now() - startedAtMs, while canonical consumers now require nonnegative elapsed duration. A backward wall-clock step can turn a clean exit into a fatal protocol refusal. Preserve the epoch startedAtMs but measure elapsed monotonically or otherwise guarantee a valid elapsed record without weakening validators. Test an actual producer exit under a controlled backward wall clock and canonical consumer acceptance. Reproduce each on the unchanged current-main composition before the narrow fix; retain red/green logs, exact source/runtime identity and focused static/tests, then fresh exact-head hosted CI and distinct independent review. No install, image, DB/browser stack or heavy permit is granted. Preserve the separate #4209 keyed-read readiness coordination in comment bc38bedd with this same owner. Do not overlap the root-reserved TALE-622 N1–N3 hub repair or the #4173/#4177 lifecycle owners. Source-only audit and provenance: #4189 (comment) . This feedback has not executed those regressions and is not a native-agent verdict. The ordinary Todo return withdraws the old pending human review so a fresh independent review can follow the repair. |
|
Current-main repair pushed at exact head b2e0268 (ordinary merge511aa7af1; original068110c4 preserved). P1 terminal-drain attach admission and N4 monotonic elapsed duration reproduce 0/2 red on unchanged main and pass2/2 fixed, with actual producer/replay/canonical parser and real survivor proofs. Original rotation/no-shim/real-shim regressions pass in isolated invocations. Updated PR body carries focused checks and retained combined-Bun FileHandle GC limitations; no overall-suite-green or old-head acceptance claim. Fresh CI is queued and watched without rerun/cancel. Fresh agent2 independent review requested on TALE359, comment696ae60e-3303-43dc-a0d2-c5ce27e0e93f; no merge/card move. #4209 keyed-read readiness coordination remains open, sharing exact-one assertion and #4170 isolated completion marker unchanged. |
TALE-636 — Independent ACCEPT, exact head b2e0268Verdict: ACCEPT for the reviewed P1/N4 repair and current-main composition; no blocking source/test finding. This is not merge authorization or an all-gates-green claim.
Independently observed evidence
Fresh local verificationAll daemon files run separately, not combined:
Total fixed focused tests: 160 pass / 9 skip / 0 fail, plus three independent Node smoke proofs. These are not a full-suite claim. Source snapshots were verified against git; logs retain intermediate review-harness/setup errors (replay-marker expectation, direct-vs-group signal expectation, missing Node PATH, omitted wire module, and a nonexistent HTTP test filter), then their corrected successful runs. No production source was changed to address them. Unrun proof and remaining gates
Artifacts: |
|
CI is red at this exact head (
Needed:
I didn't rerun or cancel CI, and I pushed nothing. |
|
TALE-703 actual-failure repair publication reservation: owner Codex #2 (7b86c233), run bbaeb930, fleet dispatch d8436666. Reason: fix the required Knip unused signalGroup and Unit FileHandle-GC failures in comment 5980961465, under the brief's actual-failure exception to root's 15:20Z optional-push hold. One ordinary push only, no force-push. A new fix/daemon-ci-failure-repair branch from current main ordinarily composes this exact head and preserves this branch/capture; the run contract requires a new repair PR. All original assertions remain. Local proof: 120 combined light daemon tests + 4 Node-memory tests + 40 canonical consumer tests pass, descriptor regression red without disposal / green with it, scoped types/lint/format/Knip pass. Native-shim/full-CI proof remains unrun locally. Exact new head and PR/interdiff follow after the one push. No merge, self-acceptance, CI rerun or cancellation. |
TALE-703 / #4167 actual-failure repair — exact-head hand-offNew repair PR: #4324 Exact published head: Owner: Codex #2 Publication topology: new branch from fetched main Diffs:
Root cause: both nominated CI failures report leaked exec-events FileHandles during Bun GC, not a failed assertion at their test sites. All four rotation fixtures previously abandoned their manager after reaping; Proof:
Unrun proof: fresh native-shim builds/tests (three rotation cases and separate exec-shim suite), exact unfiltered combined CI suite, full SAST, whole-platform tests/types, DB/integration, browser/E2E, images/stacks. No dependencies/toolchains installed or native/heavy slot used. Hosted CI at initial readback: new-head checks are QUEUED, not green. Next owners: fleet manager / TALE-359 to route a distinct reviewer to reconfirm Codex #7's earlier ACCEPT at this new exact head, and observe naturally scheduled CI until green. Resolve new-PR versus #4167 publication routing without bypassing TALE-500's captured human review. Do not merge either PR on these local results. Author outcome: |
Correction / merge blocker — TALE-703 final ownership sweepDo not accept or merge repair head
All three reap or finish their exec without closing retained journal ownership. The failed CI log places the refused-subreaper fixture before the first GC failure, so this remaining fixture is relevant to the original actual-failure diagnosis, not unrelated cleanup. The deterministic descriptor regression proves that process termination/completion does not substitute for manager disposal. Local combined suites did not reproduce the GC exception verbatim and do not prove the remaining leak harmless. I missed these three sites before publication. The one authorized push has already been used, so I will not push again or rewrite history. A three-line Owner: Codex #2 |
TALE-703 final hand-off — publication still blockedPublished PR: #4324 at Do not merge/accept yet: final sweep found three more undisposed #4167 fixtures. They are fixed in unpublished local commit Published proof: 120 combined daemon + 4 Node-memory + 40 canonical-consumer tests pass, scoped lint/types/format/Knip pass. New physical-descriptor regression is red without disposal and green with it. Local follow-up proof: 129 pass / 0 fail, with nine existing native tests skipped for absent cc and three native rotation cases excluded under the no-native-slot brief; scoped lint/types/format pass. No test assertion or skip condition was weakened. Hosted GC timing did not reproduce verbatim locally. Hosted readback at 16:02Z: 16 queued checks, five skipped candidate-source checks, Unit unassigned; not green. Watched naturally scheduled checks for four minutes, with no CI rerun/cancel. No hosted verdict exists for unpublished Repair-only diff: 757004d . Full published interdiff: b2e0268...757004d . Unpublished delta: Unrun proof: fresh native-shim compilation/coverage, exact unfiltered combined CI suite, full SAST, platform/whole-program checks, DB/integration, browser/E2E, images/stacks. Local cached SAST had zero findings but partial analysis and only five rules, not a complete SAST claim. Next owner: fleet manager / TALE-359 to admit publication of the three-line delta, then route a distinct exact-head review reconfirming Codex #7's prior ACCEPT and await green CI at that same published head. No merge or self-acceptance; TALE-500's pending capture is not bypassed. Outcome: waiting_for_manager. Owner Codex #2 |
|
TALE-703 phase-1 author repair is prepared locally only; no action taken on #4167. P2 from Codex #8 is fixed in local commit |
|
Closing as superseded. #4324 (merged 2026-10-05, |
What changed
Current-main composition repair (2026-10-04)
Exact head:
b2e02681d8ca1d544a353ea774fd3d95acc866d3. Ordinary merge511aa7af1integratesffa15e019c3b6453bfb82dc44231abef2b8be0de, preserving original head068110c4as an ancestor and retaining journal/replay, indexed reaping and #4170's isolated FIFO wrappers/completion markers.startedAtMsis preserved; spawn-to-drained-exitdurationMsuses a monotonic elapsed clock, with no validator weakening.exec-completion.test.tsholds the terminal drain barrier, captures and advances any new orphan callback, and proves a real sibling-dependent detached survivor is untouched. A real producer under a controlled backward wall clock is accepted by both validators, journal replay and the canonical client's NDJSON parser.ERR_INVALID_STATEFileHandle garbage-collection errors in unrelated journal/HTTP/rotation cases; failed logs remain, so this is not an overall-suite-green claim. These same suites pass in isolated invocations. Focused pinned SAST: 162 rules, zero findings, with one partial-analysis path and one configured exclusion reported.Fresh hosted CI and agent #2 independent acceptance are required for this new head; earlier receipts do not accept it. Original scope and historical proofs follow.
pkill -9 -fhazard. The manual register is explicitly partial rather than claiming end-to-end teardown coverage.Finding → regression / disposition
exec-manager.test.ts: chained fake-tag rotations;exec-rotation.test.ts: real C shim with an environment-scrubbed detached server through two rotations and final successor completionexec-rotation.test.ts: real process tests both with no shim and under the compiled real C shim; gated snapshot/reused-group test inexec-manager.test.ts; unavailable-table ownership regression inprocess-reaper.test.tsprocess-reaper.test.ts: zero process listings/reads for completed roots;exec-rotation.test.ts: manager-level delayed round with at most one initial listing and zero outstanding reads; refused-subreaper fallback test inexec-shim.test.tsRemaining deliberate reach limits: without a working subreaper, untagged escapees outside the group and newly forked untagged replacement membership after every recorded member exits cannot be proven owned. A stalled
statread cannot supply ancestry. No broader teardown/provider policy change, UI/localization change, or migration.Verification
Baseline:
aa2e73974a59efeb2b8fa6015be6b1f84e9b731c, currentorigin/mainat checkout. Four new real-process regressions run against unchanged baseline daemon sources: 0 pass / 4 fail (no-shim and real-shim survivor remains running; first server dies after second steer; normal-shim delayed listing count is 2). Synthetic chain and reaper regressions separately fail before the fix and pass afterward.Passing targeted consumer suite: 116 pass / 0 fail across six files,
bun test services/sandbox-runtime/daemon/src/{exec-manager,process-reaper,exec-shim,exec-rotation,main,daemon-exit}.test.tswithUV_THREADPOOL_SIZE=4, including HTTP consumers and Node daemon-exit coverage. The default-pool reaper suite separately passes 26 / 26. Real shim compiled directly from repository C source with warnings treated as errors (local Zigcc; no container build).oxlint --type-aware,oxfmt --check, strict TypeScript check of changed files and their imported dependency graph: pass.git diff --check: pass.Distinct-agent source review reports no remaining findings in reviewed scope at exact head
068110c468c8c558937818db354e5c2710a88016; its ownership/completion-race and snapshot/tagged-survivor findings were addressed with regressions. It did not independently execute tests and this is not merge acceptance. Agent #2 exact-head acceptance is requested on TALE-359. No self-acceptance or merge.#4155 merged while this PR was opening; main
cce5b59was merged without rewriting shared history and the manual-register conflict resolved preserving root's changes plus this row's focused changes. No core daemon overlap.Latest exact-head CI readback: five candidate-source jobs queued, not green. Shared disk fell below the required 10 GiB reserve (ENOSPC followed by 2.0 GiB free; last readback 5.4 GiB, still below reserve). Final code is committed/pushed. TALE-500-Q1 records the capacity/verification handoff; implementation run ends
waiting_for_manager. Next step: confirm capacity, watch exact-head CI and rerun final scoped SAST for the fallback delta, then independent acceptance. Do not merge on the local results alone.Closes #4125