You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit source cleanup assertions to the helper temporary checkout #5221
The source-checkout cleanup regression reports a leaked checkout during macOS sandbox validation even when the disposable checkout has been removed. This gives maintainers and agents a false failure when validating otherwise unrelated changes. No hosted CI or production failure is established by this observation.
Steps to Reproduce
At Platform commit 9952428d8f0036444df73ff0c8075380c017180c, run:
go test -count=1 -timeout=30s -run '^TestResolveFoldInputsRemovesItsCheckout$' -v ./scripts/reconcile-talos-kernel-args
The unchanged test fails repeatedly inside the macOS Codex sandbox and passes outside that sandbox at the same revision. The complete package suite also passes on the host.
Expected Behavior
The test proves that every temporary source checkout owned by the helper is removed after successful and failed source reads. Real checkout leaks and cleanup errors remain failures. An unrelated tool cache must not be misclassified as a source checkout.
Actual Behavior
The assertion at main_test.go:699 requires the entire fixture TMPDIR to be empty. A private Go test overlay changed only the failure diagnostic to print directory entries; the sole remaining entry was the regular file xcrun_db, with no ksail-fold-inputs-* checkout present. The source identities had already passed the test's successful-read assertions. Why this cache appears only in the sandbox has not been established.
Environment
macOS arm64; the repository test source is unchanged. This was discovered while auditing the dependency update in #5220 and is independent of its audited-input data.
Acceptance Criteria
Reproduce the parent-directory pollution without depending on a particular host or sandbox.
Scope cleanup proof to the helper's owned source checkouts, preserving successful-read and failed-read cleanup checks.
A deliberately retained owned checkout still fails the test; an unrelated regular tool-cache file does not.
Preserve the injected cleanup-error control and fail-closed source-identity behavior.
Pass the complete package suite in both the macOS sandbox and the host environment, then verify required CI.
Additional Context
Part of #4979. Size: Small. This is validation reliability work, with no urgent production impact demonstrated; retain it in Backlog for refinement. Full local diagnostics are kept privately.
🤖 Generated by the Agentic Engineer (interactive Claude Code session)
Implemented in #5285, merged through the merge queue on 2026-10-24 at 18:50 UTC as c488afaa; its merge-group run (deploy included) succeeded and every production Flux layer reports Ready.
Reproduced without the sandbox: the cleanup test now plants an unrelated xcrun_db file in its temporary directory. Planted into the old test, that file alone fails it with "temporary source checkout remains after reading 1.2.3: 1 entries".
Scoped to the helper's own checkouts: the check now counts only entries carrying the helper's checkout prefix, and asserts the unrelated file is left alone. A new control keeps a checkout on purpose and requires it to be found.
Unchanged: the injected cleanup-error test and fail-closed source identities. The complete package suite passes on the host and in hosted CI.
Not run: the Codex macOS sandbox itself; the planted file is what that sandbox leaves, so the condition is now exercised on every host.
The test now flags only a real leaked checkout, not files other tools leave behind.
Activity
chore: agent-claim #5221 nonce=10119b22e4d845ff5f1aa3a9d0877264
devantler commentedon Oct 24, 2026
Implemented in #5285, merged through the merge queue on 2026-10-24 at 18:50 UTC as
c488afaa; its merge-group run (deploy included) succeeded and every production Flux layer reports Ready.xcrun_dbfile in its temporary directory. Planted into the old test, that file alone fails it with "temporary source checkout remains after reading 1.2.3: 1 entries".The test now flags only a real leaked checkout, not files other tools leave behind.