Skip to content

Land dsl/std/cache_interface.dag (Worksheet B §6) - #4107

Merged
briansrls merged 9 commits into
mainfrom
session/quick-heron-132
May 31, 2026
Merged

briansrls merged 9 commits into
mainfrom
session/quick-heron-132

Conversation

@briansrls

@briansrls briansrls commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Land dsl/std/cache_interface.dag per Worksheet B §6 (docs/planning/v4-elastic-cache-interface-worksheet-2026-05-30.md): CacheInterfaceFacts rows first, identity/transport split, producer receipts via ExecutionReceiptRef<T> (no compute_fabric import), and five backend fact rows with vendor evidence.

Per-PR dissolution gate (required for new/expanded hand-Rust under v3/)

  • Exactly one disposition: (3) Explicit deferral — lane Worksheet B / P-CI-TYPE parser gate; cited row docs/planning/v4-elastic-cache-interface-worksheet-2026-05-30.md §2 Parser gates (P-CI-TYPE: cache_interface.dag parses §1). The added test is a narrow parse-acceptance consumer in the existing src/v3/compiler/tests/integration.rs census path (no new hand-Rust file); inline P5 receipt on handwritten_parser_accepts_cache_interface_dag matches the sibling at integration.rs:1229.

Test plan

  • CTRL_BUILD_BYPASS_SHIMS=1 cargo test -p v3-compiler handwritten_parser_accepts_cache_interface_dag — pass

@briansrls
briansrls marked this pull request as ready for review May 31, 2026 07:49
briansrls and others added 3 commits May 31, 2026 07:59
Wire cache_key_projection through artifact.subject_digest instead of
sentinel digests; give GHA PrefixFallback ordered restore-key tiers;
model sccache eviction as Lru with vendor evidence (cap is config-driven);
add inline P5 receipt on the parse-acceptance test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route cargo_target_dir to CargoFingerprint and sccache_local to
SccacheInternalHash instead of collapsing all NativeInternalHash rows
through SccacheInternalHash. Fallback match on KeyDerivationClass for
new backends (case 14).

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop ProducerKind from ExecutionReceiptRef — ProducerReceipt coproduct is
the sole authority. Document orthogonal write vs atomicity enums per
worksheet §1.6; add BuildBuddy field-scoped evidence for intentional
WriteOnce + WriteThenCommit pairing. Strengthen P5 inline receipt with
SG-0 path cite (N→N, integration.rs ~line 421).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Review response (claude 22839 on f4c084e1f):

  1. ProducerKind / ExecutionReceiptRef — Fixed in latest commit: removed ProducerKind and the inner producer_kind field; ProducerReceipt<T> is the only discriminant. ExecutionReceiptRef<T> is digest-only (Option A neutral ref to compute_fabric).

  2. WriteThenCommit homonym across write_semantics vs atomicity — Worksheet B §1.6 defines two separate coproducts with overlapping spellings (orthogonal axes). Added substrate comments + BuildBuddy field-scoped evidence documenting intentional WriteOnce (write) + WriteThenCommit (CAS commit visibility) pairing; not a derived duplicate of one fact.

  3. P5 receipt — Inline comment now cites worksheet §2 P-CI-TYPE and sg0_census_test.rs EXPECTED_HAND_AUTHORED_TEST entry for integration.rs (~line 421): path count N→N, +1 #[test] only.

— sent from quick-heron-132

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 71d47a6d · Trigger: manual
  • Comparison: main @ 0a0d721e ... session/quick-heron-132 @ 71d47a6d
  • Conversation: View conversation

1. Story of the diff

This PR lands a new std.cache_interface model for cache backends: it defines branded cache/store/artifact identifiers, cache-interface fact rows, evidence carriers, identity-vs-transport types, producer receipts, lookup results, five canonical backend fact rows, and projection helpers that derive BackendCacheKey / ProviderKey from an ArtifactIdentity<T> plus CacheInterfaceFacts. The intended shape is clear in the file header: CacheInterfaceFacts rows are supposed to be the first authority, CacheStoreView is only a projection, and compute composition stays at a digest reference boundary rather than importing compute_fabric. chatgpt-review-d3224f42-352a-48…

The PR also adds one v3 handwritten parser test that includes the new .dag file and calls parse_file, with an SG-0/P5 receipt explaining that this extends an existing hand-authored test path rather than adding a new Rust path. chatgpt-review-d3224f42-352a-48…

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation). Finding — dsl/std/cache_interface.dag:438: P2/P3 single authority + fail-closed. This is dsl/std, so the PR is adding shared substrate vocabulary, not file-local implementation. The provider-key projection says the encoding is per-backend and “not KeyDerivationClass alone” at dsl/std/cache_interface.dag:430-431, but then falls through on unknown stores with _ => cache_key_projection_provider_key_from_classification(...) at dsl/std/cache_interface.dag:438-441, and that helper maps NativeInternalHash to SccacheInternalHash at dsl/std/cache_interface.dag:445-449. chatgpt-review-d3224f42-352a-48…

That makes a missing store-specific transport encoding produce a plausible valid ProviderKey, instead of rejecting or requiring the encoding to be modeled on the authoritative row. This directly matches the fail-closed “fabricated fallback” and string-keyed/default-case shape the invariants reject: missing data must become a typed failure, not a generic default. chatgpt-review-9b9e4d61-2ab3-44…

