Repository navigation
Commit 44b405c
committed
P-037 A2.2-D tooling: the a2d closure, epoch and environment on every take, the policy field read as an enum
Step 2 of the frozen order (formal note 10.6.14, docs/evidence/p037-a2d-epoch.json).
Tooling only: no door, extractor, spec or instrument line other than the two
measurement scripts moves; the production-diff gate reports IDENTICAL for this
head against 6f9c373, so this head is the T_D candidate the R_D manifest may name.
scripts/p037_evidence.py measures in the a2d epoch and in no other. Its instrument
roots are the record's, the extractor first among them; the closure is the roots
minus the two carved-out doors (instrument_pathspec() for git's diff,
instrument_identity() as one digest of the closure's blobs at a commit), so a door
change moves nothing in it and an extractor change moves it; the treatment paths
are the doors and spec/. Every take records epoch and environment_id, both read
from the epoch record as committed at the take's source commit and never from an
operator string, plus that record's blob and the instrument identity. A record
without an epoch (every a2 record), of another epoch, of another environment, or
whose instrument identity does not re-derive at its source commit is refused, and
so is any comparison whose two sides differ in epoch, environment or instrument
identity: an a2 record cannot become a before side by construction. A HEAD whose
epoch record disagrees with the tool's roots, carve-outs or treatment paths fails
closure_problems. `python scripts/p037_evidence.py identity` prints what a take at
a commit records.
scripts/p037_cumulative_evidence.py imports the production-diff gate from the
measured checkout as a seventh measurement module, proven by path and hashed
against the treatment's blob before import; it refuses a run whose gate blob
differs between T_D and the treatment or whose treatment is not IDENTICAL or
WITHIN_ALLOWLIST against T_D. It reads the record at the treatment for the epoch,
the environment id and measurement_policy.fact_diff, a closed vocabulary held in
three equal copies (instrument, gate, driver) that the tests hold equal; it never
parses the claims' prose. The baseline records and the four takes must carry that
epoch and environment and T_D's instrument identity; the artifact names derive
from the epoch (p037-a2d-after-*.json, p037-a2d-cumulative.json,
p037-a2d-manifest.md, baseline prefix p037-a2d-baseline-). Under "unchanged" the
fact claims are that every fact document is identical between before and after and
that both MOS takes count zero moved facts; under "allowed_surfaces" the a2 claims
stand as they were. The artifact records epoch, environment, policy, the record's
blob, the gate report and the instrument identity digest.
Controls: tests/test_p037_evidence.py builds the synthetic history with the Python
door as the treatment file and adds the extractor and the Rust door (an extractor
change is instrument drift and refuses the pair, a door change is treatment and is
admitted, the instrument identity is equal across a door change and differs across
an extractor change), the epoch controls (a record without an epoch, of another
epoch, of another environment, missing its environment, with a tampered instrument
identity or carve-outs, refused; the closure digest covers the extractor and
excludes the doors; the tool refuses a record that disagrees with its closure; a
take under another epoch's record or under no record refused). The driver's selftest
adds: under "unchanged" a moved document or a take counting moved facts is negative
evidence; under "allowed_surfaces" the a2 claims hold; an unknown policy, a gate
VIOLATION, a take from another environment or without an epoch are refused.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfeUtLRm6KFRWcTGQZxQQb1 parent ecec3ea commit 44b405c
6 files changed
Lines changed: 659 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1926 | 1926 | | |
1927 | 1927 | | |
1928 | 1928 | | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
0 commit comments