Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
92770a8
WIP: silent-hawk-421
briansrls May 2, 2026
4cb92aa
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
16378c7
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
c52ad76
test(v3): refresh parse corpus manifest
briansrls May 2, 2026
d03cda4
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
8154d4e
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
80462fe
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
a4859c7
docs(r3): name string-family scaffold dissolution trigger
briansrls May 2, 2026
6604bea
test(v3): refresh parse corpus manifest after scaffold note update
briansrls May 2, 2026
a42268d
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
416e880
test(v3): refresh bootstrap snapshots
briansrls May 2, 2026
4603ad9
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
be780d7
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
cdd12f1
Merge origin/main into r3-string-family-diagnostic-ordering-carrier
briansrls May 2, 2026
a30bcc8
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 2, 2026
b52b71c
WIP: silent-hawk-421
briansrls May 2, 2026
e820eec
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
7f1f2c3
WIP: silent-hawk-421
briansrls May 3, 2026
d987e69
fix(v3): refresh induction parse manifest hash
briansrls May 3, 2026
e8c31ff
WIP: silent-hawk-421
briansrls May 3, 2026
b6a0e38
WIP: silent-hawk-421
briansrls May 3, 2026
acbae49
WIP: silent-hawk-421
briansrls May 3, 2026
53fc01d
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
80f7a54
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
70cf384
WIP: silent-hawk-421
briansrls May 3, 2026
8df2088
WIP: silent-hawk-421
briansrls May 3, 2026
e4f5491
Merge origin/main into r3-string-family-diagnostic-ordering-carrier
briansrls May 3, 2026
ea68987
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
8bb25a2
WIP: silent-hawk-421
briansrls May 3, 2026
7d42f65
WIP: silent-hawk-421
briansrls May 3, 2026
8ebfd73
WIP: silent-hawk-421
briansrls May 3, 2026
c1513f9
Merge origin/main into r3-string-family-diagnostic-ordering-carrier
briansrls May 3, 2026
53922cd
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
98854e7
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
68411ca
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
8b033f0
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
836ea21
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
c8e17d6
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
f7e8492
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
2e0a67a
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
d880040
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
e23c83e
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
9efe94b
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
c2577cc
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
f0de364
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
19f555f
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
6485031
WIP: silent-hawk-421
briansrls May 3, 2026
6cfd27f
WIP: silent-hawk-421
briansrls May 3, 2026
d195046
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
f69ef93
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
d818946
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
cd123cb
fix(v3): isolate invalid fn return result ports
briansrls May 3, 2026
34c893e
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
d651e55
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
e8a0f21
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
99286ec
WIP: silent-hawk-421
briansrls May 3, 2026
946416f
test(v3): expect distinct invalid return carrier
briansrls May 3, 2026
4cfbdd7
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
b8d217a
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
f091258
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 3, 2026
8304493
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
1c65c6c
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
3772323
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
c313b1f
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
a7b15d0
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
1a969a7
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
beb50fb
WIP: silent-hawk-421
briansrls May 4, 2026
214a712
test(v3): derive invalid bind target in bootstrap gate
briansrls May 4, 2026
dc2531f
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
2057572
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
ccc2b3e
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
7237557
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
ecdf6c8
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
98a2da3
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
c42c281
WIP: silent-hawk-421
briansrls May 4, 2026
ade3969
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
96a53ce
WIP: silent-hawk-421
briansrls May 4, 2026
cde94cc
chore: apply cargo fmt
briansrls May 4, 2026
eea8f9c
WIP: silent-hawk-421
briansrls May 4, 2026
e26df45
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
1650d39
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
f49d978
WIP: silent-hawk-421
briansrls May 4, 2026
3353b31
regen bootstrap for collection ops contracts
briansrls May 4, 2026
bfcb620
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
59a3e96
WIP: silent-hawk-421
briansrls May 4, 2026
6ac3abb
WIP: silent-hawk-421
briansrls May 4, 2026
57b780c
classify collection ops emit template projection
briansrls May 4, 2026
9358fb0
WIP: silent-hawk-421
briansrls May 4, 2026
f9e8b49
regen bootstrap after main merge
briansrls May 4, 2026
c23ca17
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
0a87647
WIP: silent-hawk-421
briansrls May 4, 2026
2c1aee6
drop unused Rust filter item helper
briansrls May 4, 2026
d9211f8
require contract refs in method template projection
briansrls May 4, 2026
168f420
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
7eb1b4d
WIP: silent-hawk-421
briansrls May 4, 2026
46c84ca
WIP: silent-hawk-421
briansrls May 4, 2026
3fdb299
Fix Rust filter contract ownership
briansrls May 4, 2026
a18c16b
Merge remote-tracking branch 'origin/r3-string-family-diagnostic-orde…
briansrls May 4, 2026
c5cbc68
Fix method template row test diagnostics
briansrls May 4, 2026
022f63a
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
3f78994
Raise self-host ratchet timeout
briansrls May 4, 2026
79aa24f
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
4391748
Borrow Rust filter contract receiver
briansrls May 4, 2026
49c61de
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
ba3106f
WIP: silent-hawk-421
briansrls May 4, 2026
c22075a
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
bacf5e1
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 2026
95126a4
Merge remote-tracking branch 'origin/main' into r3-string-family-diag…
briansrls May 4, 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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ jobs:
self_host_ratchet:
if: github.event.pull_request.draft != true
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
timeout-minutes: 20
timeout-minutes: 30
needs: [v3]
continue-on-error: true
steps:
Expand Down
2 changes: 1 addition & 1 deletion docs/audit/gunb-ai-workflowgen-action-wrapper-port.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Audit: gunb.ai workflowgen — action-wrapper & constraint port survey

**Dispatch:** T-Workflow-As-Data prep (survey / catalog only).
**Dispatch:** T-Workflow-As-Data prep (survey / catalog only).
**Scope:** Read-only inspection of `gunb-ai/gunb.ai` — especially `tools/ci/workflowgen/actions/`, `tools/ci/workflowgen/constraints/`, and how generated workflows consume wrappers. **No** workflow YAML edits, **no** substrate carriers, **no** CI timing / job-DAG design beyond noting wrapper dependencies.

**Surveyed revision:** shallow clone `gunb-ai/gunb.ai` @ `085febfb7279215039c6ce9fd15659726d7c1e3e` (oneline: `085febf Fix Docker push to GitHub Container Registry (#918)`).
Expand Down
8,284 changes: 4,252 additions & 4,032 deletions src/v3/compiler/src/bootstrap_generated.rs

Large diffs are not rendered by default.

7,746 changes: 3,983 additions & 3,763 deletions src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions src/v3/compiler/src/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2386,6 +2386,14 @@ pub(crate) struct EmitAnchorCache {
pub fold_method: Option<DeclarationId>,
/// `std.list.is_empty_method` method declaration.
pub is_empty_method: Option<DeclarationId>,
/// `std.list.filter_method` method declaration.
pub filter_method: Option<DeclarationId>,
/// `std.list.flat_map_method` method declaration.
pub flat_map_method: Option<DeclarationId>,
/// `std.list.any_method` method declaration.
pub any_method: Option<DeclarationId>,
/// `std.list.all_method` method declaration.
pub all_method: Option<DeclarationId>,
}

#[derive(Debug, Default, Clone)]
Expand Down Expand Up @@ -3248,6 +3256,26 @@ impl Dag {
self.emit_anchors.is_empty_method
}

/// `filter_method` method declaration.
pub(crate) fn filter_method_decl(&self) -> Option<DeclarationId> {
self.emit_anchors.filter_method
}

/// `flat_map_method` method declaration.
pub(crate) fn flat_map_method_decl(&self) -> Option<DeclarationId> {
self.emit_anchors.flat_map_method
}

/// `any_method` method declaration.
pub(crate) fn any_method_decl(&self) -> Option<DeclarationId> {
self.emit_anchors.any_method
}

/// `all_method` method declaration.
pub(crate) fn all_method_decl(&self) -> Option<DeclarationId> {
self.emit_anchors.all_method
}

/// Typed accessor for the cached `PatternBindingRule` variant
/// handles resolved from `src/v3/std/clean_emission.dag` at
/// bootstrap end. Consumed by per-target emitters when
Expand Down Expand Up @@ -3896,6 +3924,11 @@ impl Dag {
self.emit_anchors.fold_method = self.declaration_by_name("fold_method").map(|d| d.id);
self.emit_anchors.is_empty_method =
self.declaration_by_name("is_empty_method").map(|d| d.id);
self.emit_anchors.filter_method = self.declaration_by_name("filter_method").map(|d| d.id);
self.emit_anchors.flat_map_method =
self.declaration_by_name("flat_map_method").map(|d| d.id);
self.emit_anchors.any_method = self.declaration_by_name("any_method").map(|d| d.id);
self.emit_anchors.all_method = self.declaration_by_name("all_method").map(|d| d.id);

// `PatternBindingRule` variant resolution. Walks the
// `std/clean_emission.dag` declaration's `Disj` variants
Expand Down
130 changes: 117 additions & 13 deletions src/v3/compiler/src/emit/collection_ops_method_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@
//! declaration must be a `MethodTemplateContract` data binding whose
//! `dag_method.decl` resolves to the expected registry `*_method` row.

use crate::dag::{Dag, DeclarationId, FieldValue, TypeConnective, ValueBody};
use super::method_emit_template_variant_label;
use crate::dag::{Dag, DeclarationId, FieldValue, LiteralBits, TypeConnective, ValueBody};

/// 🟢 TERMINAL at the CollectionOps contract-consumer projection boundary.
/// This mirrors the substrate `MethodEmitTemplate` coproduct exactly so Rust
/// CollectionOps can choose the HO inline rendering without flattening or
/// copying template text into a third authority.
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum MethodTemplateContractEmitTemplate {
SingleTemplate(String),
HigherOrderTemplates {
inline_template: String,
fn_ref_template: String,
},
}

/// Fail closed unless `contract_decl` is a `MethodTemplateContract` instance
/// whose `dag_method.decl` resolves to `expected_method_decl`.
Expand All @@ -13,6 +27,33 @@ pub(crate) fn require_method_template_contract_dag_method(
collection_ops_field: &'static str,
expected_method_decl: DeclarationId,
) -> Result<(), &'static str> {
let fields = method_template_contract_fields(dag, contract_decl)?;
require_method_template_contract_fields_dag_method(
fields,
collection_ops_field,
expected_method_decl,
)
}

pub(crate) fn method_template_contract_decl_emit_template(
dag: &Dag,
contract_decl: DeclarationId,
collection_ops_field: &'static str,
expected_method_decl: DeclarationId,
) -> Result<MethodTemplateContractEmitTemplate, &'static str> {
let fields = method_template_contract_fields(dag, contract_decl)?;
require_method_template_contract_fields_dag_method(
fields,
collection_ops_field,
expected_method_decl,
)?;
method_template_contract_fields_emit_template(dag, fields)
}

fn method_template_contract_fields(
dag: &Dag,
contract_decl: DeclarationId,
) -> Result<&[(String, FieldValue)], &'static str> {
let mtc_type_id = dag
.method_template_contract_decl()
.ok_or("internal: MethodTemplateContract type missing from dag")?;
Expand Down Expand Up @@ -43,7 +84,37 @@ pub(crate) fn require_method_template_contract_dag_method(
);
}
};
Ok(fields)
}

fn require_method_template_contract_fields_dag_method(
fields: &[(String, FieldValue)],
collection_ops_field: &'static str,
expected_method_decl: DeclarationId,
) -> Result<(), &'static str> {
let method_id = method_template_contract_fields_dag_method(fields)?;
if method_id != expected_method_decl {
return Err(match collection_ops_field {
"fold_contract" => "CollectionOps.fold_contract must target fold_method",
"concat_contract" => "CollectionOps.concat_contract must target concat_method",
"length_contract" => "CollectionOps.length_contract must target length_method",
"filter_contract" => "CollectionOps.filter_contract must target filter_method",
"flat_map_contract" => "CollectionOps.flat_map_contract must target flat_map_method",
"any_contract" => "CollectionOps.any_contract must target any_method",
"all_contract" => "CollectionOps.all_contract must target all_method",
"is_empty_contract" => {
"CollectionOps.is_empty_contract must target is_empty_method (FreeMonoid<T>.is_empty -> Bool)"
}
_ => "CollectionOps contract dag_method does not match expected registry method",
});
}

Ok(())
}

fn method_template_contract_fields_dag_method(
fields: &[(String, FieldValue)],
) -> Result<DeclarationId, &'static str> {
let dag_method = fields
.iter()
.find(|(l, _)| l == "dag_method")
Expand All @@ -62,17 +133,50 @@ pub(crate) fn require_method_template_contract_dag_method(
);
}
};
if method_id != expected_method_decl {
return Err(match collection_ops_field {
"fold_contract" => "CollectionOps.fold_contract must target fold_method",
"concat_contract" => "CollectionOps.concat_contract must target concat_method",
"length_contract" => "CollectionOps.length_contract must target length_method",
"is_empty_contract" => {
"CollectionOps.is_empty_contract must target is_empty_method (FreeMonoid<T>.is_empty -> Bool)"
}
_ => "CollectionOps contract dag_method does not match expected registry method",
});
}
Ok(method_id)
}

Ok(())
fn method_template_contract_fields_emit_template(
dag: &Dag,
fields: &[(String, FieldValue)],
) -> Result<MethodTemplateContractEmitTemplate, &'static str> {
let emit_value = fields
.iter()
.find(|(label, _)| label == "emit_template")
.map(|(_, v)| v)
.ok_or("MethodTemplateContract missing emit_template field")?;
let FieldValue::Variant {
constructor,
payload,
} = emit_value
else {
return Err("MethodTemplateContract.emit_template must be a sum variant");
};
let ctor_name = method_emit_template_variant_label(dag, *constructor).ok_or(
"MethodTemplateContract.emit_template variant not found under MethodEmitTemplate disj",
)?;
match ctor_name {
"SingleTemplate" => {
let [FieldValue::Literal(LiteralBits::String(template))] = payload.as_slice() else {
return Err("SingleTemplate must carry exactly one string template payload");
};
Ok(MethodTemplateContractEmitTemplate::SingleTemplate(
template.replace("%Q", "\""),
))
}
"HigherOrderTemplates" => {
let [FieldValue::Literal(LiteralBits::String(inline_template)), FieldValue::Literal(LiteralBits::String(fn_ref_template))] =
payload.as_slice()
else {
return Err(
"HigherOrderTemplates must carry inline_template and fn_ref_template strings",
);
};
Ok(MethodTemplateContractEmitTemplate::HigherOrderTemplates {
inline_template: inline_template.replace("%Q", "\""),
fn_ref_template: fn_ref_template.replace("%Q", "\""),
})
}
_ => Err("MethodTemplateContract.emit_template uses an unknown MethodEmitTemplate variant"),
}
}
Loading
Loading