Skip to content

Agent guide: scripts/ full inventory

Moved verbatim out of scripts/CLAUDE.md (progressive disclosure: that file loads whenever an agent works in its tree; this full table loads only when its pointer fires). scripts/CLAUDE.md keeps a one-line row per entry and remains the primary contract.

Inventory

Script Purpose Triggered by
verify.py The verification orchestrator (CLAUDE.md "M0-3"). Runs a named --profile {fast,pr,full} bundle of the checks below through one step catalog, so pixi run check, .pre-commit-config.yaml, and .github/workflows/ci.yml can't independently drift from the real PR gate. --only/--skip/--list/--json for local iteration and machine-readable receipts. Every Python-module tool step (ruff/mypy/pytest) routes through run_isolated_module.py (below), not a bare python -m (P0.3, security hardening): a PR-planted repository-root pytest.py/mypy.py/ruff.py must not be able to shadow the real, installed tool while this script runs with cwd=ROOT. Pixi (pixi run check = --profile pr), pre-commit (mypy + ai-readiness hooks), CI (ai-readiness/lint-and-types/fair-metadata jobs); manual. Mirrored in tests/test_verify_profiles.py.
run_isolated_module.py The isolated-module-lookup runner every Python-tool -m invocation in this directory shares (verify.py's _py(), check_ai_readiness.py's mypy-baseline check, gen_repo_facts.py's fast-test-count collection, build_and_check_distribution.py's build/twine calls). Invoked as sys.executable -I run_isolated_module.py <module> [args...]: -I (isolated mode) keeps the checkout/cwd out of sys.path and ignores PYTHONPATH/other PYTHON* env vars, closing the repository-root-shadowing vector a bare python -m <tool> run with cwd=ROOT is exposed to; the runner then restores the base interpreter's/venv's normal user-site visibility (unless PYTHONNOUSERSITE is set) so a pip install --user tool stays resolvable. Pure stdlib. imported/invoked as a subprocess entry point by the four scripts above; gated via tests/test_verify_profiles.py.
verify_clang_lane.py The clang-sensitive/clang-catalog steps (clang-version-sensitive tests and a representative catalog subset, run against whatever clang is first on PATH), split out of verify.py to keep that orchestrator under its file-size record. Exists because #1918 was tested against clang 18 only and newer clang's -fdump-record-layouts spelling surfaced only on the macOS/Windows legs; the abicheck driver resolver (compiler_driver.resolve_clang_bin) and the tests both select clang by name on PATH, so a lane chooses the clang under test by PATH order. CLANG_CATALOG_SUBSET uses full case names because the validator filters by substring. imported (by verify.py); CI clang-latest.yml (distro clang 18 + pinned newest LLVM).
verify_stream.py run_streaming: runs one verify.py step's command, echoing each stdout/stderr line as it arrives while keeping it, so a step that never exits (a hung test, a CI job limit) still leaves its output in the log; split out of verify.py to keep that orchestrator under its file-size record. imported (by verify.py); gated via tests/test_verify_stream.py.
gen_repo_facts.py Single source of truth for volatile repository facts (CLAUDE.md "M1-4") — project/latest-release version, example-catalog size, fast-lane test count (collected in disjoint --collect-partition slices at once, tests/pytest_collect_partition.py, and summed; tests/test_collect_partition.py pins the sum to one full collection), canonical Python. Writes repo_facts.json; --check fails on drift. latest_release is a maintained field (bump it when cutting a release), not auto-derived from git tags (unreliable on a shallow CI checkout). verify.py --only repo-facts (CI ai-readiness job); manual.
check_ai_readiness.py AI-readiness gate (file size, CLAUDE.md coverage, test ratio, ChangeKind invariants, mypy baseline drift, import cycles, engine/CLI dependency-direction boundary, test-assertion density, ADR index/nav + status sync). CI (ai-readiness) and pre-commit, both via verify.py --only ai-readiness. Exits 1 on errors.
find_duplicate_tests.py Reports same-module test_* functions with byte-identical bodies (matching parameters and decorators too). A review queue, not a gate and deliberately unwired: two tests can share a body and both be wanted, so it separates the usually-intentional different-class clones from the category worth reading — same class or module scope, different names, i.e. a test whose name promises input X while its body tests input Y. That category was worked to zero in PR #1243; see the script's own docstring for what each of those nine groups turned out to be, and for two cautions (mutate before claiming a gap; a clone may be required by a separate catalog↔test contract). --json PATH writes the full listing; --tests-dir screens elsewhere. Manual.
refactor_churn_source.py The parsing and git-reading layer of test_refactor_churn.py, split out at that file's size cap. A file at one revision becomes a _Source (test spans, assertion and neutral lines, body digests); _Blobs reads rev:path through one long-lived git cat-file --batch; _git_env() strips the repository-selector variables git hooks set. Imported by test_refactor_churn.py.
test_refactor_churn.py Report-only mirror-test churn ranking. Walks git log -p -M -U0 --no-merges -- tests over --since (default 1 year ago, oldest first, renames followed) and attributes each changed hunk to the innermost enclosing test_* function, parsed with ast at the revision the lines come from. A changed line is assertion (an assert, a pytest.raises/warns header, an assert* call, or an expected*/want* assignment), neutral (import, blank or comment: attributes nothing) or setup. A test created by the commit is not an edit, nor is a test the commit moves with an unchanged body (a reorder or a split); a moved test whose body changed counts against its old location, so it reads as gone. A pure rename has no hunks. Ranks tests by refactor assertion edits, then refactor edits; feat:/fix: edits are context. Tests with a refactor edit that are gone at HEAD are listed apart. A shallow clone is fetched with git fetch --unshallow (--no-unshallow reports it instead). --json PATH writes the full listing. A one-year window takes about two minutes on this repository (ast parsing dominates). Caveats: labels are syntactic, and edits to helpers outside test_* functions are not attributed. Tested in tests/test_test_refactor_churn.py on scripted repositories. Manual.
test_redundancy.py Reports tests whose coverage adds nothing to the run: every line a test covers is also covered by another test (coverage-redundant, naming the test(s) that cover all of its lines alone), and, given a --kills file mapping mutant keys to killing test ids, whether it also kills no mutant another test kills (fully-redundant). Input is the per-test context data of pytest --cov=abicheck --cov-context=test (--scope GLOB limits what is reported, not what is compared against). Without --kills no test can be fully-redundant: mutmut 3.7.0 records each mutant's outcome but not its killing tests (its own TODO), so kill status is reported unknown. A review queue, not a gate: exits 0, edits nothing, and the coverage uniqueness it reports is relative to the run measured. manual; .github/workflows/test-redundancy.yml (workflow_dispatch) runs the fast unit lane and uploads the JSON and markdown report as an artifact.
audit_test_quality.py The test-quality ratchet (quality-gates.md, "Test-quality ratchet"): a static ast scan of every test_* function for asserts that cannot fail for a wrong behaviour -- type_only (only is not None/callable/hasattr/isinstance against a builtin/len > 0), mock_echo (patches and only checks a mock was called, not with what), set_then_read (x = C(attr=LIT) then x.attr == LIT), constant_mirror (pins an abicheck constant or enum .value), no_assert; trivial_size is report-only. --check gates against test_quality_baseline.json (keys file::Class.test, no line numbers): a new finding fails, a fixed-but-baselined key fails (--update rewrites), and --base REF (default $ARCHITECTURE_BASE) rejects a key the base revision lacks. # test-quality: ok <reason> on the def or a decorator line exempts a deliberate shape. Without --check it prints a ranked report (--json PATH, --top N) and exits 0. Stdlib only. verify.py --profile pr (test-quality step, CI ai-readiness job); gated via tests/test_audit_test_quality.py.
usecase_paths.py Which code each use case runs. record runs the automated scenarios of tests/scenarios/*.yaml (and, with --source flows, the real CLI command lines of usecase_flows.yaml against compiled catalog cases) under coverage, one coverage context per run, and maps executed lines to the function whose body ran -- never the def line, which runs at import and once made every imported function read as reached (tests/test_usecase_paths.py checks attribution against generated code that logs its own calls). rank tiers every function by how many distinct use cases reach it (shared / use-case / unreached) and, with --unit-coverage, lists use-case code whose own unit coverage is low. diff BASE HEAD reports runs whose path changed (grouped by the change they share) and functions no use case reaches any more -- a signal to look, not a deletion list. dead classifies a recording's unreached functions by production reference (production_references.py, below). record --root measures another checkout with this tool. ratchet and adr-reach (in usecase_adr_reach.py, below) gate the unreached set against a committed baseline and classify each ADR's named code by reach. Report-only on PRs. CI (usecase-paths.yml: PR base-vs-head diff; weekly full ranking and dead-code list); manual.
usecase_adr_reach.py usecase_paths.py's adr-reach and ratchet analyses. ADR reach joins a recording with the abicheck/ files each numbered ADR names and the registry use cases citing it (file name or ADR-NNN), classifying every ADR as reached (a citing use case runs its code), reached-elsewhere, not-reached, untraced (every named file gone) or no-code-refs. Ratchet compares the recording's unreached function set with usecase_unreached_baseline.json (same recording sources only): newly unreached is growth, reached-again an improvement to re-record. imported (by usecase_paths.py); weekly usecase-paths.yml (ratchet --strict over a scenarios-only recording, adr-reach over the full one; never on a PR); gated via tests/test_usecase_adr_reach.py.
production_references.py usecase_paths.py dead's reference analysis, the rule of docs/contribute/plans/dead-code-and-single-owner.md made executable: an unreached function is dead when every reference to its name in production code (abicheck/, scripts/, action/, actions/, .github/, pyproject.toml; a test caller does not count) sits inside another dead function's body -- a greatest fixpoint, so mutually-calling unused helpers go together. Functions named in docs/use/docs/reference/docs/learn (documented API) or only in an ADR/plan are listed apart and act as roots, so their helpers are kept with them. Name-based and conservative (obj.foo() keeps every foo); dunders, functions behind a registering decorator, and methods of a class with an external base are reported as not checkable. tests/test_production_references.py checks the fixpoint against a breadth-first reachability oracle over generated call graphs. A second pass, dead_parameters, lists parameters with a default that no production call passes (calls matched by name; **kw/*args count as passing; a function with any non-call production use is not checkable), checked by tests/test_production_references_parameters.py against generated packages. imported by usecase_paths.py dead.
check_usage_ratchet.py The usage ratchet (docs/contribute/agent-guide/quality-gates.md, "Usage ratchet"): a static, deterministic gate for code kept alive only by tests and for cross-module exact clones -- the two things the 80% coverage floor cannot see, since it counts a test as a caller. Reuses production_references.py's reference rule and fixpoint for test_only_functions (module#qualname), adds an import-graph fixpoint for test_only_modules, and hashes each function's position-free, name-free AST for cross_module_exact_clones (members sorted, no line numbers). usage_ratchet_baseline.json only shrinks (new key fails; fixed-but-baselined key fails; --update rewrites); --base REF (default $ARCHITECTURE_BASE) rejects a baseline key absent from the base revision's baseline. usage_exceptions.yaml declares legitimately test-only/duplicated keys (public API, plugin entry points), each with a reason; a stale exception fails. Both data files are excluded from production_references.py's production set (NOT_REFERENCES), or a baselined key would keep its own function alive. --json lists findings. Pure stdlib apart from PyYAML for the exceptions file. verify.py --profile pr (usage-ratchet step, CI ai-readiness job); gated via tests/test_usage_ratchet.py.
check_static_dead_code.py Static dead-code gate over abicheck/, the per-PR complement of usecase_paths.py dead: unreachable statements and orphan modules fail outright; unread parameters ratchet against the shrink-only static_dead_code_baseline.json. tests/test_static_dead_code.py::test_repository_is_clean (repo_scan marker, CI ai-readiness job via verify.py --only repo-scan-tests); manual --list.
usecase_flows.yaml Data for usecase_paths.py record --source flows: the catalog cases and the real CLI command lines (each tagged with a docs/contribute/usecase-registry.yaml id) run against them. tests/test_usecase_paths.py checks every flow names a registered use case, real cases, and only placeholders the recorder provides. read by usecase_paths.py.
check_architecture.py Focused ADR-061 gate for the stable responsibility-package graph and temporary no-growth debt ledger in architecture/: validates both schemas, new-file ceilings/names, frozen root prefix families, migrated-package dependency direction/cycles/instruction coverage, and configured facade shape. Pure stdlib and accepts --root for miniature-tree tests. The debt-no-growth check scopes itself to a base revision — --base, else $ARCHITECTURE_BASE (what CI sets: the PR base sha on a pull_request run, the push's own before sha on a push-to-main run, the checked-out revision's own parent (HEAD^) on a workflow_dispatch run, empty when none of those resolve — a branch's first push, or a dispatch against the repository's very first commit), else — only when $ARCHITECTURE_BASE is absent from the environment entirely, i.e. a bare local invocation, never when CI set it explicitly to empty — a local git merge-base HEAD against origin/main then a local main branch, whichever resolves first — so a bare local run distinguishes growth this change introduces from cumulative drift already on the base branch, instead of comparing every debt-tracked file against its original ADR-061 adoption baseline. verify.py --profile pr (architecture step); gated via tests/test_architecture_check.py.
generation_corpus_gate.py The generation-corpus gate, split out of check_ai_readiness.py (2000-line hard cap): EXTRACTOR_GENERATION needs one audited SPELLING_MIGRATIONS row per generation (no placeholder reason) and a frozen corpus snapshot or skip note for every retired generation. Pure stdlib (ast/json). imported (by check_ai_readiness.py); gated via tests/test_generation_corpus_gate.py.
schema_bump_gate.py The schema-bump-reason gate (ADR-062 D19), split out of check_ai_readiness.py (2000-line hard cap): every SCHEMA_VERSION bump past v69 needs a SCHEMA_BUMP_REASONS row SchemaBump(kind, why_not_extension) with kind envelope or wire and a real reason; an optional new fact is an extension fact instead (abicheck/storage/extension_fact_catalog.py). Pure stdlib (ast). imported (by check_ai_readiness.py); gated via tests/test_schema_bump_gate.py.
known_gap_canaries.py The known-gap-canaries gate, split out of check_ai_readiness.py (2000-line hard cap): every OPEN/PARTIAL/NARROWED entry of docs/contribute/known-gaps.md names an existing @pytest.mark.known_gap_canary test (<!-- canary: tests/...::test_x -->) or carries a reasoned <!-- no-canary: ... --> note; CLOSED/FIXED entries may not stay on the main page; every marked test is named by an entry. Pure stdlib (ast/re). imported (by check_ai_readiness.py); gated via tests/test_known_gap_canaries_gate.py.
container_corpus_gate.py The container-corpus gate (plan storage-format-v2.md A1.9, ADR-062 D14-D18), a sibling of generation_corpus_gate.py: tests/fixtures/containers/manifest.json names a frozen entry for each storage-v2 container sample, each entry's file or package directory still has its recorded sha256 (a frozen sample is refrozen, never edited), and the newest entry of each sample records the scalar encoder versions the sources declare (VERSION_SOURCES: snapshot schema, bundle-facts schema, G40 archive schema, package format, ref schema, bundle-variant spec). section_schema_versions is computed, so tests/test_container_corpus.py checks it. Pure stdlib (re/json/hashlib). imported (by check_ai_readiness.py); gated via tests/test_container_corpus_gate.py.
freeze_container_corpus.py Freezes one sample of every storage-v2 container into tests/fixtures/containers/: the G38 BundleFacts document and G40 archive of a two-library ELF release, a project capture-variants package, and single-file snapshots from the clang header frontend, a synthetic Mach-O dylib and a committed PE DLL. Each is produced through the CLI by tests/_container_corpus.py, the steps tests/test_container_corpus.py repeats for the fresh side. Same encoder versions: the newest entry is rewritten; a bumped version: entry n + 1 is added and the older entries kept. --sample NAME limits it. manual, after bumping an encoder version (the container-corpus check fails until then) or changing the corpus sources.
freeze_generation_corpus.py Freezes the extractor-generation corpus (tests/fixtures/generations/) at one historical commit: git archives its abicheck/, builds corpus/corpus.cpp with g++, dumps it with that code and records gen<N>/corpus.json.gz plus its manifest.json entry; --skip N --reason records a generation with no snapshot. Bug class storage.cross_generation_spelling_drift. manual, with --ref HEAD before raising EXTRACTOR_GENERATION (the generation-corpus check fails until then).
adr_status_sync.py The adr-status-sync gate, split out of check_ai_readiness.py (already past the 2000-line hard cap): an ADR's own **Status:** line and its row in docs/contribute/adr/index.md may not contradict each other, an optional **Verified:** <ref>@<sha> on <date> receipt must parse, and commits after that sha touching a first-party file the Status names raise a WARN — the only check here that catches document-vs-code drift. Also owns the ADR Status parsing helpers (_ADR_FILE_RE, _adr_status_text) that check_ai_readiness.py's own adr-index-nav-sync reuses. Pure-stdlib, importable. imported (by check_ai_readiness.py); gated via tests/test_ai_readiness.py.
engine_cli_boundary.py The engine-cli-boundary gate, split out of check_ai_readiness.py the same way adr_status_sync.py was (same 2000-line-cap reason): no engine-layer module (scan_engine.py, service*.py, artifact_*.py, buildsource/**/*.py, workflows/artifact/**/*.py) may import click or a cli/cli_* sibling — including a nested CLI adapter like abicheck/frontends/cli/ — allowlist-and-shrink (ENGINE_CLI_BOUNDARY_ALLOWLIST), keyed by a stable <rel>::<desc>::<occurrence> identity rather than line number. A trailing imported alias is only flagged once verified against the real file tree as an actual submodule (_alias_is_real_submodule), so an ordinary symbol that merely starts with cli_ is never a false positive. Pure-stdlib, importable. imported (by check_ai_readiness.py); gated via tests/test_engine_cli_boundary.py.
fact_detector_misuse.py The fact-detector-misuse gate (ADR-063 Phase 0, docs/contribute/plans/one-semantic-pipeline.md), split out of check_ai_readiness.py the same way fact_field_readers.py/engine_cli_boundary.py were: a real, repo-wide AST scan for a direct ==/!= comparison of a Fact[T]-typed value (a <attr>_fact field access, or a Fact(...)/Fact.<classmethod>(...) constructor call) — the check abicheck/model/fact.py's own Fact docstring already claimed exists by name before this module was written. No baseline: zero existing hits under abicheck/ today, so any match is an unconditional error. Only the top-level scan entry point (fact_equality_misuse_sites/check_fact_detector_misuse) and the def-time default/annotation scope-override machinery (_default_and_annotation_scope_overrides) live here now — the Fact-typedness primitives moved to fact_detector_misuse_aliases.py (below) once this file itself crossed the 2000-line hard cap a second time. Pure stdlib, importable. imported (by check_ai_readiness.py); gated via tests/test_fact_detector_misuse.py.
fact_detector_misuse_aliases.py The "does this expression/annotation/name resolve to a Fact[T] value" primitives fact_detector_misuse.py builds its top-level scan on — FACT_FIELD_NAMES, _imported_fact_aliases, _is_fact_typed_expr, _static_display_elements, _static_subscript_element, _admissible_loop_element, _candidate_resolves_to_fact, _annotation_head_name, _is_fact_typed_annotation, _fact_aliases — split out once fact_detector_misuse.py crossed the AI-readiness file-size gate's own 2000-line hard cap for the second time (the first split produced fact_detector_misuse_scope.py, below); a mechanical extraction (unchanged function bodies), not a redesign. FACT_FIELD_NAMES/_imported_fact_aliases/_is_fact_typed_expr/_static_subscript_element/_fact_aliases are re-exported by fact_detector_misuse.py (FACT_FIELD_NAMES as FACT_FIELD_NAMES, the same explicit-re-export spelling checker_policy.py uses for ChangeKind) so every existing from .fact_detector_misuse import FACT_FIELD_NAMES call site, including this check's own test suite, is unaffected. No public entry point of its own — imported by fact_detector_misuse.py only, via the identical sys.path guard. Pure stdlib, importable. imported (by fact_detector_misuse.py); gated via tests/test_fact_detector_misuse.py and siblings.
fact_detector_misuse_scope.py The lexical-scope resolution primitives both fact_detector_misuse.py and fact_detector_misuse_aliases.py build their own alias resolution on — _enclosing_qualnames/_qualname_at/_QualnameSpans, _lexical_function_parents, _def_containing_qualnames, _bound_names, _paired_unpacking_candidates, _match_pattern_names, _global_declared_names, _scope_chain_union, _locally_bound_constructor_shadow_names, _constructor_alias_names/_constructor_method_alias_names, and _iter_default_subtree (moved here once both sibling modules needed it) — split out once fact_detector_misuse.py itself crossed the AI-readiness file-size gate's own 2000-line hard cap; a mechanical extraction (unchanged function bodies), not a redesign. No public entry point of its own — imported by fact_detector_misuse.py/fact_detector_misuse_aliases.py only, via a sys.path guard mirroring check_ai_readiness.py's own identical one (so it resolves whether either loads directly or as scripts.fact_detector_misuse* by a test that never imported check_ai_readiness.py first). Pure stdlib, importable. imported (by fact_detector_misuse.py, fact_detector_misuse_aliases.py); gated transitively via tests/test_fact_detector_misuse.py/tests/test_fact_detector_misuse_scoping.py/tests/test_fact_detector_misuse_def_time_scope.py.
fact_field_readers.py The fact-field-readers gate (ADR-063 Phase 0's "widened, non-glob AI-readiness check", docs/contribute/plans/one-semantic-pipeline.md), split out of check_ai_readiness.py the same way engine_cli_boundary.py was: a real, repo-wide AST scan (not a diff_*.py glob) for a direct read of RecordType.bases/virtual_bases/vtable/vptr_offset_bits or Param.is_va_list — each carries a Fact[...] sibling recording whether the legacy value is a real determination or unavailable, and a direct read cannot tell the two apart. Catches a plain attribute access, a getattr(obj, "name", ...) call (including a resolved getattr/builtins alias, excluding one locally shadowed), operator.attrgetter(...)/__getattribute__ (bound and unbound), an ast.AugAssign target (rec.bases += x, including through a mapping receiver), a mapping-receiver subscript/.get() read (vars(rec)["bases"]/rec.__dict__.get("bases"), including through an intermediate alias), and a structural-pattern-matching keyword or positional class pattern, all alike. Allowlist-and-shrink (KNOWN_UNMIGRATED_READERS, keyed <rel>::<qualname>::<attr>::<outer-expr-text>::<expr-text>::<occurrence> — outer-expr-text is the read's own outermost containing expression and expr-text its bare source text, both via ast.get_source_segment, since a bare positional occurrence rank let two textually different reads on one line collide — generated from the real scan rather than hand-counted); EXEMPT_FUNCTIONS is the separate, non-shrinking, function-scoped (not whole-module — a review round found a module-level exemption hides a genuine decision function sharing a producer's file) set of the field's own dataclass/bridge __post_init__ and the specific DWARF producer/backfill functions. Pure stdlib, importable. imported (by check_ai_readiness.py); gated via tests/test_fact_field_readers.py.
fact_field_readers_scope.py Lexical-scope resolution primitives for fact_field_readers.py, split out once that module approached the 2000-line hard cap (mechanical extraction, not a redesign — mirrors fact_detector_misuse_scope.py's own identical split): _enclosing_qualnames, _parent_map, _TRANSPARENT_EXPR_WRAPPER_TYPES, _outermost_containing_expr, _locally_bound_names, _lexical_function_parents — every function unchanged from its original home. Deliberately not shared with fact_detector_misuse_scope.py's own, differently-shaped same-named helpers; see either module's own docstring for why. Pure stdlib, importable. imported (by fact_field_readers.py); gated via tests/test_fact_field_readers.py/tests/test_fact_field_readers_wrapper_scoping.py.
fact_field_readers_scan.py The per-node matching half of fact_field_readers.py's unmigrated_fact_reader_sites, split out to break up that function's single very complex body (radon CC 179): its _shadowed/_is_mapping_receiver/_expr_text closures and every ast.walk dispatch branch are methods of ReaderScan, one per reader form, evaluated in the identical order with identical conditions (behavior-preserving; output verified byte-identical over every abicheck//tests//scripts/ file). Owns FACT_BRIDGED_ATTRS/FACT_BRIDGED_CLASS_NAMES (re-exported by fact_field_readers.py); the alias collection stays in fact_field_readers.py, which hands a ReaderScanContext in. Pure stdlib, importable. imported (by fact_field_readers.py); gated via tests/test_fact_field_readers.py and siblings.
fact_registry_completeness.py The fact-registry-completeness gate (ADR-063 D7/Phase 5, docs/contribute/plans/one-semantic-pipeline.md), mirroring fact_field_readers.py's own extraction pattern. Enforces abicheck/model/fact_registry.py's FACT_REGISTRY in three directions: every Fact[T]-typed model field (a <field>_fact sibling on any @dataclass under abicheck/model/) has exactly one registry entry and vice versa (a stale entry naming a renamed/removed field fails too); and every field eligible for conversion but not yet converted — case (a), read from fact_registry.REFERENCE_FLAG_COVERAGE's flag-backed inventory, or case (b), a real AST scan for a tri-state (X \| None) annotation with an adjacent documented-ambiguity comment — is named in fact_registry.KNOWN_UNCONVERTED_ELIGIBLE_FACTS, the identical allowlist-and-shrink discipline fact_field_readers.KNOWN_UNMIGRATED_READERS already establishes (a stale allowlist entry that's since been converted also fails, keeping the baseline shrink-only). Pure stdlib for the AST scan; lazily imports abicheck.model.fact_registry (a dependency-free leaf module) to read the registry itself. imported (by check_ai_readiness.py); gated via tests/test_fact_registry_completeness.py.
semantic_ir_cutover.py The semantic-ir-cutover gate (ADR-063 Phase 6B, docs/contribute/plans/one-semantic-pipeline.md), split out the same way fact_field_readers.py/engine_cli_boundary.py were. A migrated detector cohort may not read back into the legacy AbiSnapshot collection it was migrated off: MIGRATED_COHORTS names each closed cohort's modules, the fields it was migrated off, and the one adapter module allowed to read them. Real AST scan — a direct attribute access, getattr(obj, "name"), and a resolved getattr alias alike; never a same-named local or an inbound keyword argument. Deliberately not an allowlist-and-shrink baseline like KNOWN_UNMIGRATED_READERS: a cohort is added at the moment it is migrated, so a grandfathered reader cannot exist, and there is no per-site exemption — a migrated module needing something only the legacy shape carries projects it inside abicheck/model/semantic_ir_legacy_adapter.py instead. Two cohorts closed so far: typedefs (abicheck/compare/typedefs.py) and constants (abicheck/compare/constants.py, cohort 2). A third, functions (abicheck/compare/function_cutover.py), was investigated (2026-09-11) but deliberately left unregistered: its first draft built a SemanticIRIndex and looked up each function's identity but discarded the result, so registering it would have made this gate pass with no real SemanticIR consumption (Codex review, PR #1224) — see that module's own docstring and docs/_meta/one-semantic-pipeline-status.yaml's semantic_ir entry for the full account of what landed instead (a tested, not-yet-consumed legacy_function_ir adapter projection). Pure stdlib, importable; also runnable standalone for a report. It also owns a second rule: no checker-layer (CHECKER_GLOBS) module reads the backend-named dwarf/dwarf_advanced (attribute or getattr). Since ADR-063 criterion 4 closed (2026-10-05) the debug layout lives in the IR store (declarations.debug_layout/debug_advanced), so there is no allowlist: any such read fails. imported (by check_ai_readiness.py); gated via tests/test_typedef_cutover.py/tests/test_constant_cutover.py/tests/test_function_cutover.py/tests/test_backend_declaration_readers.py.
perf_antipatterns.py The perf-antipatterns gate (AST, abicheck/ only), a sibling leaf module of check_ai_readiness.py. Flags shapes that turn linear work quadratic or repeat fixed work per item when they sit inside a loop or comprehension: membership/index/count on a function-local list, re.compile, json.loads/deepcopy, self-copying accumulation (acc = acc + [...], [*acc, x], {**acc, ...}), subprocess calls, re-sorting or copying a loop-invariant collection, str += concatenation, quadratic self-dedup (a comprehension whose first iterable is a name or attribute chain — s, self.s, directly or via enumerate(...) — testing each element against that same expression or a slice of it with in/index/count), pickle.loads/model_copy(deep=True), and blocking network I/O or time.sleep. A site that is the work itself is exempted in place by a # perf-ok: <reason> comment (trailing the statement or on its own line above it). perf_antipatterns_baseline.json holds per-(file, function, rule) counts of untriaged sites -- empty since every existing one was fixed or exempted: a count above baseline is an error, a baseline above reality a warning to shrink it. --all lists every site, --write-baseline re-records. imported (by check_ai_readiness.py); gated via tests/test_perf_antipatterns.py; manual.
audit_repeated_calls.py Finds first-party functions called repeatedly with the same arguments inside one compare() (plain values by value, other objects by identity; generator resumptions are not counted as calls) -- the missed-memoization question a call count cannot answer. Runs the synthetic workloads in tests/_compare_workloads.py; --workload/--mode/--n/--top. Also owns the cost-budget ratchet: --write-budgets re-measures tests/perf_call_budgets.json (same-argument repeats of a reviewed list of expensive functions, and child processes per compare). Also owns the whole-package repeat ratchet: --write-repeat-baseline re-measures tests/perf_repeat_baseline.json in a cold child interpreter -- same-argument repeats of every first-party function (dunders and model/execution_cache.py excluded), keyed by path(qualname), summed over one compare() per workload at n=40. An investigation tool first; only the two baseline files gate. manual; budgets gated via tests/test_compare_cost_budgets.py, the whole-package ratchet via tests/test_compare_repeat_audit.py.
complexity_bench.py Empirical complexity exponents of hot paths: compare() by symbol count and by type count, add/remove, rename matching, policy classification, history by release count. Each case runs in its own subprocess (process-wide caches cannot flatten another case's curve; names are salted per sample), inputs are built outside the timed region, the fastest CPU-time sample per doubling size is kept, and a least-squares log-log slope k is fitted. Every case declares a max_exponent (1.4-1.5, sub-quadratic); --strict exits 1 when one is exceeded, --json writes a receipt, --case narrows. ~15 s. Sees a function whose body turned quadratic, which the call-count gates cannot. verify.py --only complexity-bench (PR profile; CI ai-readiness job); gated via tests/test_complexity_bench.py (fit against generated power laws, an injected quadratic case).
perf_report.py Optimization-backlog report (markdown): hot first-party functions by cumulative time over every synthetic workload (--corpus N adds a dumped real C++ library), same-argument repeats ranked by cost, calls per declaration for the hot per-declaration helpers, and perf_antipatterns counts per rule. Decisions on what it surfaces live in docs/contribute/perf-findings.md. Not a gate. manual; weekly in performance.yml (step summary + artifact).
mypy_override_targets.py The mypy-override-targets gate, split out of check_ai_readiness.py the same way adr_status_sync.py/engine_cli_boundary.py were (2000-line hard cap). mypy silently ignores a per-module override whose target does not exist, so a deleted or moved module leaves its [[tool.mypy.overrides]] entry — and the explanatory comment attached to it — behind with no signal anywhere; a 2026-09 cleanup audit found eleven at once, three of them left by ADR-068 Phase 6's scan removal. Checks first-party (abicheck.*) targets only, in both directions an override can be stale: an exact target naming neither a module nor a package, and a wildcard matching nothing. Third-party targets (yaml, click) are deliberately out of scope — whether those resolve depends on the environment mypy runs in, not the tree. Pure-stdlib apart from tomllib (stdlib ≥3.11; an older interpreter WARNs rather than failing). imported (by check_ai_readiness.py); gated via tests/test_mypy_override_targets.py.
no_inline_gate_computation.py The no-inline-gate-computation gate (ADR-063 Phase 7, WARN, docs/contribute/plans/one-semantic-pipeline.md), split out the same way engine_cli_boundary.py/adr_status_sync.py were. Real, but deliberately simple, repo-wide AST scan: flags a direct attribute read named gate/operational (the two RunOutcome field names) appearing alongside a raw integer literal in a comparison or a max(...) call, outside the four boundary encoders ADR-063 D6 names (policy/outcome.py, workflows/aggregate/report_gate.py, service.py, cli.py, aggregate.py). Deliberately does not flag every .exit_code comparison (e.g. fold.py's own legitimate max(t.gate.exit_code for t in gated ...) aggregation over an already-decoded GateInfo) — see the module's own docstring. Pure stdlib, importable. imported (by check_ai_readiness.py); gated via tests/test_no_inline_gate_computation.py.
findings_report.py The shared Findings error/warning collector both gate scripts report through — grouping by check name, the ERROR:/WARN: rendering, and the <label>: N error(s), M warning(s) summary line. check_ai_readiness.py and check_docs_contract.py each subclass it to pin their own label; previously each carried a byte-identical copy of the class. Pure-stdlib (importable before pip install -e ., same constraint as check_ai_readiness.py itself). imported (by check_ai_readiness.py, check_docs_contract.py).
check_fp_rate.py False-positive/false-negative gate for public-surface scoping (ADR-024 §7). Labelled (old, new) corpus; baselines FP=0/FN=0. Cases are tagged by scoping axis (CASE_CATEGORY): --json carries a by_category breakdown and --markdown renders a per-axis table for CI step-summary / release-over-release trend reading. CI (ai-readiness). Mirrored in tests/test_fp_rate_gate.py.
check_tier_accuracy.py Per-evidence-tier accuracy gate — what each level buys. One labelled logical change per case, projected down to what each tier observes (L0 symbols → L1 debug → L2 headers → L3 build) and run through compare; verdicts collapse to a 3-band ordinal (non-breaking/risk/breaking). Measures per-tier over-call (FP) vs under-call (FN) and which transition removes each. Gates: top-tier correctness + under-call monotonicity (more evidence never hides a break — ADR-028 D3). --markdown/--json emit the per-tier matrix. CI (ai-readiness, + step-summary artifact). Mirrored in tests/test_tier_accuracy_gate.py.
measure_contract_shadow.py ADR-049 Phase 3's shadow contract-evaluator measurement and gate. Runs check_fp_rate.py's labelled corpus plus contract_platform_corpus.py's platform/shape lanes through compare(..., contract_evaluation=True) in all three contract domains and reports the phase's four "Measure:" quantities (delta matrix by old/new decision, unresolved rate by provider/domain/platform and by Phase 6 lane, proven public-break losses, proven false-positive reductions), naming the Gate lanes it deliberately cannot reach. Gates on three zero baselines: a proven public-break loss, a delta citing no (or a dangling) evidence record, and a finding with no recorded decision. --markdown/--json. Manual / CI step summary. Mirrored in tests/test_contract_shadow_measurement.py.
measure_l4_clang_projection.py Plan l4-l2-extraction-convergence Phase 4 measurement spike. Dumps each catalog C++ translation unit (catalog/cases/*/*.cpp, 253 TUs) once, builds the current L4 clang entity set (ClangSourceExtractor.source_abi_from_dump) and the projection (PublicSurfaceClangParser narrowed to the public surface, then project_clang_surface()) from that same AST, and reports per (kind, field) equality, presence, and the explicit mangled-name counters. Pure comparison (compare_views, aggregate) is unit-tested in tests/test_measure_l4_clang_projection.py; the runner needs clang. Read-only: changes no L4 output and no CLANG_EXTRACTOR_VERSION. Its result is recorded in the plan's "Status — Phase 4 measurement spike" note. Manual (python scripts/measure_l4_clang_projection.py --json OUT.json); not a gate.
gen_l4_clang_golden.py Plan l4-l2-extraction-convergence Phase 4 golden generator. Dumps each catalog C++ TU (253 TUs) once through ClangSourceExtractor.source_abi_from_dump and writes the reduced per-TU view that measure_l4_clang_projection.py's compare_views consumes on the current side, to tests/golden/l4_clang/surface_0_13.jsonl (one header line, one line per TU, sorted keys, no timestamps). --check regenerates in memory and fails on any difference. Reads the pre-change emitter only; CLANG_EXTRACTOR_VERSION stays "0.13". Manual (python scripts/gen_l4_clang_golden.py; --check for drift). Its golden is read by tests/test_l4_clang_projection_golden.py.
contract_platform_corpus.py ADR-049 Phase 6's platform/shape corpus for the measurement above: hand-built snapshot pairs carrying real ELF .dynsym / PE export-directory / Mach-O export-trie shapes, plus the stripped, versioned, and extern "C" lanes the phase's Gate names, each tagged with its lane. Exists because the FP-rate corpus carries no export tables at all, so the exports domain measured 100% unresolved — measuring the absence of evidence rather than the domain. Kept out of check_fp_rate.py's own corpus so the FP/FN gate and this coverage axis stay independent. Pure data + builders, importable. imported (by measure_contract_shadow.py); gated via tests/test_contract_shadow_measurement.py.
gen_skill_eval_pack.py Builds skills-src/evaluation/agents/skills/skill-eval-pack.json — the one artifact the skill evaluation runs against and the one interface agent-benchmark consumes (G37 D6). Records a content hash per published skill tree, per scenario (manifest record + fixture closure + ground-truth entry), plus the trigger corpus and the harness. Two hashes are deliberately not committed — the consumed abicheck surface (skill_eval_surface.py owns it; the freshness checker computes it at check time) and the publication build digest (publication_build_digest() folds the resolved runtime dependency versions in on demand) — because both derive from files other PRs change, so committing them would tax every such PR with a regeneration and let one merge into a stale main. Every entry carries affects (the skills a moved hash nominates for re-running) and roots (the paths that route to it). --check gates drift. verify.py --only skill-eval-pack (CI ai-readiness job); manual after a skills-src/, scenario, or fixture change. Mirrored in tests/test_skill_eval_pack.py.
skill_eval_surface.py The abicheck surface a published skill can invoke or read — the CLI reference, the detector spec, the compare-report schema — and its digest (G37 D6). A leaf module the freshness checker imports: it cannot import the generator (that one needs PyYAML), and two copies would drift. Files, not live introspection — a live Click/registry walk varied by host and failed the macOS and Ubuntu 3.14 lanes. Pure stdlib. The digest is not recorded in the committed pack, deliberately: it derives from files other PRs change (cli-reference.md moves on any new CLI option), so committing it would tax every such PR with a pack regeneration and let one merge cleanly into a stale main. Computing it at check time preserves invalidation exactly — a bundle records what it ran against, and the checker compares that to the surface now. imported (by check_skill_eval_freshness.py); gated via tests/test_skill_eval_pack.py.
check_skill_eval_freshness.py G37 D6's freshness gate, and the reason "the evaluation must postdate the skill trees it grades" stopped being prose nobody enforced. Three checks over the pack and the committed transcript bundles: staleness (a recorded hash no longer matches — the failure message names which skills to re-run), mapping (every hash resolves to a non-empty set of published skills, so a moved hash always nominates something), and completeness (every input a run was observed reading routes to some hash, so an input hashed nowhere cannot silently keep evidence "fresh"). Pure stdlib; no model runs, so it is bit-for-bit reproducible and free — which is what lets it be a required check (G37 D2). An empty evidence tree passes: Phase 2's check_skill_eval_evidence.py is what makes a missing bundle a failure. verify.py --only skill-eval-freshness (CI ai-readiness job); manual. Mirrored in tests/test_skill_eval_pack.py.
gen_harbor_tasks.py Generates skills-src/evaluation/agents/skills/harbor/tasks/ — one Harbor task directory per status: ready scenario in skill-eval-pack.json, real per the actual harbor schema, not guessed from docs (tests/test_gen_harbor_tasks.py::TestHarborSchemaValidation validates every generated task against the real harbor package's Task/TaskConfig Pydantic models — CI's own harbor-schema step, not a one-off check). One task per scenario, not per (scenario, arm): whether the skill is installed is an agent-configuration choice (Harbor's own --skill owner/repo:path[@ref] flag, injected into the running container after the image has already started — the generated image deliberately never bakes the skill in), not a task-directory choice — see skills-src/evaluation/agents/skills/harbor/CLAUDE.md. Reuses, never re-derives: skill-eval-pack.json's resolved prompt/expected/fixture triple, runners.claude_code's exact fixture-to-workspace transform (strip_comments/demo_app_sources/EXPLANATORY_FILES) and ANSWER_CONTRACT, and a Category A case's own documented ## abicheck command (parsed from examples/case*/README.md, the same text ground_truth.json is validated against) for solution/solve.sh — never a heuristic re-derivation of any of the three. --check gates drift (same contract as gen_skill_eval_pack.py --check). Requires PyYAML-free (only needs skill-eval-pack.json, already JSON). verify.py --only harbor-tasks (CI ai-readiness job); manual after a scenario/fixture change. Mirrored in tests/test_gen_harbor_tasks.py.
check_usecase_docs_sync.py Drift gate between docs/contribute/usecase-registry.yaml (the machine-checked source of truth) and its hand-maintained human summaries — the "Gaps that matter" table and "Proposed next steps" backlog in usecase-coverage-evaluation.md, and the remaining-vs-completed tables in plans/index.md. Not a generator (the prose isn't reconstructible from registry fields); a structural check that a gap's aggregate registry status (done vs. open) agrees with where it's mentioned in the docs. Requires PyYAML, so it runs after pip install -e ., unlike check_ai_readiness.py. CI (ai-readiness). Mirrored in tests/test_usecase_docs_sync.py.
check_adr_surfaces.py ADR-076's traceability gate: docs/contribute/adr/adr-surface-registry.yaml gives every ADR a disposition (surfaced/partial/gap/internal), its UC-* use cases and the CLI/API/Action/report surfaces that reach it. Resolves each surface against the code (click introspection of abicheck.cli.main, import, action.yml inputs, abicheck/schemas/*.schema.json properties, compare -o formats), checks dispositions against the ADR index Status, checks each use case's user_task:/adrs: (the latter mirroring the registry), checks every scenario surfaces: cli claim against that scenario's own flow commands, and ratchets against docs/contribute/adr/adr_surface_baseline.json (no downgrade, lost surface/use case, newly untraced ADR surface, or new cli+api+action use case without a scenario family; accept with --write-baseline in the same PR). Renders docs/contribute/generated/adr-surface-coverage.md (--write-report; stale copy fails). Needs abicheck importable. verify.py --only adr-surfaces (CI ai-readiness job); manual after touching an ADR, a cited surface, the UC registry or a scenario. Mirrored in tests/test_adr_surfaces.py.
check_docs_contract.py docs/AGENTS.md's ownership contract, made machine-checkable: docs/_meta/topics.yaml integrity (every referenced path exists, no two topics claim the same canonical_page), page front-matter schema (doc_type/level/lifecycle enums, canonical_for/summarizes round-trip against the topic registry, summarizes requires an actual backlink), docs/_meta/terminology.yaml entry validity, docs/_meta/one-semantic-pipeline-status.yaml structural validity (via pipeline_status_ledger.py, below) — all ERROR — plus advisory (WARN-only) scans for an identical 40+ word prose block or 10+ word table appearing verbatim in two or more manual pages, a page that appears to redefine a registered term outside its canonical_page, an in-progress status phrase ("being updated in parallel", "work in progress", TBD/TODO:, etc.) outside the ADR/plans/archive trees or a lifecycle: migration/historical page, and a manual page outside those same trees naming a retired CLI flag/command/file by its exact dead spelling (_RETIRED_SURFACES registry — e.g. mcp_server.py, --source-abi-cache) without an allowlist entry, and a documented command line (or Action extra-args value) passing a .abicheck.yml key as argv — the shape a mechanical flag-to-config-key rewrite produces when it reaches an example instead of prose, where Click reads it as unexpected positional operands and exits 64. Both sweeps run over docs/**/*.md, the examples/case*/README.md generator sources behind the published case pages, and tests/scenarios/*.yaml (whose flow: entries are commands a reader is meant to run). Requires PyYAML, so it runs after pip install -e .. CI (ai-readiness). Mirrored in tests/test_docs_contract.py (+ tests/test_docs_contract_retired_surfaces.py).
pipeline_status_ledger.py The pipeline-status-ledger gate (ADR-063 "PR 0"'s machine-readable authority matrix), split out of check_docs_contract.py the same way adr_status_sync.py/engine_cli_boundary.py were split out of check_ai_readiness.py (2000-line hard cap). Validates docs/_meta/one-semantic-pipeline-status.yaml: the file exists and parses, schema_version is exactly the one supported version and as_of_commit/as_of_date are well-formed, every one of ADR-063's tracked concepts (_PIPELINE_REQUIRED_CONCEPTS) is present with no unexpected extras, each concept's primitive/producers/consumers/authority/lifecycle fields (plus persistence, required only for facts) hold values from the declared enums, and removal_gate is a non-empty string (free text, not enum-valued). Schema 2 (track T2) adds two cross-field rules the enums alone can't state: lifecycle (the introduced → wired → authoritative → retired consolidation ladder) must agree with authority — which it refines rather than duplicates, since authority: legacy covers both introduced and wired, and authority: self covers both authoritative and retired; only mixed picks out exactly one rung — and with the status fields (retired requires every one complete); and the optional investigated_declined list (each entry: item/decided/leaves_open/tracked_as) forbids lifecycle: retired, since declining a behavioral change for lack of a demonstrated benefit does not delete a second implementation (duplication-and-convergence-assessment.md, "The completion rule this plan was missing"). Structure only — a concept's actual status is still hand-maintained, same bar topics.yaml/terminology.yaml hold themselves to. Pure stdlib apart from yaml. imported (by check_docs_contract.py); gated via tests/test_docs_contract.py.
retired_surfaces.py check_docs_contract.py's retired-CLI-surface registry (RETIRED_SURFACES) and its WARN-only sweep, split out the same way pipeline_status_ledger.py/adr_status_sync.py/engine_cli_boundary.py were split out of their own callers (2000-line hard cap). Flags a manual, non-historical page still naming a retired CLI flag/command/file by its exact dead spelling — fenced code blocks included, since a stale command inside a ``bash example is exactly the worst place to miss one. Mechanical extraction: every constant/function is unchanged from its original home incheck_docs_contract.py, which keeps its own_RETIRED_SURFACES/_retired_surface_scan_targets/_check_retired_surfacesnames as thin wrappers (existing tests and call sites, including_check_config_keys_as_cli_operands's reuse of the same scan targets, are unaffected) and passes its own_has_generated_marker/load_front_matter/_rel` helpers and stale-process-language exempt sets in rather than the two modules importing each other. Pure stdlib. imported (by check_docs_contract.py); gated via tests/test_docs_contract_retired_surfaces.py.
config_key_operands.py check_docs_contract.py's config-key-as-cli-operand sweep, split out the same way retired_surfaces.py was (its caller sits against the file-size soft limit, and CLAUDE.md's rule for a file at its ceiling is to move responsibility out rather than trim it). Flags a documented abicheck <subcommand> line — or an Action extra-args value, which is raw argv by another name — passing a .abicheck.yml key as an operand. Two patterns: a key.subkey: token by shape, and a bare key.subkey (no colon — how a list-typed key such as scope.public_symbols is spelled) matched only against BuildConfig._KNOWN_BLOCK_KEYS, since a bare a.b on a command line is usually a filename. check_docs_contract.py keeps _check_config_keys_as_cli_operands as a thin wrapper. Imports abicheck for the key set, degrading to an empty set if that fails. imported (by check_docs_contract.py); gated via tests/test_docs_contract_retired_surfaces.py.
check_docs_review_triggers.py Advisory-only "review trigger" for docs/AGENTS.md's front-matter depends_on field: diffs a PR's changed files against every docs page's depends_on list and reports the overlap as an ::notice:: annotation + step-summary table. Never fails — a path-prefix match is a heuristic nudge to re-check a page, not proof it's stale. CI (docs-review-triggers.yml, PR-only). Mirrored in tests/test_docs_review_triggers.py.
check_examples_validation_status_sync.py Keeps examples/README.md's "Current Validation Status" table's hand-typed "Result" prose honest against the latest gcc/clang/runtime/release/stripped/build-source validator run data. --check (CI mode, exits 1 on drift) or writes the table in place. CI (examples-validation.yml, path-filtered); manual.
check_build_source_release_proof.py Fails closed unless the fixed twelve-case build/source artifact has exactly the expected full ground-truth case IDs, one PASS row for each, and the matching selected-case count. verify.py --profile full --only build-source-release-proof in CI after producing results/validate_examples-build-source.json; manual with that artifact present.
check_build_source_release_proof.py Fails closed unless the fixed ten-case build/source artifact has exactly the expected full ground-truth case IDs, one PASS row for each, and the matching selected-case count. verify.py --profile full --only build-source-release-proof in CI after producing results/validate_examples-build-source.json; manual with that artifact present.
check_catalog_ratchet.py Full-catalog ratchet for the nightly validate_examples.py lanes (one per ARTIFACT_VARIANTS entry). catalog/nightly_baseline.json maps lane -> sorted PASS and XFAIL case ids. Fails on a baselined PASS case that is no longer PASS, a baselined XFAIL case now FAIL/ERROR, or a baselined lane with no report; newly passing/XFAIL cases, cases missing from a report and unknown lanes are printed with the --write-baseline command, never failed. Exists because examples-validation.yml runs build-source on a fixed case set only, so 20 full-catalog build-source failures went unseen. Pure stdlib. CI (catalog-nightly.yml, nightly + dispatch); manual --write-baseline after an improvement; gated via tests/test_check_catalog_ratchet.py.
catalog_scope_diff.py Report-only: compares a legacy-scope validate_examples.py --json report (each case's authored scope, unscoped unless scope_public_headers) with a --contract-scope public report and writes a Markdown table of cases whose actual verdict or status differs. Ground truth is authored unscoped, so a difference is a measurement of the default --contract public behaviour, not a failure. Pure stdlib; exits 0. CI (catalog-nightly.yml, step summary + results/scope-diff.md); manual.
check_fair_metadata.py Checks local, deterministic FAIR-facing metadata (CITATION.cff/codemeta.json/.zenodo.json) and the published JSON Schema contract for internal consistency. The separate pages.yml post-deploy step does the live-HTTP retrieval check after publishing. verify.py --only fair-metadata (CI fair-metadata job); manual.
check_distribution_metadata.py Validates a built sdist/wheel in dist/ against pyproject.toml (name/version/summary/requires-python/license/Project-URLs), confirms the sdist carries CITATION.cff/codemeta.json/.zenodo.json, and requires the wheel's Requires-Dist to pin CastXML 0.8.0 as a default dependency (see tests/test_packaging_docs.py for the source/docs contract). Needs dist/ already populated with exactly one sdist and one wheel — use build_and_check_distribution.py (below) to build first. verify.py --only distribution-build (via build_and_check_distribution.py); manual.
build_and_check_distribution.py Builds the sdist/wheel (isolated build module invocation via run_isolated_module.py), twine checks the resolved artifact paths (no shell glob), then runs check_distribution_metadata.py — one self-contained step so verify.py's distribution-build step doesn't require dist/ to already exist. verify.py --only distribution-build (CI fair-metadata job).
publish_schemas.py Synchronizes the package's JSON Schema copies (source of truth) into the MkDocs-published docs/reference/schemas/v1 tree at their stable, versioned $id URLs. --check gates drift. verify.py --only schema-sync (CI fair-metadata job); manual.
check_bugfix_test_contract.py Bug-fix test contract gate. Structural half: a fix:/perf:/security: PR that changes shipped code must change a test — by status (an added or modified test path, so a deletion or a type change is not evidence) and by content (at least one added line that is not blank and, in Python, neither a comment nor inside a docstring — so a rename, a copy, a whitespace edit or a prose edit is not evidence either; the content diff runs -M -C --find-copies-harder, under which a move or duplicate contributes no added lines at all, while changed_files() runs --no-renames so a deleted test stays visible as a deletion). Declared half: the PR body must answer the four core questions (regression-fails-on-base, negative control, public-surface test, axes covered, general invariant) plus any conditional the diff triggers — real-dependency coverage for a third-party boundary, a malicious fixture for the action/workflow trust boundary, a must-merge/must-not-merge pair for identity logic, an FP/FN pair for filtering, and verdict/gate/exit separately for policy. Each conditional traces to a real merged-fix escape (#699→#721, #753→#759, #705→#758). Bypass with the skip-test-contract label. Exits 2 when the structural half passed but no --body-file was available, so verify.py can record a local run as partial rather than as a pass over half the gate; a real finding is still 1. Mirrored in tests/test_bugfix_test_contract.py. CI (bugfix-test-contract.yml, on PR).
check_mutation_score.py Mutation-score gate, three lanes: --diff-scoped (absolute — any surviving mutant in a function the branch changed fails, no baseline needed; a diff that changed no production function and has no baseline reports that it gated nothing instead of OK; --require-baseline is keyed on a real baseline and is deliberately not satisfied by --diff-scoped, which only looks at the functions this branch changed and so cannot see survivors a weakened test allows elsewhere), per-module drift against the committed mutation-baseline.json (a module regressing is not cancelled out by another module improving), and the legacy global-total SURVIVOR_BASELINE. Refuses to record a baseline from an unresolved run. --run --diff-scoped --scope-run-to-diff (mutation-efficiency optimization) restricts mutmut run's own MUTANT_NAMES argument to only the only_mutate module(s) this diff touches — mutmut always generates mutants for the whole configured set, but that argument scopes the expensive test-execution phase, which is the dominant cost; falls back to an unscoped run whenever the scope can't be established as safe (no diff, no readable only_mutate, nothing in scope touched, every module touched already, or the diff touches anything at all outside only_mutate — no allowlist, after ten review rounds each found the previous one still let through a class of change that could affect an untouched module's behavior under mutation without touching that module's own file: a shared test fixture, a shared production helper, a non-Python also_copy fixture/oracle input like examples/**/*.json, a binary-file diff/pure-rename/mode-only change — none of which carry a @@ hunk, so the touched-path detection itself had to move off the hunk-based readers onto diff --git header parsing (diff_touched_paths), which sees every diff entry regardless of shape — a git-quoted path (core.quotepath's C-style-escaped diff --git "a/..." "b/..." form for a non-ASCII/space/special-char filename), which diff_touched_paths' own plain a/... b/... regex can't parse either, closed by diff_has_unparseable_git_header falling back to a full run whenever any diff --git line doesn't match that regex rather than attempting a git-quote/octal-escape decoder — and a diff with a hunk not covered by any diff --git header at all: either a wholly headerless unified diff (plain diff -u output or a hand-assembled --diff-file), or a diff that mixes one properly-headed entry with a second, headerless section, both invisible to the header-based reader regardless of content even though the hunk-based reader (diff_touched_only_mutate_modules) still sees them fine (a naive "does any diff --git line exist anywhere" check misses the mixed case), closed by diff_lacks_git_headers_for_its_hunks comparing the hunk-based and header-based readers' own file sets directly and falling back whenever a hunk's file isn't in both — a headerless GNU-diffutils binary marker (Binary files X and Y differ, real output of plain diff/diff -u on binary files, not just git diff), which carries no @@ hunk at all so it was invisible to that comparison too, closed by folding _binary_marker_paths into the same hunk-vs-header comparison — a bare-path (no a//b/ prefix) unified-diff header, real output of plain diff -u file1 file2 or git diff --no-prefix, which _hunks() itself requires the git prefix to recognize at all and so yields nothing for, closed by _hunk_file_targets (a more permissive, safety-check-only sibling of _hunks() that also accepts the bare form) replacing _hunks() as this comparison's own path source — and finally GNU diffutils' recursive diff -r/diff -ur one-sided-file marker (Only in <dir>: <name>, no hunk, no binary marker, no header at all), closed by folding _only_in_marker_paths into the same comparison — and GNU diffutils' -q/--brief Files X and Y differ form (eleventh round), which prompted a genuinely different kind of fix rather than a twelfth marker-specific extractor: diff_has_unrecognized_content flags any line that isn't one of the small, closed set of shapes a real diff tool can emit at all (a diff --git header, git's own per-entry metadata lines, a ---/+++ header, a hunk header/body line, or the binary/Only in markers this module already extracts paths from), so a still-undiscovered twelfth shape disables scoping on sight instead of needing its own review round first — checked alongside, not instead of, the existing path-set comparison, since recognizing a shape and verifying its path against the diff's own headers are different questions. That general fallback's own first draft then repeated the identical mistake its docstring warns against: it recognized _GIT_ENTRY_METADATA_PREFIXES (rename from/old mode/index/...) in any parser state rather than only immediately after the diff --git line that makes them legitimate, so a headerless rename from/rename to pair pasted after an already-open, properly-headed hunk was "recognized" (not flagged) while also carrying no path extractor of its own — invisible to both checks at once (thirteenth round), closed with an explicit in_entry_metadata_zone flag that only trusts metadata lines directly after a diff --git line; costs real applicability, since this repo's own changelog-fragment convention means most real PRs touching one only_mutate module also touch changelog.d/*.md, which now disables scoping too — see diff_touches_outside_only_mutate's own docstring), and never applies under --require-baseline/--write-baseline/--results-file (a saved results file carries no guarantee it reflects a scoped run), all of which need — or might be — the full population. An out-of-scope module's deliberately-untested ("not checked") mutants are excluded from the unresolved-mutant gate but not from the informational total. Gate logic unit-tested in tests/test_mutation_score_gate.py; run-scoping in tests/test_mutation_run_scoping.py. The per-module baseline gate (check_per_module, compared against the committed mutation-baseline.json) had the identical blind spot one layer up, caught by review after the run-scoping feature itself had already stabilized: it compared a scoped run's (necessarily incomplete) per-module survivor counts against the full baseline unconditionally, so an out-of-scope module always read zero real survivors this run and could never fail the comparison — silently reading as "still within baseline" for a module this run never re-tested at all, which matters because only_mutate modules import each other (e.g. diff_types.py imports diff_symbols), so a diff touching only one can leave a real regression in the other's mutants completely unreported (fourteenth round, Codex review; not reachable in CI today since mutation-baseline.json is not yet recorded — see the mutation-testing gate section of AGENTS.md — but would have been live the moment a dispatch run wrote one). Fixed the same way the unresolved-mutant gate already was: check_per_module now takes the same scope_modules, restricts comparison to it, and returns which baseline modules it declined to check — the caller prints them explicitly ("per-module baseline check skipped N module(s)...") and reports "OK" only for the scoped module(s) by name, never an unqualified blanket "OK" a reader could misread as full re-verification. Tests for this one gap split into their own sibling file, tests/test_mutation_per_module_scoping.py, since test_mutation_run_scoping.py had itself grown past the architecture gate's 1200-line test-file cap. The identical gap existed one level flatter in the global-total baseline (--baseline/SURVIVOR_BASELINE, fifteenth round): that comparison reads the whole-records survivors count against a total established from a full run, and a scoped run's survivors is really only the scoped module(s)' own count — so it could read a real out-of-scope regression as "improved, please lower the baseline". Unlike the per-module gate there is no narrower population a total can restrict to, so the fix skips the comparison outright for a scoped run rather than trying to score it against the wrong population, printing why rather than silently reporting "report-only" or a false pass. Skipping that comparison unconditionally then opened a sixteenth-round gap: a module-scope edit (one outside every function) has no mutant of its own for check_diff_scoped() to attribute — by that function's own docstring, it is "scored by the per-module drift gate below" instead — so with only the global baseline configured (no per-module baseline file), a scoped run left no gate standing for such an edit at all. Fixed by reading baseline_modules/total_baseline early (before the scoping decision, not after) and disabling scoping outright whenever a global baseline is configured but no per-module one exists — the same conservative "fall back to a full run when safety can't be established" answer this predicate family already gives everywhere else, not a new heuristic. A sibling finding on the same review round: mutants_measured/mutants_per_second in the JSON receipt were derived from stats (mutants/mutmut-cicd-stats.json) whenever it happened to be present, with no check that it actually corresponds to --results-file's own (externally supplied, possibly stale/unrelated) results text — mutants_measured is now gated on not args.results_file too, matching run_seconds/mutants_per_second's existing guard. A seventeenth-round follow-up widened that guard further: not args.results_file alone still let a bare mutmut results database read (no --run, no --results-file) publish mutants_measured from whatever local database happened to be sitting there — self-consistent with that read's own results text, but not evidence this invocation measured anything, since the database could be arbitrarily old or itself the product of an earlier scoped run. Both mutants_measured/mutants_per_second now require the same args.run and not args.results_file provenance bar run_seconds already holds itself to. CI (mutation.yml: PR path-filter → diff-scoped (scoped to the touched module(s) unless the label/a test-only diff forces a full run), weekly → baseline drift, dispatch → record baseline).
mutation_score_args.py The argparse parser of check_mutation_score.py (build_parser), split out so that gate's main() could be broken into phase helpers (scope planning, measurement, the diff-scoped / per-module / global-total gates, baseline writing, the --json receipt) without growing past its file-size record. Pure argparse; no logic. imported (by check_mutation_score.py).
mutation_results.py Leaf parsing/attribution layer under check_mutation_score.py: reads mutmut results' per-mutant listing, maps a mangled mutant key (pkg.mod.xǁClsǁmeth__mutmut_3) back to its source module and function, and reads mutants/mutmut-cicd-stats.json as the completeness witness. Deliberately never counts survivors from mutmut run's progress stream — that re-renders from 🙁 0 and reading its first match reported 0 survivors for a run that had 4 (reproduced against mutmut 3.7.0). Primitive-level tests in tests/test_mutation_results.py, including one real end-to-end mutmut run. Imported by check_mutation_score.py.
gen_mutation_test_selection.py Generates (or --checks) tests/mutation_test_selection.txt, the pytest @argfile [tool.mutmut].pytest_add_cli_args_test_selection reads: the test files with at least one test that calls only_mutate code in-process. mutmut's stats pass runs its selection serially under tracing (52 of a measured 72 min per shard) although only such tests can be associated with -- and so kill -- a mutant. Runs the full suite once under mutation_reach_trace.py in parallel (xdist) with the lane's own markers/deselections; per-file, superset of mutmut's association, so the narrowed pass associates the same tests. Staleness is fail-closed (an unlisted reaching file's kills go missing, so mutants read as survivors); --check fails on a missing file and runs on every full mutation run plus any PR touching the selection machinery, and a PR's own changed test files are appended for its run (mutation_scope.py extend-selection). mutation.yml (selection-check job); manual regeneration. Tested in tests/test_mutation_test_selection.py.
mutation_reach_trace.py pytest plugin (MUTATION_REACH_OUT=<dir>) recording which tests execute only_mutate code: sys.monitoring PY_START events armed only on those modules' code objects (re-armed per test with restart_events(), rescanned only when a module is re-imported), so every other call costs nothing; covers fixtures, lazily-imported modules and worker threads. A global sys.setprofile hook was too slow to use (about 2% of the suite in several minutes). Loaded by gen_mutation_test_selection.py. Tested against a real pytest (serial and xdist) in tests/test_mutation_test_selection.py.
mutmut_stable_param_ids.py pytest plugin for the mutation lane ([tool.mutmut].pytest_add_cli_args: -p scripts.mutmut_stable_param_ids). Fast-first order: during a mutant run (MUTANT_UNDER_TEST set to a mutant, not mutmut's fail/stats/list_all_tests/mutant_generation/empty sentinels) items are stably sorted by duration_by_test from mutmut-stats.json (unknown last), so a pytest -x kill stops at the cheapest failing test; a missing or unreadable stats file keeps pytest's order. mutmut 3 runs every pytest session in one process and selects tests by the node ids its stats pass recorded; pytest caches a parametrize mark's generated ids on the mark and re-escapes them in each later in-process session, so an explicit id holding a backslash, newline or non-ASCII character stops existing and the clean run aborts (exit 4, BadTestExecutionCommandsException). The plugin hands pytest the exact inverse of that cache (verified with pytest's own escape function) once per mark per session and restores it afterward, so every later session reproduces the first session's ids step for step. The same mutant run then deselects tests recorded at 1.0 s or more (MUTMUT_SLOW_TEST_CUTOFF overrides; <= 0 disables), never one with an unknown duration, and keeps the full sorted set when the cutoff would leave none. A mutant killed only by a slow test therefore reads as survived (none of 102 sampled kills was). [tool.mutmut] (every mutmut pytest session). Tested against real in-process pytest sessions in tests/test_mutmut_stable_param_ids.py, incl. a negative control that fails if pytest fixes the defect.
diff_hunk_bodies.py Where a unified diff's hunk bodies end (diff_lines_outside_hunk_bodies): counts each hunk's stated old/new lines, as git apply does, so a body line spelled like a file header (a removed -- x is --- x, an added ++ x is +++ x) stays body. check_mutation_score.py's three header readers (_hunk_file_targets, diff_has_unrecognized_content, _hunks) read only the lines it yields. Split out of mutation_scope.py at its 800-line cap. imported (by check_mutation_score.py); gated via tests/test_mutation_scope.py.
mutation_scope.py Run-cost primitives for the mutation lane, sibling leaf of check_mutation_score.py (which owns gating and sits near the 2000-line cap). Function scoping (function_run_scope/function_scope_pattern): with no baseline of either kind, the diff-scoped gate is the only reader of any mutant's outcome, so --scope-run-to-functions executes only the mutants of the only_mutate functions the diff changed — the gate's answer is identical to a full run's. Patterns are mutmut's own mangled keys (x_<fn>__mutmut_*, xǁClassǁmethod__mutmut_*), checked against real mutmut 3.8 output; a module with unattributable removed lines is measured whole; with a baseline present the conservative module-level --scope-run-to-diff rules apply unchanged. mutmut's nothing matches abort (NOTHING_MATCHES_MARKER) for a scope holding no mutable code is read as an empty scope, not an aborted run. Sharding (parse_shard/shard_assignment/merge_baseline_parts): a run that must measure the whole population is split into N disjoint, size-balanced sets of functions (mutation_units/mutable_functions, which mirror mutmut's trampoline: top-level functions and methods of top-level classes); each shard gates its functions against the baseline's per-function counts (check_shard_drift) and fails if mutmut produced a mutant no unit covers (unassigned_records); a baseline is recorded per shard and merged (a module split across shards has its counts summed), refusing any merge that does not partition the units exactly. Helper importers (helper_importers): a changed tests/ helper adds the test files importing it to the stats-pass selection. Also pyproject_mutation_config_changed (pyproject-changed subcommand): only [tool.mutmut]/[tool.pytest] changes start the lane. Pure stdlib. mutation.yml (shard matrix, resolve job, baseline merge); imported by check_mutation_score.py. Gated via tests/test_mutation_scope.py (incl. a slow real-mutmut test the lane runs).
check_changelog_fragment.py Fails a PR that touches abicheck/**/*.py (including deletions and moves out of abicheck/, via --no-renames) without an added/modified .md fragment in changelog.d/ (scriv-managed, see changelog.d/README.md) — replaces hand-editing CHANGELOG.md's shared [Unreleased] section, which caused frequent merge conflicts. Bypass with the skip-changelog label. CI (changelog-check.yml, on opened/synchronize/reopened/labeled/unlabeled). Mirrored in tests/test_changelog_fragment_gate.py.
gen_examples_docs.py Regenerates docs/reference/examples/caseNN_*.md from examples/case*/README.md, and the generated regions (headline, verdict distribution, case index) of examples/README.md from ground_truth.json. Also consumes catalog/taxonomy.json (PR 2 of the examples/catalog split's recommended order — retired plan record, see docs/contribute/plans/index.md — a sibling manifest of ground_truth.json since "What is left" item 5, not a key inside it): each case page's meta table now shows its entity/scenario_kind/operation classification, ecosystem (linked to a generated by-ecosystem/<eco>.md page), and — for a rule-entity case — its rule_slug (linked to a generated by-rule/<slug>.md family page showing the canonical case plus every confirmed duplicate/variant/composing-scenario). Also renders subjects (examples/catalog split "What is left" item 2, retired plan record) as a Subject meta-table row per case, linked to a generated by-subject/<slug>.md page grouping every case sharing that reader-facing pattern (e.g. leaked-internal-types), plus a by-subject/index.md — the one dimension not a projection of topics/rule_slug/ecosystem, so it's sourced from catalog_subjects.py rather than a mechanical derivation. A subject page renders its hand-authored pattern_summary prose verbatim when the manifest sets one (the "pattern page" the plan's own case74-77 worked example calls for). --check gates all of it. Must stay runnable with abicheck not installed (pages.yml regenerates with only the [docs] requirements). Run after adding a new example case or changing the taxonomy. verify.py --only examples-docs (CI lint-and-types job; runs --check with the abicheck import blocked); pages.yml (regenerate before deploy); manual.
catalog_kind_gaps.py Renders a catalog case's expected_kinds_gaps (per-frontend kind gaps of the strict kinds gate, tests/expected_kinds_gate.py) as meta-table rows and provenance notes for its generated doc page; split out of gen_examples_docs.py at its size record. imported (by gen_examples_docs.py).
gen_detector_spec.py Regenerates the formal detector specification matrix (docs/reference/detector-spec.{md,json}) by fusing per-ChangeKind category (checker_policy), default verdict/severity/doc-slug (policy_for), and min evidence tier (evidence_tiers). --check gates sync; mirrored in tests/test_detector_spec.py. Run after adding a ChangeKind. manual
gen_action_reference.py Regenerates the exhaustive GitHub Action inputs/outputs reference (docs/reference/github-action-inputs.md) from action.yml's description/required/default fields — the single source of truth docs/use/github-action.md's narrative previously restated by hand. --check gates sync; mirrored in tests/test_action_reference.py. Run after adding, renaming, or changing the default of an Action input/output. manual
gen_cli_reference.py Regenerates the exhaustive CLI command/option reference (docs/reference/cli-reference.md) from the live Click command tree (abicheck/cli.py + registered sibling modules) — every command/subcommand/argument/option with its exact help= text, default, and choices. --check gates sync; mirrored in tests/test_cli_reference.py. Run after adding/renaming a command or option, or changing its help=/default. manual
gen_python_api_reference.py Regenerates the exhaustive Python API reference (docs/reference/python-api-reference.md) from every name in abicheck.service.__all__ — full function signatures and dataclass field lists. --check gates sync; mirrored in tests/test_python_api_reference.py. Run after changing service.__all__ or a public function/dataclass's signature. manual
gen_config_reference.py Regenerates the exhaustive .abicheck.yml key/type reference (docs/reference/config-keys-reference.md) from abicheck.buildsource.build_config.BuildConfig's strict-schema registries (_KNOWN_TOP_KEYS/_KNOWN_BLOCK_KEYS/_BOOL_SUBKEYS/_STR_SUBKEYS/_LIST_SUBKEYS). --check gates sync; mirrored in tests/test_config_reference.py. Run after adding/renaming a config key or changing its required type. manual
gen_agent_skills.py Publishes skills-src/ as self-contained Agent Skills (ADR-058 / G36 P0.3) into the three generated trees .agents/skills/, .claude/skills/, and .gemini/skills/ — no longer committed (2026-08-21 ADR-058 amendment); build output, regenerated on demand. Resolves each skill's cited shared/*.md Layer-B fragments transitively (a fragment may cite a fragment), copies them into that skill's own references/shared/ (never symlinks — a marketplace zip, a skills.sh subset install, and a Windows checkout each break a live cross-skill link differently), rewrites every internal link to its generated position, and rewrites docs/ links to the published site using mkdocs.yml's own site_url/use_directory_urls rather than a hardcoded URL. Fails on a missing fragment reference, an orphaned (never-cited) fragment, and a link escaping the skill's own installed directory. --check now validates skills-src/'s own internal consistency (a real render succeeds, is deterministic, and is byte-identical across the three target roots it would produce) rather than diffing against on-disk output that no longer exists; mirrored in tests/test_gen_agent_skills.py and wired as verify.py's agent-skills-generated step. verify.py --only agent-skills-generated (CI: the ai-readiness job's second gate step, alongside docs-contract/repo-facts); manual after any skills-src/ edit.
install_dev_skill.py Thin CLI wrapper around gen_agent_skills.py's render_all/write_trees for local dev use: materializes the generated skill tree(s) on disk (.agents/skills/, .claude/skills/, .gemini/skills/ — all gitignored) so a contributor can point Claude Code/Codex/Cursor/Gemini CLI, or a manual Harbor task run, at an installed skill. --target {codex,claude,gemini,all} (codex selects the portable .agents/skills/ tree Copilot/Cursor also read). No rendering logic of its own. manual, after a skills-src/ edit, before exercising an installed skill locally.
action_cli_mirror.py The action-cli-mirror AI-readiness check (ADR-070 D4): resolves every # cli-mirror: <path>::<symbol> annotation in the Action shell layer, so a comment justifying a guard by naming a CLI symbol names one that still exists and is really defined there (def/class/assignment), not merely mentioned in prose. Exists because the 2026-09-12 audit found four comments in action/run.sh citing the deleted abicheck/cli_scan.py/scan_engine. Read the module docstring before trusting it: symbol existence is much weaker than symbol behaviour — both release-operand drifts that audit found live inside functions that still exist and merely reject less, so this check would have passed on them. It guards citations from rotting, never accuracy of a mirrored restriction. Non-mandatory by design (it checks the annotations present rather than demanding one per guard, so no unreviewed bulk sweep); sibling leaf module, since check_ai_readiness.py is past the 2000-line cap. imported
gen_option_vocabulary.py Inventories every user-settable option on the four surfaces — the click tree (hidden options included), build_config.KEY_TABLE, every action.yml/actions/*/action.yml input, and the CompareRequest/DumpRequest/InputSpec fields plus run_compare/run_dump keyword parameters — into architecture/option-vocabulary-inventory.json (ADR-091 Phase 0). Read live, never transcribed. architecture/option-vocabulary.yaml groups the rows into concepts by hand; tests/test_option_vocabulary.py fails when the inventory is stale or a row is unclaimed. Run after adding, removing or renaming any option, then claim the new row in the registry. manual
option_cross_refs.py The "same option on the other surfaces" cell the generated CLI, Action and config-key references show (ADR-091 Phase 7). Read from architecture/option-vocabulary.yaml's concepts and its replacements: block (a retired or deprecated Action input names its live replacement, never a live counterpart); nothing is hand-typed per option. Surfaces: CLI flag, Action input, reusable-workflow input, .abicheck.yml key, --set path. imported (by gen_cli_reference.py, gen_action_reference.py, gen_config_reference.py); gated via tests/test_option_cross_refs.py.
gen_action_cli_surface.py Generates action/cli-surface.txt — the CLI click.Choice sets action/validate-inputs.sh needs before abicheck is installed. That shell runs ahead of Python setup by design (fail fast on a bad input combination rather than after a multi-minute toolchain install), so unlike action/run.sh's extra-args tokenizer it cannot query the installed CLI, and ADR-070 D3 permits it a committed generated artifact — it alone. Emits only genuine choice sets (compare -o's FORMAT half, deps tree/deps compare -o likewise, dump --compression); deliberately not validate-inputs.sh's two narrower per-shape format subsets, which are restriction mirrors in ADR-070 D1/D2's sense rather than choice sets, and are Phase 2 work. --check gates sync as scripts/verify.py's action-cli-surface step. Run after adding, removing or renaming a choice on any of those options. manual
gen_learning_ladder.py Renders the learning-series hub's numbered step list and role-path table — docs/learn/abi-api-handling.md's <!-- BEGIN/END GENERATED: learning-ladder --> and learning-paths blocks — from docs/_meta/learning-ladder.yaml, via learning_ladder.py (page titles shortened to their pre-subtitle form by short_title, so the landing page stays a list of names rather than of sentences). Render-and-drift only (--check gates sync as scripts/verify.py's learning-ladder step); the ladder's rules live in learning_ladder.py under the docs contract. Run after editing the ladder file or a ladder page's title/level. manual
gen_cjm_stage_table.py Renders the CJM stage-coverage table in docs/contribute/cjm.md (between <!-- BEGIN/END GENERATED: cjm-stage-table --> sentinels) by counting usecase-registry.yaml use cases per journey_stages key and status. --check gates sync (verify.py --only cjm-stage-table); mirrored in tests/test_gen_cjm_stage_table.py. manual; rerun after adding a use case or changing a status.
gen_platform_matrix.py Regenerates the host-OS × binary-format capability matrix — docs/reference/platforms.md's "Quick Reference: What Works Where" section, spliced between <!-- BEGIN/END GENERATED: platform-matrix --> sentinels — from platform_capabilities.py. --check gates sync; mirrored in tests/test_platform_matrix.py. Run after a symbol/type-diff capability or tooling requirement changes for a host/format pair (ADR-051 Stage 2). manual
gen_backend_capability_matrix.py Regenerates the L2 header-backend × ABI-fact capability matrix — docs/reference/header-backend-capabilities.md's fact tables, spliced between <!-- BEGIN/END GENERATED: backend-capability-matrix --> sentinels — from backend_capabilities.py. --check gates sync; mirrored in tests/test_backend_capability_matrix.py, which additionally re-derives every published claim from the two parsers' own source. Run after a header backend starts or stops populating a model field (G31 Phase D). manual
gen_fact_capability_matrix.py Regenerates the fact/capability registry doc (docs/reference/fact-registry.md, ADR-063 D7/Phase 5) — a fully-generated page (mirroring gen_detector_spec.py's pattern, not gen_backend_capability_matrix.py's splice-into-hand-authored-page one, since this page has no hand-authored narrative of its own) listing every Fact[T]-converted model field's producing backends and persisted/identity/comparable/suppressible/reportable flags, the REFERENCE_FLAG_COVERAGE reliability-flag inventory, and the KNOWN_UNCONVERTED_ELIGIBLE_FACTS allowlist — all read from abicheck/model/fact_registry.py. --check gates sync. Run after converting a field to Fact[T] or editing the registry's allowlists. manual
gen_stable_abi_data.py Regenerates the vendored CPython Stable-ABI membership set (abicheck/stable_abi_data.py) from a Misc/stable_abi.toml (local path or --url). Extracts every [function.*]/[data.*] entry's added floor, incl. abi_only _Py* symbols. Refresh when a new CPython minor ships so --abi3-floor 3.NN extensions aren't flagged for symbols that entered the Stable ABI in that release. manual
gen_changekind_stub.py Regenerates abicheck/model/change_catalog/kinds.pyi, the mypy-only PEP 484 stub for ChangeKind (ADR-061 D9 model-vs-policy split). kinds.py builds the real ChangeKind enum at runtime via the functional Enum() API to stay under the 800-line production file-size cap once moved under model/; mypy cannot statically resolve members built that way, so this stub declares the same 397 members as an ordinary class body, derived from the same three kind_names_1/2/3.py data files kinds.py itself assembles, so the two can't independently drift. Run after any kind_names_*.py change. manual; drift enforced by tests/test_changekind_stub.py (calls --check directly, mirroring test_detector_spec.py's pattern for gen_detector_spec.py) — check_ai_readiness.py's generated-file-ownership check only verifies the marker comment survives, not content drift
seed_observable_at.py Seeds observable_at (ADR-093 WS-1) on the ChangeKind taxonomy: DECISIONS is the reviewable per-kind record (form, rationale), --table renders the evidence table (abiforge operators, designed evidence tiers, detector modules), --apply writes the observable_at lines under the 800-line cap, --baseline rewrites the UNCLASSIFIED baseline. manual; gated via tests/test_seed_observable_at.py.
gen_detector_kind_map.py Regenerates abicheck/policy/detector_kind_map.py, which detector can emit which ChangeKind (ADR-067 P1 addendum, per-rule not_evaluated). Derived from the detector source: each registered detector's function is walked through its first-party calls and references (AST, no code run), and the ChangeKind members it reaches are its producer set; kinds no detector reaches are recorded as NON_DETECTOR_KINDS. Run after adding or moving a @registry.detector, or changing which kinds a detector reaches. manual; drift enforced by tests/test_detector_kind_map.py (calls derive() and compares parsed data, not text, so a ruff format never reads as drift)
source_l2_overlap.py Phase 8 assessment: derives which ChangeKinds the L4 source_diff path and the L2 diff_types/diff_symbols detectors can emit (same closure as gen_detector_kind_map.py), and checks each shared kind against a hand-judged classification (L4_ONLY/L2_ONLY/DUPLICATE/NEAR_DUPLICATE). Run it for the overlap table. manual; gate enforced by tests/test_source_l2_overlap.py (fails on an unclassified, stale or mislabelled kind)
example_catalog.py Phase 3 of the examples/catalog split (retired plan record, see docs/contribute/plans/index.md; complete): the single case_dir(case_id)/all_case_ids()/iter_case_dirs()/load_ground_truth()/load_taxonomy() resolver every consumer that needs an example case's on-disk path, ground_truth.json, or taxonomy.json routes through, instead of hand-rolling EXAMPLES_DIR / case_name or REPO_DIR / "examples" / "ground_truth.json". load_taxonomy()/TAXONOMY_PATH (added when "What is left" item 5 split taxonomy.json out of ground_truth.json) mirror load_ground_truth()/GROUND_TRUTH_PATH. Phase 4's physical directory split has since landed: CASES_DIR (catalog/cases/) is the real on-disk layout case_dir()/iter_case_dirs() resolve against; EXAMPLES_DIR (examples/) remains a separate constant for the curated, task-oriented workflow tree (see examples/CLAUDE.md), not the calibration catalog. Where a caller needs test-injectable per-case resolution (not just a lint-safe default), it takes a case_dir: Callable[[str], Path] = example_catalog.case_dir keyword-only parameter instead of hand-rolling a flat-root module constant a test would monkeypatch — fixture_sync.sync_fixtures, gen_skill_eval_pack.py's _fixture_paths/_scenario_digest, and tests/validate_examples.py's _resolve_case_sources all follow this pattern, with the corresponding test injecting its own resolver (case_dir=lambda name: tmp_path / name) instead of monkeypatching a constant. A closed, named class of four bidirectional directory-sync audits stays structurally unmigrated, not a missed migration: check_ai_readiness.py::check_examples_ground_truth, check_docs_contract.py's case*/README.md glob, tests/test_case_analysis_validation.py::TestDirectorySync, and tests/test_examples_docs.py::test_ground_truth_matches_example_dirs each check both directions (every on-disk case dir has a ground_truth.json entry, and vice versa), so each needs a raw, ground_truth.json-independent CASES_DIR.iterdir() scan by design — driving discovery from ground_truth.json instead (the way iter_case_dirs()/all_case_ids() do) would make every discovered case trivially already have an entry, permanently blinding the check to the one failure mode (an orphaned directory) it exists to catch. No resolver-injection pattern reaches this: the scan's independence from ground_truth.json is the point. All four already scan the post-split catalog/cases/ layout directly. A directory scan that does not need that independence (e.g. tests/test_benchmark_smoke.py's pinned-suite case list, which only wanted the canonical case-name set) routes through all_case_ids() normally, same as everything else. gen_examples_docs.py's DOCS_EXAMPLES_DIR is unrelated to this class — it's the docs output tree, not a source-catalog scan at all. Pure stdlib, importable before pip install -e .. imported by every consumer in the codebase that resolves an example case's path, reads ground_truth.json, or needs the canonical case-name set, except the four bidirectional-audit holdouts above; gated via tests/test_example_catalog.py plus every migrated consumer's own existing test suite (including tests/test_review_comment_regressions.py's dynamic-load coverage of the validation runners, and a real PYTHONPATH=. python tests/validate_examples.py <case> --json end-to-end run).
gen_catalog_taxonomy.py Phase 1 + Phase 2 of the examples/catalog split (retired plan record, see docs/contribute/plans/index.md): generates catalog/taxonomy.json — entity (rule/scenario), scenario_kind, ecosystem, topics (derived from expected_kinds via the change-catalog's own symbols/types/platform/build/source split), languages, scope, artifact_shape, validation_owner, related_rules, rule_slug/variant_of (every rule-entity case's canonical family name — mechanical by default, hand-reviewed for a confirmed duplicate; seven pairs found across the whole catalog so far), and subjects (a hand-authored, reader-facing pattern classification from catalog_subjects.load_subjects()/case_subjects(), below — the one field here that is NOT a mechanical projection of another; "What is left" item 2). A sibling manifest of catalog/ground_truth.json, not a key inside it (since "What is left" item 5 split it out — a taxonomy-only edit no longer changes ground_truth.json's own bytes, so it can no longer perturb the whole-file digest benchmark_comparison._ground_truth_digest() pins the frozen abidiff/ABICC competitor-result cache to). Additive only — never moves or renames a case. entity/scenario_kind/ecosystem come from catalog_classification.load_classification() (below) rather than a hard-coded case-number set. Also validates every rule slug it emits against catalog/catalog_rules.yaml via catalog_rule_registry.validate_registry (a hard error, before anything is written). --check fails on drift. manual; run after adding/reclassifying a case.
catalog_classification.py The declarative per-case entity/scenario_kind/ecosystem manifest loader/validator for gen_catalog_taxonomy.py — catalog/catalog_classification.yaml (below) is the hand-authored half: one entry per case, under scenarios (with scenario_kind/ecosystem) or rules. validate_classification() enforces both directions the same way catalog_rule_registry.validate_registry() does for rule slugs — a case with no entry, or a stale entry naming a removed/renamed case, is a hard error. Replaces the six hard-coded case-number sets (BUNDLE_SCENARIOS, CAPABILITY_SCENARIOS, four per-ecosystem sets) gen_catalog_taxonomy.py used to carry, whose silent-default-to-generic-rule behavior for an unlisted case was the "What is left" item 6 gap in the examples/catalog split (retired plan record, see docs/contribute/plans/index.md). imported (by gen_catalog_taxonomy.py); gated via tests/test_catalog_classification.py.
catalog_subjects.py The declarative, hand-authored subjects manifest loader/validator for gen_catalog_taxonomy.py (examples/catalog split's "What is left" item 2 — retired plan record, see docs/contribute/plans/index.md) — catalog/catalog_subjects.yaml (below) is the hand-authored half: one entry per subject (not per case, unlike catalog_classification.yaml — a case may genuinely belong to more than one subject, e.g. case181_xcheck_public_to_internal_dependency), each naming its member cases plus a title/blurb and an optional hand-authored pattern_summary prose block for a subject rich enough to warrant one. validate_subjects() enforces both directions the same way catalog_classification.validate_classification() does — a case with no subject, or a subject naming a stale/removed case, is a hard error. case_subjects() derives the case -> subject-slugs reverse mapping gen_catalog_taxonomy.py's subjects taxonomy field and gen_examples_docs.py's by-subject/ pages both consume. Unlike topics/rule_slug/ecosystem, subjects is not a projection of any existing field — it's a genuinely new, bottom-up reader-facing classification (e.g. leaked-internal-types groups case74/75/76/77's four different C++ embedding mechanisms under one lesson). imported (by gen_catalog_taxonomy.py, gen_examples_docs.py); gated via tests/test_catalog_subjects.py.
workflow_examples.py Phase 5 of the examples/catalog split: the examples/workflows/<id>/workflow.yaml schema, its loader, and readme_drift() — the check that every command a manifest runs appears verbatim (whitespace-normalized) in that workflow's own README. Without that check the manifest is a second copy of the walkthrough, free to keep passing against commands the README no longer shows. A workflow directory with no manifest is a hard error, not a free point of coverage (it used to be exactly that: gen_catalog_coverage_report.py counted subdirectories). imported (by gen_catalog_coverage_report.py, skills-src/evaluation/validation/scripts/run_workflow_examples.py); gated via tests/test_workflow_examples.py.
catalog_rule_registry.py The canonical compatibility-rule registry's loader and its join against the catalog taxonomy (catalog/catalog_rules.yaml -> slug/title/definition; build_families() derives each rule's canonical case, variants, duplicates, composing scenarios, and therefore its demonstrated-vs-referenced-only status). validate_registry() enforces both directions -- every slug a case names must be defined, every definition must be used -- which is what stops a typo, a synonym, or an accidental rename in a rule_slug/related_rules string from silently becoming one more "distinct compatibility rule" in docs/contribute/catalog-coverage.md's headline. Status/canonical case/membership are deliberately derived, never hand-stated, so they can't go stale against the taxonomy. imported (by gen_catalog_taxonomy.py, gen_catalog_coverage_report.py, gen_examples_docs.py); gated via tests/test_catalog_rule_registry.py.
gen_catalog_coverage_report.py Phase 6 of the examples/catalog split (retired plan record, see docs/contribute/plans/index.md): generates docs/contribute/catalog-coverage.md, reporting the 197-case catalog along five independent dimensions (rule, variant, scenario, ecosystem, workflow) instead of one flat case count. Report-only — doesn't change any existing gate's count. --check fails on drift. manual; run after any ground_truth.json change.
abi_taxonomy_coverage.py Phases 2/3 of docs/contribute/plans/abi-api-knowledge-and-corpus.md: the parser for Phase 1's frozen Markdown taxonomy (docs/contribute/abi-api-failure-taxonomy.md — 88 leaf mechanisms read back out of its own ## N. Branch (slug) sections and |id| ... | rows, tolerating the handful of Phase 1 rows whose platforms cell carries an internal |), the loader for the hand-maintained Phase 2/3 mapping (docs/_meta/abi-taxonomy-coverage.json), and validate() — the abi-taxonomy-coverage gate's whole ruleset: every leaf carries exactly one status from the plan's fixed vocabulary, every referenced learn page/topic/case/ChangeKind exists, a non-COVERED status states its reason, a KNOWN_UNDETECTABLE/NOT_IMPLEMENTED leaf's cross-reference really appears in docs/learn/limitations.md/docs/contribute/known-gaps.md, and the recorded status agrees with the columns under the plan's first-match-wins order. Derives only two facts (a kind's owning abicheck/model/change_catalog/ module, its evidence_tiers.py tier) so those can't go stale in the JSON. Pure stdlib, importable. imported (by check_ai_readiness.py, gen_abi_taxonomy_coverage.py); gated via tests/test_abi_taxonomy_coverage.py.
gen_abi_taxonomy_coverage.py Generates docs/contribute/abi-taxonomy-coverage.md, the Phase 2/3 coverage matrix: every taxonomy leaf's learn_pages/catalog_cases/detector columns and its one Phase 3 status, headlined by completeness against the taxonomy (N of 88 COVERED) rather than a raw case count — the taxonomy-side counterpart of gen_catalog_coverage_report.py's corpus-side dimensions. Report-only; renders the committed mapping and refuses to render an inconsistent one. --check fails on drift. manual; run after editing docs/_meta/abi-taxonomy-coverage.json or the Phase 1 taxonomy.
changekind_real_coverage.py Real-extraction coverage inventory: for every ChangeKind, which real end-to-end evidence sources name it -- catalog/ground_truth.json expected_kinds, tests/field_shapes/*/ground_truth.json expected_kinds, and integration-marked tests (module pytestmark, class or function decorator) referencing the kind as ChangeKind.NAME or its exact string value inside an assert or a parametrize decorator. Lexical heuristic: misses kinds asserted only in helpers or marks applied by conftest/pytest.param, and counts not in asserts. Groups by evidence_tiers.py tier, renders docs/contribute/changekind-real-coverage.md (--check fails on drift), --json dumps the inventory, --write-baseline rewrites the shrink-only zero-source baseline changekind_real_coverage_baseline.json. --write-fixture-ledger rewrites changekind_fixture_ledger.json, the narrower per-kind real-fixture backing (catalog expected_kinds plus the edit corpus verified_floor in abiforge/coverage_ledger.json; the lexical integration scan does not count): the test fails when a recorded kind loses every source and when the ledger drifts from its sources. Needs the package installed (imports abicheck.checker_policy). manual; gated via tests/test_changekind_real_coverage.py (repo_scan).
gen_g20_fixtures.py Single source of truth for the committed G20 snapshot fixtures (catalog/cases/case143–151, ADR-035 / plan g20-source-scan-example-catalog). Writes each hand-built AbiSnapshot to snapshot.abi.json (plus thin.abi.json for the provider-matrix case); --check fails if committed snapshots drift. Validated in the fast lane by tests/test_g20_catalog.py (no compiler/castxml). Run after changing a fixture's design. manual
fixture_sync.py The write-or---check driver the committed-snapshot generators share: the walk over {case: {filename: builder}}, serialization, byte-comparison, drift reporting, exit code. gen_g20_fixtures.py and gen_reachability_examples.py each had their own copy; they now own only their fixtures. Takes a case_dir: Callable[[str], Path] resolver rather than a flat examples_dir: Path root (Phase 3 of the examples/catalog split, retired plan record — see docs/contribute/plans/index.md) — production callers pass example_catalog.case_dir directly, so Phase 4's directory split needs no change here or in either caller; tests/test_fixture_sync.py injects its own resolver (lambda name: tmp_path / "examples" / name) the same way the module's other test-injection seams work. Pure-stdlib apart from the caller-supplied builders/resolver. imported (by gen_g20_fixtures.py, gen_reachability_examples.py).
gen_l3l4l5_examples.py Single source of truth for the L3/L4/L5 build/source-only example fixtures — ABI/API failures only build context, source-replay, or the derived source graph can see, no artifact layer does. --check fails if committed fixtures drift. Run after changing a fixture's design. manual
gen_reachability_examples.py Generates the committed snapshot fixtures for the reachability-aware-suppression example cases (192–193): the headline scenario end to end, and its deliberate counter-example. --check fails if committed fixtures drift. manual
benchmark_comparison.py Benchmarks abicheck vs ABICC / libabigail across the examples/ catalog. --evidence-tiers instead runs abicheck at each evidence source (L0 binary / L1 +debug / L2 +headers / L3 +build) and reports which cases each source discovers. Exposes run_suite(args) (case discovery + tool invocation + frozen-data merge, factored out of main()) for generate_benchmark_report.py to drive programmatically. _rule_family_accuracy() (examples/catalog split "What is left" item 3, retired plan record) aggregates accuracy by rule family instead of by raw case, via catalog_rule_registry.build_families() — a family counts as correct for a tool only when every one of its member (canonical + confirmed duplicate/variant) cases scores correctly, so a rule with more sibling fixtures than another can no longer inflate or deflate a tool's apparent accuracy for a reason unconnected to how many rules it actually understands; wired into _collect_metadata()'s rule_family_accuracy field. Requires more than one compiler for a full run: gcc/g++ + CastXML for the abicheck L2 lane (the default pip install abicheck includes CastXML; otherwise install a system package), clang/clang++ for case64 and the abicheck_full lane, and a second, newer gcc (gcc-14+/gcc-15, tried ahead of the bare gcc alias) for case115's C23 _BitInt — without one, that single case reports ERROR rather than BREAKING (see module docstring). manual
generate_benchmark_report.py Wraps benchmark_comparison.py into one reproducible report: JSON + Markdown envelope (git commit, ground-truth sha256, tool versions, case list, per-lane accuracy/FP/FN/unsupported-error-timeout counts, wall time, process-tree peak RSS via resource.getrusage) plus per-lane cache-state (live vs. frozen-competitor provenance) and a second, independent rule-family accuracy table (benchmark_comparison._rule_family_accuracy, examples/catalog split "What is left" item 3, retired plan record) rendered under its own ## Rule-family accuracy (N demonstrated rule families) heading. --check diffs a generated report against the committed tables in docs/reference/tool-comparison.md — the flat per-case table (heading case-count always checked; per-lane numeric rows only on a full-catalog run, parse_doc_table/diff_against_doc) and the rule-family table (parse_rule_family_table/diff_rule_family_against_doc, checked on any run since a family's own denominator already excludes cases a partial run never touched) — and exits 1 on drift; the flat-table check is what should have caught the table falling behind catalog/ground_truth.json after PR #539. Pure-logic helpers (doc-table parsers, drift diffs, Markdown renderer) unit-tested in tests/test_generate_benchmark_report.py; the actual run still needs whatever external tools benchmark_comparison.py needs. manual
evidence_tiers.py Single source of truth for the five-source / L0–L4 evidence model: EVIDENCE_TIER_BY_KIND + KINDLESS_CASE_TIER compute each case's min_evidence (stored in catalog/ground_truth.json). Pure-stdlib, importable. Consumed by benchmark_comparison.py --evidence-tiers and gated by tests/test_evidence_tiers.py. imported
learning_ladder.py The learning series' reading order as data (docs/_meta/learning-ladder.yaml: two sequences, steps with a floor:, members, branches, links, role paths) and the learning-ladder docs-contract rules over it — completeness, per-sequence level monotonicity, floors, links-are-members, paths as strictly increasing ladder walks, **Ladder:** footers matching the ladder's neighbours in link target, link text (short titles) and Step N · <title> label, and the sidebar rule: mkdocs.yml's "ABI/API Compatibility" tab carries one nav group per step, titled <id>. <title>, in step order, holding that step's members in ladder order with each branch after its parent, while the Concepts tab lists its sequence flat in the same order (reads the nav through learning_nav_order.nav_groups). Also owns short_title/step_label, the reader-facing spellings the hub generator and the footers share. PyYAML, importable; consumed by check_docs_contract.py and gen_learning_ladder.py; gated via tests/test_learning_ladder.py. imported
learning_nav_order.py The learning-nav-order AI-readiness gate, split out of check_ai_readiness.py (past the 2000-line cap): each nav group under the ABI/API Compatibility and Concepts tabs must be non-decreasing in front-matter level: (hub skipped, branch pages included). Since the sidebar became the ladder itself (one nav group per step, enforced by learning_ladder.py's sidebar rule), a regression here means the ladder's own order regressed or a go-deeper branch sits ahead of a lower-level member — the fix is in docs/_meta/learning-ladder.yaml and mkdocs.yml together. Also owns nav_groups and duplicate_nav_groups, the nav readers that sidebar rule builds on (the walker folds two same-titled groups into one key; the second names them). Pure stdlib (indentation walk over the nav block, no PyYAML), importable; gated via tests/test_learning_nav_order.py. imported (by check_ai_readiness.py, learning_ladder.py)
platform_capabilities.py Single source of truth for the host-OS × binary-format capability matrix (ADR-051 Stage 2): per binary format (ELF/PE/Mach-O), each host OS's symbol-diff/type-param-diff capability and required tooling. Pure-stdlib, importable. Consumed by gen_platform_matrix.py; gated by tests/test_platform_matrix.py. imported
backend_capabilities.py Single source of truth for the L2 header-backend capability matrix (G31 Phase D): one row per field of the six declaration dataclasses dumper_castxml.py/dumper_clang.py build, plus scan_backend_evidence() — an ast-based reader that answers the same question from the parsers' own source, so the curated claim can be checked rather than trusted. Pure-stdlib, importable. Consumed by gen_backend_capability_matrix.py; gated by tests/test_backend_capability_matrix.py. imported
backend_capability_scan.py The observed half of backend_capabilities.py, split out when its FACT_ROWS data reached that file's size record: scan_backend_evidence(), castxml_evidence()/clang_evidence() and the Evidence enum, which read what each header backend actually constructs with ast. backend_capabilities.py re-exports every public name. imported (by backend_capabilities.py).
evidence_benchmark.py ADR-033 Phase 7 performance & false-positive report: times the compiler-free inline collection path per collect mode and prints the FP-rate gate's D9 delta metrics. --json for machine output. Reporting tool, not a gate. manual / CI report
dump_cli_surface.py Dumps the full abicheck Click command tree (commands/subcommands, options, arguments — names, flags, defaults, types, choices) to JSON. Relies only on whatever abicheck is importable in the current interpreter (no self sys.path insertion), so the same script dumps whichever checkout is installed in the active venv. CI (cli-interface-check.yml); manual
diff_cli_surface.py Diffs two dump_cli_surface.py JSON outputs and reports added/removed commands and added/removed/changed options. Exit 1 if the surface differs (0 if identical); --markdown formats the report for a PR comment. CI (cli-interface-check.yml); manual
benchmark_scaling.py Synthetic scaling benchmark for the pipeline — sweeps sizes and times compare(), suppression audit, severity, serialization, and the HTML/SARIF/JUnit reporters (plus PE/Mach-O/typedef/union/vtable/opaque-filter diff arms, fuzzy-rename accept path, and version-node migration fan-out), reporting a scaling exponent, peak heap (tracemalloc), and process peak RSS (resource.getrusage — catches native allocs). Pure-Python (no compiler/castxml). One untimed warmup then --repeat timed samples per point, summarized via perf_measurement.summarize_samples (median is the reported/gated figure, not the fastest run). Gating in CI; --max-seconds / --max-exponent (per-scenario opt-out via gate_exponent) / --max-memory-mb / --max-rss-mb gate absolute budgets, --baseline/--regress-tolerance/--regress-min-delta-seconds gate PR-vs-base drift (fails closed if --baseline is given but shares zero (scenario, size) points with this run — see --meta for recording base/head SHA + host/toolchain identity in the JSON report). See docs/contribute/performance.md. CI (performance.yml: weekly / performance label / dispatch / PR classified as perf-sensitive by classify_perf_paths.py); manual
check_header_graph_perf.py G31 Phase D header-graph attach-cost perf gate: isolates and times service._attach_header_graph's marginal cost (the always-on L2 semantic-graph build, G31 Phase A) across a synthetic header-size sweep, separately from the dumper.dump() baseline it's layered on top of — for both the clang backend (real Phase C in-process AST-memo handoff, measured by wrapping the dump call in dumper_cache.ast_memoize_scope() the same way service._run_dump_uncached does) and the default castxml backend (the genuine second clang subprocess every non-clang-frontend dump still pays; skipped, not fatal, when castxml isn't installed or is an out-of-policy build — unless --require-castxml is passed, which turns that same condition into a hard failure for a caller that just installed a pinned castxml itself, e.g. the CI jobs below). Needs clang/clang++/g++ on a Linux/ELF host; self-skips otherwise. One untimed warmup then --repeat timed (dump, attach) pairs per (size, backend), summarized via perf_measurement.summarize_samples (median reported/gated, not the fastest pair). --json-out writes a report; --baseline <report>/--regress-tolerance/--regress-min-delta-ms gate a later run against it, keyed on (size, backend) (report-only until a baseline is supplied, same convention as check_mutation_score.py's SURVIVOR_BASELINE; fails closed if the baseline shares zero points with this run's measurements); --markdown for a step-summary table. CI (performance.yml: header-graph-perf report-only trend job on weekly/dispatch, the gating PR-vs-base header-graph steps of the l2-cli-perf job (whose head run also supplies the PR's trend artifact) following benchmark_scaling.py's own same-runner base-vs-head pattern); manual. Mirrored in tests/test_header_graph_perf_gate.py (its live-measurement class carries the integration marker).
bench_release_memory.py Reproducible memory/time benchmark for a header-depth multi-library compare. Builds a real compiled two-sided C++ release fixture (--members/--apis/--records; g++ -shared -g per member, one changed public record and one removed export on the NEW side so a real break is detected), runs the CLI per output variant (json, junit, bundle-facts, junit+bundle-facts), and samples the four distinct memory figures a peak has to be attributed to: parent RSS, process-tree RSS and PSS (summed RSS double-counts shared pages), and cgroup billing (v2 or v1). --tracemalloc is a separate profiling run, never combined with a timing claim; --cold clears the cache between runs; --trace writes an abicheck.workflows.memory_trace JSONL trace with phase boundaries and retention counts; --keep reuses a fixture so a before/after pair at two SHAs compares identical operands. Deliberately runnable at a pre-instrumentation revision too (the memory_trace import is optional), so one harness measures both sides of a change. See docs/contribute/memory.md. manual; before/after measurement for memory work
bench_extraction_scope.py Phase 0 harness of docs/contribute/plans/target-ownership-and-extraction-scope.md. For one translation unit and its flags, measures time, per-process peak RSS and output size of clang -ast-dump=json (full and -ast-dump-filter), castxml (full and --castxml-start), and a prototype ownership-rooted closure over the full castxml XML; parses each castxml variant through abicheck's own parser and counts functions/types per owner (--owner NAME=PREFIX, first is the target), reporting target-owned declarations each narrowing lost. --dump adds abicheck dump end to end with both frontends. manual; rerun by every phase of that plan
bench_graph_materialization.py Evidence-entity-model Phase 5 (invariant I6) measurement: what the header graph and the public-surface graph cost over the plain snapshot. Runs the real CLI in a child interpreter under three variants — none (workflows.dump.native._HEADER_GRAPH_ENABLED/_HEADER_GRAPH_INCLUDES_ENABLED off), graph (today's default attach) and graph+facts (plus compare.surface_graph.build_public_surface_facts, the pass _attach_header_graph skips) — by setting module constants and wrapping the attach before cli.main runs, so no production code changes. Per variant/repeat: dump OLD, dump NEW and a stored/stored compare, each with private cold ABICHECK_CACHE_DIR/XDG_CACHE_HOME; samples parent RSS, tree RSS/PSS (via bench_release_memory._Sampler) and a per-run cgroup memory.current delta (the sampler's memory.peak is the cgroup's lifetime high-water mark); reads node/edge counts and raw/zstd sizes from the written snapshots; --tracemalloc adds a separate allocation-attribution run per variant. --old-lib/--new-lib naming two release directories switches to a per-member dump of each side, a stored/stored directory compare and a live directory/package compare per variant/repeat (the multi-library release, e.g. libonedal.so + libonedal_dpc.so). The child imports the checkout the script lives in, so a before/after pair is the script run from two worktrees. Results: docs/contribute/plans/evidence-entity-model.md § "Phase 5 measurements". manual
export_orphan_breakdown.py Evidence-entity-model Phase 4 (invariant I4) measurement: for one stored snapshot, runs the exports edge query (compare.edge_query.EdgeEvidence) over every declaration and every observed export and assigns each orphan (a subject not answering present) one cause, first match wins -- unknown (the query itself), compiler-generated, inline, uninstantiated template, hidden visibility, .symtab-only (--lib, read with pyelftools), versioned alias, internal namespace, structor variant, and unexplained/truly undeclared. Demangles with one batched c++filt process. --json writes counts plus per-cause samples. Results: docs/contribute/plans/evidence-entity-model.md § "Phase 4 — landed". manual
perf_cache_reset.py Cold-cache reset for benchmark_scaling.py's memory passes (clear_process_caches(): every live lru_cache plus the demangle batch cache), split out purely to keep that file under the file-size gate's line cap. Takes a whole-heap census only when memory_trace.gc_census_is_safe(); otherwise it walks abicheck module and class namespaces, because a census beside a live thread breaks that thread's tuple(...) construction. imported (by benchmark_scaling.py); gated via tests/test_benchmark_scaling.py and tests/test_gc_census_thread_safety.py.
perf_baseline.py Baseline-regression comparison for benchmark_scaling.py, split out purely to keep that file under the file-size gate's line cap: baseline_points_from_report() (parses a scaling-benchmark JSON report into (scenario, size) -> seconds), load_baseline(), matched_baseline_points() (the subset of a run's points that actually overlap the baseline — used to detect a zero-overlap --baseline rather than silently reporting a clean pass), and check_regressions() (the max(relative, absolute) regression rule via perf_measurement.combined_regression_threshold). Duck-typed over any .size/.seconds-bearing object, not a real import of benchmark_scaling.Point — no import cycle. imported (by benchmark_scaling.py); gated via tests/test_benchmark_scaling.py.
check_l2_cli_perf.py Full-CLI L2 perf harness -- the third and outermost of this repo's three perf measurement levels (benchmark_scaling.py = synthetic/in-process/compiler-free; check_header_graph_perf.py = real L2 dump+attach/in-process; this = the whole abicheck CLI as a subprocess against a real compiled C++ fixture). Measures the window a user actually waits for: interpreter startup, config discovery, input resolution, evidence extraction or snapshot load, comparison, report writing. Fixture compilation and every correctness check are strictly outside it. Covers the six supported L2 CLI forms (dump to a stored snapshot; live/live with side-specific headers; stored/live; stored/stored; --no-baseline audit; JSON + human report over one extraction) plus an unchanged-comparison control. Correctness is gated alongside time, because the worst regression available to a timing harness is getting faster by doing less: every scenario asserts resolved evidence depth really reached headers, public scoping resolved without falling back, the expected declarations are present, the header call/include/type graph passes all ran undegraded, and the deliberate break produced both a removal-family and a layout-family finding. Native invocations are observed, not assumed, via perf_receipt.NativeInvocationSpy, which is what turns "a stored/stored compare runs no compiler", "a stored/live compare extracts one side only", and "this warm run really was served by a cache" into measurements rather than claims. --suite pr (one small fixture, the six forms) vs --suite extended (selected single-axis points: shape, header count 1/8/32 over a shared closure, library count 1/2/5 with shared vs distinct contexts, cold/warm/invalidated cache -- never the full cross product). --baseline/--regress-tolerance/--regress-min-delta-seconds gate PR-vs-base; a missing required scenario shape is a failure, not a quiet pass, and --scenario/--no-spy print an explicit COVERAGE NOT CLAIMED line rather than letting a narrowed run read as a full one. Self-skips off Linux/without g++; --require-toolchain makes that a failure for a CI job that installed one. CI (performance.yml: l2-cli-perf on perf-sensitive PRs; l2-cli-extended periodic/manual); manual. Validation and gating live in the l2_cli_validation.py/l2_cli_gating.py siblings below (two 2000-line-cap splits). Mirrored in tests/test_l2_cli_perf_gate.py (its real-subprocess class carries the integration marker) and tests/test_l2_cli_perf_contracts.py (the what it asserts half -- fixture arms, the no-compiler contract's coverage of every observed invocation kind, threshold provenance, duration-argument validation -- split out once the gate file crossed the architecture gate's 1200-line test cap), plus two further thematic splits of that file when it crossed the same cap itself: tests/test_l2_cli_perf_cache.py (every cache-state claim -- the one kind that rests on a pair of observations, which is where collapsing a batch to its best member kept going wrong) and tests/test_l2_cli_perf_lane.py (whether a base receipt may be used as a baseline at all, and whether the workflow asks that of the gate's own rule).
check_l2_scaling_perf.py Full-CLI L2 scaling gate -- the growth-rate sibling of check_l2_cli_perf.py. Sweeps two axes through the real CLI on real compiled l2_cli_fixture builds: header count on one library (compare --depth headers, 1/4/12/30 headers) and library count through a directory compare (the release fan-out, 1/3/6/10 libraries x 2 headers). Gates the marginal cost exponent -- the OLS slope of log(wall(n) - wall(1)) against log(n - 1) -- because every CLI run pays a ~1 s fixed floor that makes a raw log-log slope read ~0 whatever the product does; a sweep whose largest point is under 0.25 s above the floor fails as unfittable rather than passing. Also gates a per-point peak process-tree RSS ceiling, and validates every repetition outside the timed window (L2 reached / public scope resolved / every library compared / break found), so a fast fallback is a failure. Cold XDG_CACHE_HOME per repetition. Head-only and absolute, so it needs no base run. CI (performance.yml: l2-cli-perf job, after the PR-vs-base step); manual. Gated via tests/test_l2_scaling_perf_gate.py (fit recovers the generating exponent over a parametrized family of synthetic power laws; release-report degradations; workflow wiring).
l2_cli_argv.py The argv the full-CLI L2 harness measures -- the third 2000-line-cap split out of check_l2_cli_perf.py, and the narrowest seam left (argv construction depends on the fixture shape and nothing else). Worth one place for a reason beyond line count: this is where the product's CLI grammar is restated, so it is what goes stale when the CLI changes -- ADR-068 slices 7m/7n replaced --format F -o PATH with a repeatable -o FORMAT=DESTINATION mid-review and every scenario had to move at once. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_gate.py's grammar guard.
l2_cli_validation.py What the full-CLI L2 harness asserts about a run's output, split out of check_l2_cli_perf.py once that file crossed the file-size gate's 2000-line hard cap (mechanical extraction, unchanged bodies). Every check runs strictly OUTSIDE the timed window, which is what lets them be thorough -- loading a snapshot through the product's own codec, walking a report's whole change set. The one rule they all serve: a timing harness that checks only duration rewards getting faster by doing less, so each function states what the run promised and fails when the promise is unmet however fast it was. Note two deliberate shapes: the identical-pair control rejects only findings asserting a difference (allowed set derived from the product's own RISK_KINDS/QUALITY_KINDS, since a risk observation holding on both sides is a true statement about the fixture), and the --no-baseline audit proves L2 through its own evidence_tiers because the audit report publishes no assurance/scope/depth block at all. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_contracts.py.
l2_cli_gating.py How the same harness turns receipts into a pass or a failure -- the third piece of that split (what it asserts / what it measures / how it gates). Reads only the receipt dicts a completed run produced, never a Step or a Scenario, which is the seam that lets the parent import it rather than the reverse. Two load-bearing rules live here: a point is gated only when its own scenario's status is ok (head and base alike -- a failed run is typically faster, having fallen back or rendered nothing, so its timings would gate against a number no correct run produces), and a required scenario shape that was never measured is a failure rather than a quiet pass. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_gate.py.
l2_cli_model.py The innermost types the full-CLI L2 harness is built from -- Step, Scenario, and EXTRACTION_EXPECTATIONS -- extracted on the fourth crossing of the file-size gate's 2000-line hard cap. Deliberately the innermost seam rather than another slice off the end: it imports nothing from the harness, so the scenario definitions (which are just data over these types) can move here next without a second reshuffle. EXTRACTION_EXPECTATIONS lives with them because it is the per-scenario contract a Step is checked against, not a gating policy -- l2_cli_gating.py never reads a Step. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_contracts.py.
l2_cli_observation.py What the full-CLI L2 harness concludes from an observed native-invocation count -- the fifth 2000-line-cap split, and an inward seam like l2_cli_model.py: every function takes a CommandRun plus a Step contract and reaches no fixture, argv, filesystem or scenario. Worth one module because one rule governs all of it, and both halves of that rule were real defects here: an absent observation is unknown, never zero (a --no-spy run read an absent counter as "extracted nothing" and failed deterministically) and one favourable observation never certifies a batch (a min() over repetitions let one lucky warm run certify a whole cold/warm batch). Holds the include-pass floor, which is one pass per header the argv names rather than one per side -- measured as h1 -> 2, h8 -> 16, h32 -> 64, so a regression parsing only the first header of each side is caught instead of reading as a speedup. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_contracts.py and tests/test_l2_cli_perf_gate.py.
l2_cli_fixture.py The generated real C++ fixture check_l2_cli_perf.py measures against -- a real .so with real public headers built by a real compiler, not a hand-built AbiSnapshot (a synthetic snapshot would skip the header frontend, which is the most expensive and most regression-prone part of an L2 run). Three independent axes: shape (simple / a bounded templates variant), top-level header count over a shared detail/ dependency closure, and library count with shared or distinct header contexts. Every variant builds an old/new pair, the new side carrying either no change or two specific edits -- a removed exported function and a widened record -- whose findings the harness asserts on via EXPECTED_BREAK_KIND_FAMILIES (families, not exact kinds: the same two edits surface as func_removed or func_removed_elf_only and as type_size_changed/struct_size_changed/type_field_offset_changed depending on shape, so pinning one spelling would test detector routing instead of evidence arrival). Generated rather than committed, so the sweep can be calibrated locally without a tree full of binaries. Building a fixture is setup, never a measured scan. imported (by check_l2_cli_perf.py); gated via tests/test_l2_cli_perf_gate.py/tests/test_l2_cli_perf_contracts.py.
l2_real_profiles.py The pinned real-integration L2 profiles (oneDAL PR #3693, SVS released-v0.4.0-vs-PR-#387 and its separate PR-base smoke test, PVXS PR #216) as declarative data: each profile's compared operands and how each side is obtained (side_sources/side_commands -- built from a revision, or a published distribution consumed as-is), the libraries and public headers actually in L2 scope, required tools, approximate build cost, and reproducible prepare commands. Periodic/manual only -- an ordinary PR must never download and build oneDAL (~120 build-minutes, ~25GB). The rule it exists to enforce: an unavailable profile is reported PARTIAL/BLOCKED/NOT_RUN with a concrete reason, never silently replaced by a synthetic substitute, and a synthetic number is never published under a real project's name. The negative statuses are deliberately distinct -- "this host can do part of it" vs. "this host cannot" vs. "nobody asked" -- and so are READY and MEASURED: resolve_status answers a readiness question and can only return READY/PARTIAL, because it once returned MEASURED for any request whose prepared_root merely existed (an empty directory, no library or headers on either side, no comparison run). Declared operands are now checked on both sides (missing_inputs) and MEASURED is reachable only via promote_to_measured, which requires a completed timed window with validated output. PARTIAL exists because tool requirements are per header/compile context (context_tools), not per profile: oneDAL's two DPC++ libraries need icpx and its three host libraries do not, so a profile-wide requirement made a host-only machine report the whole profile BLOCKED, hiding usable coverage; a PARTIAL status carries the per-library split (measurable_libraries/blocked_libraries), and the case where no context is buildable stays BLOCKED. Further honesty constraints are encoded as validation rather than prose: a library with no public API of its own is a recorded non-case with a stated reason (oneDAL's libonedal_thread); an in-scope library naming no public header is rejected as a binary-only case mislabelled as L2; validate_side_headers rejects a plan resolving both sides' headers to one root; a side declared a prebuilt distribution may not carry build commands (rebuilding a release measures the rebuild, not the artifact consumers received); and every declared scenario must state its expectation (SCENARIO_EXPECTATIONS) -- "any finding is a false positive by construction" holds for a literal self-comparison only, while independent rebuilds are investigated against the recorded toolchain and intentionally different build variants differ in contract on purpose. digest_tree verifies a prepared tree really is the pinned one. Multi-library profiles are measured as the supported set of per-library L2 operations -- never called a bundle scan, since no declarative L2 bundle capability exists. Pure stdlib; downloads and builds nothing on import. imported (by the periodic lane); reported by performance.yml's l2-cli-extended job; gated via tests/test_l2_real_profiles.py.
perf_receipt.py The shared, versioned performance receipt layer the perf harnesses emit, so the three measurement levels above stop reinventing the apparatus around them while staying separate as scenarios: run identity -- the measuring harness's own revision and, separately, the measured product (the installed abicheck's version/location/revision), because the PR-vs-base lane deliberately runs one harness against two products and a single product_sha recorded the harness's revision for both -- plus toolchain versions, interpreter, OS/arch, CPU quota and memory limit read from cgroup v2 rather than assumed from cpu_count()), input digests, the NativeInvocationSpy (a directory of exec-ing PATH shims that log every castxml/clang++/g++ invocation with its argv, classified by classify_invocation into header_extraction / include_pass / probe / other -- the classification is what keeps a castxml --version probe out of the extraction count, and it was calibrated against real observed argv, not guessed from product source), the TreeRssSampler (parent-side sampling of a subprocess tree's concurrent RSS), and run_measured (one timed subprocess, whole-lifetime window, process-group reaping on timeout so a castxml grandchild cannot outlive its parent and skew later measurements). Deliberately never claims an exact peak: sampled_peak_tree_bytes is a sampled figure that misses sub-interval spikes and double-counts shared pages (sampled_peak_tree_pss_bytes, the same tree summed as PSS, is the figure the L2 scaling gate budgets), ru_maxrss_bytes is carried separately as the kernel per-process high-water mark, and both are reported with the sampling interval and observation limits. Records an explicit environment allowlist, never os.environ, because a receipt is a committed CI artifact. Pure stdlib (with resource guarded, so the module still imports on Windows where the Windows unit-test matrix collects its test files -- the harness refuses to run off Linux, which is a different thing from failing collection); imported by no abicheck/ module. imported (by check_l2_cli_perf.py); gated via tests/test_perf_receipt.py (real child processes for the spy, the two-simultaneously-live-children tree sum, and timeout grandchild cleanup -- none of which a mock can establish).
perf_proc_tree.py The /proc readers perf_receipt.TreeRssSampler samples each interval: per-process RSS (statm) and PSS (smaps_rollup), and the descendant walk, split out of perf_receipt.py to keep that file under its size record. imported (by perf_receipt.py).
baseline_loader.py The one strict parser for the gate baseline JSON files: read_baseline() / parse_baseline() refuse NaN/Infinity (json accepts them, and every gate comparison against one is False, so a poisoned baseline passes silently) with BaselineFormatError, a json.JSONDecodeError subclass, so each caller's existing malformed-baseline handling covers it. Otherwise returns exactly json.loads's result. Callers keep their own error policy. imported (by perf_baseline.py, check_header_graph_perf.py, l2_cli_gating.py, mutation_scope.py, perf_antipatterns.py); gated via tests/test_baseline_loader.py.
perf_measurement.py Shared repeated-measurement statistics for the two perf-gate scripts above: summarize_samples() (median/min/max/p95/coefficient-of-variation over a list of timing samples — the median is the value every gate/report uses, not the fastest sample), combined_regression_threshold() (the max(relative %, absolute floor) regression rule both scripts' check_regressions() apply), and finite_positive_float_arg() (the duration/interval sibling of finite_nonnegative_float_arg(), rejecting zero too: zero is meaningful for a regression floor and silently broken for a timeout or a sampling interval -- the first instantly times out every step, the second busy-loops the sampler thread and perturbs the timings it only observes), positive_int_arg() (the shared argparse type= for a --sizes/--repeat-shaped option — rejects <= 0, since a --repeat 0 otherwise leaves summarize_samples() an empty list and crashes with ValueError instead of a clean usage error). One shared implementation so the two scripts' regression math and argument validation can't independently drift. Pure stdlib (statistics, argparse). imported (by benchmark_scaling.py, perf_baseline.py, check_header_graph_perf.py); gated via tests/test_perf_measurement.py.
classify_perf_paths.py The classifier-job pattern for performance.yml's PR-triggered jobs (scaling/regression/l2-cli-perf (which also runs the header-graph PR gate), plus header-graph-perf on schedule/dispatch): PERF_SENSITIVE_PATTERNS (the one, testable-in-Python source of truth for which changed paths mark a PR performance-sensitive — previously an untestable pull_request.paths: YAML filter, whose staleness once let real perf-sensitive changes merge with no Performance check run at all), changed_files_are_perf_sensitive(), and matched_patterns() (diagnostic: which pattern each sensitive file matched). main() reads changed paths from stdin/--files-from, decides run=true/false (or unconditionally true via --always for schedule/workflow_dispatch, or via --force-label/--current-labels for a performance-labeled PR — --current-labels carries the PR's whole current label set, not just the event that triggered this run, so the force-run survives a later push to an already-labeled PR), and writes it to $GITHUB_OUTPUT (or stdout outside Actions). Pure stdlib (fnmatch, argparse). CI (performance.yml's classify job, gating its downstream jobs); gated via tests/test_classify_perf_paths.py.
demo_libz.py End-to-end demo on libz. CI (integration.yml Linux leg, via verify.py --profile full --only demo-libz)
summarize_test_durations.py Renders the per-test durations captured by the tests/conftest.py ABICHECK_DURATIONS_JSON hook into a Markdown table (GitHub run summary in CI, stdout locally). Reporting only — not a gate. Unit-tested in tests/test_summarize_test_durations.py. CI (unit-tests, Linux/3.13)
test_unique_coverage.py Reads a coverage data file recorded with --cov-context=test and, for every test, counts the lines it covers and the lines no other test covers. Sections: zero-unique tests by lines covered; zero-unique tests by runtime (--durations PATH, a pytest --junitxml report, matched on classname.name); test files mostly zero-unique; source files whose lines single tests alone cover. A review queue, not a deletion list and not a gate: a zero-unique test may still assert a value no other test checks, so read it with the test-assertion-density gate and the mutation lane. --json PATH writes the per-test rows. Exits 0 always; unreadable inputs are reported, not raised. Unit-tested in tests/test_test_unique_coverage.py. CI (test-unique-coverage.yml, weekly + dispatch); manual.
extract_bundle_manifest.py Extracts a manifest from multi-library bundles (cases 90–93). manual
restore_git_mtimes.py Restores each tracked file's mtime to its last-commit timestamp (one git log walk, not one subprocess per file). dumper's on-disk AST cache keys headers by mtime, not content; actions/checkout resets every file's mtime to checkout time, so without this a persisted actions/cache for ~/.cache/abi_check would miss every entry, every run. Restoring last-commit mtimes makes the cache key stable across checkouts of the same commit. CI (examples-validation.yml); manual
setup_dev_env.sh Vendor-neutral dev-environment bootstrap: pip install -e ".[dev,docs,dist]" into an isolated venv (DEV_VENV_DIR, dev_venv_pin.env below — avoids clobbering dpkg-owned Python packages on Debian-based images, which a system-interpreter install would otherwise need a whole-invocation --ignore-installed to work around) plus a pinned, checksum-verified castxml install from conda-forge (via a throwaway, checksum-verified micromamba) for hosts with no apt/pip castxml package. The canonical setup logic — an adapter (e.g. .claude/hooks/session-start.sh) should call this rather than hand-duplicating its commands (AGENTS.md's adapter principle). Shares its venv/castxml pins with dev_venv_pin.env/castxml_pin.env (below) so a caller needing an install location doesn't have to parse this script. .claude/hooks/session-start.sh; manual for a local from-scratch setup.
dev_venv_pin.env The single source of truth for where setup_dev_env.sh creates its isolated dev venv (DEV_VENV_DIR) and which interpreter it uses (dev_venv_python() — prefers python3.13, AGENTS.md's canonical dev/CI version, falling back to python3). DEV_VENV_DIR is keyed by the resolved interpreter's own X.Y version, so a host gaining/losing 3.13 lands in a fresh venv rather than reusing one built for a different interpreter. Sourced by both setup_dev_env.sh and any adapter that needs that venv's bin/ on PATH, so the location can't drift between the two. sourced by setup_dev_env.sh, .claude/hooks/session-start.sh.
castxml_pin.env The single source of truth for setup_dev_env.sh's conda-forge castxml pin — CASTXML_BUILD (the direct matchspec) and CASTXML_LOCKED_SPECS (its complete transitive runtime closure, pinned exactly, since castxml's own conda depends: only bounds those to ranges and a direct-only install can drift over time even with CASTXML_BUILD fixed — observed empirically against pixi.lock's own resolve), plus the CASTXML_PREFIX derived from both (keyed by CASTXML_PINSET_VERSION too, so a locked-spec-only re-pin still invalidates old cache directories). Sourced by both setup_dev_env.sh and any adapter that needs to know where the pinned castxml ends up, so the pin can't drift between the two. Keep CASTXML_BUILD in lockstep with pixi.lock's committed linux-64 solve (grep castxml pixi.lock); re-verify CASTXML_LOCKED_SPECS against a real install when bumping either. sourced by setup_dev_env.sh, .claude/hooks/session-start.sh.