Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
81c27f2
CBZ-0 G11: bind exemptions and exercise to parsed source
d6g8k5htny-coder Oct 30, 2026
d566f15
CBZ-0 G11: add adversarial auditor controls
d6g8k5htny-coder Oct 30, 2026
fe8a330
CBZ-0 G11: require designated assertion mutation kills
d6g8k5htny-coder Oct 30, 2026
fcaac86
CBZ-0 G11: document bounded auditor scope
d6g8k5htny-coder Oct 30, 2026
651ac44
CBZ-0 G11: add pinned component self-test workflow
d6g8k5htny-coder Oct 30, 2026
5ad42e7
CBZ-0 G11: bind stub exemptions and exercise evidence to actual scopes
d6g8k5htny-coder Oct 30, 2026
385b038
CBZ-0 G11: add adversarial false-exercise and scope-shadow controls
d6g8k5htny-coder Oct 30, 2026
8602ddc
CBZ-0 G11: bind mutation kills to exact unittest failures
d6g8k5htny-coder Oct 30, 2026
f47d069
CBZ-0 G11: document conservative command and import evidence boundaries
d6g8k5htny-coder Oct 30, 2026
e80f327
CBZ-0 G11: preserve quoted workflow command boundaries
d6g8k5htny-coder Oct 30, 2026
179b777
CBZ-0 G11: exercise valid shell command quoting and template literals
d6g8k5htny-coder Oct 30, 2026
93a9807
CBZ-0 G11: keep mutation cases aligned with scope and workflow parsers
d6g8k5htny-coder Oct 30, 2026
6037ed3
CBZ-0 G11: exclude unittest failure headers from exception attribution
d6g8k5htny-coder Oct 30, 2026
a3a56bd
test(cbz): expose residual G11 auditor false positives
d6g8k5htny-coder Oct 30, 2026
d4d22d4
test(cbz): fix quoted python command fixture
d6g8k5htny-coder Oct 30, 2026
97584de
test(cbz): correct G11 residual regression fixtures
d6g8k5htny-coder Oct 30, 2026
609783f
fix(cbz): close G11 auditor soundness residuals
d6g8k5htny-coder Oct 30, 2026
2ba97e8
test(cbz): bind G11 mutations to unique assertions
d6g8k5htny-coder Oct 30, 2026
fec019d
test(cbz): refine G11 assertion attribution
d6g8k5htny-coder Oct 30, 2026
9a063fd
test(cbz): bind raise-call mutant to full assertion
d6g8k5htny-coder Oct 30, 2026
9dbc976
fix(cbz): close G11 auditor soundness and mutation-campaign gaps
d6g8k5htny-coder Oct 30, 2026
51293d1
test(cbz): repair exact mutation assertion binding
d6g8k5htny-coder Oct 30, 2026
3433a67
test(cbz): align multiline mutation assertion source binding
d6g8k5htny-coder Oct 30, 2026
3901886
test(cbz): bind docstring mutant to unique assertion
d6g8k5htny-coder Oct 30, 2026
6a91249
test(cbz): bind exception-context mutant to loop assertion
d6g8k5htny-coder Oct 30, 2026
1b96460
fix(cbz): align G11 mutation targets with current source
d6g8k5htny-coder Oct 30, 2026
2aa6b26
fix(cbz): preserve log-message mutation target literal
d6g8k5htny-coder Oct 30, 2026
f3da535
fix(cbz): qualify G11 harness on current Main
d6g8k5htny-coder Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/cbz-g11-auditor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CBZ G11 auditor component self-tests

on:
pull_request:
push:

permissions:
contents: read

jobs:
g11-auditor:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11'
- name: Run census controls normally
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -m unittest tests.test_g11_census
- name: Run census controls with optimization
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -O -m unittest tests.test_g11_census
- name: Run mutation self-test normally
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S tools/cbz/g11_mutation_selftest.py
- name: Run mutation self-test with optimization
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -O tools/cbz/g11_mutation_selftest.py
30 changes: 30 additions & 0 deletions docs/cbz/G11_AUDITOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# G11 auditor — bounded census, not certification

