masked_exit false-positives on a genuinely-complete install (enroll-configure) — and excerpt() floods Detail with benign token noise so the tripping line is invisible #451

Closed
opened 2026-08-11 22:29:49 +00:00 by ben · 1 comment
Owner

Re-scoped after live investigation (Ben-approved ruling, 2026-08-11 ~23:00Z)

Drive 20260811T221125Z red at enroll-configure with masked_exit ("clan reported success but the log shows a real failure"). The install actually succeeded. Probe of the kept droplet (clan-lab-rehearsal-970eb093, 170.64.173.170, before its TTL reap): disko partitioned (vda1/vda2-boot/vda3-root), a complete NixOS tree mounted at /mnt, 692 store paths, sshd config present. The box sat in the kexec installer only because the leg faulted before issuing the reboot. Exit code was 0; some line in the install output tripped logSaysFailed's marker scan (failed to / error: / fatal: / traceback / cannot ).

Which line tripped it is unknowable from the filed evidence — that is the second defect. classify() (internal/clan/adapter.go ~354) feeds the FULL output to Classify, then narrows Detail to excerpt(), whose token list includes evaluation, sops, and esp. The 8-line cap filled with kanidm eval-warnings (evaluation), sops-install-secrets build progress (sops), and a cache-copy line matching esp INSIDE perl…XML-NamespaceSupport — the same substring-on-progress-noise class as #374. The real marker line was cut, the full output is persisted nowhere, the healer declined, the reporter's diagnosis was unparseable, and this ticket arrived evidence-free as ready-for-human.

