Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e3725a5
WIP: valiant-ibex-312
briansrls May 5, 2026
f87de65
fix(v3): close nested-optional cardinality codegen bypass (Path B ren…
briansrls May 5, 2026
195377e
fix(v3): refresh bootstrap generated snapshots via regen_bootstrap
briansrls May 5, 2026
31cab64
ci: empty-commit retrigger for #1803 self_host_ratchet runner-budget …
briansrls May 6, 2026
cdd9778
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
a9dadaa
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
273aefc
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
384217e
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
d400a92
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
ce25cb6
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
eaf36c0
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
81cb31f
WIP: valiant-ibex-312
briansrls May 6, 2026
d47b122
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
9ccfe16
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
3e3c320
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
25a6cf4
fix(measure): typed scale_exponent authority + constrained-inhabitanc…
briansrls May 6, 2026
4e4859d
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
b38f007
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
919681b
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
8058d29
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
724fcdc
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
819e0ef
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
ac62e02
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
90b991e
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
c0cf5ef
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
cddc251
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
e7c97f9
WIP: valiant-ibex-312
briansrls May 6, 2026
2eb2632
WIP: valiant-ibex-312
briansrls May 6, 2026
01df58e
test(r3-l6): wire cross_target_coverage carrier ratchet through SG-0
briansrls May 6, 2026
da1ada8
fix(r3-l6): four-pattern dissolution receipt for ShapeATarget 🟢 TERMINAL
briansrls May 6, 2026
b179018
ci: re-trigger after PR body SG-0 hand-path delta line restoration
briansrls May 6, 2026
2dd990b
WIP: valiant-ibex-312
briansrls May 6, 2026
103ef13
test(r3-l6): tighten ratchet to assert exact variant labels + record …
briansrls May 6, 2026
bcbb856
Merge remote-tracking branch 'origin/main' into session/valiant-ibex-312
briansrls May 6, 2026
06bad65
docs(sg0-census): correct PR-number cite (this is #1842, precedent #1…
briansrls May 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/v3/compiler/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pub const BOOTSTRAP_FIXTURE_PATH_KEYS: &[&str] = &[
"src/v3/std/python_method_template_contracts.dag",
"src/v3/std/go_method_template_contracts.dag",
"src/v3/std/anthropic_operations.dag",
"src/v3/std/cross_target_coverage.dag",
];

/// v3-only inhabitance for kernel `Bool` (Class 5 / Lane 1e-2b Path A).
Expand Down
9,430 changes: 4,944 additions & 4,486 deletions src/v3/compiler/src/bootstrap_generated.rs

Large diffs are not rendered by default.

8,724 changes: 4,591 additions & 4,133 deletions src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/v3/compiler/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ mod bridge_lower_helpers_patch_zero_residual_test;
mod canonical_lens_bridge_ratchet_test;
#[path = "integration/cementing/cementing_lens_registry_dispatch_test.rs"]
mod cementing_lens_registry_dispatch_test;
#[path = "integration/cross_target_coverage_carrier_test.rs"]
mod cross_target_coverage_carrier_test;
#[path = "integration/e_i_lane_induction_preflight_test.rs"]
mod e_i_lane_induction_preflight_test;
#[path = "integration/extdeps_rust_primitives_loader_test.rs"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
//! **Layer:** integration
//!
//! Slice-active ratchet for the L6 `EmissionPathProjection` substrate
//! carrier slice authored at `src/v3/std/cross_target_coverage.dag` per
//! Director Option 2 RATIFIED at gunbc#828 #issuecomment-4377533390 and the
//! worker brief
//! `docs/briefs/r3-l6-emission-path-projection-substrate-worker.md`.
//!
//! **What this slice asserts (load-bearing now):**
//!
//! 1. The six type declarations exist with the ratified field shapes
//! (typed-substrate read; no string scan): `ShapeATarget`, `FormAxis`,
//! `BehaviorAxis`, `MethodTemplateContractKey`, `EmissionCell`,
//! `EmissionPathProjection`.
//! 2. `emission_path_projections == []` — the empty-state predicate. The
//! slice ships with the data declaration empty by design; populated
//! rows are scoped to Grounding's follow-up per §4.D=(b). The empty
//! assertion is the slice's load-bearing claim that no row drift
//! sneaks in via this PR.
//!
//! **What this slice DEFERS (per §4.D=(b)):**
//!
//! Per-row key bijection between `emission_path_projections` and the union
//! of `*_method_template_contracts` rows is the activation gate Grounding
//! flips on in the row-population follow-up PR. The bijection scaffold
//! lives there, not here — at HEAD `emission_path_projections: []` and the
//! source contract lists are non-empty, so a strict bijection cannot pass
//! while this slice ships empty. That's why the bijection check belongs
//! in Grounding's row-population PR (#1745).

use v3_compiler::dag::{Dag, Declaration, TypeConnective, ValueBody};
use v3_compiler::generated_full_bootstrap_dag;

const SHAPE_A_TARGET: &str = "ShapeATarget";
const FORM_AXIS: &str = "FormAxis";
const BEHAVIOR_AXIS: &str = "BehaviorAxis";
const METHOD_TEMPLATE_CONTRACT_KEY: &str = "MethodTemplateContractKey";
const EMISSION_CELL: &str = "EmissionCell";
const EMISSION_PATH_PROJECTION: &str = "EmissionPathProjection";
const EMISSION_PATH_PROJECTIONS_DATA: &str = "emission_path_projections";

#[test]
fn cross_target_coverage_six_carrier_types_present() {
let dag = generated_full_bootstrap_dag();
for name in [
SHAPE_A_TARGET,
FORM_AXIS,
BEHAVIOR_AXIS,
METHOD_TEMPLATE_CONTRACT_KEY,
EMISSION_CELL,
EMISSION_PATH_PROJECTION,
] {
dag.declaration_by_name(name)
.unwrap_or_else(|| panic!("`{name}` missing from full bootstrap dag"));
}
}

/// Collect the structural variant labels (in declaration order) of a `Disj`
/// declaration, panicking with a typed message if the carrier is not a `Disj`.
fn disj_variant_labels<'a>(decl: &'a Declaration, name: &str) -> Vec<&'a str> {
let TypeConnective::Disj { variants } = &decl.connective else {
panic!("`{name}` must be `Disj`; got {:?}", decl.connective);
};
variants.iter().map(|f| f.label.as_str()).collect()
}

