Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
69 changes: 69 additions & 0 deletions .github/workflows/cbz-source-auditor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CBZ source instrument self-tests
'on':
push:
branches: [main]
paths:
- '**/*.lean'
- 'cbz-source-manifest.json'
- 'tools/cbz_source_audit.py'
- 'tests/test_cbz_source_audit.py'
- 'tests/test_cbz_mutation_harness.py'
- 'tests/run_scanner_mutations.py'
- '.github/workflows/cbz-source-auditor.yml'
pull_request:
paths:
- '**/*.lean'
- 'cbz-source-manifest.json'
- 'tools/cbz_source_audit.py'
- 'tests/test_cbz_source_audit.py'
- 'tests/test_cbz_mutation_harness.py'
- 'tests/run_scanner_mutations.py'
- '.github/workflows/cbz-source-auditor.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
source-instrument:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11'
- name: Preserve current source identity
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/cbz-evidence"
git rev-parse HEAD > "$RUNNER_TEMP/cbz-evidence/commit.txt"
python --version > "$RUNNER_TEMP/cbz-evidence/python.txt"
- name: Instrument and harness regression controls
run: |
set -euo pipefail
python -B -S -m unittest discover -s tests -p test_cbz_source_audit.py -v 2>&1 | tee "$RUNNER_TEMP/cbz-evidence/tests-normal.log"
python -B -S -m unittest discover -s tests -p test_cbz_mutation_harness.py -v 2>&1 | tee -a "$RUNNER_TEMP/cbz-evidence/tests-normal.log"
python -B -O -S -m unittest discover -s tests -p test_cbz_source_audit.py -v 2>&1 | tee "$RUNNER_TEMP/cbz-evidence/tests-optimized.log"
python -B -O -S -m unittest discover -s tests -p test_cbz_mutation_harness.py -v 2>&1 | tee -a "$RUNNER_TEMP/cbz-evidence/tests-optimized.log"
- name: Actual scanner mutation controls
run: |
set -euo pipefail
python -B -S tests/run_scanner_mutations.py --evidence-dir "$RUNNER_TEMP/cbz-evidence/mutation-cut"
- name: Preserve lexical findings without manufacturing Layer A success
run: |
set -euo pipefail
set +e
python -B -S tools/cbz_source_audit.py --manifest cbz-source-manifest.json > "$RUNNER_TEMP/cbz-evidence/source-review.json"
status=$?
set -e
test "$status" -eq 1 || test "$status" -eq 2
python -B -S -c 'import json,os; p=os.path.join(os.environ["RUNNER_TEMP"],"cbz-evidence","source-review.json"); r=json.load(open(p)); valid=r["gate_claims"]=={"G1":"NOT_ESTABLISHED","CBZ-0":"NOT_ESTABLISHED"} and r["input_integrity"]["status"]=="CHECKED" and not r["errors"]; print("Instrument output retained; G1 and CBZ-0 remain NOT_ESTABLISHED"); raise SystemExit(0 if valid else 1)'
- name: Preserve actual instrument evidence including failures
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: cbz-source-instrument-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/cbz-evidence/
if-no-files-found: error
retention-days: 30
105 changes: 105 additions & 0 deletions DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,108 @@ Append-only. Historical source outcomes remain in their original records.
| 2026-10-29 16:56 | 1 | C | Began installing the repository-pinned Lean toolchain for fresh build/kernel execution. Historical hosted CI will remain historical evidence. | Yes | Math `formal/lean-toolchain`, `lake-manifest.json` |
| 2026-10-29 16:54 | 1 | C | Timestamp correction: the entries labelled 16:55 and 16:56 above used projected times by mistake; both actions had actually completed by the observed clock reading 16:54:09 UTC. The actions and evidence are unchanged. | Yes | UTC clock observation 2026-10-29 16:54:09; append-only correction |
| 2026-10-29 16:54 | 1 | C | Direct fast-forward push to main was rejected by repository rule GH013 (PR required and three current status checks required). Use a PR with actual automated checks and autonomous integration; no owner input is needed. Do not bypass the rejection. | Yes | Git push exit 1, remote rule readback |


## Source instrument execution lane


- 2026-10-29 · Phase 1 · Layer B · Apply the current owner Crystalline Baseline
Protocol over conflicting legacy approval/freeze/routing requirements.
Preserve mathematical rigor and actual platform enforcement.
- 2026-10-29 · Phase 1 · Layer C · Recover Main 4ef1867175dbe1072a54a02e95f80c4e2c70a4ff
by Git-blob comparison: 2565 reused files and 259 fetched files. Root tree
005e7fb08659f23485587b7201779e9d30b7ccd1 and signed commit bytes matched.
The local execution view is explicitly shallow, not full-history custody.
- 2026-10-29 · Phase 1 · Layer C · Separate Main, Math and infrastructure
inventories in disjoint workspaces. No authority or kernel success is
inferred from old claim records or green metadata.
- 2026-10-29 · Phase 2 · Layer C · Build a bounded Lean source inventory
instrument rather than mislabel lexical scans as complete Layer A proof.
Full G1/CBZ claims remain blocked in every report.
- 2026-10-29 · Phase 2 · Layer B · Preserve prior mutation cuts. The first
37/39 cut exposed missing permission/semantic-gap assertions. Add tests,
reject startup/JSON/timeout harness failures as kills, then require 39/39.
- 2026-10-29 · Phase 2 · Layer C · Repair report FIFO/input overwrite and
unbounded directory materialization defects found by fresh review.
Regression failures were observed before the fixes;36 scanner tests pass.
- 2026-10-29 · Phase 2 · Layer B · Optional report files must be new, regular,
outside the source root and reached without symlinked ancestors.
Enumeration consumes at most the declared budget plus one refusal sentinel.
- 2026-10-29 · Phase 2 · Layer B · Add read-only CI instrument self-tests and
retained mutation evidence. Preserve navigation Option A and all existing
required-check contexts, commands and source files.
- 2026-10-29 · Phase 2 · Layer C · The composed full Main run executed 1591
tests and exposed one routing-document regression, with 36 environment
skips. Restore the canonical board link as a history/source pointer; do not
reinstate the superseded approval ceremony or weaken the routing test.

- 2026-10-29 · Phase 2 · Layer C · Reconcile against live Main 81acc060341e8a31cc4cd4f9523ef71fb6c06175; preserve its canonical governance and agent entry byte-for-byte, append this instrument registry and retain both decision histories. No source proof, navigation workflow or required-check rule is changed.
- 2026-10-29 · Phase 2 · Layer B · Consolidate lexical tooling around the
bounded source instrument. Add the stronger trust-bypass/native review
triggers from the pinned alternatives, retain their provenance and adverse
observations in cbz/evidence/source-instrument-selection.json, and qualify
the union with 39 scanner plus 14 harness methods and 47/47 killed mutants.
Alternatives are not declared integrated or superseded by this candidate.
- 2026-10-29 · Phase 2 · Layer B · Scope this new, nonrequired mutation
workflow to its Lean inputs, implementation, manifest, controls and own
workflow, retaining manual dispatch. Its first hosted run retained 451456
artifact bytes. Navigation Option A stays byte-identical and continues full
normal discovery on every eligible event. No required context or protection
setting is changed; no saved-run count or monetary saving is asserted.
- 2026-10-29 · Phase 2 · Layer C · Execute all 46 Node test files with four
exact public-shop inputs and 34 exact museum inputs: 763 pass, zero skips.
Preserve the initial missing-fixture failure and intermediate skip logs.
No Node test, product source, assertion or mathematical bound was changed.
- 2026-10-29 · Phase 2 · Layer C · Preserve concurrent Main 27c89b05bd2503c580b692f57146d608a7f0f668,
its zeta-manifest source repair and all 14 additional tests during composition.
Fresh hosted qualification will bind the resulting revised PR head.
- 2026-10-29 · Phase 2 · Layer B · Repair four bounded source-instrument defects
reproduced by native review: preserve JSON refusal and create no report file
when the audited root is unknown; reject ambiguous POSIX `//` path anchors;
review record-update `with native :=` fields; record execution health for
every CLI invocation during mutation suites. Input-dependent crashes or
invalid JSON cannot become assertion kills after a healthy benign smoke.
Observe 58 methods passing normally and with optimization, and 50/50 genuine
assertion kills with a healthy 42-method baseline, zero harness/test errors
and zero skips. Retain the exploratory 49/50 cut without relabelling its one
missing-artifact test error as a kill; strengthen the artifact assertion and
qualify the final source separately. G1 and CBZ-0 remain NOT_ESTABLISHED.
Exact commands, controls and prior qualification are preserved in
cbz/evidence/source-instrument-selection.json. Frozen SHA-256 bindings:
scanner `c91da1c607a956cb64d39d8342b7d59722070d0aa5f2dfe54a5e049f3ec8fc9a`;
scanner tests `0facbe01b9e2c69928dce1973206bf4fbbd7b962cfbf8a7c2bed38999d1a2250`;
mutation runner `8ac245bec4c5fafe4c54bbeb51e447783d871570153ac7d5b1e70280e7c8eab5`;
harness tests `588190d7ec55d8d6dcd4e7d2bed290bd3d3593f133d1bcecbbc018d89dcfabe4`.
- 2026-10-29 · Phase 2 · Layer B · Repair native review finding
PRRT_kwDOQpeC2s6xuZcD at reviewed head
67c58ce23b26f54814b1727a848e2ec090219a8f: comma-free newline-separated
record fields could hide `native := true` after `kernel := false` from the
bounded lexical trigger. The pinned fixture
`7559cc5c662a07cba512c688d568330589165d6675b2a7a1be5c57cf8fc0dfe7`
was accepted by actual Lean 4.34.1 and missed by the prior scanner; a separate
axiom probe observed its generated native-decide axiom. Conservatively review
native assignments as first code on a line inside lexical braces, preserving
comment/literal masks. Four CLI regression cases failed before the repair.
Now 59 methods pass normally and with optimization; the unchanged 43-method
baseline and all 51 mutants have healthy CLI execution, zero errors/skips,
and 51/51 genuine assertion kills. Preserve the prior 58-method/50-mutant
qualification and its raw receipt unchanged. This lexical repair supplies no
semantic or full G1 proof; G1 and CBZ-0 remain NOT_ESTABLISHED. Exact fixture,
runtime observations and qualification are in cbz/evidence/source-instrument-selection.json.
Frozen SHA-256 bindings: scanner
`827c5d582d889ec4b8c5d36ceb9d89de7d79cccfe0736d633ab9eb7b40db0e05`;
scanner tests `4f138b59b8d767e4d1e169b7031f1924f7b8e50ebb0353895c205f4aaf46c1c4`;
runner `7c06fd16fd9a34d9e37b6470971cb415d30a0624d69d531f6357507b83397033`.
Harness test bytes remain at
`588190d7ec55d8d6dcd4e7d2bed290bd3d3593f133d1bcecbbc018d89dcfabe4`.

