fix(ci): a failed fetch is not a finding — the audit withholds what it cannot see - #33
Merged
Merged
Conversation
…at it cannot see Two defects in the auditor itself, both found by turning its own discipline back on it: 1. Every remote read was `gh api ... 2>/dev/null`, and the empty string a failure yields was read as a FACT. One sweep produced four wrong verdicts: vitareba and aoz-housing (live Next.js apps) vanished as "not a JS repo"; ai-forms and fleetcrown were accused of never running `verify` when their ci.yml does exactly that. Fetches now return three states — fetched / genuinely absent (404) / could not look — and every caller withholds its verdict on the third instead of charging the repo. A 404 is an answer and is not retried; neither is an exhausted rate limit (seconds of backoff cannot outlive an hour-long window). Transient failures retry with backoff. 2. `⊗ UNCALLED` string-matched `npm run verify`, but the property that matters is weaker: every gate `verify` composes runs in CI, unsoftened. aoz-housing satisfies it by fanning the gates into parallel jobs — the rule was asking a conforming repo to serialize the fleet-slowest pipeline to please a regex. Decomposed wiring now reports as informational `≡ DECOMPOSED`; botsmann's shape (hand-copy with --if-present on every step) is still caught. The transport lives in verify-predicates.sh so tests can stub `gh`: 29 cases cover both rules in both directions and all three fetch states, and a mutation run (collapse `return 1` into `return 2`) turns exactly the two relevant cases red. Post-fix sweep: 23 repos inspected, 0 below floor, 3 fetch failures withheld instead of reported as findings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two defects in
verify-floor-audit.shitself, found by turning the audit's own discipline back on it:1. A failed fetch was reported as a finding. Every remote read was
gh api … 2>/dev/null, and the empty string a failure yields was read as a fact. One sweep produced four wrong verdicts: vitareba and aoz-housing (live Next.js apps) silently vanished from the report as "not a JS repo"; ai-forms and fleetcrown were accused of never runningverifywhen theirci.ymldoes exactly that. The tell was arithmetic: two runs an hour apart inspected 24 and 22 repos with no repo created or deleted between them.Fetches now go through a three-state
gh_get:0 = fetched,2 = genuinely absent (404 — an answer, never retried),1 = could not look (retried with backoff; callers withhold the verdict). An exhausted rate limit also fails fast — seconds of backoff cannot outlive an hour-long window.2.
⊗ UNCALLEDencoded its first example, not the property. It string-matchednpm run verify, but the real contract is weaker: every gateverifycomposes runs in CI, unsoftened. aoz-housing satisfies it by fanning lint/typecheck/test into parallel jobs — the rule was asking a conforming repo to serialize the fleet-slowest pipeline to please a regex. That shape now reports as informational≡ DECOMPOSED; botsmann's hand-copy-with---if-presentis still caught.Proof
gh_getlives inverify-predicates.shso tests can stubgh— the original bug survived precisely because its failure path was unreachable without a real outage.test-verify-predicates.sh: 29 passed, 0 failed, covering both rules in both directions and all three fetch states (incl. 404-not-retried and rate-limit fail-fast, each costing exactly one call).return 1intoreturn 2(the original defect) turns exactly the two relevant cases red; baseline restored green.· unreadableinstead of becoming verdicts — the fix demonstrating itself.🤖 Generated with Claude Code