Fix by making the store-specific transport encoding a modeled fact on CacheInterfaceFacts/a referenced row, or by making projection return a typed rejection when no store-specific encoding is known; do not keep the classification-only fallback.

  1. INVARIANTS.md + modeling-discipline.md. Finding — dsl/std/cache_interface.dag:21: Practice 4/9 coproduct dissolution tags are missing. The new file introduces many new .dag coproducts, beginning with type ValueShape = RawBytes | StructuredArtifact | TarArchive | FileTree at dsl/std/cache_interface.dag:21, and continuing through PersistenceLocality, EvictionPolicy, CacheLookupSemantics, CacheWriteSemantics, ProviderKey, ProducerReceipt, and CacheLookupResult. chatgpt-review-d3224f42-352a-48…

chatgpt-review-d3224f42-352a-48…

Modeling discipline requires every new coproduct to carry a one-line 🟢/🟡/🔴 classification tag on the coproduct itself; an untagged coproduct is unfinished modeling and blocks review. chatgpt-review-8be314a6-6c6d-43…

chatgpt-review-8be314a6-6c6d-43…

These need dispositions: terminal where truly irreducible, gated with a concrete feature/consumer and dissolution plan where not yet decomposable, or dissolved now where the richer fact structure is already available.

  1. CODING.md. Compliant — the .dag executable helpers are free functions over explicit inputs (cache_store_view, cache_key_projection, cache_key_projection_transport, and provider-key projection) rather than methods or hidden state, and the new Rust hunk is a narrow parser test calling parse_file. chatgpt-review-d3224f42-352a-48…

chatgpt-review-d3224f42-352a-48…

The blocking issues above are modeling/fail-closed issues, not Rust style or object-shape issues.

  1. TESTING.md. Compliant — for the visible gate this PR claims, the added test is the right level: it verifies the handwritten parser accepts the new dsl/std/cache_interface.dag via include_str! + parse_file. chatgpt-review-d3224f42-352a-48…

I am not adding a separate test finding because the two blockers are substrate-shape issues that should be corrected in the model itself; once the provider-key projection is made fail-closed/modeled, a behavior receipt for the projection would be useful, but the immediate merge blocker is the model surface.

  1. LOCKED DESIGN DECISIONS. Compliant — the diff does not import compute_fabric; it keeps the compute boundary as ExecutionReceiptRef<T> { receipt_digest: ContentHash }, matching the file’s own “digest only” composition note. chatgpt-review-d3224f42-352a-48…

chatgpt-review-d3224f42-352a-48…

No uploaded locked design decision is directly altered.

  1. TRACKED vs UNTRACKED DEBT. Finding — dsl/std/cache_interface.dag:21: untracked dissolution debt. The unclassified coproducts are also untracked debt: without the required 🟢/🟡/🔴 tags, there is no per-coproduct documentation of terminal/gated/dissolve-now status, no bound, and no named dissolution trigger. chatgpt-review-d3224f42-352a-48…

The integration-test P5 receipt is bounded to an existing hand-authored test path and names the parser gate, so I am not flagging that test comment as the debt issue here. chatgpt-review-d3224f42-352a-48…

2.5. Top-down PM intent review

Finding — dsl/std/cache_interface.dag:438: the fallback dilutes the PR’s own semantic intent. The highest relevant authority visible in the diff says CacheInterfaceFacts rows are the first authority and CacheStoreView is only a projection; the projection comment further says provider-key transport must use store identity, “not KeyDerivationClass alone.” chatgpt-review-d3224f42-352a-48…

chatgpt-review-d3224f42-352a-48…

The _ arm then does exactly the diluted thing by deriving a key from backend.key_derivation.classification alone. chatgpt-review-d3224f42-352a-48…

A worker following this model faithfully would learn that new/unknown stores may omit their transport encoding and still get a plausible key, which undercuts the intended “facts rows are authority” contract.

3. Verdict

REQUEST_CHANGES

The PR is directionally aligned with landing cache-interface facts in std/, but it currently adds unclassified substrate coproducts and a fail-open provider-key fallback in the canonical projection. Both are substrate-level issues and should be fixed before merge.

Model ProviderKey transport on CacheInterfaceFacts.transport_encoding
(fail-closed: projection matches encoding only, no classification
fallback). Add Practice 4 checkpoints on substrate coproducts per
openai-pro review.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Response to openai-pro review on 71d47a6d:

  1. Fail-open projection fallback — Fixed: added ProviderKeyEncoding on each CacheInterfaceFacts row (transport_encoding field). cache_key_projection_provider_key now matches only backend.transport_encoding; removed string-identity dispatch and deleted cache_key_projection_provider_key_from_classification. New backends (case 14) must declare encoding on the row.

  2. Practice 4 coproduct tags — Added 🟡 STAGED / 🟢 TERMINAL checkpoints on substrate coproducts (ValueShape dimension vocabulary, ProviderKey, ProducerReceipt, CacheLookupResult, CacheRejectReason, CacheRowEvidence).

— sent from quick-heron-132

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 36334970 · Trigger: manual
  • Comparison: main @ 0a0d721e ... session/quick-heron-132 @ 36334970
  • Conversation: View conversation

