NA-0686 — split the literal scan into its own infra-literal-scan context, and retire a stale comment - #68
Merged
Conversation
…ext, and retire a stale comment that said the opposite of the truth OBS-C, first half. Until now this repository's literal scan reported under the name `public-safety`, so an operator-infrastructure literal and a leaked private key FAILED AS THE SAME WORD. At the branch-protection layer the two causes were indistinguishable: a reviewer saw "public-safety failed" and could not tell whether a secret had escaped or a hostname had, without opening the log. Same defect class as ENG-0082 (401 and 403 collapsing to one marker), one layer out. The new job, its context name, its step names and their order are byte-consistent with qsl-protocol's infra-literal-scan.yml, so all four repositories now report this gate under one name. ⚠ THE SCAN IS DELIBERATELY STILL RUN IN public-safety TOO, AND THAT IS THE SAFE SHAPE RATHER THAN AN OVERSIGHT. Measured before editing: in this repository `public-safety` is a REQUIRED context whose entire content is this scan - it has no other duties. Moving the steps out would have left a required context that never reports, and a required context that never reports BLOCKS EVERY PULL REQUEST INDEFINITELY. That is the NA-0653 failure, and walking into it while splitting a context to avoid a different hazard would have been a poor trade. Duplicating a scan over a few dozen files for one transition is cheap; stranding the repository is not. The stale comment is the second half. It read "ADVISORY UNTIL BRANCH PROTECTION CHANGES ... this repository requires exactly one status context, `rust`". Measured against live branch protection: THREE are required - advisories, public-safety and rust - so both jobs have been blocking for some time. A comment that understates a gate is worse than no comment, because it invites someone to merge past a red they were told was advisory. What is genuinely advisory now is the NEW context, and the replacement says so. NO BRANCH PROTECTION CHANGE IS MADE HERE - that is operator-only. The sequence is written into the workflow so the follow-up is not guesswork: this merges and infra-literal-scan reports on main at least once; THEN the operator adds it to the required set and drops public-safety; a later lane deletes the redundant job. Red-capable by construction: the new job runs on this very PR, so its own report is the evidence that the context exists and gates.
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.
Addendum to NA-0686 (D-1325), operator-authorized. OBS-C first half only.
Workflow-only change to
.github/workflows/ci.yml. No branch-protection change — that is operator-only.(a) The split
Until now this repository's literal scan reported under the name
public-safety, so an operator-infrastructure literal and a leaked private key failed as the same word. At the branch-protection layer the two causes were indistinguishable: a reviewer saw "public-safety failed" and could not tell whether a secret had escaped or a hostname had, without opening the log.That is the same defect class as ENG-0082 — 401 and 403 collapsing to one marker code — one layer out. Distinct causes get distinct words.
The new job's context name, step names and their order are byte-consistent with
qsl-protocol'sinfra-literal-scan.yml(verified by comparing the parsed step signatures, not by eye), so all four repositories now report this gate under one name and old lane records keep reading true.⚠ (a.1) Why the scan is deliberately STILL run in
public-safetyThis is the safe shape, not an oversight, and it is worth reading before approving.
Measured before editing: in this repository
public-safetyis a REQUIRED context whose entire content is this scan — it has no other duties. So moving the steps out, rather than adding a second job, would have left a required context that never reports. A required context that never reports blocks every pull request indefinitely — the NA-0653 failure.Walking into that hazard while splitting a context specifically to avoid a different hazard would have been a poor trade. Duplicating a scan that examines 81 files for the length of one transition is cheap; stranding the repository is not.
A
needs:-gated aggregate was considered and rejected: a skipped job can count as SUCCESS for a required context in GitHub, which would turn a scan failure into a greenpublic-safety. Fail-open is not an option for this gate.(b) The stale comment
The note above
public-safetyread:Measured against live branch protection: three contexts are required —
advisories,public-safetyandrust. Both jobs have been blocking for some time. A comment that understates a gate is worse than no comment, because it invites someone to merge past a red they were told was advisory.The replacement states the measured truth, and names what is genuinely advisory now: the new
infra-literal-scancontext, which runs and reports but is not in the required set.The sequence, written into the workflow so the follow-up is not guesswork
infra-literal-scanreports onmainat least once;infra-literal-scanto the required set and removespublic-safety;Step 2 is deliberately not automated and not this lane's to make.
Evidence
Red-capable by construction: the new job runs on this very PR, so its own report is the evidence that the context exists and gates. Locally before pushing:
--mode treeclean (81 files examined) and the selftest 13 checks, 0 failed. Every workflow file re-parsed withyaml.safe_loadafter editing.Goals: G4, G1, G5