- 2026-10-29 · Phase 2 · Layer C · Compose the repaired source instrument on
current Main c93cec70223281492709ff74ca84fed5dc6e40e8, preserving the
receipt-attempt hardening, its source-bound evidence and the novelty-memo
clarification. Native tree comparison confirms no Lean source change in
that base advance. Publish only after all twelve instrument blobs and the
complete base-relative changed-path set match; fresh hosted checks bind
the resulting head. Existing nine green checks at f9b800dc are historical
and do not qualify the four subsequent repairs.

- 2026-10-29 · Phase2 · LayerC · Resolve four original PR694 review threads only after fixes were published at67c58ce23b26f54814b1727a848e2ec090219a8f and58tests/50mutants observed. Missing-root JSON refusal, all-invocation CLI health, record-update native fields and alternate POSIX path anchors are repaired. Fifth comma-free layout finding is independently reproduced with actual Lean and fixed in this successor; previous run evidence stays historical. No review/protection bypass or person-directed comment.
64 changes: 64 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,67 @@ are being inventoried against their actual tests and execution coverage.
Mission tools must be finished, documented with exact usage and verification,
and registered here and in `TOOLING.md` before final admission. Tools are a
means to closure, never a reason to open a general infrastructure project.


## Registered source inventory instrument


### cbz_source_audit

Path: tools/cbz_source_audit.py. Purpose: reconcile a hash-pinned local .lean
inventory and flag bounded lexical hazards without silently dropping sources.
It is an inventory/review tool, not a full Layer A certifier. Every report
leaves G1 and CBZ-0 NOT_ESTABLISHED.

Run: python -B -S tools/cbz_source_audit.py --manifest cbz-source-manifest.json

Manifest paths and SHA-256 values pin every Lean source in the selected local
root. Symlinks, unreadable/missing files, malformed UTF-8, unlisted Lean sources,
hash mismatches and resource-limit failures are explicit refusals. Nested Lean
comments and literal strings are masked; unsupported syntax is reviewed.
Optional output creates a new regular file outside the audited root and
refuses overwriting earlier evidence or inputs. An unknown audited root
preserves the JSON refusal and creates no output. Ambiguous POSIX `//` path
anchors are refused before filesystem traversal or containment checks.