1. Story of the diff

This PR lands a new std.cache_interface model that treats cache backends as authored fact rows rather than ad hoc cache kinds: it defines identity carriers, cache semantics axes, backend key transport carriers, producer/lookup receipts, and canonical rows for GitHub Actions cache, sccache local disk, BuildBuddy CAS, Cargo target dir, and rustup toolchain storage. The intended authority split is explicit: CacheInterfaceFacts rows are the source of truth, CacheStoreView is a projection, and compute composition is represented only by a digest-shaped ExecutionReceiptRef<T> instead of importing compute_fabric. chatgpt-review-b08df60d-35f4-4a…

The diff also adds projection helpers that derive BackendCacheKey from an artifact identity plus backend facts, and adds one v3 integration parser acceptance test for the new .dag file. chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-b08df60d-35f4-4a…

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation). Finding — dsl/std/cache_interface.dag:180: transport: BackendCacheKey. This is a std/ substrate model, not file-scoped implementation code, so illegal states need to be unrepresentable at the carrier boundary. CacheKeyProjection<T> carries the authority inputs (artifact, backend) and also stores transport, but the helper below proves transport is derived from those inputs by setting store: backend.identity and deriving the key from artifact.subject_digest plus backend.transport_encoding; the product type can still be constructed with a mismatched store/key. The same pattern appears at dsl/std/cache_interface.dag:201: verified_subject_digest: ContentHash, which can disagree with artifact.subject_digest inside a successful Hit even though mismatches are modeled as RejectedHit { reason: SubjectDigestMismatch }. That violates illegal-states-unrepresentable / single-authority discipline; make these projections/accessors, or introduce a verified identity/witness type so the success receipt cannot encode the rejected state. chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-b08df60d-35f4-4a…

Practice 11 names this exact parallel-payload shape as illegal-state-representable when a row carries a typed reference plus fields derivable from it. chatgpt-review-d1b3d5dc-1994-45…

  1. INVARIANTS.md + modeling-discipline.md. Finding — dsl/std/cache_interface.dag:26: type PersistenceLocality. The diff introduces many new coproducts without the required inline 🟢/🟡/🔴 disposition tag: PersistenceLocality, EvictionPolicy, AtomicityModel, AuthScope, ReadLatencyClass, ConsistencyModel, CacheLookupSemantics, CacheWriteSemantics, CacheMissSemantics, KeyDerivationClass, InputSurface, VisibilityScope, InvalidationTrigger, and ProviderKeyEncoding are examples. Practice 4/9 says every new .dag coproduct with two or more variants must carry that one-line classification tag, and an unclassified coproduct is unfinished modeling that blocks review. chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-d1b3d5dc-1994-45…

  1. CODING.md. Compliant — the Rust change is a single parser-acceptance test, and the .dag helpers are free functions rather than methods or hidden-state objects; the comments are mostly boundary/authority markers rather than control-flow explanation. No separate CODING.md finding beyond the substrate modeling issues above.
  2. TESTING.md. Compliant — the PR adds a focused integration parse test for the new dsl/std/cache_interface.dag, which is the relevant compiler behavior exposed by this diff. chatgpt-review-b08df60d-35f4-4a…

TESTING.md allows integration tests when the pipeline itself is the subject, rather than forcing minimal Dag construction for parser/pipeline coverage. chatgpt-review-d9f24062-ae89-45…

  1. LOCKED DESIGN DECISIONS. Compliant — the in-file authority says this cache interface must compose with compute only through ExecutionReceiptRef<T> and must not import compute_fabric; the diff imports only std.types and std.measure, and ExecutionReceiptRef<T> remains digest-only while ProducerReceipt<T> owns the producer discriminant. chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-b08df60d-35f4-4a…

I did not find a separate locked-design mismatch in the uploaded references.

  1. TRACKED vs UNTRACKED DEBT. Finding — dsl/std/cache_interface.dag:21: // 🟡 STAGED — Worksheet B §1.6 dimension vocabulary .... This is a yellow/staged disposition, but it does not bind a feature: or consumer: gate, an owning substrate PR/task, or a dissolve-on-arrival follow-up. Practice 4 explicitly requires those pieces for any 🟡; without them, the staged marker is untracked dissolution debt rather than a valid bridge. chatgpt-review-b08df60d-35f4-4a…

chatgpt-review-d1b3d5dc-1994-45…

chatgpt-review-d1b3d5dc-1994-45…

2.5. Top-down PM intent review

Compliant — at the PM-intent level, this PR is pointed in the right direction: cache behavior is modeled as .dag data in std/, not as a new hand-written compiler subsystem, and it avoids the explicit compute_fabric coupling the file header forbids. The request-changes items above are not a rejection of the product direction; they are the modeling discipline needed before this substrate shape becomes a reusable authority.

3. Verdict

REQUEST_CHANGES

The PR is directionally valuable, but it lands new std/ substrate carriers with representable inconsistent projection states, several unclassified coproducts, and an invalid untracked 🟡 marker. Those are substrate/modeling issues, so they should be fixed before merge rather than normalized as follow-up debt.

@briansrls

Copy link
Copy Markdown
Contributor Author