/// Collect the `(label, type-name)` pairs of a `Conj` declaration's children
/// (record-type field shape), panicking with a typed message if the carrier
/// is not a `Conj`.
fn conj_field_label_and_type_names<'a>(
dag: &'a Dag,
decl: &'a Declaration,
name: &str,
) -> Vec<(&'a str, &'a str)> {
let TypeConnective::Conj { children } = &decl.connective else {
panic!(
"`{name}` must be `Conj` (record); got {:?}",
decl.connective
);
};
children
.iter()
.map(|f| {
let ty_decl = dag.declaration(f.ty);
let ty_name = ty_decl.name.as_deref().unwrap_or("<anonymous>");
(f.label.as_str(), ty_name)
})
.collect()
}

#[test]
fn shape_a_target_disj_variants_match_ratified_labels() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(SHAPE_A_TARGET)
.expect("ShapeATarget must exist");
let labels = disj_variant_labels(decl, SHAPE_A_TARGET);
assert_eq!(
labels,
vec!["Rust", "Python", "Go"],
"ShapeATarget variants must be exactly [Rust, Python, Go] in declaration order \
(closed set per Q-Unit-1 brief §1; new target requires P1 substrate-fact-introduction)"
);
}

#[test]
fn form_axis_disj_variants_match_type_connective_discriminants() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(FORM_AXIS)
.expect("FormAxis must exist");
let labels = disj_variant_labels(decl, FORM_AXIS);
assert_eq!(
labels,
vec![
"Atom",
"Conj",
"Disj",
"Arrow",
"Cardinality",
"Instantiation"
],
"FormAxis variants must mirror v3_compiler::dag::TypeConnective's six discriminants \
in substrate-declaration order (label-by-label parity; drift requires P1 procedure \
on the upstream Rust enum first)"
);
}

#[test]
fn behavior_axis_disj_variants_match_behavior_discriminants() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(BEHAVIOR_AXIS)
.expect("BehaviorAxis must exist");
let labels = disj_variant_labels(decl, BEHAVIOR_AXIS);
assert_eq!(
labels,
vec!["Value", "Transform", "Branch", "Loop", "Bind"],
"BehaviorAxis variants must mirror v3_compiler::dag::Behavior's five discriminants \
in L1 model order (label-by-label parity)"
);
}

#[test]
fn method_template_contract_key_record_fields_match_ratified_shape() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(METHOD_TEMPLATE_CONTRACT_KEY)
.expect("MethodTemplateContractKey must exist");
let fields = conj_field_label_and_type_names(&dag, decl, METHOD_TEMPLATE_CONTRACT_KEY);
assert_eq!(
fields,
vec![("target", "ShapeATarget"), ("dag_method", "MethodRef")],
"MethodTemplateContractKey must carry exactly {{ target: ShapeATarget, dag_method: MethodRef }} \
per Director Option 2 §4.C=(i) RATIFIED (typed dispatch, no string-name)"
);
}

#[test]
fn emission_cell_record_fields_match_ratified_shape() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(EMISSION_CELL)
.expect("EmissionCell must exist");
let fields = conj_field_label_and_type_names(&dag, decl, EMISSION_CELL);
assert_eq!(
fields,
vec![("connective", "FormAxis"), ("behavior", "BehaviorAxis")],
"EmissionCell must carry exactly {{ connective: FormAxis, behavior: BehaviorAxis }}"
);
}

#[test]
fn emission_path_projection_record_fields_match_ratified_shape() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(EMISSION_PATH_PROJECTION)
.expect("EmissionPathProjection must exist");
let fields = conj_field_label_and_type_names(&dag, decl, EMISSION_PATH_PROJECTION);
assert_eq!(
fields.len(),
2,
"EmissionPathProjection must have exactly two fields; got {fields:?}"
);
assert_eq!(
fields[0],
("row_identity", "MethodTemplateContractKey"),
"EmissionPathProjection.row_identity must be MethodTemplateContractKey"
);
// `cells: List<EmissionCell>` lowers as a `Cardinality`-wrapped element ref.
// Verify the field name and that the wrapped element resolves to EmissionCell.
assert_eq!(
fields[1].0, "cells",
"EmissionPathProjection's second field must be `cells`"
);
let TypeConnective::Conj { children } = &decl.connective else {
unreachable!("already established Conj above")
};
let cells_ty_decl = dag.declaration(children[1].ty);
// `List<X>` lowers to a `Cardinality { element_type: X, ... }` Atom payload
// or to an `Instantiation` reference. Walk to find the `EmissionCell`
// declaration referenced by the cells field's type.
let cells_repr = format!("{:?}", cells_ty_decl.connective);
assert!(
cells_repr.contains("EmissionCell")
|| cells_repr.contains("Cardinality")
|| cells_repr.contains("Instantiation"),
"EmissionPathProjection.cells must resolve through `List<EmissionCell>` \
(Cardinality/Instantiation wrapper around EmissionCell); got {cells_repr}"
);
}

#[test]
fn emission_path_projections_data_is_empty_list() {
let dag = generated_full_bootstrap_dag();
let decl = dag
.declaration_by_name(EMISSION_PATH_PROJECTIONS_DATA)
.unwrap_or_else(|| {
panic!(
"`{EMISSION_PATH_PROJECTIONS_DATA}` data declaration missing from full bootstrap dag"
)
});
let body = decl
.value_body
.as_ref()
.expect("emission_path_projections must be a `data` declaration with a value body");
let ValueBody::List(rows) = body else {
panic!(
"emission_path_projections must lower as `ValueBody::List` (declared as \
`List<EmissionPathProjection>`); got {body:?}"
);
};
assert!(
rows.is_empty(),
"Phase-1 carrier slice ships `emission_path_projections` EMPTY; \
row population is Grounding's follow-up (#1745) per §4.D=(b). \
Got {} row(s).",
rows.len()
);
// The list's declared element type must be `EmissionPathProjection`. The
// data declaration's `connective` records the typed list shape (e.g.,
// `List<EmissionPathProjection>` lowers through a Cardinality/Instantiation
// wrapper around the element-type DeclarationId). Walk the connective and
// require the EmissionPathProjection id to be transitively reachable —
// without this, an empty `List<Foo>` would silently pass even if the
// element type drifted from the ratified shape.
let projection_decl = dag
.declaration_by_name(EMISSION_PATH_PROJECTION)
.expect("EmissionPathProjection must exist");
let projection_id_token = format!("DeclarationId({})", projection_decl.id.raw());
let connective_repr = format!("{:?}", decl.connective);
assert!(
connective_repr.contains(&projection_id_token)
|| connective_repr.contains("EmissionPathProjection"),
"emission_path_projections must be typed as `List<EmissionPathProjection>` \
(connective must reference EmissionPathProjection's DeclarationId or name); \
got connective {connective_repr}"
);
}
5 changes: 3 additions & 2 deletions src/v3/compiler/tests/integration/parse_corpus_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ src/v3/std/anthropic_operations.dag 6 3404 a729e7662be9af5f
src/v3/std/anthropic_schema.dag 12 54190 a430f932e3962ecb
src/v3/std/approximate_field.dag 11 16862 d3bf5c7f2f410ce1
src/v3/std/bin_shim.dag 4 2544 9ac96f1b3feafe47
src/v3/std/bootstrap_authority.dag 4 64334 5bad26d70c58cc74
src/v3/std/bootstrap_authority.dag 4 65384 b001a82f44210230
src/v3/std/bridge_ledger.dag 7 31662 ec3b4ea8c0455eb7
src/v3/std/clean_emission.dag 15 23867 e7bc1e6145f4781e
src/v3/std/computation.dag 18 36754 8023f388c3fb0918
src/v3/std/computation_model.dag 14 22953 20e458fe097d175a
src/v3/std/cross_target_coverage.dag 9 12594 aa7fac5a10143fff
src/v3/std/diagnostics.dag 11 21478 7d2e9e73d74e5adb
src/v3/std/dimensions.dag 21 39170 c6833b618a39e0af
src/v3/std/effects.dag 53 97984 1acdbeaa68acfd2e
src/v3/std/emit_model.dag 44 82642 350e3581bbca7873
src/v3/std/extdeps_bootstrap_fixtures.dag 4 14463 909ca7a1c1705e89
src/v3/std/extdeps_bootstrap_fixtures.dag 4 16839 22cffc76152e82dd
src/v3/std/go_method_template_contracts.dag 14 133273 43ccd439b5e388ea
src/v3/std/induction.dag 56 88794 e405e1549cf2fe08
src/v3/std/integer_diagnostic_order.dag 6 8124 5d7b31594a5b3d5c
Expand Down
8 changes: 8 additions & 0 deletions src/v3/compiler/tests/integration/sg0_census_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ const EXPECTED_HAND_AUTHORED_TEST: &[&str] = &[
"src/v3/compiler/tests/integration/common/mod.rs",
"src/v3/compiler/tests/integration/common/r1_gates_bridge.rs",
"src/v3/compiler/tests/integration/common/substrate_receipts.rs",
// R3 L6 carrier slice (PR #1842; Measure-carrier precedent at #1819,
// Director Option 2 RATIFIED at
// gunbc#828 #issuecomment-4377533390): slice-active ratchet for
// `cross_target_coverage.dag` (six type declarations exist;
// `emission_path_projections == []`). Stays hand-Rust alongside
// `method_template_contract_test.rs` until testgen covers
// reflected-Dag structural assertions over std/ row authorities.
"src/v3/compiler/tests/integration/cross_target_coverage_carrier_test.rs",
"src/v3/compiler/tests/integration/e_i_lane_induction_preflight_test.rs",
// T-Ground-Engine Phase-1 loader-close (PR #776, Director-approved
// Path 2): hand-Rust integration test pinning
Expand Down
1 change: 1 addition & 0 deletions src/v3/std/bootstrap_authority.dag
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ data bootstrap_authority: BootstrapAuthoritySet = {
"src/v3/std/clean_emission.dag": V3StdAuthority,
"src/v3/std/computation.dag": V3StdAuthority,
"src/v3/std/computation_model.dag": V3StdAuthority,
"src/v3/std/cross_target_coverage.dag": V3StdAuthority,
"src/v3/std/diagnostics.dag": V3StdAuthority,
"src/v3/std/dimensions.dag": V3StdAuthority,
"src/v3/std/effects.dag": V3StdAuthority,
Expand Down
Loading
Loading