Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
0b2c48a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
67ab086
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
1967c54
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
c8457b0
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2d4393a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
810cd22
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
6660932
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
ac61819
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
0a9a815
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
7d77f0e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
c2f9373
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
e6ba893
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
d2969e5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
c1ab901
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
72f30a5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
cba2858
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
a12fdec
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
20f2fc7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
1b6d892
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 10, 2026
64a0502
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
d1ad805
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
3f4a380
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
dbeba7d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
66893b2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
e18744a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
9efe304
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
6ad7a49
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
a3ac01a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2f9659a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
66a9edc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
ee7bc33
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 10, 2026
f4e6fe3
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
145b54c
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
f224fbc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
1ed6352
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
db41622
Add kernel leaf mismatch receipt
Jun 10, 2026
416af83
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
a7c3261
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
5738d37
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
a5250a2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
52653a8
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
0b904d4
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
05110e0
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2c57610
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
a1660f2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
3f79c1b
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
debe2ed
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
f7a1e34
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
5822964
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
089971d
WIP: sync stage0 after binding-id lookup fixes
Jun 10, 2026
371b25d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
9e74655
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
70d8265
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
3919468
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
7fa6c7f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2befeca
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
db25256
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
52f57bb
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
04188fc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
97f0477
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
f277f0e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
b43cd6d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
c2c5ae7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
6934c5b
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
43c6d50
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
9e39a43
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
4870887
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
8379dcb
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
c0029b4
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
e393691
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
d33b19c
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
10b25e9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
d8ed831
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
4e34396
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
f7bc728
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
b0ec2f3
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
cf837e3
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
368ea2d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
7a757d2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
01e8110
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2e0c768
Regenerate stage0 for variant import collisions
Jun 10, 2026
54d7f56
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
44afbd2
Fix stage0 render target option arm
Jun 10, 2026
66be2c9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
91e9a23
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
1c3fa3d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
3c45190
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
185d638
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
f2ebff0
Revert "WIP: Fresh brand-identity binding_id implementation from #458…
Jun 10, 2026
f7f30ce
Revert "WIP: Fresh brand-identity binding_id implementation from #458…
Jun 10, 2026
5d82d4d
Revert "WIP: Fresh brand-identity binding_id implementation from #458…
Jun 10, 2026
d8daa25
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
fc43468
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
22213e7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
addd94f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
1cc5bda
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
d6f5377
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
9f05b24
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
b75e121
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
ab82697
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
307bcd9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
26f95c5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
4cf5a63
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
ef24c4b
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
ab21981
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
79a20e5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
3b5b7ea
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
e4ae6ef
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
2092ba8
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
9f7d4ed
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 10, 2026
04878af
fmt stage0 infer resolve
Jun 10, 2026
e3760e0
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 10, 2026
35200d8
clean structural carrier indentation
Jun 10, 2026
6aecc68
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
bf8601b
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
d0d8819
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
c4088e6
fix(v2): sync stage0 resolve_alias_target with fail-closed .dag autho…
Jun 11, 2026
7ad4640
fmt stage0 alias resolve
Jun 11, 2026
ca69148
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
ac205a1
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 11, 2026
e9a755e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
82f4eb1
WIP: remove affected-testgen debug probes
Jun 11, 2026
e76c273
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
ebcc29c
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
f3ceec6
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b78ea7b
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 11, 2026
f16eea9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
5c757cf
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
93d2f5c
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
6185f56
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
78a702e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
be9128b
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
7db02cb
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
7d5507d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
fb4ebf7
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 11, 2026
28c5033
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
96fb152
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b63dcc5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
aa51410
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
928425a
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
4698fa2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
1b81c15
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
995d2fc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
71960a6
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
816280e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
17ca329
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
89b3a81
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
e72a5ac
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
a44db57
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
e9860f0
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
2e55ac9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
2020f44
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
851361f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b23c3ee
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
0ab7fbc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
20232d2
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
890ab93
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
c1ddb51
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
ae5fc5f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
2320da7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
df1dba5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
4f733de
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
50dc2bf
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
4ad0091
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
be388b7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
4eebf9d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b0a0474
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
591dbf6
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
2df3d00
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b075768
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
9ab652e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
59194ea
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b5ee34d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b4f7057
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
bbbff58
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
cebb222
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
cd5b435
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
e912485
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
553072e
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
e6ed14f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
cf21192
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 11, 2026
9a4bbeb
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
f5a1fb9
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
7959fbc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
3f7a4d7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
6079d74
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
54e36d5
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b3d4dae
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
c73d48d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
c34460f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
e05c37c
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
b7b89c8
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
654bbf7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
32ea505
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
9a1bcc7
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
284e913
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
97df85f
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
58293ce
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
54ab531
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
494abf0
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
040a1fc
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
4dfe80d
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 2026
49db47a
Merge remote-tracking branch 'origin/main' into session/clever-bear-818
Jun 11, 2026
633fe63
WIP: Fresh brand-identity binding_id implementation from #4587: Bindi…
Jun 11, 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 dsl/extdeps/cloud/gcp/iam.dag
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module extdeps.cloud.gcp.iam