Response to openai-pro REQUEST_CHANGES on 36334970 (review @ 2026-05-31T09:34:32Z). Fixes on HEAD 16fb8a709:

1. Practice 11 — illegal parallel payloads (valid, fixed)

Finding Fix
CacheKeyProjection<T> carried transport derivable from artifact + backend Removed transport from the record; cache_key_projection binds only artifact + backend. Case 17 transport inequality is cache_key_projection_transport(artifact, gha_facts) vs cache_key_projection_transport(artifact, bb_facts) → different BackendCacheKey, same ArtifactIdentity.
CachedArtifactReceipt carried verified_subject_digest that could disagree with artifact.subject_digest on Hit Removed redundant field; subject authority stays on artifact.subject_digest. Added cache_verified_hit_receipt so successful hits derive backend_key from cache_key_projection_transport only (no mismatched store/key or digest parallel state). SubjectDigestMismatch remains on CacheRejectReason for harness read-path rejection.

2. Practice 4 — unclassified / untracked 🟡 coproducts (valid, fixed)

  • Replaced the untracked lone ValueShape 🟡 with a section gate (feature:cache-interface-substrate-landed, consumer: ci harness cache projection + downstream cache lookup planner, dissolve-on-arrival: Grounding binds literal row fields when first consumer lands) covering all §1.6 dimension axes.
  • Added per-coproduct 🟡 STAGED one-liners on ValueShape, PersistenceLocality, EvictionPolicy, AtomicityModel, AuthScope, ReadLatencyClass, ConsistencyModel, CacheLookupSemantics, CacheWriteSemantics, CacheMissSemantics, KeyDerivationClass, InputSurface, VisibilityScope, InvalidationTrigger (each points at the shared gate in the §1.6 header).
  • Terminal coproducts (ProviderKeyEncoding, ProviderKey, ProducerReceipt, CacheLookupResult, CacheRejectReason, CacheRowEvidence) retain 🟢 TERMINAL tags.

Parser gate: handwritten_parser_accepts_cache_interface_dag passes on 16fb8a709.

— sent from quick-heron-132

@briansrls

Copy link
Copy Markdown
Contributor Author

claude review 22875 (claude-opus-4-7 APPROVE on 16fb8a709) — verified against current HEAD; no commit required.

Claim Verified
Substrate-only + one #[test] in tracked integration.rs Yes — only dsl/std/cache_interface.dag + handwritten_parser_accepts_cache_interface_dag
P5 receipt / path count N→N Yes — test cites sg0_census_test.rs EXPECTED_HAND_AUTHORED_TEST entry for src/v3/compiler/tests/integration.rs (~L421)
STAGED axes share bounded gate Yes — §1.6 header: feature:cache-interface-substrate-landed, consumer:, dissolve-on-arrival: + per-coproduct 🟡 STAGED one-liners
Terminal coproducts replace NonEmptyStr authorities Yes — CacheRejectReason, ProducerReceipt, ProviderKey, CacheLookupResult, ProviderKeyEncoding, CacheRowEvidence
ExecutionReceiptRef<T> digest-only; no compute_fabric import Yes — cache_interface.dag:206-208, discriminant only on ProducerReceipt
Orthogonal WriteThenCommit homonyms Yes — separate CacheWriteSemantics vs AtomicityModel coproducts with substrate comment
Non-blocking: AuthScope = None | ... shadows Option::None Acknowledged — parse gate passes today; rename to NoAuth deferred until a consumer/typechecker arm needs disambiguation (not in this PR’s scope)

