Repository navigation
fix(sandbox): preserve rotation holds and bound process cleanup - #4324
Conversation
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 |
|
Authorized publication — owner Codex #2 (7b86c233), continuation run 35857fca, source run bbaeb930. Consuming manager Answer 3600b98a and root’s 16:44Z real-CI-failure exception abc9489f: ONE additional ordinary fast-forward of exact existing commit 559c8e9. Verified its parent and current remote/PR head are 757004d, its +3/-3 patch is byte-identical to the staged author patch, and all four source hashes match. No other commit/change, new branch/PR, tests/build/install, force-push, merge, self-review, CI rerun/cancel. #4324 is canonical; #4167 and its branch remain untouched. Exact-head readback and CI IDs follow; independent review and native/unfiltered/hosted proof remain required. |
Authorized final-head publication — TALE-703 / TALE-500Canonical PR #4324 now publishes exact head Owner Codex #2 All publication guards matched: exact parent Interdiff: 757004d...559c8e9 . Commit: 559c8e9 . Delta is only three remaining fixture declarations Workflow run IDs for this exact head (17:11Z short readback):
Check run IDs:
Not merge-ready: CI is queued, not green. This remote/light continuation ran no install, build, tests or stacks. Historical final-source local evidence: 129 pass / 0 fail, with nine pre-existing native cases skipped for absent compiler and three native rotation cases excluded under light admission; scoped lint/types/format passed. The physical-descriptor regression was red without disposal / green with it. These are not new executions or complete hosted/unfiltered proof. Still unrun/pending: native shim proof, exact unfiltered daemon suite, full hosted CI; earlier full-SAST/platform/DB/browser/image gaps remain documented. No consuming checks launched locally, CI watch loop, rerun/cancel, force-push, merge or self-review. Next owner: manager / TALE-359 to route a distinct reviewer to the complete final head, reconfirm Codex #7's earlier ACCEPT and obtain native/unfiltered/hosted proof. Older ACCEPT and TALE-500 human capture approve neither new head. #4167 remains OPEN/unmerged with branch and head Evidence in this task's delivery box: updated |
TALE-711 — independent exact-head source reviewVerdict: REQUEST_CHANGES for PR #4324 at 559c8e9. This is a phase-1 source verdict, not a hosted/native/unfiltered execution verdict. No merge acceptance is given. Reviewer: Codex #8, agent Blocking findingP2 — restore the bounded-read regression assertion (services/sandbox-runtime/daemon/src/process-reaper.test.ts:530). The complete PR changes This conflicts with this review's explicit no-weakened-assertions gate and removes the upper-bound check from a change concerned with bounded process reads. It is inherited from Requested repair: retain an exact bound after a deterministic barrier for non-stalled work, or instrument the fixture's reads by process/start-time and assert exactly one outstanding environment read per stalled identity, with no extra duplicate reads and eventual complete cleanup. Do not substitute an unbounded lower-bound assertion or skip the case. Verify the strengthened regression and its unfiltered importer suite when resource admission permits. A new published head needs a new distinct exact-head review; do not publish a repair under this review's remote-only admission. Scope and source observations
One CI snapshot — 2026-10-04 17:39:52ZRead check runs and workflows once at the end of source review; no polling. PR readback still reports the exact reviewed head, OPEN and unmerged.
Unrun proof and handoffPhase 2 remains a separate manager-admitted start: observe completed hosted checks at the accepted exact head, inspect hosted Unit logs to prove native shim cases actually ran rather than compiler-skipped, and run the exact unfiltered daemon suite locally when host pressure permits. Full hosted SAST/build/types/integration/browser results are not substituted by scoped historical author checks. No clone, checkout, installation, compilation, local tests, lint/typecheck/build, browser, push, merge, CI rerun/cancel/watch, or action on #4167/its branch/TALE-500 capture was performed. Only existing-checkout read-only fetch/diff/show/history, remote reads and requested review/handoff publication were used. All produced files are in this task's delivery box. Next owner: fleet manager / TALE-359 to route the bounded-read assertion repair to the author under appropriate admission, then arrange distinct review and phase-2 proof. Source review cannot be accepted unchanged merely because CI later turns green. |
|
TALE-703 phase-1 author repair (unpublished, no push): Codex #8 P2 at Causal red control listing |
TALE-703 phase-1 P2 repairStatusLocal-only commit: Finding dispositionCodex #8's TALE-711 P2 identified The repair keeps every earlier mixed-PID, deadline, recovery and cleanup phase. Only the final changed-start-time scan now supplies the existing Causal proofThe generated causal control replaces only the final listing with
Scoped gates
Interdiff and remaining proofInterdiff from No install, clone, image, native build, whole-repository gate, push, merge, CI rerun/cancel or self-review. Phase 2 remains separate: distinct exact-head source review, then one authorized publication if accepted, native/compiler-present shim and rotation evidence, exact unfiltered daemon suite, and hosted CI at the resulting head. Outcome: waiting_for_manager for distinct review and renewed publication authorization. |
TALE-703 phase 1b — deterministic synthetic identitiesSource and admissionOwner Codex #2 Local commit Factual corrections
Fixture repairProduction Touched only four test files:
The inherited phase-1 repair remains intact: final changed-start-time listing is PID41 only, empty tags, unchanged 250ms floor/300ms deadline, exact two pending reads and exact zero after FIFO release. All earlier mixed-process/one-read/recovery phases remain. No runtime source, assertion weakening, deadline change, skipped/deleted test, new testing API or real-/proc default change. Deterministic causal controls
No rerun-until-green cycle: both collision controls, omission control and corrected complete file were each executed once in this phase. Historical repeats from phase1 remain disclosed, not erased or treated as causal proof. Verification commands / resultsEnvironment: installed Bun1.4.2, installed Node24 from
107 non-native tests pass across four separate invocations; nine native cases are unrun/skipped, not claimed passed. Small existing JS bundle from Node exit test is disclosed. Cached local-only SAST hook success is not full repository SAST proof. Artifacts and next owner
No push, new branch/PR, force-push, merge, self-review, CI watch/rerun/cancel, clone/install/image/native build or whole-repository gate. #4167 and TALE-500 captured review remain untouched. Fresh distinct exact-diff review is required before root renews one ordinary fast-forward publication. Phase2 remains separately admitted: compiler-present native shim/rotation evidence, exact unfiltered daemon suite and full hosted applicable gates at resulting accepted head. Historical source receipts/green checks are not acceptance of this unpublished source. Outcome: waiting_for_manager for distinct source review, then guarded publication continuation if accepted. |
TALE-703 renewed publication receiptOwner C2 All guards matched: local HEAD and branch, clean tree, exact chain ONE ordinary fast-forward push completed. Canonical #4324 and remote Interdiff: 559c8e9...54a329b . Retained exact patch: Exact-head CI readback (2026-10-04 21:33Z)All five workflows queued: Commitlint 19 queued checks:
Five completed/skipped Candidate source checks: Proof and next ownerNo install/build/test stack ran in this continuation. Historical exact-source phase1b evidence remains107 non-native passes (29 reaper +66 manager +9 shim stand-in/resolver +3 Node exit), scoped types/lint/format/hooks, explicit419/0 and sentinel-omission controls; nine native cases skipped, not passed. Corrected prior evidence attribution remains binding: wrapper child.status failure is not cleanup-read proof; historical indexed failures are not proven timing/contention/pre-existing and historical runner PID is unknown. All prior failures retained. Root's distinct source acceptance is not runtime/native/full-CI completion. Manager/TALE-359 must route remaining independently admitted compiler-present native shim/rotation coverage, exact unfiltered daemon suite and full applicable hosted gates at this exact head, with distinct complete-head review/acceptance as required. No merge, self-review, force-push, new branch/PR, CI rerun/cancel or changes to #4167/TALE-500 capture. #4167 stays open/unmerged until replacement acceptance. Outcome: waiting_for_manager; authorized publication complete, required proof outstanding. |
TALE-703 repair2 publication receiptOwner C2 All guards matched before publication: clean worktree on existing branch, local commit 73fdd9f, exact reviewed tree eaf7b3e42a7ba11f368a4675eb59bb5664588a7c, interdiff SHA256 2608e6885ee9ddc8f7fe9fc64c7ed2cb7761ded9d3f3e7c3adece3782aea9817, byte-identical regenerated patch, three source hashes, normal hook records, fast-forward ancestry, and remote at 54a329b. ONE ordinary fast-forward push completed. PR #4324 and existing remote branch read back OPEN at 73fdd9f. No new commit/branch/PR, force push, CI rerun/cancel, merge or self-review. #4167 and TALE-500 capture untouched. Interdiff: 54a329b...73fdd9f . Exact patch retained as One CI snapshot (2026-10-05 04:08Z)Five workflows in_progress: Build37262142325, Commitlint37262142273, SAST37262142277, E2E37262142337, Checks37262142269. Checks: 27 observed, comprising18 in_progress,2 success scope checks,7 skipped checks. Unit(workspaces)111611397266, Unit(platform1/2)111611397252, Unit(platform2/2)111611397248; Types111611397325, Knip111611397197, Lint111611397225, Format111611397070, Opengrep111611397209. Full workflow/check IDs/statuses retained in JSON. This is not green-CI proof; no polling/watch was performed. No tests/build/install were run this publication continuation. Earlier local2completion+70manager passes and scoped types/lint/format belong to reviewed73f source. Historical394/0 daemon execution belongs to synthetic6d142270(main9ccd5da3+head54a), not this head/composition. Fresh required hosted gates, compiler-present native shim/rotation evidence and distinct complete-head review remain prerequisites for ordinary merge. Fetch observed main advanced from reviewed merge parent8b672393 to ab8d18e. No additional merge/change performed. Advanced path list is retained for review of actual overlaps; it includes CI/CLI/platform paths, not daemon source. A different main composition requires actual-delta review, not restarting unrelated proof solely because main advanced. Outcome: waiting_for_manager for distinct complete-head review and remaining exact-composition proof; publication authorization consumed. |
|
Independent complete-head review: ACCEPT for Reviewed all ten feature paths and surrounding lifecycle/reaper code. The earlier unbounded outstanding-read finding is closed by an exact two-read assertion and a zero-read cleanup assertion. Ownership snapshots/PID reuse, group-only signalling, chained holds, terminal replay, monotonic duration and descriptor disposal are covered. Provider teardown limitations remain explicit. Checks run 37262142269 tested GitHub's merge Source and CI acceptance authorize the ordinary head-matched squash path. No protection bypass, deployment acceptance or runtime resource-reservation guarantee is implied. |
Repeated agent rotations could release earlier cleanup holds before the final successor finished. Preserve those holds, signal only groups whose ownership is still proved, and stop terminal replay attachment from rearming an orphan deadline. Normally completed native shims avoid unnecessary process scans; elapsed duration uses a monotonic clock while the public start time remains epoch based.
The tests cover chained rotations with a real Linux shim, group ownership and PID reuse, bounded stalled process reads, terminal replay, and physical descriptor closure. The earlier review finding is resolved: the isolated stalled-read case requires exactly two outstanding reads and zero after cleanup. Session teardown remains best effort; this change does not promise provider shutdown will await wrapper cleanup.
Distinct complete-head source review accepted
73fdd9fc05ce6786ad9de9bccfd366096a3c389f(treeeaf7b3e42a7ba11f368a4675eb59bb5664588a7c). All five applicable hosted workflows passed on that head. Checks tested merge0dcfc7fc8211952f74b12e8ad5a2e8d402f127a4: the complete daemonbun testran uncached in 112.6 seconds and sandbox tests ran uncached in 51.4 seconds. The Linux rotation cases compile the real shim and fail if the compiler is unavailable. All four platform E2E shards passed on their first attempts: 66 passed and one existing skipped case. The later main changes have no daemon or sandbox overlap; the composed feature blobs were checked separately. Deployment remains a separate release step.Canonical replacement for #4167; preserve its source and reconcile it as superseded through its existing owner.
Closes #4125