Render known-good binaries in text output#249
Conversation
When an artifact instance is a known-good binary (the SDK exposes known_good_sources), the text formatter now reports "This artifact is a known-good binary (flagged by: …); it is not scanned." and "Status: Known good" instead of the misleading "no engines responded — rescan now" a window-closed, no-assertion instance would otherwise show. Read with getattr(..., None) so a CLI on an older SDK renders exactly as before; non-known-good output is unchanged. JSON output already carries the raw known_good array via .json.
ReviewClean against AGENTS.md and Correctness — gating is consistent: Detections uses Spec / contract — Tests — new path exercised both ways (known-good renders sorted feeds + One non-blocking note (just confirming the spec-05 gate is honored): the new test depends on |
|
Superseded by #250 — the branch was renamed to |
TL;DR
known_good_sources, the Detections line reads "This artifact is a known-good binary (flagged by: …); it is not scanned." and the Status line reads "Known good".getattr(..., None), so a CLI running against an older SDK renders exactly as before. Non-known-good output is byte-for-byte unchanged;JSONOutputneeds no change (it dumps.json, which already carries the rawknown_goodarray).Tests
Pure-unit formatter tests: a known-good instance renders the sorted feed list + "Status: Known good" and no rescan prompt; a normal instance is unchanged (still "Status: Assertion window closed"). Full CLI suite green (74 passed) — no golden-output cassette shifts. Spec
03-formatters.mdupdated in the same change set.Requires
ArtifactInstance.known_good/known_good_sources, the attribute this rendering reads). Backward-compatible viagetattr, but the known-good rendering only activates once that SDK change is released.