Skip to content

R3 gate #62: negative-bridge audit (supporting evidence; CONSUMER_LANDED retained) - #3111

Merged
briansrls merged 20 commits into
mainfrom
session/clever-heron-274
May 14, 2026
Merged

briansrls merged 20 commits into
mainfrom
session/clever-heron-274

Conversation

@briansrls

@briansrls briansrls commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Promotes §1.8 row Workflow capabilities next steps #62 substrate_gap_file_ingestion_closed (T-Workflow-As-Data) from CONSUMER_LANDED to CONSUMER_LANDED + PASSING.
  • Lands the §Acceptance receipt: CI-visible tree-state ratchet r3_gate_62_no_include_str_in_dsl asserting zero include_str! matches across every .dag/.v3 file under dsl/.
  • Extends Director's PR docs(r3): gate #62 file-ingestion substrate-shape canvas #2820 ratification-time grep into a CI-enforced predicate over the substrate file tree's authoritative body (distinct from grep-on-doc-comment textual-enforcement per feedback_no_textual_enforcement_bridges).

Context

Carrier + structural ratchet + existence-proof demo already landed via #2823:

  • FileAttachment (Refined-B-1, 5-of-7 subset of WorkflowObservationAnchor) in src/v3/std/timing_lens.dag
  • file_attachment_substrate_carrier_test.rs (shape locked + field types locked + field count = 5)
  • gate_62_file_attachment_demo_record existence-proof constructor

§Acceptance per §1.8 row #62 is ".dag program ingests external file w/o include_str!". This PR closes the §Acceptance side as a substrate-tree ratchet:

  • new file src/v3/compiler/tests/integration/r3_gate_62_file_ingestion_passing_test.rs
  • single test r3_gate_62_no_include_str_in_dsl walks dsl/ recursively, reads every .dag/.v3 file, and fails listing offending paths if any contain include_str!.
  • registered via tests/integration.rs.

§1.8 row #62 Notes updated to record the new receipt + cite feedback_no_textual_enforcement_bridges for the textual-vs-substrate-tree distinction.

Scope-bound (Substrate Mgr direction msg_210620aa)

Out-of-scope (Substrate-Mgr-owned, separate authoring trigger):

Test plan

  • cargo test -p v3-compiler --test integration r3_gate_62 — new ratchet passes (1/1)
  • cargo test -p v3-compiler --test integration file_attachment — carrier ratchet still green (3/3)
  • CI sweep

🤖 Generated with Claude Code
SG-0 hand-path delta: +1
SG-0 pairing: (c) follow-up dispatch via docs/briefs/r3-substrate-gate-62-file-attachment-carrier-worker.md

briansrls and others added 13 commits May 14, 2026 17:15
Promotes §1.8 row #62 `substrate_gap_file_ingestion_closed` from
CONSUMER_LANDED to CONSUMER_LANDED + PASSING.

Carrier + structural ratchet + demo already landed via PR #2823
(`FileAttachment` in `src/v3/std/timing_lens.dag` + Refined-B-1 shape
ratchet in `file_attachment_substrate_carrier_test.rs` +
`gate_62_file_attachment_demo_record` existence proof).

§Acceptance per §1.8 row #62 is ".dag program ingests external file
w/o `include_str!`". Director's PR #2820 ratification-time grep
established the gate-fact (zero matches under `dsl/`); this PR extends
that one-time grep into a CI-visible tree-state ratchet
`r3_gate_62_no_include_str_in_dsl` that scans every `.dag`/`.v3` file
under `dsl/` and fails with the offending paths if any reintroduce
`include_str!`. The predicate is over substrate file bodies — distinct
from grep-on-doc-comment textual-enforcement per
`feedback_no_textual_enforcement_bridges`.

Scope-bound per Substrate Mgr direction (msg_210620aa):
- Sub-canvas-2 (workflow blob-store / content_digest → bytes
  resolution) remains Substrate-Mgr-owned, out-of-scope.
- No changes to the ratified Refined-B-1 5-field structure
  (anti-pattern #7); no `AttachmentEncoding` / `WorkflowAssetPath`
  authoring (anti-patterns #4 + #5).

Receipts:
- `cargo test -p v3-compiler --test integration r3_gate_62` — passes
- `cargo test -p v3-compiler --test integration file_attachment` —
  carrier ratchet still green (3 passed)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses cursor/composer-2 REQUEST_CHANGES on PR #3111: the new
`r3_gate_62_file_ingestion_passing_test.rs` is a hand-authored
integration test, so the SG-0 census enforces it must be listed in
`EXPECTED_HAND_AUTHORED_TEST` and carry an INVARIANTS §P5 Mechanism (b)
receipt row in the same PR (per `sg0_v3_hand_authored_census`).

- `src/v3/compiler/tests/integration/sg0_census_test.rs`: add the path
  to `EXPECTED_HAND_AUTHORED_TEST` with dissolution trigger (`.dag`
  `TestClaim` / PB-B-1 runner receipt that asserts workspace
  file-tree predicates without a host-side filesystem walker).
- `INVARIANTS.md`: matching SG-0 hand-authored compiler test receipt
  row citing R3 program plan §1.8 gate #62, the carrier pairing with
  `file_attachment_substrate_carrier_test.rs`, and the
  `feedback_no_textual_enforcement_bridges` distinction (predicate
  over substrate file bodies, not over doc-comment text).

Receipts:
- `cargo test -p v3-compiler --test integration sg0_v3_hand_authored_census` — passes

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

Addresses codex/codex-default REQUEST_CHANGES on PR #3111 (review
#11981): the prior `body.contains("include_str!")` over raw file bytes
would trip on a comment, doc block, or string literal mentioning the
bridge name — collapsing the receipt into raw text policing rather
than the program-body predicate the gate's §Acceptance text states.

Fix: introduce `strip_comments_and_string_literals` (single-pass scan,
handles `//` line comments, `/* … */` block comments, `"…"` / `` `…` ``
string literals with `\` escape handling) and run the substring check
over the stripped output. The gate-fact is now "no `.dag` program
body invokes `include_str!`", not "no `.dag` file's bytes contain the
substring".

Four unit tests pin the stripping behaviour: line/block-comment
mentions, string-literal mention, and an actual invocation surviving
the strip. Existing gate-#62 ratchet over `dsl/` stays green.

Receipts:
- `cargo test -p v3-compiler --test integration r3_gate_62` — 5/5 pass

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

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 7f92455d · Trigger: schedule
  • Thinking: 275s wall

BLOCKING (2)

Root Cause

  • docs/r3-program-plan.md negative bridge-audit evidence was promoted to representative gap-test closure → either keep row #62 at CONSUMER_LANDED or add a positive .dag ingestion/TestClaim receipt that constructs and consumes FileAttachment as the file-ingestion proof.
  • INVARIANTS.md new SG-0 test path was paired only with an R3 plan-row receipt → add the explicit deferral lane plus concrete ROADMAP row, e.g. T-PB-B pb_rust_tests_outside_residual_zero, or replace the host ratchet with a .dag TestClaim.

⚠️ Two blocking receipt issues need correction before this can claim gate #62 closure.

Comment thread docs/r3-program-plan.md Outdated
| 61 | `substrate_gap_function_valued_data_closed` | substrate-gap-class | T-E-P-Producer-Broadening (Phase 1) + E6-G0d (landed #1813) | DECLARED YELLOW (NEW 2026-05-06; reframed RED→YELLOW 2026-05-06 per option (a) RATIFIED) | chain-break dissolved by Q-Class-2-Chain-Break option (a) gap-test re-pick + Q-LBP-R3-Closeability option (b) narrowing; single-prereq-blocked on T-E-P P1 / S10 |
| 62 | `substrate_gap_file_ingestion_closed` | substrate-gap-class | T-Workflow-As-Data | **CONSUMER_LANDED** (`src/v3/std/timing_lens.dag` `FileAttachment` + `gate_62_file_attachment_demo_record`; `src/v3/compiler/tests/integration/file_attachment_substrate_carrier_test.rs` — ratified shape unchanged per msg_09df44c6 / msg_61e302c6 / PR #2820) | `.dag` program ingests external file w/o include_str!. **Ratified top-level shape**: workflow-substrate `FileAttachment` carrier extending gate #53 (sibling-carrier pattern with WorkflowSecret + CronExpression β-ratified via PR #2160). **Ratified carrier-internals** (Refined-B-1 — strict 5-of-7 subset of #55 `WorkflowObservationAnchor` at `src/v3/std/timing_lens.dag:98-106`): `FileAttachment { subject_node: NodeId, content_digest: ContentHash, producer_id: WorkflowProducerId, workflow_run_id: WorkflowRunId, attached_at_ns: Nanoseconds }`. Drops observer_id + prover_id (timing-observation-specific epistemological roles; not applicable to file attachment). **Q1-Q6 dispositions** (Director verbatim): Q2 encoding ABSENT default (if needed, `Encoding` from `dsl/std/encoding.dag` — NEVER novel `AttachmentEncoding`); Q3 `WorkflowAssetPath` NOT introduced (digest-only canonical); Q4 workflow-coupling deferred to worker brief / consumer evidence (#55 `TimingObservationSet = List<TimingObservationEntry>` is own carrier, not embedded; analogy: no preemptive `List<FileAttachment>` on Job/Step); Q5 eager confirmed; Q6 `AttachmentEncoding` Practice-4 🔴 RED — dissolved to existing `dsl/std/encoding.dag` 6-variant `Encoding` BoundedLattice. **Disqualified top-level candidates** (per Director original disposition): (a) compile-time `read_utf8_file` — P5-style intrinsic, doesn't match §4.3 framing, re-introduces `include_str!` semantics under new syntax (PR #2819 STAND DOWN); (c) precedent-mirror — no precedent enumerated, §4.3 already names answer; (d) A+B bundle — creates parallel-authority violating §P1. **Disqualified carrier-shape candidates** (per Director sub-canvas disposition): B-2 path+digest — parallel-representation (two canonical identifiers for same fact); B-3 anchor+entry-pair — over-engineered (no separate payload to split). **Anti-patterns post-ratification** (Director-enumerated 7 total — 3 from top-level + 4 from sub-canvas): (1) compile-time `read_utf8_file`-equivalent additions; (2) FileAttachment landed without #55/#53 sibling-carrier alignment; (3) bridge variants alongside FileAttachment violating §P5 atomic-migration; (4) any `AttachmentEncoding` or equivalent encoding sum-type duplicating `dsl/std/encoding.dag`; (5) path field on FileAttachment (parallel-rep vs canonical digest); (6) `List<FileAttachment>` on Job/Step preemptively (consumer-evidence-required); (7) carrier-pattern deviation from Refined-B-1 5-field structure (no novel field-name renames; producer_id stays producer_id). **Ratification-time Director grep (PR #2820 snapshot, pre-`FileAttachment` land):** #55 anchor 7 fields at `timing_lens.dag:98-106`; 5 branded nominals (`ContentHash` :324, `WorkflowProducerId` :328, `WorkflowObserverId` :329, `WorkflowProverId` :330, `WorkflowRunId` :331) at `dsl/std/types.dag`; `dsl/std/encoding.dag` exists with `Encoding = ASCII \| UTF8 \| Latin1 \| Text \| Binary \| Unknown` BoundedLattice (compile-time narrowing); at ratification time none of `FileAttachment` / `AttachmentEncoding` / `WorkflowAssetPath` were present under those names (parallel-authority collision avoided). **Current tree (post gate-62 land):** `FileAttachment` is authored in `timing_lens.dag`; `AttachmentEncoding` / `WorkflowAssetPath` remain unauthored per Director Q2/Q3. **Sub-canvas-2 trigger** (follow-on, not blocking this carrier-internals ratification): workflow blob-store substrate — Refined-B-1 requires `content_digest → bytes` resolution; substrate may not exist at HEAD per sub-canvas §3.B-1.Cons; Substrate Mgr authors as separate canvas after Refined-B-1 lands. **PR #2823 land:** carrier (`FileAttachment`) + sibling-alignment / bootstrap ratchet (`file_attachment_substrate_carrier_test.rs`) + existence proof (`gate_62_file_attachment_demo_record`) per worker brief. **`include_str!` audit (ratification snapshot)** (Director-verified `grep -rn "include_str!" dsl/` on PR #2820 canvas): no matches — gate is forward-looking (model the carrier so future file-ingestion sites have first-class workflow-substrate form), not retire-existing-side-channel. |
| 62 | `substrate_gap_file_ingestion_closed` | substrate-gap-class | T-Workflow-As-Data | **CONSUMER_LANDED + PASSING** (carrier + structural ratchet + demo: `src/v3/std/timing_lens.dag` `FileAttachment` + `gate_62_file_attachment_demo_record`; `src/v3/compiler/tests/integration/file_attachment_substrate_carrier_test.rs` — ratified shape unchanged per msg_09df44c6 / msg_61e302c6 / PR #2820. **§Acceptance receipt** (this gate's `.dag` program-ingests-external-file-w/o-`include_str!` predicate): CI-visible tree-state ratchet `src/v3/compiler/tests/integration/r3_gate_62_file_ingestion_passing_test.rs` `r3_gate_62_no_include_str_in_dsl` asserts zero `include_str!` matches across every `.dag`/`.v3` file under `dsl/` — extends Director's PR #2820 ratification-time grep into a CI-enforced predicate over the file tree's authoritative substrate body, distinct from grep-on-doc-comment textual-enforcement per `feedback_no_textual_enforcement_bridges` (the gate-fact is over substrate files, not over text mentioning the string). Scope-bound per Substrate Mgr msg_210620aa — sub-canvas-2 workflow blob-store / `content_digest → bytes` resolution remains Substrate-Mgr-owned out-of-scope.) | `.dag` program ingests external file w/o include_str!. **Ratified top-level shape**: workflow-substrate `FileAttachment` carrier extending gate #53 (sibling-carrier pattern with WorkflowSecret + CronExpression β-ratified via PR #2160). **Ratified carrier-internals** (Refined-B-1 — strict 5-of-7 subset of #55 `WorkflowObservationAnchor` at `src/v3/std/timing_lens.dag:98-106`): `FileAttachment { subject_node: NodeId, content_digest: ContentHash, producer_id: WorkflowProducerId, workflow_run_id: WorkflowRunId, attached_at_ns: Nanoseconds }`. Drops observer_id + prover_id (timing-observation-specific epistemological roles; not applicable to file attachment). **Q1-Q6 dispositions** (Director verbatim): Q2 encoding ABSENT default (if needed, `Encoding` from `dsl/std/encoding.dag` — NEVER novel `AttachmentEncoding`); Q3 `WorkflowAssetPath` NOT introduced (digest-only canonical); Q4 workflow-coupling deferred to worker brief / consumer evidence (#55 `TimingObservationSet = List<TimingObservationEntry>` is own carrier, not embedded; analogy: no preemptive `List<FileAttachment>` on Job/Step); Q5 eager confirmed; Q6 `AttachmentEncoding` Practice-4 🔴 RED — dissolved to existing `dsl/std/encoding.dag` 6-variant `Encoding` BoundedLattice. **Disqualified top-level candidates** (per Director original disposition): (a) compile-time `read_utf8_file` — P5-style intrinsic, doesn't match §4.3 framing, re-introduces `include_str!` semantics under new syntax (PR #2819 STAND DOWN); (c) precedent-mirror — no precedent enumerated, §4.3 already names answer; (d) A+B bundle — creates parallel-authority violating §P1. **Disqualified carrier-shape candidates** (per Director sub-canvas disposition): B-2 path+digest — parallel-representation (two canonical identifiers for same fact); B-3 anchor+entry-pair — over-engineered (no separate payload to split). **Anti-patterns post-ratification** (Director-enumerated 7 total — 3 from top-level + 4 from sub-canvas): (1) compile-time `read_utf8_file`-equivalent additions; (2) FileAttachment landed without #55/#53 sibling-carrier alignment; (3) bridge variants alongside FileAttachment violating §P5 atomic-migration; (4) any `AttachmentEncoding` or equivalent encoding sum-type duplicating `dsl/std/encoding.dag`; (5) path field on FileAttachment (parallel-rep vs canonical digest); (6) `List<FileAttachment>` on Job/Step preemptively (consumer-evidence-required); (7) carrier-pattern deviation from Refined-B-1 5-field structure (no novel field-name renames; producer_id stays producer_id). **Ratification-time Director grep (PR #2820 snapshot, pre-`FileAttachment` land):** #55 anchor 7 fields at `timing_lens.dag:98-106`; 5 branded nominals (`ContentHash` :324, `WorkflowProducerId` :328, `WorkflowObserverId` :329, `WorkflowProverId` :330, `WorkflowRunId` :331) at `dsl/std/types.dag`; `dsl/std/encoding.dag` exists with `Encoding = ASCII \| UTF8 \| Latin1 \| Text \| Binary \| Unknown` BoundedLattice (compile-time narrowing); at ratification time none of `FileAttachment` / `AttachmentEncoding` / `WorkflowAssetPath` were present under those names (parallel-authority collision avoided). **Current tree (post gate-62 land):** `FileAttachment` is authored in `timing_lens.dag`; `AttachmentEncoding` / `WorkflowAssetPath` remain unauthored per Director Q2/Q3. **Sub-canvas-2 trigger** (follow-on, not blocking this carrier-internals ratification): workflow blob-store substrate — Refined-B-1 requires `content_digest → bytes` resolution; substrate may not exist at HEAD per sub-canvas §3.B-1.Cons; Substrate Mgr authors as separate canvas after Refined-B-1 lands. **PR #2823 land:** carrier (`FileAttachment`) + sibling-alignment / bootstrap ratchet (`file_attachment_substrate_carrier_test.rs`) + existence proof (`gate_62_file_attachment_demo_record`) per worker brief. **`include_str!` audit (ratification snapshot)** (Director-verified `grep -rn "include_str!" dsl/` on PR #2820 canvas): no matches — gate is forward-looking (model the carrier so future file-ingestion sites have first-class workflow-substrate form), not retire-existing-side-channel. |
| 63 | `substrate_gap_workflow_scheduling_closed` | substrate-gap-class | T-Workflow-As-Data + T-Lens-Self-Application | **CANVAS_RATIFIED** (2026-05-13 per PR **#2831** squash `89df284e3` — Substrate Mgr canvas `docs/briefs/r3-substrate-gate-63-workflow-scheduling-canvas.md` + worker `docs/briefs/r3-substrate-gate-63-workflow-scheduling-worker.md`; Director **msg_804cdc93** ratifies **Q1=Candidate A** administrative closure path — gate-criterion test `ci_workflow_as_data_demo_timing_dimension_report_evaluates_via_evaluator` passes in isolation per snappy-bear-502 **msg_cef1340b**; **Q2 OR-semantics**; **Q3** planned-deferral anchor `73969f4a9`; **Q4** substrate-lane-owned; snappy-bear-502 audit **msg_140d9bc7**; sibling `--include-ignored` failures Director-allocated to §1.8 rows **#99/#100** per msg_804cdc93 — **not** gate #63 closure scope) | CI workflow as `.dag` data executes through evaluator + `DimensionReport<TimingMeasurement>`; §4.4 substrate-prereq mapping table in canvas §2. **CONSUMER_LANDED + PASSING** requires worker Phases A–C (un-ignore + §1.4 (a)+(b) receipts + §4.4 footnote reconciliation + ledger flip), not claimed at ratification. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: Marking gate #62 CONSUMER_LANDED + PASSING from a zero-include_str! tree ratchet weakens the ratified §1.4/§4.3 criterion, which requires a positive .dag program ingesting an external file via FileAttachment, not just absence of the old bridge (THESIS/P1 modeling faithfulness).

Comment thread INVARIANTS.md
| `src/v3/compiler/tests/integration/common/wiring_scanner_test.rs` | **ROADMAP:** same **v3 lens capability honesty pass** bullet — Band-C `tests/integration.rs` `#[path]` wiring is enforced by `integration_rs_wiring_scan.rs` + `cementing_dispatch.rs`. **Dissolution:** remove when `integration.rs` wiring can be validated structurally for cementing modules without line scanners. **Interim ratchet:** unit tests for helpers promoted from the retired `cementing_lens_registry_dispatch_test.rs` monolith. |
| `src/v3/compiler/tests/integration/ctrl_pr_digests_dag_smoke_test.rs` | **Project plan:** `docs/r4-ctrl-dag-migration-project-plan.md` §3 — catalog **#8** `dsl/ctrl/pr_digests.dag` (Wave-1 ctrl → `.dag` subsystem modeling). **PR receipt (P5 Mechanism (b)):** this INVARIANTS row + the matching `EXPECTED_HAND_AUTHORED_TEST` line in `sg0_census_test.rs` land in the same PR as the smoke test. **Dissolution:** remove when `compile_to_dag` (or a single generated harness) validates `module … service …` ctrl carrier files end-to-end without a parallel Rust string/lexer ratchet, or when the contract migrates to `.dag` `TestClaim` coverage. **Interim ratchet:** `ctrl_pr_digests_dag_tokenizes_and_matches_expected_surface` requires clean tokenization plus presence of `module ctrl.pr_digests`, `import extdeps.github.pulls { PullRequest, PullReview, ReviewComment }`, `std.errors` / `std.types` imports, the four Practice-4 sum/record carriers (with `🟡 STAGED` / `🟢 TERMINAL` markers per `dsl/ctrl/README.md`), `ReviewCommentBody` + `review_line_comments` wiring, and `service ctrl.PrDigests` / the four `operation` blocks / `readonly`. |
| `src/v3/compiler/tests/integration/extdeps_sql_transport_test.rs` | **ROADMAP:** `ROADMAP.md` § **Nine lanes** row `T-PB-B` / `pb_rust_tests_outside_residual_zero`; this Rust integration receipt keeps HTTP/SQL/audit extdeps compiled by the existing v3 parser before downstream emission-target consumers rely on them. **Dissolution:** remove when extdeps transport and Phase 3 emission-target files are covered by a `.dag`-native parse/authority suite or generated test harness rather than per-file Rust `compile_to_dag` probes. **Interim ratchet:** `rest_transport_dag_compiles_cleanly` and `sql_transport_dag_compiles_cleanly` pin `dsl/extdeps/transports/rest.dag` and `dsl/extdeps/transports/sql.dag`; `http_server_extdep_dag_compiles_cleanly`, `sql_migration_extdep_dag_compiles_cleanly`, and `audit_event_extdep_dag_compiles_cleanly` pin `dsl/extdeps/http/server.dag`, `dsl/extdeps/sql/migration.dag`, and `dsl/extdeps/audit/event.dag` as parseable staged emission-target substrate. The field-sensitive companions (`http_server_target_fields_are_authoritative_substrate_edges`, `sql_migration_target_fields_bound_raw_sql_scaffold`, `audit_event_target_fields_preserve_cloudevents_core_names`) consume the new target-contract fields directly so they fail on raw `String`/`Int` regressions, missing SQL scaffold bounds, or CloudEvents alias drift while the first real projection consumer is still staged; the audit ratchet also locks CloudEvents core fields to branded carriers and `std.types.Timestamp` rather than raw strings. |
| `src/v3/compiler/tests/integration/file_attachment_substrate_carrier_test.rs` | **R3 program plan:** `docs/r3-program-plan.md` §1.8 gate **#62** `substrate_gap_file_ingestion_closed` (T-Workflow-As-Data substrate-gap class; worker brief `docs/briefs/r3-substrate-gate-62-file-attachment-carrier-worker.md`). **Dissolution:** remove when a `.dag` `TestClaim` / PB-B-1 runner receipt can assert `FileAttachment` field names + cross-module nominal wiring against `generated_full_bootstrap_dag()` without this hand-Rust structural ratchet (same dissolution posture as `timing_lens_substrate_carrier_test.rs` for gate #55). **Interim ratchet:** `file_attachment_shape_locked` + `file_attachment_field_types_locked` + `file_attachment_field_count_is_five` pin the ratified Refined-B-1 five-field subset of `WorkflowObservationAnchor` (`NodeId`, `ContentHash`, `WorkflowProducerId`, `WorkflowRunId`, `Nanoseconds`) exactly as declared in `src/v3/std/timing_lens.dag`; existence proof carrier construction stays in-module as `gate_62_file_attachment_demo_record`. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The new hand-Rust test receipt for r3_gate_62_file_ingestion_passing_test.rs does not cite a concrete ROADMAP.md row, so it misses the stricter P5 requirement for new src/v3 Rust tests.

…ge audit

Addresses operator BLOCKING on PR #3111 (2026-05-14T19:13:37Z, inline
on docs/r3-program-plan.md:290): marking #62 `CONSUMER_LANDED + PASSING`
from a zero-`include_str!` tree ratchet weakens §1.4/§4.3, which require
a positive `.dag` program ingesting an external file via `FileAttachment`,
not just absence of the old bridge (THESIS/P1 modeling faithfulness).

Also addresses codex BLOCKING review on `7f92455d`:
- (1) Negative bridge-audit promoted to gap-test closure — fixed by
  reverting PASSING flip.
- (2) INVARIANTS row paired only with R3 plan-row receipt — fixed by
  adding explicit T-PB-B / `pb_rust_tests_outside_residual_zero`
  deferral lane citation.

Changes:
- `docs/r3-program-plan.md` §1.8 row #62: `CONSUMER_LANDED + PASSING` →
  `CONSUMER_LANDED`. New test reclassified as supporting evidence
  (negative-bridge audit), not §Acceptance receipt. PASSING flip awaits
  a positive ingestion-via-`FileAttachment` `.dag` `TestClaim` / runner
  receipt.
- `INVARIANTS.md` SG-0 hand-authored test row: reframed as supporting
  evidence (not §Acceptance receipt); added T-PB-B deferral lane
  citation; dissolution broadened to (a) `.dag` `TestClaim` carries the
  audit OR (b) PASSING flip via positive demonstration.
- `src/v3/compiler/tests/integration/r3_gate_62_file_ingestion_passing_test.rs`
  header: drop PASSING-receipt framing; document operator BLOCKING and
  the audit's supporting-evidence-only role.
- `src/v3/compiler/tests/integration/sg0_census_test.rs` census comment:
  mirror the supporting-evidence framing + T-PB-B deferral lane.

Test behaviour unchanged; the audit still ratchets zero `include_str!`
matches across `.dag`/`.v3` program bodies under `dsl/` (comments +
string literals stripped). What changed is the *claim* the audit
supports — no longer §Acceptance closure.

Receipts:
- `cargo test -p v3-compiler --test integration r3_gate_62` — 5/5
- `cargo test -p v3-compiler --test integration sg0_v3_hand_authored_census` — pass

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

Copy link
Copy Markdown
Contributor Author

BLOCKING acknowledged. Reverted in commit ee8d99e3d:

  • §1.8 row Workflow capabilities next steps #62: CONSUMER_LANDED + PASSING → CONSUMER_LANDED. The new audit is now classified as supporting evidence (negative-bridge ratchet), explicitly NOT a §Acceptance receipt. PASSING flip held pending a positive .dag program that ingests an external file via FileAttachment per §1.4/§4.3.
  • INVARIANTS.md row: reframed as supporting evidence; added explicit T-PB-B / pb_rust_tests_outside_residual_zero deferral lane citation (also addresses codex finding (2)); dissolution broadened to either .dag TestClaim carrying the audit OR PASSING flip via positive demonstration.
  • Test header + SG-0 census comment mirror the supporting-evidence framing.

The audit (zero include_str! under dsl/, with comments + string literals stripped from program bodies) stays in CI as a regression-guard on the absence-of-bridge property while the positive ingestion demonstration is built out. Test behaviour unchanged; only the claim it supports was narrowed.

— sent from clever-heron-274

@briansrls briansrls changed the title R3 gate #62: §Acceptance receipt — include_str!-free dsl/ CI ratchet R3 gate #62: negative-bridge audit (supporting evidence; CONSUMER_LANDED retained) May 14, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed in commit ee8d99e3d (pushed before this second BLOCKING surfaced). The new INVARIANTS row at :345 now cites ROADMAP.md → ### Nine lanes → T-PB-B / pb_rust_tests_outside_residual_zero as the explicit deferral lane (same pattern as the adjacent merged row at INVARIANTS.md:347 for no_coercion_cost_dimension_ratchet_test.rs). This satisfies the stricter §P5 requirement for new src/v3 Rust tests.

— sent from clever-heron-274

briansrls and others added 6 commits May 14, 2026 19:25
…sty)

Addresses non-blocking nits from both reviewers on PR #3111:
- cursor/composer-2 review #12121: "the filename
  `r3_gate_62_file_ingestion_passing_test.rs` reads like a PASSING
  receipt even though the module docs and plan row stress the opposite;
  a rename in a follow-up would reduce confusion for future grep-based
  audits."
- claude/claude-opus-4-7 review #12156: same observation, suggesting
  `r3_gate_62_file_ingestion_negative_bridge_audit_test.rs`.

Rename via `git mv`; updated path in:
- `src/v3/compiler/tests/integration.rs` (#[path] + mod)
- `src/v3/compiler/tests/integration/sg0_census_test.rs`
  `EXPECTED_HAND_AUTHORED_TEST` entry
- `INVARIANTS.md` row
- `docs/r3-program-plan.md` §1.8 row #62 supporting-evidence cite

No semantic change. Tests still pass (5/5).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses non-blocking nit from cursor/composer-2 review #12190 on PR
#3111: prior rustdoc on `strip_comments_and_string_literals` said any
surviving `include_str!` "still trips the ratchet" even for malformed
sources. Not accurate — an unterminated `"`/`` ` ``/`/*` causes the
scanner to consume through end-of-input and the post-opener tail is
dropped, not searched. Tightened doc to state this honestly and note
that the audit relies on lex-level well-formedness of substrate it
walks (realistic `.dag`/`.v3` trees would fail parse elsewhere on
unbalanced delimiters).

Behaviour unchanged; only the doc-comment is updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	INVARIANTS.md
#	docs/r3-program-plan.md
@briansrls
briansrls merged commit a92ae6f into main May 14, 2026
4 checks passed
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