Skip to content

NA-0686 — infra-literal gate self-test and new needle classes - #43

Merged
Tebbens4832 merged 1 commit into
mainfrom
na0686-scanner-selftest
Jul 29, 2026
Merged

NA-0686 — infra-literal gate self-test and new needle classes#43
Tebbens4832 merged 1 commit into
mainfrom
na0686-scanner-selftest

Conversation

@Tebbens4832

Copy link
Copy Markdown
Member

Lane: NA-0686. Spine ruling: D-1325.

Carries the spine's updated scripts/ci/infra_literal_scan.pybyte-identical across all four repositories (md5 verified) — and its new self-test.

The gate had no tests

Its refusal to report a pass over an empty input (NOTHING EXAMINED, exit 2) was correct, valuable, and completely unguarded. That is how a CI gate silently becomes a no-op when a base ref is not fetched: CI goes green and everyone believes it.

scripts/ci/infra_literal_scan_selftest.py (13 checks) pins:

  • the NOTHING EXAMINED refusal in tree and diff mode;
  • ⚠ the deliberate asymmetry that staged mode does not refuse — a deletion-only or rename-only commit legitimately has no added lines, and blocking those would make the pre-commit hook unusable;
  • that the scan reports what it examined, not merely a verdict;
  • both new classes firing and going green again;
  • the Tier-1 per-path allowlist behaving as a budget rather than an exemption.

It runs before the scan, so a broken instrument fails before it can report clean.

The self-test carries no operator literal. It runs inside the tree the Tier-1 scan examines, so a test written the obvious way would make the gate fail on its own test file. Every needle is assembled at run time from fragments that never appear contiguously in the source.

Two new Tier-2b classes

CGNAT (100.64/10) and the retired public dynamic-DNS domain — each proven fail-closed on a synthetic added line and green again on removal.

Tier-2b added-line semantics are deliberate here: this repository carries 8 dated-record occurrences of the DDNS class across three test-evidence files, ruled LEAVE because they report what was true when written. The history stays untouched and every new one fails.

Measurements

  • infra-literal scan (tree): clean, 42 files / 14 333 lines examined
  • scanner self-test: 13 checks, 0 failed

Spine evidence: qsl-protocol docs/governance/evidence/NA-0686_as_built.md.

Carries the spine's updated scripts/ci/infra_literal_scan.py (byte-identical
across all four repositories) and its new self-test.

The gate had no tests. Its refusal to report a pass over an empty input
("NOTHING EXAMINED", exit 2) was correct, valuable and completely unguarded -
which is how a CI gate silently becomes a no-op when a base ref is not
fetched. The self-test pins that refusal, and pins the deliberate asymmetry
that staged mode does NOT refuse, since a deletion-only commit legitimately
has no added lines. It runs BEFORE the scan so a broken instrument fails
before it can report clean.

Two new Tier-2b classes: CGNAT tailnet addresses and the retired public
dynamic-DNS domain, each proven fail-closed on a synthetic added line and
green again on removal. This repository carries 8 dated-record occurrences of
the dynamic-DNS class; Tier-2b added-line semantics leave them untouched and
fail every new one.

The self-test carries no operator literal: every needle is assembled at run
time from fragments that never appear contiguously in its source.
@Tebbens4832
Tebbens4832 merged commit 86a22db into main Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant