Repository navigation
Python RCA cross-runtime drift detection receipts - #4230
Conversation
|
Thanks — addressed both review rounds with fix commits: 1. Scratch-dir race (hermeticity, TESTING.md). 2. P5 receipt for the new v3 hand-Rust test. The test is registered in 3. (self-found) Real parse bug fixed. This is the first test to actually Note (pre-existing, not from this PR): Local validation (real cargo, shim bypassed due to host fork pressure): — sent from wise-badger-822 |
… drift claim, mandatory rustc - P5 deferral now cites only in-repo authorities (SG-0 census mechanism (b) + real ROADMAP rows); T-PB-B/_internal/INVARIANTS_OPS.md were removed in the public-repo cleanup - drift claim predicate now verifies fixed_width_go_source (was unchecked — Go fixture drift would have passed) - boundary test: rustc is mandatory (fail-closed), matching the host runner and sibling rust boundary tests; no silent skip Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed all three findings from review 24507 (commit a7d29cd): 1. P5 receipt not checkable (stale ROADMAP row). Correct — 2. Go fixture unverified in the drift claim (fail-closed wiring). Correct — the predicate now also asserts 3. Boundary test silently skipped on missing rustc. Correct — Re-validated: (Unchanged, pre-existing and not from this PR: — sent from wise-badger-822 |
…ration Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
a7d29cd0· Trigger:schedule - Thinking:
387s wall
BLOCKING (1)
Root Cause
src/v4/std/leaf_model_verification.dagCross-runtime drift carrier was introduced in std without a disposition gate → add a terminal receipt or a bounded scaffold receipt with owner/lane/dissolution trigger.
| // value, `actual` is the fixed-width wrapped value — so the receipt references a modeled value | ||
| // pair, never a script-local literal. Go is a corroborating fixed-width witness (rust == go); | ||
| // the runner asserts it only when the Go toolchain is present. | ||
| type LeafModelCrossRuntimeDriftProbe { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
— sent from wise-badger-822 |
…obe (P5) Required 🟢/🟡/🔴 disposition tag for new .dag type declarations: this probe is a gated scaffold that dissolves when the modeled TestClaim runner exercises python_cross_runtime_drift.dag directly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Fixed in commit Added a bounded 🟡 gated scaffold receipt directly above the type, with owner/lane/dissolution trigger matching the sibling This mirrors the P5 census receipt already on the boundary test — same dissolution trigger (modeled runner exercises the drift claim dag), now also expressed as the substrate-level disposition tag. std dag still tokenizes/parses clean ( — sent from wise-badger-822 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
39ef97c1· Trigger:schedule - Thinking:
388s wall
ROADMAP — Verified
- Tests as .dag TestClaim data: ROADMAP.md lists this v4 row with src/v4/test/claim, matching the SG-0 deferral for the new Rust boundary bridge.
- Pure bootstrap / self-host: ROADMAP.md lists the zero hand-maintained Rust self-host trajectory through self_host.dag, matching the P5 hand-Rust receipt.
✅ Mixed code/.dag PR; I found no blocking concerns in the changed lines.
|
Verified against current This is a bounded 🟡 scaffold receipt with owner/lane ( — sent from wise-badger-822 |
|
The "2 failing checks" on
— sent from wise-badger-822 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
670bf60e· Trigger:schedule - Thinking:
155s wall
ROADMAP — Verified
- Tests as .dag TestClaim data: ROADMAP.md lists the src/v4/test/claim corpus direction, matching the new python_cross_runtime_drift claim.
- Pure bootstrap / self-host: ROADMAP.md preserves the zero hand-maintained Rust trajectory, matching the SG-0 receipt for the temporary Rust boundary bridge.
✅ Mixed code/.dag PR; I found no blocking concerns in the changed lines.
…work + drift lane) Resolve additive conflicts in std/lens leaf_model_verification.dag: keep both main's reworked Go claim ids (incl. go_r2b_int64_silent_overflow_truncates) and this branch's cross-runtime drift carrier + claim id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
c4d8919f· Trigger:schedule - Thinking:
310s wall
BLOCKING (1)
Root Cause
src/v4/lens/leaf_model_verification.dagpython_cross_runtime_drift_probe is built from artifact/value constants rather than extdeps language fact refs → add fact-anchor fields to the drift probe and assert them in the TestClaim.
ROADMAP — Verified
- Tests as .dag TestClaim data: ROADMAP.md lists the growing src/v4/test/claim corpus, matching the new python_cross_runtime_drift claim.
- Pure bootstrap / self-host: ROADMAP.md preserves the zero hand-maintained Rust trajectory, matching the SG-0 receipt's dissolution target.
| // boundary host-process bridge `scripts/v4-leaf-model-python-cross-runtime-drift-verify.sh` + | ||
| // `v4_leaf_model_python_cross_runtime_drift_test.rs`, shrinking `EXPECTED_HAND_AUTHORED_TEST` by 1); | ||
| // forbidden: a parallel drift-probe vocabulary outside this carrier — extend it, don't fork it. | ||
| type LeafModelCrossRuntimeDriftProbe { |
There was a problem hiding this comment.
BLOCKING: LeafModelCrossRuntimeDriftProbe carries source strings and ValueDiff values but not the Python/Rust/Go primitive or overflow fact anchors that justify the drift, so the substrate drops the modeled cause at the boundary (INVARIANTS P1/P2; Facts Flow Forward).
|
Fixed in Facts Flow Forward (INVARIANTS P1/P2): added three fact-anchor fields to
These three facts are precisely why the same Validated: the std/lens/claim dags tokenize+parse clean and the 5 drift boundary tests pass. — sent from wise-badger-822 |
Summary
Python cross-runtime drift detection receipts — the positive-divergence complement of the merged L2 cross-target parity lane (PR #4154). Where parity proves runtime-value equality on the common domain (R2a add/order, R3 symbol projection), this lane proves the complement named in Python RCA Worksheet C: the same modeled program — exact integer add at the fixed-width boundary (
MAX + 1) — diverges across runtimes.intis arbitrary precision → exact sum9223372036854775808.i64/ Goint64are fixed-width two's-complement → defined wraparound to-9223372036854775808.The receipt asserts this drift positively, so the verification system demonstrably detects drift instead of silently treating fixed-width wraparound as parity.
Model-before-implement
LeafModelCrossRuntimeDriftProbeinsrc/v4/std/leaf_model_verification.dag, anchoring the expected divergence to the existingValueDiff<String>host_run carrier (expected= arbitrary-precision value,actual= fixed-width value) — a modeled value pair, never a script literal.python_cross_runtime_drift_probe()insrc/v4/lens/leaf_model_verification.dag.src/v4/test/claim/language_model/python_cross_runtime_drift.dag(probe-wired + positive-divergence claims).P5 receipt (INVARIANTS.md §P5 — new v3 hand-Rust)
This PR adds exactly one hand-authored v3 Rust test,
src/v3/compiler/tests/boundary/v4_leaf_model_python_cross_runtime_drift_test.rs. Its P5 dissolution receipt:EXPECTED_HAND_AUTHORED_TESTinsrc/v3/compiler/tests/integration/sg0_census_test.rs. The census moves by exactly +1 now and must shrink by 1 at dissolution; the in-file sorted/unique + disk-vs-list census tests mechanically enforce the count. (Note: the pre-public-cleanupT-PB-B/_internal/INVARIANTS_OPS.mdanchors no longer exist in the public tree, so the receipt cites only in-repo authorities.).dagTestClaimdata" (src/v4/test/claim/) and "Pure bootstrap / self-host" (zero hand-maintained Rust;self_host.dagratchet).TestClaimrunner exercisessrc/v4/test/claim/language_model/python_cross_runtime_drift.dagdirectly, so the boundary host-process bridge is no longer the only exerciser of the drift claim.Deliverables
scripts/v4-leaf-model-python-cross-runtime-drift-verify.sh— host runner emitting the drift receipt JSON. python3 + rustc mandatory (the drift pair); Go corroboratesrust == gowhen present, else deferred honestly.v4_leaf_model_python_cross_runtime_drift_test.rs— tokenize/parse smoke of std + lens + claim dags, fixture-string authority match, and the runtime drift assertion (python != rust). Scratch dirs are per-call unique (process-wide atomic counter) for parallel-test hermeticity per TESTING.md.Scope
Per manager kickoff: modeled drift detection / fixtures / receipts only. No CI model/YAML touched. No parallel-ledger doc (the receipt is the runner JSON + modeled carrier + test, per the ledger standing principle).
Test plan
bash scripts/v4-leaf-model-python-cross-runtime-drift-verify.sh— drift DETECTED (python9223372036854775808!= rust-9223372036854775808; go deferred, toolchain absent locally)cargo test -p v3-compiler --test integration v4_leaf_model_python_cross_runtime_drift— exit 0cargo test -p v3-compiler --test integration sg0_census— green with the new census entry🤖 Generated with Claude Code