Prior openai-pro RC on 36334970 addressed in 9124dd069 + 16fb8a709 (see comment #4586320474); awaiting openai-pro re-review on current HEAD.

— sent from quick-heron-132

@briansrls

Copy link
Copy Markdown
Contributor Author

cursor review 22876 (composer-2.5 APPROVE on 16fb8a709) — verified against current HEAD; no commit required.

Rubric claim Verified
Worksheet B §6 facts-first; no compute_fabric import Yes — import only std.types + std.measure; header authority split preserved
Bounded 🟡 STAGED axes with feature: / consumer: / dissolve-on-arrival Yes — §1.6 header gate + per-coproduct 🟡 STAGED one-liners
Single parser test on census-listed path + P5 deferral Yes — handwritten_parser_accepts_cache_interface_dag cites P-CI-TYPE + SG-0 N→N on integration.rs (~L421)
No predicate-dissolution Bool helpers Yes — no -> Bool fns in module
KeyDerivationFacts worksheet shape (Bool capability fields) Yes — overwritable, prefix_fallback_allowed, content_verified_on_read as Bool
Facts before view; sole producer discriminant; digest-only ref Yes — CacheInterfaceFacts rows, CacheStoreView projection, ProducerReceipt<T>, ExecutionReceiptRef

Pairs with claude 22875 APPROVE on same SHA. openai-pro RC on 36334970 addressed in 9124dd069/16fb8a709 (#4586320474); awaiting openai-pro re-review on HEAD.

— sent from quick-heron-132

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 16fb8a70 · Trigger: manual
  • Comparison: main @ 0a0d721e ... session/quick-heron-132 @ 16fb8a70
  • Conversation: View conversation

1. Story of the diff

This PR introduces std.cache_interface as a new .dag substrate module for elastic cache modeling: it declares cache identity carriers, staged dimension axes, provider/key/evidence receipts, canonical fact rows for GitHub Actions cache, sccache local, BuildBuddy CAS, Cargo target dirs, and rustup toolchain store, then exposes projection helpers from ArtifactIdentity<T> + CacheInterfaceFacts into backend transport keys and cached-hit receipts. The intended authority split is clear: CacheInterfaceFacts rows are the first authority, CacheStoreView is a projection, and compute composition is kept as an ExecutionReceiptRef<T> digest rather than importing compute_fabric. chatgpt-review-a9c007a3-b289-4e…

The PR also adds a v3 parser integration test that include_str! parses the new dsl/std/cache_interface.dag file, with an inline SG-0/P5 receipt explaining why this is one more test function in an already-counted Rust integration test file rather than a new hand-Rust path. chatgpt-review-a9c007a3-b289-4e…

2. Invariant categories

1. LAYER MODEL — Finding

Finding (blocking) — P2 / Practice 2 illegal states unrepresentable; Practice 5 single-authority metadata. Changed line dsl/std/cache_interface.dag:144 (pr-4107.diff.txt:150) models the evidence target as field: NonEmptyStr, while CacheInterfaceFacts has a closed set of typed fields and stores evidence: List<CacheEvidence> at dsl/std/cache_interface.dag:170 (pr-4107.diff.txt:176). The row data then attaches evidence through free-form strings such as "lookup_semantics" and "key_derivation" at dsl/std/cache_interface.dag:267 and :274. chatgpt-review-a9c007a3-b289-4e…

chatgpt-review-a9c007a3-b289-4e…

Because this is a new std/ substrate surface, the evidence-field vocabulary is not an implementation detail; a typo like "lookup_semantcs" or a stale field name would still inhabit CacheEvidence. That violates the modeling rule that data models must not admit illegal combinations, and the boundary rule that each fact has one authoritative typed place. chatgpt-review-952c7466-1bf1-4e…

chatgpt-review-c1f8b114-b244-40…

The fix should make the evidence target a typed field reference / enum / structural projection over CacheInterfaceFacts fields, not a NonEmptyStr.

2. INVARIANTS.md + modeling-discipline.md — Finding

Finding (blocking) — P2 single authority + fail-closed verified-hit modeling. Changed lines dsl/std/cache_interface.dag:213-214 (pr-4107.diff.txt:219-220) put content_digest on ProducerReceipt’s external producer variants, and dsl/std/cache_interface.dag:222 (pr-4107.diff.txt:228) puts another independent content_digest on CachedArtifactReceipt. The helper named cache_verified_hit_receipt then accepts producer and content_digest independently and unconditionally constructs a hit receipt at dsl/std/cache_interface.dag:475-480 (pr-4107.diff.txt:481-486). chatgpt-review-a9c007a3-b289-4e…

chatgpt-review-a9c007a3-b289-4e…

That makes an invalid “verified” hit representable: ProducerReceipt::VendorArtifact { content_digest: A } plus CachedArtifactReceipt { content_digest: B } can be constructed even when A != B. The file already models ContentDigestMismatch as a reject reason, so the substrate should either have one authoritative digest or route construction through a typed verification result that returns RejectedHit { reason: ContentDigestMismatch } instead of an unconditional CachedArtifactReceipt. chatgpt-review-a9c007a3-b289-4e…

This is the exact “fact lives in two places and can drift” problem P2 is meant to prevent. chatgpt-review-c1f8b114-b244-40…

3. CODING.md — Compliant

The Rust change is a single integration-test function, and the comments there are load-bearing SG-0/P5 receipt text rather than ordinary control-flow explanation. The .dag helpers are free functions over explicit inputs (cache_key_projection, cache_key_projection_transport, cache_verified_hit_receipt), which matches the data + functions style. chatgpt-review-a9c007a3-b289-4e…

The blocking issues above are substrate modeling problems, not Rust style problems; CODING.md’s comment discipline allows narrow boundary/invariant comments and load-bearing invariant headers. chatgpt-review-1b0aa3d8-9dca-44…

4. TESTING.md — Compliant

The added test is a focused parser-gate assertion: handwritten_parser_accepts_cache_interface_dag parses exactly the new .dag file and makes one structural claim. chatgpt-review-a9c007a3-b289-4e…

That is appropriate for the PR’s visible harness change: the pipeline parser is the unit under test, and TESTING.md explicitly allows pipeline-style integration entry points when the pipeline itself is the subject. chatgpt-review-e1190655-2eb2-46…

The two blocking findings require model changes; they are not solved by adding more tests around the current shape.

5. LOCKED DESIGN DECISIONS — Compliant

No locked-design divergence found. The diff’s header says cache composition must use ExecutionReceiptRef<T> digest-only and must not import compute_fabric; the module imports only std.types and std.measure, and ExecutionReceiptRef<T> is a digest carrier while the sole producer discriminant lives on ProducerReceipt<T>. chatgpt-review-a9c007a3-b289-4e…

chatgpt-review-a9c007a3-b289-4e…

6. TRACKED vs UNTRACKED DEBT — Compliant

The explicit staged coproduct axes are marked with 🟡 tags, a feature/consumer gate, and a dissolve-on-arrival trigger in the new module header, then each staged axis points back to that header. chatgpt-review-a9c007a3-b289-4e…

chatgpt-review-a9c007a3-b289-4e…

The parser test also carries a P5/SG-0 receipt explaining the hand-Rust test addition is within an already-counted path. chatgpt-review-a9c007a3-b289-4e…

The blocking findings above are not accepted as tracked debt because they are modeled as normal/terminal authority, not declared scaffolds with a dissolution trigger.

2.5. Top-down PM intent review

Compliant. The PR preserves the visible PM intent of landing a std/ cache-interface fact model with facts rows as authority, a derived store view, digest-only compute composition, and a parser gate for the new .dag file. chatgpt-review-a9c007a3-b289-4e…

The issues I’m requesting changes for are enforcement holes inside that intended model, not semantic dilution of the plan or a shift toward permanent hand-written implementation.

3. Verdict

REQUEST_CHANGES. The PR is directionally aligned, but it lands new std/ substrate authority with string-keyed evidence targets and independently driftable content digests inside “verified” hit receipts. Those are substrate-level illegal-state / single-authority violations and should be fixed before merge.

@briansrls
briansrls merged commit 0d9a4a3 into main May 31, 2026
10 checks passed
briansrls added a commit that referenced this pull request May 31, 2026
…uthor positive-Y CiUpsertStep row in ci.dag consuming Upsert/ci-schema + #4105/#4107 substrate at composition edges; retire scripts/v4-testclaim-corpus-gate.sh + remove paired ci.yml step; assert receipt parity with existing T-22 (#4115)

* WIP: P5 structural-bridge implementation per #4114 worksheet (7ab2d28) — aut

* WIP: P5 structural-bridge implementation per #4114 worksheet (7ab2d28) — aut

* WIP: P5 structural-bridge implementation per #4114 worksheet (7ab2d28) — aut

* chore: apply cargo fmt for PR #4115 smoke-test assertions

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): address P5 bridge review — bootstrap if parity, carveout, notice text

- Run v4_bootstrap_compile (and resolve/gate-result) when workflow_policy
  is affected so corpus eval always has upstream dag artifacts (P3/F3).
- Document workflow-local bootstrap consumption in ci_always_run_carveouts
  per worksheet §1.2 until v4_bootstrap_dag_emit_ci_job lands.
- Retire forbidden "T-22 TestClaim corpus structural bridge" notice wording.
- Extend smoke tests for carveout + YAML grep F5.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 31, 2026
…cement) — +184 delta vs #4086

