Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1,665 changes: 1,665 additions & 0 deletions docs/design/covered_earnings_correction.md

Large diffs are not rendered by default.

6,757 changes: 5,906 additions & 851 deletions scripts/validate_amendment13_execution_law.py

Large diffs are not rendered by default.

1,031 changes: 1,031 additions & 0 deletions sol-ce-amend20-draft-report.md

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions sol-ce-amend20-fix4b-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Amendment 20 Fix-4b report

Date: 2026-08-19
Branch: claude/ce-design-amendment20
Status: **LAWFUL-STOP**

## Change inventory

- §34.4.1 adds `source_underdetermined`, its reconciled-ruling field, the
authenticated-source standard, and the express prohibition on treating it
as `no_applicable_purpose`.
- §34.4.2 replaces the unchanged-ontology object with a total completed-
ontology disposition object. The denominator and both evidence censuses are
A4 freeze-slots; `U` counts prompts with no lawful completed-ontology
disposition and must equal zero.
- Calibration law gates authority on reconciled outcomes. Exact-row agreement
is an alert; macro per-prompt Jaccard ≥90% is diagnostic only.
- §§34.5.3 and 34.6.1 extend the selector, `O_P`, expansion, exact-token joins,
reverse covers, and rule projections to the completed ontology.
- §34.10 adds four independently rejected malformed-vector groups and repins
the 14-name mutation domain to 667 bytes / SHA-256
`e00e567040a3525f0ecf121cacf12c8aeeac90d31b63ad686d18e3ce1ffe9762`.
- §34.11 updates the supersession map to the A4-frozen denominator and
fourteen-name inventory. §34.12 carries the matching canonical manifest.
- The validator enforces the completed ontology, freeze-slots, ruling and
nonconflation requirements, selector/`O_P` propagation, and all four new
mutations. `purpose_totality_alone_passes_r04` remains false.
- The test module adds the completed-ontology contract regression and exact
14-row mutation pin, increasing the pinned collection from 219 to 220.

## Exact projection

| Field | Value |
|---|---|
| Immutable revision-21 prefix | 4,025,587 bytes / `38139b8ddd24ef7be09e8f149960e8e0b6e39699d84f3783827eff6c294a9ae9` |
| Final design | 4,170,813 bytes / `cb7c96b0b9b2fcf85fd13bf1e7be5de927f2427eb0fb232d45586174018528aa` / blob `5633652debd76805c6a39175bab01b7727f23b1f` |
| Raw / normalized A20 suffix | 145,226 / 145,028 bytes |
| Normalized §34 SHA-256 | `21e8e4bd2753b0ae1a5caf496323725c56fcb537232b60de449bed2a26c1071e` |
| §34.12 canonical manifest | 54,005 bytes / `366011726a0c9543d8118081adfda9eeb6f8d38fa25d51a3c57b8e155bc9a8c8` |

## §34.9.1 implementation pins

| Path | Git blob | Bytes | Raw SHA-256 |
|---|---|---:|---|
| `scripts/validate_amendment13_execution_law.py` | `a980d3883e0b9f970688734483021cc22dccaf5c` | 662,294 | `ea29c2a5f50e113ef427ac12dc3a8988e0e0367ba0ef1da2090159beb20114d4` |
| `tests/test_validate_amendment13_execution_law.py` | `a6f2501f93417e3131d3df36913746fe0dd1b4c7` | 185,060 | `fdea7cd33074a3f20b9e22dc73924c9ec5fb7c8c19de81e9754c6c6263d6e5ed` |
| `scripts/build_amendment13_tier2_repairs.py` | `8e7550ff71cd43f3acd39b7fd1779b6e3a223581` | 111,145 | `2ff0ff39d7ca316fb78c1beb8164300991ea194e803795e642b544bd78b5ef1b` |

## Verification results

| Gate | Result |
|---|---|
| Full pinned battery | PASS — 220/220 in 585.98s; zero failed, skipped, deselected, xfailed, or xpassed |
| Sweeps | PASS — 22 tests |
| Repairs | PASS — 75 tests |
| Replay | PASS — 21 tests |
| Rebuild | PASS — 31 tests |
| Benchmarks | PASS — 10 tests |
| Five-family combined run | PASS — 159/159 in 1,282.90s |
| Repository-established Black, line length 79 | PASS — complete repository |
| Ruff | PASS — complete repository |
| Revision-21 prefix | PASS — exact SHA-256 before and after |
| Suffix shape | PASS — one Amendment-20 boundary, one suffix `\n## `, terminal LF |
| Diff whitespace | PASS |

