Witness daemon leaks registered scratch worktrees across pod restarts (fast-fails later runs) #87
Open
opened 2026-07-26 22:54:59 +00:00 by iggy
·
0 comments
No Branch/Tag specified
main
agent/zstd-project-check-runtime-20260804
agent/lane-restart-continuity
agent/diagnostic-retrigger-refresh-20260804
agent/candidate-notfound-idempotent
agent/lanetree-stale-remove-race
agent/lane-stale-candidate-cleanup-20260804
agent/lane-stale-candidate-cleanup-ci-retry-20260804
agent/lane-cutover-integration-r3-20260804
agent/lane-abandoned-verdict
agent/lane-cutover-integration-r2-20260804
agent/lane-point-retry
agent/witness-scratch-recovery-20260804
agent/lane-cutover-integration-20260804
agent/project-timeout-finalization-linear3-20260804
agent/diagnostic-cancel-backoff-20260803
agent/project-timeout-finalization-linear2-20260804
agent/project-timeout-finalization-linear-20260804
agent/project-timeout-finalization-20260804
agent/lane-red-files-evidence
agent/lane-member-identities
agent/lane-dispatch-artifact
agent/lane-honesty
agent/lane-stages
agent/lsp-pipe-liveness-20260803
agent/lane-point-reassert-20260803
agent/lane-infra-backoff
agent/analyzer-pathology-rollout-20260803
agent/unattributed-witness-20260803
agent/respawn-nonlatching-main
agent/rejection-reason-refresh-20260803
agent/rejection-reason-20260803
agent/lane-compose-legs
agent/overlay-response-timeout-20260803
agent/diagnostic-event-origin-20260803
agent/http-partial-write-20260803
agent/readyz-liveness
agent/diagnostic-absolute-uri-20260803
agent/diagnostic-final-fence-20260803
agent/diagnostic-freshness-rebased-20260803
agent/diagnostic-freshness-20260803
agent/diagnostic-timeout-20260803
agent/reuse-result-protocol-20260803
agent/project-check-lifecycle-fix
agent/outcome-pending-race
agent/red-files-attribution
agent/name-the-unattributed-diagnostic
agent/ra-proper-20260731
agent/build-lane
agent/serve-image-tag-epoch
agent/ci-no-cancel-in-progress
agent/witness-serial-class
agent/batch-obs
agent/cgls11-reopen-cap
agent/coalesce-gated-witness-by-base-rebased
agent/get-status-attributed
agent/ra-memory-cap
agent/witness-stranded-unknown
agent/witness-ra-reap-handover
agent/coalesce-gated-witness-by-base
agent/witness-warm-target
agent/witness-serial-warm
agent/coalesced-emit-gated-checks-ran
agent/test-flake-hardening
agent/appdrv-test-isolation
agent/cgls-26-attribution-guard
agent/verdict-failure-class
agent/appserve-clear-stale-last-red
agent/witness-watchdog-25m
agent/docs-ci-log-pointer
agent/appserve-enospc-selfheal
agent/eager-boot-warm
agent/deploy-ref-parity-fsgroup
feat/serial-batch-witness
agent/witness-base-sha-keying
agent/instances-sighup-reload
agent/eager-boot-warm-basefetch
agent/serveapi-base-local-no-fetch
agent/preview-restart-persistence
agent/hot-trunk-no-cancel
agent/preview-selfserve-integrated
agent/gated-checks-ran-on-deployed
agent/gated-checks-ran
agent/preview-rename-public-status
fix/interaction-red-unknown
agent/overlay-cap-128
agent/per-lane-build-slot
agent/runplan-per-build-reread
agent/cgls11-pool-overlay-flycheck
agent/cgls12-content-macro-detection
agent/manifest-run-plan-on-main
agent/ci-concurrency
agent/macro-witness-fix
agent/appserve-build-job
agent/build-to-completion
agent/fix-overlay-reaches-ra
agent/fix-appbuild-test-manifest-hash
agent/fix-serve-ra-procmacro-skew
agent/fix-otlp-v1-traces-path
agent/ra-stderr-visible
agent/manifest-run-plan
agent/self-serve-previews
agent/appserve-worktree-setup
agent/appserve-dockerfile-fix
agent/timer-settle-unknown-cgls9
agent/verdict-freshness-cgls9
agent/app-serve
agent/verdict-cli
agent/witness-offloop
agent/bounded-git
agent/readyz
agent/verdict-attribution
agent/otlp-queue
agent/infra-258-260
agent/project-checks-nonblocking
agent/attribution-helper
release/v0.3.0
agent/batch-concurrency-validation
agent/project-checks-hard
agent/amem-49-exporter-timeout
agent/infra-54-init-success-log
agent/infra-49-blocking-client
agent/infra-49-simple-exporter
agent/honest-verdict-and-otel
agent/overlay-project-checks
agent/fsn-serve-shards
agent/existing-red-report
agent/checks-base-pruning
agent/docs-project-check-resource-discipline
agent/session-handover-2026-05-25
agent/builder-template-cache-repair
agent/tf-multiverse-serve-service
agent/serve-auth-read-image
agent/cargoless-http-read-auth
agent/serve-image-bump
agent/push-only-ready
agent/architect
agent/bench-lead-m3
agent/builder-infra-msrv-doc
agent/builder-infra-doc-housekeeping
agent/builder-infra-roadmap-integration
agent/builder-infra-docs-combined
agent/docs-launch-lead-roadmap-refresh
agent/docs-launch-lead-prestage
agent/builder-infra-update-lock
agent/docs-launch-lead-w2-docs
agent/builder-infra-263-disk-full
agent/dev-fixer-2c
agent/dev-fixer-2b
agent/bench-lead-m2-on-9429462
agent/docs-launch-lead-brand-coherence
agent/bench-lead-m2-approx
agent/docs-launch-lead-dewasm-scope
agent/dev-fixer-otel-wave1
agent/dev-fixer-dewasm
agent/dogfood-lead-stage1-rework
agent/dev-fixer-respawn-driver-reset
agent/dev-fixer-pushoverlay
agent/dev-fixer-healthz
agent/dogfood-lead-stage1-suite
agent/bench-lead-diffharness
agent/dev-fixer-serve-wire
agent/builder-infra-serve-image
agent/docs-launch-lead-inc2spec
agent/builder-infra-serve-k8s
agent/builder-infra-v020
agent/docs-launch-lead-e5
agent/builder-infra-198
agent/dev-fixer-modelr-cio
agent/builder-infra-podinfra
agent/bench-lead-15bench-r
agent/bench-lead-15bench
agent/builder-infra-14-integ
agent/builder-infra-14auth-fix
agent/builder-infra-tripleguard
agent/builder-infra-i2fixed
agent/builder-infra-i1
agent/builder-infra-reset0
agent/builder-infra-capcore
agent/builder-infra-12
agent/builder-infra-4
agent/builder-infra-incr4
agent/builder-infra-incr3
agent/builder-infra-182
agent/builder-infra-14auth
agent/docs-launch-lead-e4
agent/bench-lead-modelr-13c
agent/docs-launch-lead-e3
agent/bench-lead-modelr-13
agent/dev-fixer-modelr-c
agent/docs-launch-lead-e2
agent/builder-infra-comp2v2
agent/builder-infra-cigatefix2
agent/dev-fixer-modelr-b
agent/bench-lead-modelr
agent/builder-infra-cigatefix
agent/builder-infra-comp2
agent/docs-launch-lead-modelr
agent/builder-infra-modelr
agent/docs-launch-lead-final
agent/bench-lead
agent/dev-fixer-132
agent/dev-fixer-97
agent/docs-launch-lead-prep
agent/dev-fixer-128
agent/dev-fixer-procmacro-downrank
agent/dev-fixer-idle-evict
agent/dev-fixer-structural-trigger
agent/dev-fixer-openclosed-design
agent/dev-fixer-94
agent/dev-fixer-97-plan
agent/docs-launch-sf
agent/docs-launch-lead-d1b
chore/f13a-integrate-v2
agent/dev-fixer-f13a
chore/cwdl-71-phase-d
chore/buildid-integrate-v2
agent/dev-fixer-f13b
agent/buildid
agent/ra-config
agent/d-a2-design
agent/docs-launch-lead-d1
agent/docs-launch-lead
agent/dev-fixer-5
agent/dev-fixer-4
agent/dev-fixer-3
chore/launch-readiness-docs
agent/dev-fixer-2
agent/f8-integrate
agent/integration-default
agent/dev-fixer-f8
agent/dev-fixer
agent/builder-infra
agent/v0-feature-complete
agent/daemon-core-21
agent/v0-final-converge2
agent/ra-bench-wt
agent/cli-ux-v0
agent/v0-final-converge
agent/build-cas-publisher
agent/docs-v0
agent/v0-core-converge
agent/gate-locked
agent/main-stabilize
agent/cli-ux-wire
agent/devserver-bundle
agent/daemon-core-sup
agent/integration-converge
agent/build-cas-bundle
agent/daemon-core-wt
agent/build-cas
agent/devserver
agent/cli-ux
integ/dc-ac6
integ/ra-bench
integ/daemon-core
agent/ra-bench
agent/proto-contracts
agent/daemon-core
v0.4.0
v0.3.0
v0.2.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
triform/cargoless#87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom. A gated push fast-fails in ~4s with:
The verdict publishes as
unknown— it does not wedge a PR, but it burns a gate slot and reads as an unexplained infra flake.Cause. When the serve pod dies mid-compile (Flux roll, OOM, node eviction), the per-run scratch worktree survives on the PVC and stays registered in
.git/worktrees/. The run counter resets on the new pod, so a later run eventually reuses the samerun-1-Nindex and collides with the orphaned registration.Why
git worktree prunedoes NOT fix it. Prune only clears registrations whose directory is gone. These directories still exist (full of build artifacts), so prune reports nothing to do. Clearing them requiresgit worktree remove --force(orrm -rf+ prune).Observed 2026-07-26 on the live witness: 4 orphans holding 11 GB — dated Jul 17, Jul 21, and same-day — on a 147G PVC. Normal cleanup works fine (a run that completes removes its own scratch); these were purely restart debris.
Suggested fix. At daemon boot, sweep
<state_dir>/project-check-runs/*withgit worktree remove --force(thenprune). Nothing there can be live at startup by definition, so the sweep is unconditionally safe. Alternative/complement: make the run-dir name unique per process (e.g. include boot id) so a stale registration can never be collided with.Found while soaking the CGLS-25 serialization work; the orphans predate that change (Jul 17/21 entries), so this is long-standing, not a regression.