Skip to content

SG-2: worksheet §6 closure + P5 smoke receipts (substrate on main #3962) - #4124

Merged
briansrls merged 4 commits into
mainfrom
session/valiant-eagle-646-sg2-section6
May 31, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/valiant-eagle-646-sg2-section6

Conversation

@briansrls

@briansrls briansrls commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes the SG-2 worksheet §6 receipt lane for TargetTypeExpressionProjection after substrate landed on main in #3962. This PR does not re-implement the carrier — it adds the downstream worker brief (§5–§7), three parse/tokenize smokes in v4_std_target_realization_dag_smoke_test.rs, and P5 pairing (INVARIANTS_OPS, sg0_census_test, sg0-pr-body-append.4124.txt, +0 SG-0 paths).

Test plan

  • cargo test -p v3-compiler --test integration v4_std_target_model_declares_target_type_expression_projection_carrier
  • cargo test -p v3-compiler --test integration v4_translate_dag_imports_type_expression_projection_consumer
  • cargo test -p v3-compiler --test integration v4_rust_language_model_declares_type_expression_projection_row
  • Existing harness smokes unchanged (SG-1 / SG-5 / SG-6 rows in same file)
  • Manual falsification already on main: src/v4/test/claim/manual/sg2_type_expression_projection.dag

briansrls and others added 3 commits May 31, 2026 16:45
Add §5–§7 to the SG-2 worksheet, expand v4_std_target_realization_dag_smoke_test
with three parse/tokenize smokes for TargetTypeExpressionProjection, and pair
INVARIANTS_OPS / sg0 census / sg0-pr-body-append.4124.txt (+0 SG-0 paths).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls briansrls changed the title SG-2 implementation per sg2-type-expression worksheet on main — TargetTypeExpressionProjection per §6 SG-2: worksheet §6 closure + P5 smoke receipts (substrate on main #3962) May 31, 2026
@briansrls
briansrls marked this pull request as ready for review May 31, 2026 17:02

@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: fb0e46d3 · Trigger: schedule
  • Thinking: 265s wall

BLOCKING (1)

Root Cause

  • src/v3/compiler/tests/integration/sg0_census_test.rs SG-0 census entry for a still-wired hand-authored test was removed without retiring the test path → restore the expected entry or delete the harness plus #[path] registration and record a real census shrink.

⚠️ One blocking P5 ratchet inconsistency needs to be fixed before merge.

@@ -0,0 +1,2 @@

SG-0 pairing: (c) Net +0 on `EXPECTED_HAND_AUTHORED_TEST` — same-path expansion of `v4_std_target_realization_dag_smoke_test.rs` (INVARIANTS §P5(b) parse/tokenize receipt for SG-2 `TargetTypeExpressionProjection` + `06_translate` type-expression consumer + Rust row wiring; substrate on `main` #3962). Deferral: `_internal/ROADMAP_OPS.md` § **Nine lanes** row **T-PB-B** / `pb_rust_tests_outside_residual_zero`; dissolve when type-expression projection surfaces execute from `.dag` `TestClaim` / T-22 eval only — gunb-ai/gunbc#4124.

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 P5 “Net +0” receipt is false because the PR removes a live hand-authored boundary test from EXPECTED_HAND_AUTHORED_TEST while it remains registered at src/v3/compiler/tests/integration.rs:302, so the SG-0 hand-Rust ratchet will drift.

Merge tip accidentally dropped EXPECTED_HAND_AUTHORED_TEST line for the
#4117 boundary test while the file, integration.rs wiring, and INVARIANTS_OPS
row remained live. Restores Net +0 for PR #4124.

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

Copy link
Copy Markdown
Contributor Author

Addressed (commit pending push verification): Restored v4_leaf_model_python_r2_r3_external_test.rs in EXPECTED_HAND_AUTHORED_TEST (sg0_census_test.rs ~405). The drop was accidental during the main merge — file, integration.rs:302 wiring, and _internal/INVARIANTS_OPS.md:52 were never removed. Diff vs main for that file is now only the PR #4124 comment line (+0 paths for SG-2).

— sent from valiant-eagle-646

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified — addressed on 9414fc222 (not fb0e46d3).

The blocking finding was correct for fb0e46d3: merge tip had dropped v4_leaf_model_python_r2_r3_external_test.rs from EXPECTED_HAND_AUTHORED_TEST while integration.rs:302, the boundary file, and _internal/INVARIANTS_OPS.md:52 stayed live.

9414fc222 restores the four-line census block at sg0_census_test.rs:405–408. Diff vs main for that file is now only the PR #4124 comment (+0 paths). No harness retirement needed.

— sent from valiant-eagle-646

@briansrls

Copy link
Copy Markdown
Contributor Author

Already fixed — please re-review 9414fc222.

Claude review targeted fb0e46d3, where the merge had dropped lines 405–408. Current PR HEAD restores:

sg0_census_test.rs:405–408
  // Phase 1 leaf-model python R2a/R2b/R3-external …
  "src/v3/compiler/tests/boundary/v4_leaf_model_python_r2_r3_external_test.rs",

(fix(SG-2): restore v4_leaf_model_python_r2_r3_external census entry)

Boundary file, integration.rs:302, and INVARIANTS_OPS.md:52 unchanged. Diff vs main for sg0_census_test.rs is only the #4124 comment (+0 paths). SG-2 scope unchanged.

— sent from valiant-eagle-646

@briansrls
briansrls merged commit 4d1d89b into main May 31, 2026
10 checks passed
@briansrls
briansrls deleted the session/valiant-eagle-646-sg2-section6 branch May 31, 2026 17:45
briansrls added a commit that referenced this pull request May 31, 2026
Accidental drop when extending the SG-RC target_model import block removed
symbols still used by translate_target_function_signature_realization_for_boundary
and serialize_type_expr_boundary_* (from main #4124).

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 31, 2026
…single-authority-fact substrate per §6; close the missing modeled fact for the ~700-error class so emit/lower can resolve without spot-fix. First impl wave under the §10.0 worksheet. (#4116)

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* fix(v4): address openai-pro SG-RC substrate review on #4116

- TargetReferenceLayerWrapped probe payload (Owned only via NotWrapped arm).
- Propagate bundle edge probe Rejected through apply_disposition (no false absent).
- Fail closed on use-site ownership lookup miss when SG-RC consumer runs.

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

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* fix(v4): address openai-pro SG-RC fail-closed review on d7bfbae

- TargetReferenceLayerWrapped probe payload (no duplicate Owned arm)
- translate_sg_rc_bundle_edge_present propagates bundle Rejected
- catalog lookup miss rejects instead of Owned passthrough
- manual claim: missing use_site row under SG-RC-ready bundle
- smoke: assert translate_sg_rc_bundle_edge_present surface

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

* fix(v4): add dissolution tag on TargetReferenceLayerWrapped

Practice 4 / INVARIANTS P5: classify the SG-RC wrapped-layer coproduct
alongside TargetReferenceLayer and TargetReferenceLayerProbe.

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

* fix(v4): codex fail-closed SG-RC decode + facts-forward value use_site

- Reject non-Conj reference_layer_tokens bundles (no fabricated Rc/Box tokens)
- TargetReferenceLayerWrapped dissolution tag (prior commit)
- Thread use_site through value path via at_use_site only; drop hardcoded
  translate_atom_realization_value_from_source wrapper
- F2 claims: return/param value expr consult matching catalog rows

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

* test(v4): smoke ratchet for reference_layer_tokens fail-closed decode

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

* fix(v4): restore SG-1b signature-realization imports in 06_translate

Accidental drop when extending the SG-RC target_model import block removed
symbols still used by translate_target_function_signature_realization_for_boundary
and serialize_type_expr_boundary_* (from main #4124).

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
…ings (#4116) (#4133)

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* fix(v4): address openai-pro SG-RC substrate review on #4116

- TargetReferenceLayerWrapped probe payload (Owned only via NotWrapped arm).
- Propagate bundle edge probe Rejected through apply_disposition (no false absent).
- Fail closed on use-site ownership lookup miss when SG-RC consumer runs.

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

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* fix(v4): address openai-pro SG-RC fail-closed review on d7bfbae

- TargetReferenceLayerWrapped probe payload (no duplicate Owned arm)
- translate_sg_rc_bundle_edge_present propagates bundle Rejected
- catalog lookup miss rejects instead of Owned passthrough
- manual claim: missing use_site row under SG-RC-ready bundle
- smoke: assert translate_sg_rc_bundle_edge_present surface

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

* fix(v4): add dissolution tag on TargetReferenceLayerWrapped

Practice 4 / INVARIANTS P5: classify the SG-RC wrapped-layer coproduct
alongside TargetReferenceLayer and TargetReferenceLayerProbe.

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

* fix(v4): codex fail-closed SG-RC decode + facts-forward value use_site

- Reject non-Conj reference_layer_tokens bundles (no fabricated Rc/Box tokens)
- TargetReferenceLayerWrapped dissolution tag (prior commit)
- Thread use_site through value path via at_use_site only; drop hardcoded
  translate_atom_realization_value_from_source wrapper
- F2 claims: return/param value expr consult matching catalog rows

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

* test(v4): smoke ratchet for reference_layer_tokens fail-closed decode

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

* fix(v4): restore SG-1b signature-realization imports in 06_translate

Accidental drop when extending the SG-RC target_model import block removed
symbols still used by translate_target_function_signature_realization_for_boundary
and serialize_type_expr_boundary_* (from main #4124).

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

* fix(v4): SG-RC review follow-up — drop fail-open bundle_ready, add ctor spellings

- Remove translate_sg_rc_bundle_ready (Bool escape hatch); apply_disposition only.
- Add Rc::new/Box::new to rust_sg2_binding_spellings for value-wrap serialization.
- Tighten sg_rc_value_rc_wrap_tagged to assert catalog ctor symbol, not self-hash.

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

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* WIP: SG-RC-LAYERING implementation per #4100 worksheet (c725de3) — author s

* fix(#4133): checkable P5 deferral + facts-forward value coupling claim

Cite _internal/ROADMAP_OPS.md Nine lanes T-PB-B (lane table moved off
ROADMAP.md). sg_rc_value_rc_wrap_tagged compares full TargetValueExpression
nodes against substrate target_reference_layer_apply_value_expression.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.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