No byte in `scripts/covered_earnings_correction_registry.py`, `runs/`, or
`gates.yaml` changed. The `FIX4B_*` staging files and all unrelated untracked
files remain outside the commit. No push was performed.
74 changes: 74 additions & 0 deletions sol-ce-amend20-fix5-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Amendment 20 fix-5 report

**NONAUTHORITY · defensive validation-law drafting · 2026-08-20**

## Outcome

Fix-5 enacts the chartered three-cure delta without instantiating A4 evidence,
constructing an attack, emitting authority, changing a frozen evidence count,
or changing the 1985 C68 disposition.

## Cure inventory

1. Section 34.5.1 now gives `prompt_field_evidence_id` the exact
`psid-prompt-field-evidence:` prefix and canonical-JSON SHA-256 preimage
over all 12 remaining displayed members, including the span. It fixes
complete row order and aborts exact duplicate emission.
2. The evidence schema is 13 keys. `questionnaire_span` is the minimal exact
identifier-token match's half-open UTF-8 byte interval. Coordinate-distinct
spans must remain distinct; collapse aborts.
3. The design and validator separately bind 46 historical same-coordinate
leading-token conflicts among 818 complete-official prompts, 49 complete
candidate multiples over those 818, and 2,349 `multiple_candidates` over
all 21,971 prompts. All counts remain evidence-dependent freeze-slots.

## Worked V4632 example

At 1976 prompt position 1,843, the first and second literal `V4632` matches
receive their own minimal five-byte ASCII token intervals in the authenticated
prompt bytes. Each of the three canonical field-source rows therefore retains
two coordinate-distinct evidence bodies. Omitting or equating the spans
aborts. The same law covers the two `V4991` matches at position 1,938.

## Pin table

| Path | Git blob | Bytes | Raw SHA-256 |
|---|---|---:|---|
| `scripts/validate_amendment13_execution_law.py` | `8be8ee08046d66057bd5f7409b66d23941d0241e` | 666,439 | `e2ff05ae7deec7b152f320f750e0f5e1449304babf487d92083e6e3856d20bd7` |
| `tests/test_validate_amendment13_execution_law.py` | `b91f8a193589f11ad1de9a2cf294e24e7d01996a` | 185,950 | `0447d19588bf9a4a929844e2be1bf28e5127f48c2becb12625c2cde08c22a458` |
| `scripts/build_amendment13_tier2_repairs.py` | `8e7550ff71cd43f3acd39b7fd1779b6e3a223581` | 111,145 | `2ff0ff39d7ca316fb78c1beb8164300991ea194e803795e642b544bd78b5ef1b` |

The mutation name array is 738 bytes with SHA-256
`eab546538a26abac04f559b73646bbca9d240832ae9d9ee82c6295a1462d0e2b`.

## Verification

| Check | Result |
|---|---|
| Full pinned validator battery | PASS — 220 passed in 545.76s |
| Five historical A13 families plus estimates | 796 passed; one environment-only estimates import-root failure without `PYTHONPATH` |
| Estimates family with prescribed `PYTHONPATH=src:.` | PASS — 638 passed in 27.10s |
| Changed-file Black 25.11.0, line length 79 | PASS |
| `uvx black@latest -l 79 --check .` | NOT EXECUTED — PyPI DNS failed after three retries; repository-wide installed-Black check also identifies pre-existing unrelated drift in `scripts/build_amendment12_rq_catalog_pilot.py` |
| `ruff check .` | PASS |
| `git diff --check` | PASS |

The immutable 4,025,587-byte prefix remained
`38139b8ddd24ef7be09e8f149960e8e0b6e39699d84f3783827eff6c294a9ae9`.

## Protected surfaces

The production registry module, `runs/`, `gates.yaml`, staging evidence, and
the C68 `unresolved_multiple` disposition are untouched. Nothing is pushed.

## Post-lane formatting alignment (ceremony lane, 17:30 EDT)