## Purpose

`tools/cbz/g11_census.py` reads tracked blob bytes from one Git revision and reports review triggers for the owner-defined G11 tooling-hygiene criterion: Python stubs, code-comment markers, no-op workflow run steps, and tool documentation/static-reference checks. It is a triage instrument, not a proof, a Layer A certificate, or a federation-wide G11 admission.

## Commands

From the repository root, using only the Python standard library:

```sh
python3 -B -S -m unittest tests.test_g11_census
python3 -B -S -O -m unittest tests.test_g11_census
python3 -B -S tools/cbz/g11_mutation_selftest.py
python3 -B -S -O tools/cbz/g11_mutation_selftest.py
python3 -B -S tools/cbz/g11_census.py --rev <commit> --json census.json
```

The census exits 0 for no detected production finding, 1 for a detected production finding, and 2 when the requested Git revision cannot be read. In-scope tracked symlinks and other non-regular scanned entries fail closed with exit 2. A zero exit is only the result of this implementation over its stated scanned paths and rules.

## Soundness boundaries

- Stub exemptions are bound to source-resolved imports, not decorator or base names. An imported `abc.abstractmethod` exempts only a method in an immediate class with a trusted imported `abc.ABC` base. Imported `typing.overload`/`typing_extensions.overload` exempts only declarations in one contiguous same-name overload group followed by a concrete, non-stub implementation. Immediate imported `typing.Protocol`/`typing_extensions.Protocol` interface methods and the named `http.server` request-handler `log_message` override remain contextual. ABC inheritance alone and exception-class inheritance do not exempt a method. Nested outer-class context, unpaired overloads, name suffixes, local look-alikes, and lexical bindings shadowing an imported decorator/base do not grant exemptions.
- Python reference evidence is limited to module-level statements and classes whose base resolves to the imported `unittest.TestCase` identity (including explicit aliases), following only locally reachable helper calls and literal branches; a local class merely named `TestCase` is not credited. Uncalled helpers, `if False`, runtime-dependent branches, and loop bodies are not credited. Workflow references ignore here-document bodies and are read from run commands, not YAML comments. Python/shell `-c` payloads and JavaScript template-literal text are not credited. These are static references only, never proof of runtime execution, and cannot satisfy a runtime-exercise requirement.
- YAML comments are scanned for marker words. Empty and comment-only `run` blocks are reported as no-op steps.
- The mutation self-test has 75 cases: 72 of the 74 original cases, one F4 decoy-`TestCase` control, and two controls for the Python 3.11+ unittest failure header `method (module.Class.method)`, with and without a `subTest` suffix. Two original cases were dropped as equivalent mutants: exception bases confer no stub exemption, so neither a decoy `…Error` base name nor an ignored shadow of a builtin exception name can change a report. It seals the exact source slice containing `MUTATIONS`, `TARGETS`, `NEW_MUTATIONS` and `EXPECTED_MUTATION_NAMES` with a test-side SHA-256, then compares complete literal case tuples—not names alone—against the harness source. A kill is admitted only when the clean full 38-test baseline succeeds and the exact designated module/class/method reports `FAILED` with one AssertionError at its exact designated assertion line, zero errors, and zero skips. The harness propagates the parent's optimized mode to child tests and applies each mutation to its declared source, including all harness-target cases.

## Limits

This scanner does not establish Python runtime behavior, shell/YAML semantics in general, JavaScript parsing correctness, completeness of every possible test/execution mechanism, or semantic absence of placeholders introduced by metaprogramming. The comment lexer for JavaScript/shell is intentionally conservative. Findings and misses require source-aware review. A green component workflow is not G11 gate acceptance, Layer A compliance, proof closure, scientific acceptance, or CBZ-0.
Loading
Loading