Review triggers include direct `sorryAx`, compiler-trust primitives
`ofReduceBool`, `ofReduceNat`, `trustCompiler`, `skipKernelTC` and
`addDeclWithoutChecking`, plus `+native` and record-field `native :=` forms,
including record updates after `with`, across whitespace and comments.
An assignment to `native` as the first code on a line inside lexical braces
also requests review, covering comma-free record-field layout. This conservative
trigger preserves literal/comment masking and does not claim to parse records.
Compound-form evidence points to the actual
`native` identifier bytes and records the matched `review_form`. Ordinary
identifiers and literal data do not become compiler options by spelling alone.

Verification: 43 scanner regression tests; tests/test_cbz_mutation_harness.py has 16
real-process controls. tests/run_scanner_mutations.py applies 51 source mutants
to the scanner. Its declared threshold is 51/51 killed with a passing unchanged
suite, valid CLI smoke, healthy JSON execution throughout the suite, full case
count, assertion failures and no harness/test errors or skips. Input-dependent
crashes, invalid JSON and timeouts are not successful rejection evidence even
after a healthy benign smoke. Earlier 37/39, 39/39, 47/47 and 50/50 cuts remain preserved.
The exploratory 49/50 repair cut is retained as unqualified evidence; its
missing-artifact test error did not count as a kill. The strengthened assertions
and final source seal are registered in cbz/evidence/source-instrument-selection.json.

Limits: no grammar/elaboration/kernel proof, complete dependency audit,
semantic bound/nonvacuity proof, historical deletion comparison, concurrent
snapshot atomicity or status-truth certification. These require their actual
independent evidence. A clear lexical scan cannot make G1 green.

### formal_gate_check

Existing tool: tools/formal_gate_check.py.
Source-only mode checks the SIDE24 arithmetic manifest and exact source bytes.
With --run-lean it requires pinned Lean, fresh build, leanchecker, target axiom
audit and actual negative controls. Its scope is the registered 31 arithmetic
targets, not an analytic coefficient theorem or all federation mathematics.

## Ownership and maintenance

Tools are standard-library Python except documented Lean execution.
Maintenance is self-contained; any subsequent edit repeats the relevant
tests and updates this registry. No future reserved reviewer, human approval
queue or background monitor is installed here.
38 changes: 38 additions & 0 deletions INVENTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# CBZ inventory checkpoint — 2026-10-29

Phase 1 remains ACTIVE; this is not its completed exit or CBZ-0.

| Scope | Observed state |
|---|---|
| Main | 4ef1867175dbe1072a54a02e95f80c4e2c70a4ff; 276 branches; 42 open PRs; 2824 file blobs; 4 Lean files; 30 workflows |
| Math | 8151f592918a845bf19eb8eafaf8444540a32734; 149 branches; 25 open PRs; 4019 file blobs; 162 Lean paths |
| Workspace/governance/query/meta | 108 branches; 0 open PRs; public default trees enumerated |
| Archived trial | 1559 branch refs; 19 tag refs; 0 open PRs; preserved archive |
| Archived sandbox/google-drive | 5/8 branches; 0 open PRs; preserved archives |
| Profile repository | 4 branches; 1 open PR; no proof status inferred |
| Private infrastructure | Authenticated repository GETs are available; RHQ 3 branches/0 tags/1 PR/3 runs, OpenClaw 2 branches/0 tags/1 PR/0 runs at the dated discovery cut; source reconciliation active |

Counts are pinned observations, not a permanent current-claims register.
Historical archive branches are not newly accepted proofs.

Subsequent source reconciliation: Main advanced to
81acc060341e8a31cc4cd4f9523ef71fb6c06175 (canonical governance adoption),
Math to 74565f013575b7b05ecfc4034cd5d638ee355353 (determinant admission repair
and explicit quarantine), governance to
1b62ca2f64b3012c2fdbbf7f55ced236c3042891 (lease validator repair).
These compatible concurrent changes are preserved. This file is a checkpoint,
not a claim that all references were observed atomically or fully disposed.

## Tooling gaps and active remedies

- Full Layer A semantic coverage: lexical tool has explicit limits; combine
actual kernel/axiom/bound/nonvacuity and status evidence, never a regex PASS.
- Math native kernel coverage: a new eight-project current-source gate is
under implementation; no hosted result is claimed for it.
- Binary64 coefficient certification: explicit A3 quarantine work is tracing
numerical consumers and preserving original packet bytes.
- Full regression matrix: Main baseline ran 1541 tests with 36 environment skips;
that is not the requested final100percent executed matrix.
- Cross-repository pin alignment and complete branch/PR disposition remain
work; old green pin checks are not current federation consistency evidence.
- Cold-start G9 and the final same-run G0-G11 matrix have not been observed.
Loading
Loading