import extdeps.cloud.gcp.gcp { GcpServiceAccount, GcpProject }
import extdeps.cloud.gcp.errors { GcpErrorShape }
import std.types { HttpMethod, AuthScheme }
import std.types { HttpMethod, AuthScheme, Secret, ServiceAccountEmail, GcpProjectId, NonEmptyStr }

// -- Roles ---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion dsl/extdeps/cloud/gcp/sts.dag
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

module extdeps.cloud.gcp.sts

import std.types { Url, HttpMethod, AuthScheme }
import std.types { Url, HttpMethod, AuthScheme, Secret, NonEmptyStr }
import extdeps.cloud.gcp.errors { GcpErrorShape, GcpOAuth2ErrorShape }
import extdeps.github.errors { GitHubErrorShape }

Expand Down
38 changes: 35 additions & 3 deletions src/v2/00_core.dag
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,14 @@ type DeclaredFuncEnv {
// Node -- unified recursive structure
// =========================================================================

type BindingId {
value: Int
}

type Node {
name: String
ident: Int?
binding_id: BindingId?
span: SourceSpan
ident_span: SourceSpan?
children: List<Node>
Expand Down Expand Up @@ -350,6 +355,33 @@ fn node_name_span(n: Node) -> SourceSpan {
match n.ident_span { Present { value: s } => s Absent => n.span }
}

fn node_with_binding_id(n: Node, binding_id: BindingId) -> Node {
Node {
name: n.name, ident: n.ident, binding_id: Present { value: binding_id },
span: n.span, ident_span: n.ident_span, children: n.children,
connective: n.connective, params: n.params, inferred: n.inferred,
return_cardinality: n.return_cardinality, uses: n.uses,
body: n.body, transport: n.transport, properties: n.properties,
type_annotation: n.type_annotation, is_self_recursive: n.is_self_recursive,
has_non_tail_self_call: n.has_non_tail_self_call,
match_pattern: n.match_pattern, expr_data: n.expr_data
}
}

fn node_with_preserved_binding_id(identity: Node, structural: Node) -> Node {
Node {
name: structural.name, ident: structural.ident, binding_id: identity.binding_id,
span: structural.span, ident_span: structural.ident_span,
children: structural.children, connective: structural.connective, params: structural.params,
inferred: structural.inferred, return_cardinality: structural.return_cardinality,
uses: structural.uses, body: structural.body, transport: structural.transport,
properties: structural.properties, type_annotation: structural.type_annotation,
is_self_recursive: structural.is_self_recursive,
has_non_tail_self_call: structural.has_non_tail_self_call,
match_pattern: structural.match_pattern, expr_data: structural.expr_data
}
}

// Construct a Node carrying expression data (P5.11 dissolved form).
// Children are passed explicitly — ExprData is pure operator metadata.
fn make_expr_node(expr_data: ExprData, children: List<Node>, inferred: InferredNode?, span: SourceSpan) -> Node {
Expand Down Expand Up @@ -1156,7 +1188,7 @@ fn transport_env(t: Node, source_indices: Map<String, NewlineIndex>) -> List<Nod

fn map_children(node: Node, transform: fn(Node) -> Node) -> Node {
Node {
name: node.name, ident: node.ident, span: node.span, ident_span: node.ident_span,
name: node.name, ident: node.ident, binding_id: node.binding_id, span: node.span, ident_span: node.ident_span,
children: node.children |> map(child => transform(child)),
connective: node.connective,
params: node.params, inferred: node.inferred,
Expand Down Expand Up @@ -1527,9 +1559,9 @@ fn pre_intern_tokens(tokens: List<Token>, table: InternTable) -> InternTable {
}

fn with_optional_cardinality(n: Node) -> Node {
Node { name: n.name, ident: n.ident, span: n.span, ident_span: n.ident_span, children: n.children, connective: n.connective, params: n.params, inferred: n.inferred, return_cardinality: CardOptional, uses: n.uses, body: n.body, transport: n.transport, properties: n.properties, type_annotation: n.type_annotation, is_self_recursive: n.is_self_recursive, has_non_tail_self_call: n.has_non_tail_self_call, match_pattern: n.match_pattern, expr_data: n.expr_data }
Node { name: n.name, ident: n.ident, binding_id: n.binding_id, span: n.span, ident_span: n.ident_span, children: n.children, connective: n.connective, params: n.params, inferred: n.inferred, return_cardinality: CardOptional, uses: n.uses, body: n.body, transport: n.transport, properties: n.properties, type_annotation: n.type_annotation, is_self_recursive: n.is_self_recursive, has_non_tail_self_call: n.has_non_tail_self_call, match_pattern: n.match_pattern, expr_data: n.expr_data }
}

fn with_required_cardinality(n: Node) -> Node {
Node { name: n.name, ident: n.ident, span: n.span, ident_span: n.ident_span, children: n.children, connective: n.connective, params: n.params, inferred: n.inferred, return_cardinality: Required, uses: n.uses, body: n.body, transport: n.transport, properties: n.properties, type_annotation: n.type_annotation, is_self_recursive: n.is_self_recursive, has_non_tail_self_call: n.has_non_tail_self_call, match_pattern: n.match_pattern, expr_data: n.expr_data }
Node { name: n.name, ident: n.ident, binding_id: n.binding_id, span: n.span, ident_span: n.ident_span, children: n.children, connective: n.connective, params: n.params, inferred: n.inferred, return_cardinality: Required, uses: n.uses, body: n.body, transport: n.transport, properties: n.properties, type_annotation: n.type_annotation, is_self_recursive: n.is_self_recursive, has_non_tail_self_call: n.has_non_tail_self_call, match_pattern: n.match_pattern, expr_data: n.expr_data }
}
2 changes: 1 addition & 1 deletion src/v2/02_parse.dag
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import v2.std.core {
ShStrBegin, ShStrMid, ShStrEnd,
ShNewline, ShEof, ShUnknown,
SourceSpan, make_span,
ErrorNode, make_error_node, ParseError,
ErrorNode, make_error_node, ParseError, InternalError,
with_required_cardinality,
error_type, is_compiler_error,
node_name_span, no_span,
Expand Down
183 changes: 178 additions & 5 deletions src/v2/04_env.dag
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
// v2 type environment -- structural type bindings and lookup.
module v2.compiler.infer_env

import v2.std.core { Node, NewlineIndex, InternTable, empty_intern_table, merge_intern_tables, intern, intern_find, intern_str, source_text_at, authored_name_at }
import v2.std.core { BindingId, Node, SourceSpan, NewlineIndex, InternTable, empty_intern_table, merge_intern_tables, intern, intern_find, intern_str, source_text_at, authored_name_at, error_type }
import std.induction { InductiveField, RecursionShape, DirectRecursion, ListRecursion, OptionalRecursion, SubValueRelation, SubValueUnknown, PreservedValue }

// =========================================================================
// Types
// =========================================================================

// Three binding maps coexist during phase-1 migration: `bindings` is the
// legacy intern-key index for unresolved/name-only lookup; `decl_registry`
// is the authority stamp (BindingId → declaration metadata + binding_key);
// `carrier_bindings` holds imported/hidden structural carriers keyed by
// BindingId when no local decl_registry row exists. `lookup_type_for`
// consults decl_registry first, verifies binding_id on the resolved node,
// and only accepts the legacy intern row when it carries the same BindingId.
// If that intern row is shadowed by another visible same-name import,
// carrier_bindings may still supply the exact BindingId-keyed hidden row;
// without that exact carrier row, lookup returns a compiler error.
// 🟡 tracked scaffold — owner: Mgr-SOUNDNESS; lane: #4587 BindingId phase-2.
// Dissolve when declaration registration stamps every local/imported transparent
// alias through one BindingId-keyed declaration table before lookup: fold
// carrier_bindings into decl_registry-backed rows and demote `bindings` to the
// unresolved pre-registration spelling index only. Forbidden steady state:
// payload-owning parallel maps or spelling fallback for BindingId-stamped nodes.
type TypeEnv {
bindings: Map<Int, TypeBinding>
carrier_bindings: Map<BindingId, TypeBinding>
decl_registry: Map<BindingId, TypeDeclBinding>
duplicate_decl_ids: List<BindingId>
recursive_types: List<Int>
recursive_type_set: Map<Int, Bool>
inductive_fields: Map<String, List<InductiveField>>
Expand All @@ -23,6 +42,71 @@ type TypeBinding {
provenance: SubValueRelation
}

type TypeDeclBinding {
binding_id: BindingId
authority: TypeDeclAuthority
binding_key: Int
decl_arity: Int
name: String
provenance: SubValueRelation
}

type TypeDeclAuthority {
module_name: String
decl_name: String
decl_span: SourceSpan
}

type BindingIdAllocator {
next_id: Int
}

type BindingIdAllocResult {
binding_id: BindingId
allocator: BindingIdAllocator
}

fn empty_binding_id_allocator() -> BindingIdAllocator {
BindingIdAllocator { next_id: 1 }
}

fn alloc_binding_id(allocator: BindingIdAllocator) -> BindingIdAllocResult {
BindingIdAllocResult {
binding_id: BindingId { value: allocator.next_id },
allocator: BindingIdAllocator { next_id: allocator.next_id + 1 }
}
}

type DeclRegistryMergeState {
decl_registry: Map<BindingId, TypeDeclBinding>
duplicate_decl_ids: List<BindingId>
}

fn merge_decl_registry_state(state: DeclRegistryMergeState, incoming: Map<BindingId, TypeDeclBinding>) -> DeclRegistryMergeState {
fold(map_keys(incoming), init: state, f: (acc, binding_id) =>
match map_get(incoming, binding_id) {
Present { value: binding } =>
match map_get(acc.decl_registry, binding_id) {
Present { value: existing } =>
if existing.authority == binding.authority {
acc
} else {
DeclRegistryMergeState {
decl_registry: acc.decl_registry,
duplicate_decl_ids: list_push(acc.duplicate_decl_ids, binding_id)
}
}
Absent =>
DeclRegistryMergeState {
decl_registry: map_insert(acc.decl_registry, binding_id, binding),
duplicate_decl_ids: acc.duplicate_decl_ids
}
}
Absent => acc
}
)
}

// =========================================================================
// Environment operations
// =========================================================================
Expand Down Expand Up @@ -55,14 +139,95 @@ fn lookup_type_by_name(env: TypeEnv, name: String) -> Node? {
}
}

fn lookup_decl_arity_for(env: TypeEnv, node: Node) -> Int? {
match node.binding_id {
Present { value: binding_id } =>
match map_get(env.decl_registry, binding_id) {
Present { value: decl } => Present { value: decl.decl_arity }
Absent => none
}
Absent =>
let node_name = authored_name(env: env, node: node)
let by_ident = match node.ident {
Present { value: id } =>
fold(env.decl_registry |> map_values, init: none, f: (acc, decl) =>
match acc {
Present { value: _ } => acc
Absent => if decl.binding_key == id { Present { value: decl.decl_arity } } else { none }
}
)
Absent => none
}
match by_ident {
Present { value: _ } => by_ident
Absent =>
fold(env.decl_registry |> map_values, init: none, f: (acc, decl) =>
match acc {
Present { value: _ } => acc
Absent => if decl.name == node_name { Present { value: decl.decl_arity } } else { none }
}
)
}
}
}

fn lookup_carrier_type_for(env: TypeEnv, node: Node) -> Node? {
match node.binding_id {
Present { value: binding_id } =>
match map_get(env.carrier_bindings, binding_id) {
Present { value: binding } => Present { value: binding.resolved }
Absent => none
}
Absent => none
}
}

fn node_has_binding_id(n: Node, binding_id: BindingId) -> Bool {
match n.binding_id {
Present { value: actual } => actual == binding_id
Absent => false
}
}

fn lookup_binding_id_type_for(env: TypeEnv, node: Node) -> Node? {
match node.binding_id {
Present { value: binding_id } =>
match map_get(env.decl_registry, binding_id) {
Present { value: decl } =>
match lookup_type(env: env, ident: decl.binding_key) {
Present { value: resolved } =>
if node_has_binding_id(n: resolved, binding_id: binding_id) {
Present { value: resolved }
} else {
match lookup_carrier_type_for(env: env, node: node) {
Present { value: carrier } => Present { value: carrier }
Absent => Present { value: error_type }
}
}
Absent => lookup_carrier_type_for(env: env, node: node)
}
Absent => lookup_carrier_type_for(env: env, node: node)
}
Absent => none
}
}

fn authored_name(env: TypeEnv, node: Node) -> String {
authored_name_at(source_indices: env.source_indices, node: node)
}

fn lookup_type_for(env: TypeEnv, node: Node) -> Node? {
match node.ident {
Present { value: id } => lookup_type(env: env, ident: id)
Absent => lookup_type_by_name(env: env, name: authored_name(env: env, node: node))
match node.binding_id {
Present { value: _ } => lookup_binding_id_type_for(env: env, node: node)
Absent =>
match node.ident {
Present { value: id } =>
match lookup_type(env: env, ident: id) {
Present { value: resolved } => Present { value: resolved }
Absent => lookup_type_by_name(env: env, name: authored_name(env: env, node: node))
}
Absent => lookup_type_by_name(env: env, name: authored_name(env: env, node: node))
}
}
}

Expand Down Expand Up @@ -127,6 +292,14 @@ fn inductive_fields_list_to_map(fields: List<InductiveField>) -> Map<String, Lis

fn merge_envs(envs: List<TypeEnv>) -> TypeEnv {
let merged_bindings = fold(envs, init: empty_map(), f: (acc, env) => map_merge(acc, env.bindings))
let merged_carrier_bindings = fold(envs, init: empty_map(), f: (acc, env) => map_merge(acc, env.carrier_bindings))
let merged_decl_state = fold(envs, init: DeclRegistryMergeState { decl_registry: empty_map(), duplicate_decl_ids: [] }, f: (acc, env) =>
let with_prior_duplicates = DeclRegistryMergeState {
decl_registry: acc.decl_registry,
duplicate_decl_ids: concat(acc.duplicate_decl_ids, env.duplicate_decl_ids)
}
merge_decl_registry_state(state: with_prior_duplicates, incoming: env.decl_registry)
)
let merged_recursive = fold(envs, init: [], f: (acc, env) => concat(acc, env.recursive_types))
let merged_recursive_set = fold(envs, init: empty_map(), f: (acc, env) => map_merge(acc, env.recursive_type_set))
let merged_inductive_fields = fold(envs, init: empty_map(), f: (acc, env) => merge_inductive_fields(left: acc, right: env.inductive_fields))
Expand All @@ -135,5 +308,5 @@ fn merge_envs(envs: List<TypeEnv>) -> TypeEnv {
Present { value: first_env } => first_env.intern_table
Absent => empty_intern_table()
}
TypeEnv { bindings: merged_bindings, recursive_types: merged_recursive, recursive_type_set: merged_recursive_set, inductive_fields: merged_inductive_fields, source_indices: merged_source_indices, intern_table: merged_intern_table }
TypeEnv { bindings: merged_bindings, carrier_bindings: merged_carrier_bindings, decl_registry: merged_decl_state.decl_registry, duplicate_decl_ids: merged_decl_state.duplicate_decl_ids, recursive_types: merged_recursive, recursive_type_set: merged_recursive_set, inductive_fields: merged_inductive_fields, source_indices: merged_source_indices, intern_table: merged_intern_table }
}
Loading
Loading