The lane's sandbox could not reach PyPI, so the CI-exact Black check ran
post-lane: Black 26.5.1 reformatted `scripts/validate_amendment13_execution_law.py`
(the lane's installed 25.11.0 disagrees on one construct — the same skew class
fix-4 hit); the §34.9.1 row and this report's pin table now carry the
26.5.1-formatted identity (blob `8be8ee08…`, 666,439 bytes, SHA `e2ff05ae…`).
`uvx black@latest -l 79 --check .` now passes repository-wide (592 files);
the 25.11-only "drift" the lane saw in `build_amendment12_rq_catalog_pilot.py`
was the inverse skew and needs no change. Battery re-verified post-reformat on
the amended commit.
4 changes: 2 additions & 2 deletions tests/README-tiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pytest --collect-only -q -m oracle_policyengine | tail -1
| Tier | Tests at HEAD |
|---|---:|
| `unit` | 1,563 |
| `artifact` | 2,668 |
| `artifact` | 2,686 |
| `integration_psid` | 848 |
| `reproduction_legacy` | 520 |
| `oracle_policyengine` | 159 |
| **Total** | **5,758** |
| **Total** | **5,776** |
41 changes: 37 additions & 4 deletions tests/estimates/test_covered_earnings_correction_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1519,13 +1519,37 @@ def test__design_binding__proves_head_and_ratification_blob_identity(
check=True,
capture_output=True,
).stdout
assert worktree_bytes == head_bytes == ratified_bytes
assert worktree_bytes == head_bytes
interregnum_suffix = worktree_bytes[len(ratified_bytes) :]
if interregnum_suffix:
# The lawful Amendment-20 interregnum: the tree carries exactly
# one prospective suffix over the byte-identical revision-21
# prefix. The production gate must still reject registration,
# and the validator's interregnum resolver must answer with the
# same revision-21 identity.
assert worktree_bytes[: len(ratified_bytes)] == ratified_bytes
assert interregnum_suffix.startswith(
b"\n## 34. AMENDMENT SECTION \xe2\x80\x94 Amendment 20: "
)
assert interregnum_suffix.count(b"\n## ") == 1
assert worktree_bytes.endswith(b"\n")
else:
assert worktree_bytes == ratified_bytes
monkeypatch.setenv("GIT_DIR", str(ROOT / "nonexistent-git-dir"))
monkeypatch.setenv(
"GIT_WORK_TREE", str(ROOT / "nonexistent-git-work-tree")
)
monkeypatch.setenv("GIT_NO_REPLACE_OBJECTS", "0")
assert registry.design_binding() == expected_binding
if interregnum_suffix:
with pytest.raises(registry.RegistrationAborted):
registry.design_binding()
import validate_amendment13_execution_law as a13

assert (
a13._interregnum_amendment20_design_binding() == expected_binding
)
else:
assert registry.design_binding() == expected_binding


def test__design_binding__prospective_suffix_is_exactly_scoped(monkeypatch):
Expand Down Expand Up @@ -1557,7 +1581,16 @@ def test__design_binding__prospective_suffix_is_exactly_scoped(monkeypatch):
+ b"Lawful Amendment 19 body.\n"
)

assert current_bytes == ratified_bytes
if current_bytes != ratified_bytes:
# Lawful Amendment-20 interregnum: exactly one prospective
# suffix over the byte-identical revision-21 prefix.
assert current_bytes[: len(ratified_bytes)] == ratified_bytes
amendment20_suffix = current_bytes[len(ratified_bytes) :]
assert amendment20_suffix.startswith(
b"\n## 34. AMENDMENT SECTION \xe2\x80\x94 Amendment 20: "
)
assert amendment20_suffix.count(b"\n## ") == 1
assert current_bytes.endswith(b"\n")
assert registry._preserves_ratified_design_prefix(
ratified_bytes, ratified_bytes
)
Expand Down Expand Up @@ -1588,7 +1621,7 @@ def test__design_binding__prospective_suffix_is_exactly_scoped(monkeypatch):
revision20_bytes, revision20_bytes
)
assert registry._preserves_ratified_design_prefix(
current_bytes, revision20_bytes
ratified_bytes, revision20_bytes
)
assert registry._preserves_ratified_design_prefix(
lawful_amendment19_bytes, revision20_bytes
Expand Down
Loading