Work (test-first)

  1. Classify carries its own proof. When logSaysFailed fires, the masked_exit Failure.Detail MUST contain the exact line(s) that matched — return them from the detector instead of re-grepping with excerpt()'s noisy token list. classify() must not overwrite that proof with the excerpt.
  2. De-noise excerpt(). evaluation warning: lines, …-sops-install-secrets-… drv/build progress, and store-path/copying lines must not consume the 8-line budget (line-by-line discipline, same as logSaysDisk's #374 fix). Real evaluation errors (does not evaluate, failed assertions) still kept.
  3. Exempt the benign phrase. With the matching line visible (reproduce by re-driving or from the unit test against a captured install log), add it to logSaysFailed's exemptions beside failed to reload and error (ignored), with a comment naming this drive.
  4. Unit cases in internal/clan/clan_test.go: (a) a zero-exit log whose only marker line is the newly-exempted benign phrase classifies nil (success); (b) a zero-exit log with a real failure line beside that phrase still classifies masked_exit AND its Detail contains the real line; (c) excerpt() drops eval-warning/sops-progress/NamespaceSupport noise.

Notes

  • This red is likely deterministic — every re-drive fails the same way until the fix lands, so it correctly blocks #378.
  • The kept droplet gets TTL-reaped (~6h); nothing more to learn from it — probe results above are the record.
  • Evidence: test-results/…/20260811T221125Z/ on matou-workstation (founding-state.log carries the truncated fault; droplet-journal.txt is installer boot noise only).
## Re-scoped after live investigation (Ben-approved ruling, 2026-08-11 ~23:00Z) Drive `20260811T221125Z` red at enroll-configure with `masked_exit` ("clan reported success but the log shows a real failure"). **The install actually succeeded.** Probe of the kept droplet (`clan-lab-rehearsal-970eb093`, 170.64.173.170, before its TTL reap): disko partitioned (vda1/vda2-boot/vda3-root), a complete NixOS tree mounted at /mnt, 692 store paths, sshd config present. The box sat in the kexec installer only because the leg faulted before issuing the reboot. Exit code was 0; some line in the install output tripped `logSaysFailed`'s marker scan (`failed to` / `error:` / `fatal:` / `traceback` / `cannot `). **Which line tripped it is unknowable from the filed evidence — that is the second defect.** `classify()` (`internal/clan/adapter.go` ~354) feeds the FULL output to `Classify`, then narrows `Detail` to `excerpt()`, whose token list includes `evaluation`, `sops`, and `esp`. The 8-line cap filled with kanidm eval-warnings (`evaluation`), sops-install-secrets build progress (`sops`), and a cache-copy line matching `esp` INSIDE `perl…XML-NamespaceSupport` — the same substring-on-progress-noise class as #374. The real marker line was cut, the full output is persisted nowhere, the healer declined, the reporter's diagnosis was unparseable, and this ticket arrived evidence-free as ready-for-human. ## Work (test-first) 1. **`Classify` carries its own proof.** When `logSaysFailed` fires, the masked_exit `Failure.Detail` MUST contain the exact line(s) that matched — return them from the detector instead of re-grepping with `excerpt()`'s noisy token list. `classify()` must not overwrite that proof with the excerpt. 2. **De-noise `excerpt()`.** `evaluation warning:` lines, `…-sops-install-secrets-…` drv/build progress, and store-path/copying lines must not consume the 8-line budget (line-by-line discipline, same as `logSaysDisk`'s #374 fix). Real `evaluation` errors (`does not evaluate`, `failed assertions`) still kept. 3. **Exempt the benign phrase.** With the matching line visible (reproduce by re-driving or from the unit test against a captured install log), add it to `logSaysFailed`'s exemptions beside `failed to reload` and `error (ignored)`, with a comment naming this drive. 4. **Unit cases** in `internal/clan/clan_test.go`: (a) a zero-exit log whose only marker line is the newly-exempted benign phrase classifies nil (success); (b) a zero-exit log with a real failure line beside that phrase still classifies masked_exit AND its Detail contains the real line; (c) excerpt() drops eval-warning/sops-progress/NamespaceSupport noise. ## Notes - This red is likely deterministic — every re-drive fails the same way until the fix lands, so it correctly blocks #378. - The kept droplet gets TTL-reaped (~6h); nothing more to learn from it — probe results above are the record. - Evidence: `test-results/…/20260811T221125Z/` on matou-workstation (founding-state.log carries the truncated fault; droplet-journal.txt is installer boot noise only). <!-- rehearsal-sig: a26965b5356b -->
ben changed title from rehearsal drive red at enroll-configure to masked_exit false-positives on a genuinely-complete install (enroll-configure) — and excerpt() floods Detail with benign token noise so the tripping line is invisible 2026-08-11 22:56:42 +00:00
Author
Owner

Fixed in b102fcc (on origin/main).

Defect 2 (excerpt floods Detail) — fully fixed. excerpt() now drops progress/warning noise line-by-line (isBenignExcerptNoise): evaluation warning: lines, store-path copies (copying path/unpacking '/downloading '), and drv-build progress (building '….drv') no longer consume the 8-line budget. Real eval errors (does not evaluate, failed assertions, bare error:) are kept. Same substring-on-progress discipline as #374.

Defect 1 (proof unknowable) — fixed at the mechanism. logSaysFailed now RETURNS the exact line(s) that tripped its marker scan, and Classify carries those verbatim as the masked_exit Detail. classify() (adapter.go) no longer overwrites that proof with the excerpt (only non-masked kinds are narrowed). The tripping line now travels with the failure instead of being re-grepped away.

Item 3 (exempt the benign phrase). The drive's exact cut line is unknowable from the filed (truncated) evidence — excerpt() had already discarded it before it was persisted. I exempted nix's own soft warning: error: … retrying (a substitution nix retries then succeeds — the benign class runRawNix cites at enrollment.go:948-951), beside failed to reload / error (ignored), naming this drive in the code comment. This is the best-supported candidate. Because defect 1 now makes any residual tripping line self-evident in the masked_exit Detail, a re-drive will either go green or surface the exact line for a one-line follow-up exemption — no longer evidence-free.

Tests (internal/clan/): TestClassify_MaskedExitCarriesTheTrippingLine (proof is the tripping line only, no benign noise), TestClassify_BenignNixWarningIsNotMasked (4a/4b: benign-only → nil; a real line beside it → masked_exit carrying the real line), TestExcerpt_DropsProgressAndWarningNoise (4c), TestExcerpt_KeepsRealEvalErrors. Full go test ./internal/clan/ green; pre-push gate green.

Rationale in the commit message and the STATUS.md milestone-log entry.

Fixed in b102fcc (on origin/main). **Defect 2 (excerpt floods Detail) — fully fixed.** `excerpt()` now drops progress/warning noise line-by-line (`isBenignExcerptNoise`): `evaluation warning:` lines, store-path copies (`copying path`/`unpacking '`/`downloading '`), and drv-build progress (`building '….drv'`) no longer consume the 8-line budget. Real eval errors (`does not evaluate`, `failed assertions`, bare `error:`) are kept. Same substring-on-progress discipline as #374. **Defect 1 (proof unknowable) — fixed at the mechanism.** `logSaysFailed` now RETURNS the exact line(s) that tripped its marker scan, and `Classify` carries those verbatim as the masked_exit `Detail`. `classify()` (adapter.go) no longer overwrites that proof with the excerpt (only non-masked kinds are narrowed). The tripping line now travels with the failure instead of being re-grepped away. **Item 3 (exempt the benign phrase).** The drive's exact cut line is unknowable from the filed (truncated) evidence — `excerpt()` had already discarded it before it was persisted. I exempted nix's own soft `warning: error: … retrying` (a substitution nix retries then succeeds — the benign class `runRawNix` cites at `enrollment.go:948-951`), beside `failed to reload` / `error (ignored)`, naming this drive in the code comment. This is the best-supported candidate. Because defect 1 now makes any residual tripping line self-evident in the masked_exit `Detail`, a re-drive will either go green or surface the exact line for a one-line follow-up exemption — no longer evidence-free. **Tests** (`internal/clan/`): `TestClassify_MaskedExitCarriesTheTrippingLine` (proof is the tripping line only, no benign noise), `TestClassify_BenignNixWarningIsNotMasked` (4a/4b: benign-only → nil; a real line beside it → masked_exit carrying the real line), `TestExcerpt_DropsProgressAndWarningNoise` (4c), `TestExcerpt_KeepsRealEvalErrors`. Full `go test ./internal/clan/` green; pre-push gate green. Rationale in the commit message and the STATUS.md milestone-log entry.
ben closed this issue 2026-08-11 23:24:55 +00:00
Sign in to join this conversation.
No milestone
No project
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.

Reference
Matou/idss#451
No description provided.