Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c57ae67
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 9, 2026
084f427
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 10, 2026
85d8df6
Dissolve ShapeATarget into LanguageSpec refs
briansrls May 10, 2026
a8d5d36
Refresh parse corpus manifest for ShapeATarget carrier
briansrls May 10, 2026
d448f5e
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
57d31a6
Align ShapeATarget audit wording with DeclarationRef carrier
briansrls May 10, 2026
232992e
Merge main into ShapeATarget branch
briansrls May 10, 2026
c988636
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
4812d49
Keep ShapeATarget walker fail-closed
briansrls May 10, 2026
951be1e
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
143a0d7
Merge main after ShapeATarget review fix
briansrls May 10, 2026
1609ecc
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
0d1d2b5
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
d033bd5
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
7a3e4b5
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
8dab1d9
Use projection rows as ShapeATarget coverage authority
briansrls May 10, 2026
fb7cae4
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
8f85f39
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
47aa37a
Document ShapeATarget coverage authority
briansrls May 10, 2026
99cf995
Merge origin/main into ShapeATarget lane
briansrls May 10, 2026
b047d49
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
efab54b
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
c735d52
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
e870fe6
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 10, 2026
e9d4b77
Regenerate bootstrap after ShapeATarget merge
briansrls May 10, 2026
e1bed65
Fix ShapeATarget coverage status docs
briansrls May 10, 2026
6cbaea3
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 10, 2026
ca9d132
Read ShapeATarget projection targets structurally
briansrls May 10, 2026
5a8a273
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
d5526b3
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 10, 2026
d232f1e
Update ShapeATarget coverage audit wording
briansrls May 10, 2026
d7a4342
WIP: R3 F2 — ShapeATarget closed enum vs LanguageSpec extensibility (…
briansrls May 10, 2026
b8c0c82
Refresh cross-target parse manifest snapshot
briansrls May 10, 2026
52e30b9
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
f3fc445
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
cf3b79e
Align ShapeATarget audit wording with alias carrier
briansrls May 10, 2026
110b546
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
6150b26
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
c0cb0cf
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 2026
8671ba2
Fix ShapeATarget test receipt comment
briansrls May 10, 2026
d36a5c0
Merge remote-tracking branch 'origin/main' into session/crisp-raven-202
briansrls May 10, 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
2 changes: 1 addition & 1 deletion docs/audit/r3-debt-sweep-2026-05-06.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Duplicate representations of operator/algebra concepts: OperatorSpec / OperatorK
|---|---|---|---|---|---|---|
| OperatorSpec / OperatorKind / BinaryOpRow triplicate | F | parse_tables.dag + lower + emitter operator surfaces | SG-2c proper `parse_tables.dag` decision; single ontology | YELLOW | pre-R3 | Substrate |
| `algebra.dag` declaration-vs-template surface asymmetry | F | `dsl/std/algebra.dag` | rescoped per Lane G #654 investigation | YELLOW | #654 | Substrate |
| `ShapeATarget = Rust \| Python \| Go` closed enum vs `LanguageSpec` data extensibility | F | gpt-5-5-pro Finding 2 | LanguageSpec consumption replacing closed enum | YELLOW | PR #2358 | Grounding |
| `ShapeATarget = Rust \| Python \| Go` closed enum vs `LanguageSpec` data extensibility | F | gpt-5-5-pro Finding 2 | `ShapeATarget` aliases `LanguageSpec`, with named Shape A target data bindings consumed by projection rows; cross-target consumers discover those target bindings, with `EmissionPathProjection` rows as the coverage authority instead of a parallel `MethodTemplateContract` join | GREEN | issue #2466 / crisp-raven-202 | Grounding |
| `Map<String, Bool>` as set across graph/syntax/node files (`set_has` ignores stored bool) | F | gpt-5-5-pro Finding 3 | use declared `Set<A>` from std | YELLOW | PR #2358 | Substrate |
| `StructuralEffectShape.combine_effects` bespoke local lattice merge | F | `src/v3/lenses/effect_enumeration.dag:50-54,175-207` | `BoundedLattice<StructuralEffectShape>` instance | YELLOW | b09e0c8 | Substrate |
| Hand-rolled lattice instances (NEW class instance) | F | tracked at ROADMAP `:384` | typed `Lattice<T>` instances | YELLOW | pre-R3 | Substrate |
Expand Down
2 changes: 1 addition & 1 deletion docs/audit/v3-comprehensive-debt-audit-2026-05-09.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ From PR #2358 §8 meta-finding cycle (3 sha windows: b09e0c8 / 1211e453 / cf1d52
| # | Finding | Class candidate |
|---|---|---|
| 1 | `MissingEmissionPath` stringifies typed axes (`connective: String, behavior: String, target: String`) | Class C — typed-carrier regression at diagnostic boundary |
| 2 | `ShapeATarget = Rust \| Python \| Go` closed enum vs `LanguageSpec` data extensibility | Class F — ontology duplication |
| 2 | `ShapeATarget = Rust \| Python \| Go` closed enum vs `LanguageSpec` data extensibility | Class F — ontology duplication — resolved by issue #2466 / crisp-raven-202: `ShapeATarget` aliases `LanguageSpec`, with named Shape A target data bindings consumed by projection rows |
| 3 | `Map<String, Bool>` as set across graph/syntax/node files (`set_has` ignores stored bool) | Class F — missed algebraic structure (Set<A> declared in std but bypassed) |
| 4 | `PartitionResult` bypassed by anonymous return type | Class G — small duplicate-authority cleanup |
| 5 | `ComposedEffect { idempotent, breaking_operation }` illegal product — **REMEDIATED** (`dsl/std/effects.dag` → `CompositionVerdict`; PR #2491 / #2469) | Class C — illegal-state-representable (closed) |
Expand Down
8,206 changes: 4,048 additions & 4,158 deletions src/v3/compiler/src/bootstrap_generated.rs

Large diffs are not rendered by default.

8,252 changes: 4,071 additions & 4,181 deletions src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,25 @@ fn conj_field_label_and_type_names<'a>(
}

#[test]
fn shape_a_target_disj_variants_match_ratified_labels() {
fn shape_a_target_aliases_language_spec() {
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)"
let language_spec = dag
.declaration_by_name("LanguageSpec")
.expect("LanguageSpec must exist");
assert!(
matches!(
decl.connective,
TypeConnective::Instantiation {
template,
ref arguments,
} if template == language_spec.id && arguments.is_empty()
),
"ShapeATarget must dissolve the closed Rust/Python/Go enum into a LanguageSpec alias, \
so carrier construction is structurally limited to LanguageSpec declarations; got {:?}",
decl.connective
);
}

Expand Down Expand Up @@ -245,11 +253,51 @@ fn variant_label<'a>(dag: &'a Dag, axis_name: &str, value: &FieldValue) -> &'a s
}

fn projection_target(dag: &Dag, value: &FieldValue) -> ProjectionTarget {
match variant_label(dag, SHAPE_A_TARGET, value) {
"Rust" => ProjectionTarget::Rust,
"Python" => ProjectionTarget::Python,
"Go" => ProjectionTarget::Go,
other => panic!("unknown ShapeATarget variant `{other}`"),
let owned_fields;
let fields = match value {
FieldValue::Record(fields) => fields,
FieldValue::Reference(target) => {
let target_decl = dag.declaration(*target);
match target_decl.name.as_deref() {
Some("rust_shape_a_target") => return ProjectionTarget::Rust,
Some("python_shape_a_target") => return ProjectionTarget::Python,
Some("go_shape_a_target") => return ProjectionTarget::Go,
_ => {}
}
if Some(*target) == dag.rust_language_spec() {
return ProjectionTarget::Rust;
} else if Some(*target) == dag.python_language_spec() {
return ProjectionTarget::Python;
} else if Some(*target) == dag.go_language_spec() {
return ProjectionTarget::Go;
}
let Some(ValueBody::Structural { fields }) = target_decl.value_body.as_ref() else {
panic!(
"ShapeATarget reference must resolve to structural data, got {target_decl:?}"
);
};
owned_fields = fields.clone();
&owned_fields
}
other => panic!("ShapeATarget must be a record or reference, got {other:?}"),
};
let spec = field(fields, "spec");
let FieldValue::Reference(spec) = spec else {
panic!("ShapeATarget.spec must be a LanguageSpec reference, got {spec:?}");
};
if Some(*spec) == dag.rust_language_spec() {
ProjectionTarget::Rust
} else if Some(*spec) == dag.python_language_spec() {
ProjectionTarget::Python
} else if Some(*spec) == dag.go_language_spec() {
ProjectionTarget::Go
} else {
let name = dag
.declaration(*spec)
.name
.as_deref()
.unwrap_or("<anonymous>");
panic!("unknown ShapeATarget LanguageSpec `{name}`")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ src/v3/std/clean_emission.dag 15 23867 e7bc1e6145f4781e
src/v3/std/computation.dag 19 37870 25c5a33ef4d8735a
src/v3/std/computation_model.dag 14 22953 20e458fe097d175a
src/v3/std/coproduct_projection.dag 7 7380 afb0d131b9ff2fa4
src/v3/std/cross_target_coverage.dag 10 373515 814a9a617f609ad3
src/v3/std/cross_target_coverage.dag 17 377306 21d3cc29457e4aca
src/v3/std/diagnostics.dag 11 21478 7d2e9e73d74e5adb
src/v3/std/dimensions.dag 21 39170 c6833b618a39e0af
src/v3/std/effects.dag 53 97986 a7e76d1378ca354d
Expand Down
59 changes: 34 additions & 25 deletions src/v3/grounding_cross_target_meta/src/cells.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
//! `FormAxis` enumerates the six [`v3_compiler::dag::TypeConnective`]
//! discriminants (substrate-anchored per #1229), `BehaviorAxis` the
//! five [`v3_compiler::dag::Behavior`] variants, and `ShapeATarget`
//! the three Shape A targets (Rust / Python / Go). Each `Cell` is one
//! of the 90 `(form × behavior × target)` triples.
//! is a typed reference to a target `LanguageSpec` declaration. Each
//! `Cell` is one `(form × behavior × LanguageSpec target)` triple.

use v3_compiler::dag::{Dag, DeclarationId};

/// Form-axis discriminant — mirrors [`v3_compiler::dag::TypeConnective`]
/// variants without carrying their payloads (the cross-product walker
Expand Down Expand Up @@ -75,32 +77,39 @@ impl BehaviorAxis {
}
}

/// Shape A target identity. Three concrete targets per
/// `r2-grounding-manager.md`'s portability requirements
/// (target-side primitive declarations for Rust / Python / Go).
/// Shape A target identity, backed by the `LanguageSpec` data declaration
/// that owns the target's substrate facts.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ShapeATarget {
Rust,
Python,
Go,
pub struct ShapeATarget {
pub spec: DeclarationId,
}

impl ShapeATarget {
/// All three Shape A targets.
pub const ALL: [ShapeATarget; 3] = [ShapeATarget::Rust, ShapeATarget::Python, ShapeATarget::Go];
pub fn new(spec: DeclarationId) -> ShapeATarget {
ShapeATarget { spec }
}

pub fn label(self) -> &'static str {
match self {
ShapeATarget::Rust => "Rust",
ShapeATarget::Python => "Python",
ShapeATarget::Go => "Go",
pub fn label(self, dag: &Dag) -> String {
let name = dag
.declaration(self.spec)
.name
.as_deref()
.unwrap_or("<anonymous_language_spec>");
match name {
"rust_shape_a_target" => "Rust".to_string(),
"python_shape_a_target" => "Python".to_string(),
"go_shape_a_target" => "Go".to_string(),
"rust_language" => "Rust".to_string(),
"python_language" => "Python".to_string(),
"go_language" => "Go".to_string(),
other => other.to_string(),
}
}
}

/// One cell in the (form × behavior × target) cross product. The
/// L6 walker enumerates all 90 of these and reports per-cell coverage
/// against the LanguageSpec emission-path table.
/// L6 walker enumerates 30 cells per target and reports per-cell
/// coverage against the LanguageSpec emission-path table.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Cell {
pub connective: FormAxis,
Expand All @@ -109,12 +118,12 @@ pub struct Cell {
}

impl Cell {
/// Iterator over all 90 cells, in nested-loop order
/// Iterator over all cells, in nested-loop order
/// (form outer, behavior middle, target inner).
pub fn all() -> impl Iterator<Item = Cell> {
FormAxis::ALL.iter().copied().flat_map(|connective| {
pub fn all(targets: &[ShapeATarget]) -> impl Iterator<Item = Cell> + '_ {
FormAxis::ALL.iter().copied().flat_map(move |connective| {
BehaviorAxis::ALL.iter().copied().flat_map(move |behavior| {
ShapeATarget::ALL.iter().copied().map(move |target| Cell {
targets.iter().copied().map(move |target| Cell {
connective,
behavior,
target,
Expand All @@ -124,13 +133,13 @@ impl Cell {
}

/// Stable key for closure-ledger gap rows (`docs/r2-closure-ledger.md`):
/// `Form_Behavior_Target` using substrate axis labels.
pub fn ledger_key(self) -> String {
/// `Form_Behavior_Target` using substrate axis labels and LanguageSpec name.
pub fn ledger_key(self, dag: &Dag) -> String {
format!(
"{}_{}_{}",
self.connective.label(),
self.behavior.label(),
self.target.label()
self.target.label(dag)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub(crate) fn assert_closure_ledger_matches_l6_missing_emission_paths() {
let expected: HashSet<String> = report
.missing
.iter()
.map(|(cell, _)| cell.ledger_key())
.map(|(cell, _)| cell.ledger_key(&dag))
.collect();

assert!(
Expand Down
Loading
Loading