carlos / platform Public

spec: Astra's code review findings, unedited (13 and 14 fixed in 63287c0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 682811029c1e8d3d5045bb9007e19b0068ad0c5a parent 6232a1c
1 file changed, +17 −0
  • docs/superpowers/specs/CODEX-FINDINGS-SCANNER-HOST-CODE.md +17 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/specs/CODEX-FINDINGS-SCANNER-HOST-CODE.md b/docs/superpowers/specs/CODEX-FINDINGS-SCANNER-HOST-CODE.md
new file mode 100644
index 000000000..34fae5280
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-FINDINGS-SCANNER-HOST-CODE.md
@@ -0,0 +1,17 @@
+13. **P2 — The self-test accepts timeouts as proof that archive limits work.** [scanner-selftest:104](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/scanner-host/infra/modules/scanner-host/files/scanner-selftest:104)
+
+ The classifier accepts `Heuristics.Limits.Exceeded.MaxScanTime FOUND` as a successful `limit` result. That proves only that scanning timed out, not that the deterministic archive limits prevented silent truncation. A regressed engine can therefore pass during transient load and later answer `OK` when that load subsides. ClamAV generates this reply specifically on timeout. [ClamAV 1.4.3 source](https://github.com/Cisco-Talos/clamav/blob/clamav-1.4.3/libclamav/others.c#L1152-L1156)
+
+ The substring match also accepts `Win.Heuristics.Limits.Exceeded.Fake FOUND`. Both misclassifications were reproduced using the actual classifier.
+
+ **Fix:** Parse the signature and accept only the expected deterministic limit names. Treat `MaxScanTime` as failure or retry it within a bounded policy; reject lookalikes. Add regression cases for both.
+
+14. **P3 — A logging failure bypasses the required FAILED marker.** [scanner-init.sh.tftpl:15](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/scanner-host/infra/modules/scanner-host/scanner-init.sh.tftpl:15)
+
+ If `tee /dev/console` fails inside `say()`, `set -e` terminates the script without invoking the non-inherited `ERR` trap. Simulating that failure with the actual function definitions produced exit status 1 but no `SCANNER-HOST FAILED:` marker. The prescribed serial-output polling can consequently receive neither terminal marker.
+
+ **Fix:** Handle logging failures explicitly, or inherit the trap with `set -E` and make `fail()` emit its marker through a fallback that does not depend on successful serial-console logging.
+
+Reviewed `092c5a85`; no files changed. Shell syntax, OpenTofu formatting and diff checks passed. Go, provider-backed and live-box tests were not run.
+
+accept with fixes
\ No newline at end of file