deploy-document-archive: pytest's "Enable tracemalloc…" hint out of the paperless-ngx build trips the masked-exit "traceback" marker and reds a fully converged deploy #1287
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1287
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?
The failure
Drive
20260907T041410Z(commit25551a2b), 10 green / 1 red,deploy-document-archiveafter 3334881 ms (55.6 min — under the 75 m ceiling25551a2bset, so NOT a timeout):clean-retryhere is the RecoveryMode label the failure carries (internal/provision/deploy.go:97), not evidence of a second attempt — the control-plane log records exactly ONEprovision deploy failed.The evidence: the deploy CONVERGED
logs/guest-system-journal.log:59-177— 05:15:27 the paperless slice is created, redis-paperless starts,paperless-scheduler-pre-startapplies every migration (account,auditlog,auth,authtoken,django_celery_results,documents, … allOK);logs/guest-system-journal.log:285showspaperless-web-startup by 05:16:05.logs/guest-failed-units.log—systemctl --failedon the guest:0 loaded units listed.logs/guest-control-plane.log:198— the deploy is declared failed at 05:16:05, i.e. 38 s AFTER the service it deployed came up. The classifier reddened a healthy node.The defect
logSaysFailed(internal/clan/errors.go:353-419) is the masked-exit detector: on a zero exit it scans the activation log line-by-line for failure markers, one of which is"traceback"(internal/clan/errors.go:411).The tripping line is pytest's own hint, printed beside a
ResourceWarning/ unraisable-exception warning when tracemalloc is off: "Enable tracemalloc to get traceback where the object was allocated." (the interpreter words the same hint "Enable tracemalloc to get the object allocation traceback"). It says only we could have told you where this object came from — it is never a failure.It reaches the scan because a nix build that runs its
checkPhaseon the guest streams the derivation's stdout through activation, clan-prefixed and package-tagged — hence the[gateway] paperless-ngx>prefix. This became reachable now because the document-archive deploy builds its Python/OCR closure on the box rather than substituting it (25551a2b: "builds tesseract from source").There was no exemption for it, so a benign build-test warning was recorded as masked-exit proof. This is the fifth entry in this detector's documented false-positive family:
failed to reload(2026-08-05),error (ignored)(2026-08-07),cannot read ssh key(#456),warning: error:(#451).Suspected layer
Failure classification,
internal/clan/errors.go— not clan, not nix, not paperless. The build succeeded, the activation succeeded, the guest converged.The fix
One line-by-line exemption on the distinctive phrase
"tracemalloc to get"(covers both the pytest and interpreter wordings and nothing else), placed with the four existing exemptions, plusTestClassify_PytestTracemallocHintIsNotMaskedpinning the drive's verbatim lines, the chunk-split form, and that a realTraceback (most recent call last):beside the hint still classifiesmasked_exitand carries that real line as proof.Note on the repeated signature
8bcb93da00e3was healed once before (1e85bf4d, drive20260907T023209Z), but that heal did not resist — it worked. That red was a deploy timeout with two blind readouts; with the readouts fixed and the ceiling raised (25551a2b), this drive ran the deploy to full convergence and surfaced a different fault, in a different layer, with a different error class. The signature is leg-coarse; the defect is new.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door. Revertible: the change is one self-contained
if strings.Contains(judged, "tracemalloc to get") { continue }block insidelogSaysFailed(internal/clan/errors.go) — a later commit deletes it and the detector is bit-for-bit what it was; nothing persists, no state or schema is touched. Proven here:TestClassify_PytestTracemallocHintIsNotMasked(internal/clan/clan_test.go) was written first and failed on the drive's verbatim proof lines, then passed; it also pins the converse — a realTraceback (most recent call last):sharing the log with the hint still classifiesmasked_exitand carries that real line, and the hint never travels as proof — so the exemption cannot silently swallow a genuine failure. Mechanical, not a design decision: the detector's own doc-comment states its contract — "Kept deliberately narrow — only phrases clan/nixos-anywhere are known to print under a lying success… so benign activation noise can be exempted without blinding the detector" — and this repo has applied exactly that repair four times already (failed to reload,error (ignored),cannot read ssh key,warning: error:). A pytest hint out of a build's checkPhase is benign noise by that definition; exempting it makes the classifier do what it already means to do. Nothing a community sees, no default, route, secrets shape, message at a trust moment, or security posture changes — and the direction of the change is the safe one: it stops a converged deploy being reported as failed. A checkPhase that genuinely fails dies non-zero and never reaches this zero-exit scan at all. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260907T041410Zred atdeploy-document-archive(sig 8bcb93da00e3) — self-fixed on the fast lane, commit48b6f5caec4ea87266471eb4f9a954eb27ded928; checks: targeted (red-first):go test ./internal/clan/ -run TestClassify_PytestTracemallocHintIsNotMasked -v→ FAIL before the fix (clan_test.go:416: a pytest tracemalloc hint must not mask a real success, got clan: masked_exit on gateway: … Enable tracemalloc to get traceback where the object was allocated.), PASS after. package:go test ./internal/clan/→ ok (18.5s). consumers:go test ./internal/provision/ ./internal/controlapi/→ both ok. whole tree:go test ./internal/...→ every package ok, no failures.go build ./...→ clean;gofmt -l internal/clan/→ clean. Commit shape: 2 files, 19 non-test lines added (internal/clan/errors.go19/0), 0 deletions; no assertion, test or leg touched — the only test change is a new test added.. evidence:/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T041410Zon matou-workstation.close-report for #1287 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope