Skip to content

fix(r3): gate #28 receipt includes Shape A emit_rust on shared Dag - #2447

Merged
briansrls merged 4 commits into
mainfrom
fix/r3-gate-28-shape-a-receipt
May 9, 2026
Merged

briansrls merged 4 commits into
mainfrom
fix/r3-gate-28-shape-a-receipt

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Resolves codex BLOCKING feedback on merged #2412: gate #28 omni_layers_share_one_node_tree must match r3-structure.md acceptance — every emitted layer (Shape A backend + Shape B artifacts) deriving from one compile_to_dag result.

Changes

  • omni_layers_share_one_node_tree: after projections, call emit_rust(&dag) on the same Dag as routes/OpenAPI/Markdown; compile_count still 1.
  • Fixture: minimal top-level let omni_emit_anchor: Int = 0 so emit_rust is defined for this module (emit_rust requires a top-level value bind).
  • docs/r3-program-plan.md §1.8 row Fix Value serialization and implement is_empty() method #28 Notes + docs/thesis/r2-r3-thesis-mapping.md coherence row: spell out emit_rust alongside route extraction + Shape B projections.

Verification

cargo test -p v3-compiler m1_5_omni_shape_b_openapi_test

Made with Cursor

Extend omni_layers_share_one_node_tree to call emit_rust on the same Dag as
route/OpenAPI/Markdown projections (fixture gains a minimal top-level Int bind
so emit_rust is defined). Update §1.8 Notes + thesis mapping to list Shape A
Rust emission alongside the interim route projection and Shape B artifacts.

Addresses codex BLOCKING on gate #28 PASSING vs r3-structure acceptance.

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

briansrls commented May 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Reply — codex review (dashboard stdout artifact)

Verification against HEAD:

  • emit_rust: Re-export of emit_rust_text (src/v3/compiler/src/emit_rust.rs) — emit_rust(&dag) is &Dag -> Result<String, EmitError> on the same compiled graph as the Shape B helpers.
  • Program-mode requirement: emit_rust_with_mode rejects empty top-level value binds in EmitRustMode::Program (rust_target.rs 2969–2973 — exact error string matches UnsupportedBehavior("emit_rust requires at least one top-level value Bind")).
  • Fixture change: let omni_emit_anchor: Int = 0 satisfies that precondition without altering service-operation data rows used by route/OpenAPI/Markdown tests.

Verdict: APPROVE — codex assessment matches the implementation; no further code change from this thread.

Merge readiness: Dashboard merge policy asks for ≥2 distinct api-review APPROVE threads (Verdict: APPROVE grep). Codex satisfies one provider; second provider (e.g. openai-pro) still needed before squash-merge per operator policy. Confirm fmt / ci / v3 green + mergeStateStatus: CLEAN before gh pr merge.

— sent from wise-cat-637

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — codex follow-up review (sha 454a41a44, dashboard artifact /api/reviews/8467/...)

Verification: Re-checked HEAD 454a41a44 — unchanged from the prior codex pass: omni_layers_share_one_node_tree still calls emit_rust(&dag) after routes/OpenAPI/Markdown on the same Dag with compile_count == 1; omni_emit_anchor remains the minimal top-level bind for program-mode emit_rust. docs/r3-program-plan.md §1.8 #28 Notes and docs/thesis/r2-r3-thesis-mapping.md coherence row still describe emit_rust + interim route extraction + Shape B projections.

Verdict: APPROVE — second codex pass is consistent with the first; no code/doc amend required from this artifact alone.

Merge readiness: This adds a second inline Verdict: APPROVE line from codex only — merge policy calls for ≥2 distinct providers (openai-pro + codex, etc.). v3 CI was still in flight on 25613778112 last check; mergeStateStatus BLOCKED until checks/reviews clear. No squash-merge from this session until openai-pro (or another distinct api-review) APPROVE + v3 green + CLEAN.

— sent from wise-cat-637

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — cursor/composer-2 dashboard review (8489)

Verification on HEAD d0eae976: The diff still wires omni_layers_share_one_node_tree as emit_rust(&dag) plus extract_rest_routes / project_openapi_yaml / project_markdown_documentation on one compile_to_dag result (compile_count == 1). omni_emit_anchor remains the minimal top-level bind so program-mode emit_rust is defined on an endpoint-list fixture. Ledger/thesis lines still describe emit_rust alongside the interim route projection + Shape B artifacts.

INVARIANTS P5(b) note:** Composer flags that exactly-one-checkable-receipt-in-PR-body is not verifiable from repo diff alone — agreed; no contradiction inferred from changed lines.

Verdict: APPROVE — aligns with implementation and r3-structure.md gate #28 strengthening path.

— sent from wise-cat-637

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: d0eae976 · Trigger: manual
  • Comparison: main @ 390d7adb ... fix/r3-gate-28-shape-a-receipt @ d0eae976
  • Conversation: View conversation

1. Story of the diff

This PR tightens gate #28’s receipt from “Shape B projections share one lowered Dag” to “Shape A Rust emission and Shape B projections share the same lowered Dag.” The docs now describe omni_layers_share_one_node_tree as covering emit_rust, route extraction, OpenAPI YAML, and Markdown projections from one compile result (docs/r3-program-plan.md:252, docs/thesis/r2-r3-thesis-mapping.md:129). The test fixture is made Rust-emittable by importing Int and adding a tiny top-level let omni_emit_anchor: Int = 0, then the existing omni_layers_share_one_node_tree test calls emit_rust(&dag) alongside the Shape B projection calls (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:21, :25, :352). The load-bearing mechanism is not a new emitter path; it is a receipt that every layer is consuming the same already-compiled Dag.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — the diff is docs plus an integration-test receipt; it does not change Dag substrate types, cross-pass substrate fields, or dag.rs. The added Shape A consumer is a read of the existing Dag via emit_rust(&dag), not a new representation (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:352).

  1. INVARIANTS.md + modeling-discipline.md.

Compliant — Boundary Discipline / single authority is handled correctly: the test extends the receipt by adding another consumer of the same dag value, not a second compilation or parallel fact source (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:352, :356-358). This is “shared read of one resolved fact,” not duplicate authority.

  1. CODING.md.

Compliant — the new dependency is explicit and functional: emit_rust is imported as a free function and called with &dag, matching the data + free-functions style rather than hiding state or introducing a method/object wrapper (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:13, :352).

  1. TESTING.md.

Compliant — this is an appropriate integration-level regression receipt because the claim is cross-layer: one compiled fixture feeds Shape A emission and multiple Shape B projections. The assertion message now names the full behavioral contract being protected: one compile result for routes, OpenAPI, Markdown, and emit_rust (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:356-358). I do not see a missing lower-level unit test obligation here; the point is the shared pipeline artifact.

  1. LOCKED DESIGN DECISIONS.

Compliant — the diff preserves the Shape A / Shape B split instead of collapsing it. The changed docs and test commentary explicitly call Rust emission “Shape A” and OpenAPI/Markdown “Shape B” (docs/r3-program-plan.md:252, src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:4-8).

  1. TRACKED vs UNTRACKED DEBT.

Compliant — no new scaffold, TODO, temporary API, or bridge is introduced. The only “interim” language remains the pre-existing cross-target predicate caveat, and this patch does not expand it beyond documenting the added emit_rust consumer (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:7-8).

2.5. Top-down PM intent review

Compliant. The highest-level omni-emission intent is that multiple layers derive coherently from the same modeled structure, with Shape A compiler targets and Shape B user-artifact projections remaining distinct. This patch strengthens the receipt in exactly that direction: the plan row now says emit_rust, route extraction, OpenAPI YAML, and Markdown all share the same Dag (docs/r3-program-plan.md:252), and the test actually calls emit_rust(&dag) after the Shape B projections (src/v3/compiler/tests/integration/m1_5_omni_shape_b_openapi_test.rs:352). I do not see semantic dilution: no must-have target becomes optional, no dissolution goal becomes permanent scaffolding, and no new hand-written implementation path is added.

3. Verdict

APPROVE. The PR is a narrow receipt-alignment change: it updates the docs and test so gate #28 covers Shape A emit_rust plus Shape B projections over one shared Dag. I found no substrate issue, no duplicate-authority problem, and no untracked debt introduced by the diff.

@briansrls
briansrls merged commit d85a099 into main May 9, 2026
4 checks passed
@briansrls
briansrls deleted the fix/r3-gate-28-shape-a-receipt branch May 9, 2026 23:14
@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — openai-pro (sha d0eae976) + dashboard stdout artifact

Substantive [api-review] thread: Re-verified on merged main — §1.8 gate #28 Notes still list Shape A emit_rust + routes + Shape B projections on one Dag; omni_layers_share_one_node_tree still runs emit_rust(&dag) with compile_count == 1 and omni_emit_anchor for program-mode emit_rust. The layered-model / single-authority / Shape A vs Shape B framing in the review matches the tree.

Verdict: APPROVE — findings hold post-merge; no fix commit.

Stdout-only artifact (8488): The routed excerpt stops at harness bootstrap (diff upload / prompt fill / typing) — it does not include a separate findings block beyond the full [api-review] comment above.

Merge readiness: N/A — #2447 already squash-merged (2026-05-09T23:14:12Z). Nothing left to gh pr merge.

— sent from wise-cat-637

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