Per PM dispatch 2026-05-31: re-run full-tree M1 probe + per-class delta vs
PR #4086 baseline. Substrate landings since #4086: #4099 SG-1b worksheet,
#4100 SG-RC worksheet, #4102 R3-internal, #4105 + #4107 substrate
(compute_fabric + cache_interface), #4115 P5 bridge replacement.

Headline (origin/main at d015b76):
- v2 emit diagnostics: 0 (SG-7 stays closed; confirms #4115 didn't regress)
- .rs files emitted: 345 (was 335; +10 substrate growth)
- rustc errors: 7175 (was 6991; +184 / +2.6%)
- E0423 (SG-1 closure check): 0 (stays closed across all 6 substrate PRs)

Delta concentration:
- E0107 (SG-2): +125 — biggest single delta; new compute_fabric/cache_interface
  carriers need type-arg projection; SG-2 worksheet path #3962 absorbs without
  shape change.
- E0308 (mixed): +43 — SG-1-FOLLOWON +13 (1317 → 1330 'expected String, found
  Symbol') + SG-RC-LAYERING +24 on TestClaim row + minor others.
- Other codes: ±0 to +6 each; long tail completely pinned.

No new SG-class signatures emerged. P3-D elastic core count UNCHANGED from
#4086: 8 active receipt-producing classes + 2 closed. All routing from
proud-pike-680 (msg_6db2dc9e) absorbs the delta:
- SG-1b worksheet #4099 absorbs the +13 SG-1-FOLLOWON.
- SG-RC-LAYERING worksheet #4100 absorbs the +80 SG-RC.
- SG-COLLECTION-PROJECTION (~170, no Δ) stays on SG-5/SG-6 amendment plan.
- SG-2 / SG-8 / SG-3-CASCADE: existing worksheet routings.

§6 includes a spot-correction of #4086's SG-3-CASCADE arithmetic (was
1191; actual sum is 761).

§7 explicit reads: P5 bridge replacement (#4115) did NOT regress v2 emit;
this catalog's 0-diagnostic line is the implicit non-regression receipt.

§8 NOT-list: not a worker dispatch (proud-pike's routing surface); not a
SG-1/SG-7 reopening; not a P5 bridge receipt (#4097 owns that); not a P1/
MW-D8 amendment.

Two files: catalog + raw probe summary verbatim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…4086 (no new SG classes) (#4122)

* WIP: Close/Receipt Manager — authority over close predicates, two-axis dispos

* docs(close/receipt): fresh M1 rustc probe post-#4115 (P5 bridge replacement) — +184 delta vs #4086

Per PM dispatch 2026-05-31: re-run full-tree M1 probe + per-class delta vs
PR #4086 baseline. Substrate landings since #4086: #4099 SG-1b worksheet,
#4100 SG-RC worksheet, #4102 R3-internal, #4105 + #4107 substrate
(compute_fabric + cache_interface), #4115 P5 bridge replacement.

Headline (origin/main at d015b76):
- v2 emit diagnostics: 0 (SG-7 stays closed; confirms #4115 didn't regress)
- .rs files emitted: 345 (was 335; +10 substrate growth)
- rustc errors: 7175 (was 6991; +184 / +2.6%)
- E0423 (SG-1 closure check): 0 (stays closed across all 6 substrate PRs)

Delta concentration:
- E0107 (SG-2): +125 — biggest single delta; new compute_fabric/cache_interface
  carriers need type-arg projection; SG-2 worksheet path #3962 absorbs without
  shape change.
- E0308 (mixed): +43 — SG-1-FOLLOWON +13 (1317 → 1330 'expected String, found
  Symbol') + SG-RC-LAYERING +24 on TestClaim row + minor others.
- Other codes: ±0 to +6 each; long tail completely pinned.

No new SG-class signatures emerged. P3-D elastic core count UNCHANGED from
#4086: 8 active receipt-producing classes + 2 closed. All routing from
proud-pike-680 (msg_6db2dc9e) absorbs the delta:
- SG-1b worksheet #4099 absorbs the +13 SG-1-FOLLOWON.
- SG-RC-LAYERING worksheet #4100 absorbs the +80 SG-RC.
- SG-COLLECTION-PROJECTION (~170, no Δ) stays on SG-5/SG-6 amendment plan.
- SG-2 / SG-8 / SG-3-CASCADE: existing worksheet routings.

§6 includes a spot-correction of #4086's SG-3-CASCADE arithmetic (was
1191; actual sum is 761).

§7 explicit reads: P5 bridge replacement (#4115) did NOT regress v2 emit;
this catalog's 0-diagnostic line is the implicit non-regression receipt.

§8 NOT-list: not a worker dispatch (proud-pike's routing surface); not a
SG-1/SG-7 reopening; not a P5 bridge receipt (#4097 owns that); not a P1/
MW-D8 amendment.

Two files: catalog + raw probe summary verbatim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(close/receipt): #4122 — fix §6 arithmetic per openai-pro (long-tail 58 → 115; SG-3-CASCADE includes E0308 mop-up)

openai-pro found that §6 published a contradictory long-tail count:
§2 already lists E0391=29, E0599=28, other=58 separately, but §6's
'Long tail (E0391 / E0599 / + 12 other codes)' said 58 — should be
29+28+58 = 115. Separately, SG-3-CASCADE row totaled only
E0277+E0573+E0560+E0369+E0121 (765), omitting the E0308 mop-up that
the cascade definition is supposed to soak up by construction.

Fixes:
- Long tail row: 58 → 115 (E0391 + E0599 + other 12 codes, sum verified).
- SG-3-CASCADE row: 765 → ~1,390 (adds unclassified-E0308 mop-up
  ~625 = 2905 total E0308 minus SG-1-FOLLOWON 1330 minus SG-RC-LAYERING
  ~780 minus SG-COLLECTION-PROJECTION ~170).
- Added an explicit arithmetic-reconciliation sub-table showing each
  bucket × code coverage × count, summing to ~7,175 ± 1 rounding band.
- Footnote on the probe-summary top-25 histogram summing to 7,174 vs §1's
  7,175 — single error in a code beyond top-25 (probe script truncates
  display at top-25; rustc log carries full population).

Catalog now publishes a single self-consistent residual count usable as
the live ratchet meter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: Close/Receipt Manager — authority over close predicates, two-axis dispos

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…-driven, not "zero Δ" (openai-pro #4126)

§1 claimed the SG-3 named bands are "pinned (zero Δ)" and "the only motion is
residual-E0308," contradicting the adjacent table's E0560 +4 / named-subtotal +4.
Corrected: 4 of 5 named bands are zero-Δ; E0560 ticked +4, and that tick is
itself primary-driven (new SG-2 field-projection sites from #4105/#4107
substrate, per §2) — not independent SG-3 growth, which strengthens the
cascade-only thesis rather than weakening it. The −46 total is net of the +4
E0560 tick. No count changed; wording made internally faithful.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…ksheet (per #4086) (#4126)

* docs(receipt): SG-3-CASCADE cascade-only determination — no §10.0 worksheet (per #4086)

SG-3-CASCADE (trait/field/binary mop-up: E0277/E0573/E0560/E0369/E0121 +
residual-E0308) carries no independent missing modeled fact. Each band is the
rustc-visible consequence of a fact already owned by a primary class
(SG-1-FOLLOWON #4099, SG-2 #3962, SG-RC-LAYERING #4100, SG-8, SG-COLLECTION-
PROJECTION). A §10.0 worksheet's DFS-path / canonical-home fields would be empty
or duplicate a primary's — so no worksheet is warranted; authoring one would
invent substrate work that does not exist.

- New: docs/audit/v4-sg3-cascade-only-receipt-2026-05-31.md
  §0 determination, §2 per-band traceability (each → owning primary/worksheet),
  §4 falsifiable monotonic-dissolution criterion for the next post-primary probe.
- Resolves predicate-dependency-graph §3.3 ambiguity: SG-3-CASCADE row was
  "extend existing worksheet" (unnamed); now "retired (no worksheet)" — bands
  fan across five primaries, no single host to extend.

Docs-only; no code/substrate/.dag touched. Grounded in the committed #4122 live
ratchet meter (SG-3 bands pinned, zero-Δ vs #4086); no re-probe (would regenerate
identical numbers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: SG-3-CASCADE §10.0 worksheet or cascade-only receipt — trait/field/binar

* docs(receipt): fix §1 measurement-basis wording — E0560 +4 is primary-driven, not "zero Δ" (openai-pro #4126)

§1 claimed the SG-3 named bands are "pinned (zero Δ)" and "the only motion is
residual-E0308," contradicting the adjacent table's E0560 +4 / named-subtotal +4.
Corrected: 4 of 5 named bands are zero-Δ; E0560 ticked +4, and that tick is
itself primary-driven (new SG-2 field-projection sites from #4105/#4107
substrate, per §2) — not independent SG-3 growth, which strengthens the
cascade-only thesis rather than weakening it. The −46 total is net of the +4
E0560 tick. No count changed; wording made internally faithful.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 31, 2026
…4126 (#4130)

* docs(receipt): SG-3-CASCADE cascade-only determination — no §10.0 worksheet (per #4086)

SG-3-CASCADE (trait/field/binary mop-up: E0277/E0573/E0560/E0369/E0121 +
residual-E0308) carries no independent missing modeled fact. Each band is the
rustc-visible consequence of a fact already owned by a primary class
(SG-1-FOLLOWON #4099, SG-2 #3962, SG-RC-LAYERING #4100, SG-8, SG-COLLECTION-
PROJECTION). A §10.0 worksheet's DFS-path / canonical-home fields would be empty
or duplicate a primary's — so no worksheet is warranted; authoring one would
invent substrate work that does not exist.

- New: docs/audit/v4-sg3-cascade-only-receipt-2026-05-31.md
  §0 determination, §2 per-band traceability (each → owning primary/worksheet),
  §4 falsifiable monotonic-dissolution criterion for the next post-primary probe.
- Resolves predicate-dependency-graph §3.3 ambiguity: SG-3-CASCADE row was
  "extend existing worksheet" (unnamed); now "retired (no worksheet)" — bands
  fan across five primaries, no single host to extend.

Docs-only; no code/substrate/.dag touched. Grounded in the committed #4122 live
ratchet meter (SG-3 bands pinned, zero-Δ vs #4086); no re-probe (would regenerate
identical numbers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: SG-3-CASCADE §10.0 worksheet or cascade-only receipt — trait/field/binar

* docs(receipt): fix §1 measurement-basis wording — E0560 +4 is primary-driven, not "zero Δ" (openai-pro #4126)

§1 claimed the SG-3 named bands are "pinned (zero Δ)" and "the only motion is
residual-E0308," contradicting the adjacent table's E0560 +4 / named-subtotal +4.
Corrected: 4 of 5 named bands are zero-Δ; E0560 ticked +4, and that tick is
itself primary-driven (new SG-2 field-projection sites from #4105/#4107
substrate, per §2) — not independent SG-3 growth, which strengthens the
cascade-only thesis rather than weakening it. The −46 total is net of the +4
E0560 tick. No count changed; wording made internally faithful.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(planning): purge SG-3 single-authority conflict — retire it across all dispatch/count surfaces (codex + inline RC on #4126)

#4126 retired SG-3-CASCADE as cascade-only but only updated the §3.3 row +
state legend, leaving SG-3 still represented as dispatchable elsewhere in the
same planning artifact — two authorities for "is SG-3 dispatchable" (INVARIANTS
P2 single-authority). Resolved across all surfaces:

- §Path C (line 98): dropped SG-3 from "Workers extend ..." dispatch list;
  added explicit "SG-3 is NOT a dispatch target — retired cascade-only" note.
- Count surfaces (§P3 row line 11, §2 #4086 entry line 21, §3.3 header line 44,
  §3.3 footnote line 60): "8 active receipt-producing classes routed" →
  "8 receipt-producing classes — 7 dispatchable + SG-3-CASCADE cascade-residual."
  Keeps the #4086-catalog reconciliation (still 8 receipt-producing) while
  removing the dispatchability contradiction.

Follow-up to merged #4126; receipt unchanged. Docs-only — no code/substrate/.dag.

Closes #4086
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(planning): "7 dispatchable" → "7 active across routing states" — precise count (openai-pro RC on #4130)

openai-pro flagged that "7 dispatchable" introduced a new dispatch-count
contradiction: of the 7 non-SG-3 classes, several are not worker-dispatchable
under the table's own legend (SG-1b=worksheet-needed, SG-RC-LAYERING=authoring,
SG-COLLECTION-PROJECTION=route-pending). Reworded all four count surfaces
(§P3 row, §2 #4086 entry, §3.3 header, §3.3 footnote) to "7 active across
routing states + SG-3-CASCADE retired cascade-residual" — the only binary
fact the count asserts is retired-vs-active, which matches the per-row state
column exactly. No claim that all 7 are dispatchable.

Docs-only — no code/substrate/.dag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant