Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
cf0ea96
v2: carry the authored test marker on a DESIGN 4c channel keyed by oc…
Sep 18, 2026
ff3a17b
WIP v2: refuse references to test code at name resolution
Sep 18, 2026
da171d2
Measure the 4c equality at the lowering interface with one parse, ins…
Sep 18, 2026
7fea661
Drop the unconsumed occurrence key and empty-channel constructor; cou…
Sep 18, 2026
7e48502
WIP wall claims: expression-bodied fixtures, one language model per c…
Sep 18, 2026
a42a3cc
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 18, 2026
e535599
Wall claims over supplied normalized roots, with one inhabitance clai…
Sep 18, 2026
c8dc17d
Establish the dag canonical-symbol set once instead of rewalking the …
Sep 18, 2026
150eb33
Prove the carried-symbol map matches the node-fold oracle and that a …
Sep 18, 2026
da08ee6
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
eb3c052
Collapse the dag-local lex token-class fold into std and drop unused …
Sep 18, 2026
e5e9c5b
Wall inhabitance over a one-member module
Sep 18, 2026
b8f8cbe
Build the canonical-symbol map in resolution context, not in dag_lang…
Sep 18, 2026
bf46be5
Enroll a tokenize/parse probe that never enters resolution.
Sep 18, 2026
8bfb269
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
6a938b3
Share the wall's real front-end pass warm; split inhabitance into roo…
Sep 18, 2026
1c277dc
Serve body_lowering_normalized_module warm and release the arrow-root…
Sep 18, 2026
739644c
Derive resolve canonical symbols from the language model that was pas…
Sep 18, 2026
a018772
Supply the empty marker channel in #11599's one-member probe fixture
Sep 18, 2026
23daa3e
Derive the grammar symbol map from grammar_to_node and restore linear…
Sep 18, 2026
e96639c
Carry canonical symbols on the language model resolve actually uses.
Sep 18, 2026
a81faad
Delete unused lex/canonical wrappers left by the resolve cutover.
Sep 18, 2026
c1e81e6
Warm-share the portable dag canonical-symbol map across floor claims.
Sep 18, 2026
435268d
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
5b771c1
Fix the merged warm roster's separator
Sep 18, 2026
8024c04
Wall: item-scoped rule, the qualified-path door checked, precedence a…
Sep 18, 2026
9ef6496
lookup_chain reports which scope answered; drop the second walk
Sep 18, 2026
5d2eebe
Use grammar_symbol_list_put for dag canonical sugar and binding symbols.
Sep 18, 2026
9cabd86
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
549e7a5
The marker borrows the 4c channel's shape, not its non-interference r…
Sep 18, 2026
c48d35d
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 18, 2026
1c53f1c
Establish the dag canonical-symbol set once instead of rewalking the …
Sep 18, 2026
7a9b55f
Prove the carried-symbol map matches the node-fold oracle and that a …
Sep 18, 2026
fed71ba
Collapse the dag-local lex token-class fold into std and drop unused …
Sep 18, 2026
d6a4d71
normalized_tree: name the marker channel by its home, not as a 4c ann…
Sep 18, 2026
99af043
Build the canonical-symbol map in resolution context, not in dag_lang…
Sep 18, 2026
9949a1a
Enroll a tokenize/parse probe that never enters resolution.
Sep 18, 2026
abc03c9
Derive resolve canonical symbols from the language model that was pas…
Sep 18, 2026
1790372
Merge remote-tracking branch 'origin/main' into v2-test-ref-refusal
Sep 18, 2026
aae97d4
Derive the grammar symbol map from grammar_to_node and restore linear…
Sep 18, 2026
a5de5ce
Carry canonical symbols on the language model resolve actually uses.
Sep 18, 2026
4c83478
Delete unused lex/canonical wrappers left by the resolve cutover.
Sep 18, 2026
3e5da21
Warm-share the portable dag canonical-symbol map across floor claims.
Sep 18, 2026
4bbf159
Use grammar_symbol_list_put for dag canonical sugar and binding symbols.
Sep 18, 2026
38e5b59
Stop copying canonical_symbols onto ResolutionContext.
Sep 18, 2026
f14e9b6
Make grammar membership a lookup of the carried-symbol map.
Sep 18, 2026
c0c73a1
Consume v2.std.algebra length and contains; name both producers of te…
Sep 18, 2026
428d061
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 18, 2026
56fa942
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
8881a51
Take #11599's grammar.dag as-is: the rebased merge had doubled its ad…
Sep 18, 2026
9530e80
Name all three producers of test-ness, give each frontier a trigger, …
Sep 18, 2026
6557746
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 18, 2026
c7cd02b
Establish the dag canonical-symbol set once instead of rewalking the …
Sep 18, 2026
d82a2ce
Prove the carried-symbol map matches the node-fold oracle and that a …
Sep 18, 2026
9b39e99
Collapse the dag-local lex token-class fold into std and drop unused …
Sep 18, 2026
da428b5
Build the canonical-symbol map in resolution context, not in dag_lang…
Sep 18, 2026
9d920cf
Enroll a tokenize/parse probe that never enters resolution.
Sep 18, 2026
d3bd26c
Derive resolve canonical symbols from the language model that was pas…
Sep 18, 2026
e3facc8
Derive the grammar symbol map from grammar_to_node and restore linear…
Sep 18, 2026
42892e5
Carry canonical symbols on the language model resolve actually uses.
Sep 18, 2026
166b553
Delete unused lex/canonical wrappers left by the resolve cutover.
Sep 18, 2026
0ddeb3b
Warm-share the portable dag canonical-symbol map across floor claims.
Sep 18, 2026
031983e
Use grammar_symbol_list_put for dag canonical sugar and binding symbols.
Sep 18, 2026
1a77ee3
Stop copying canonical_symbols onto ResolutionContext.
Sep 18, 2026
eaf8876
Make grammar membership a lookup of the carried-symbol map.
Sep 18, 2026
5584abc
Supply the wall's Namespace fields in the weather float-literal probe…
Sep 18, 2026
0b2c356
Merge remote-tracking branch 'origin/main' into v2-test-ref-refusal
Sep 18, 2026
506bebc
Merge remote-tracking branch 'origin/session/snappy-moth-388' into v2…
Sep 18, 2026
afdcbb8
Delete realization_attempt's line-rewriting marker capture: its disso…
Sep 18, 2026
a354783
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 18, 2026
2e8369e
Wall: a red and a control for the imported-binding door
Sep 18, 2026
e4d2b3b
Merge remote-tracking branch 'origin/main' into v2-test-ref-refusal
Sep 18, 2026
cbc295b
Adopt #11582's qualified_head_bound_on_chain onto lookup_chain's Scop…
Sep 19, 2026
8b9f6bb
Merge remote-tracking branch 'origin/main' into session/snappy-koi-46
Sep 19, 2026
0bcb53e
Serve the projection control's parse warm: it measured just over the …
Sep 19, 2026
2ac90bc
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 19, 2026
9f390cb
floor_naming_hygiene: retract the stale grammar obstacle and point th…
Sep 19, 2026
0a52ba5
Merge remote-tracking branch 'origin/session/snappy-koi-46' into v2-t…
Sep 19, 2026
c755688
Merge origin/main into v2-test-ref-refusal
Sep 19, 2026
c0c8993
Drop the unread ResolutionContext.canonical_symbols copy and repair t…
Sep 19, 2026
d20ad10
Merge origin/main into v2-test-ref-refusal after #11573 landed the ca…
Sep 20, 2026
619977b
Say which doors reach resolve_atom_bound and why the qualified door r…
Sep 20, 2026
cfd6c81
Merge remote-tracking branch 'origin/main' into v2-test-ref-refusal
Sep 20, 2026
a1709bb
Merge remote-tracking branch 'origin/main' into v2-test-ref-refusal
Sep 20, 2026
dfb9b9b
Wall: measure the import-shadow case review 69014 named, and record t…
Sep 20, 2026
973115b
Wall fixtures: the grafted module body carries its producer marker first
Sep 20, 2026
2f91f3b
Wall pairing claim: the inhabitance source covers every fixture builder
Sep 20, 2026
bf484ea
Merge origin/main into v2-test-ref-refusal
Sep 20, 2026
d3f4dad
Record the census that makes the shadow-lookup refusal sound: nothing…
Sep 20, 2026
4f18f08
Delete the last live test-fn reference the wall refuses, and its ledg…
Sep 20, 2026
9cc054b
Delete the three unmeasured warm rows, and join the qualified fixture…
Sep 20, 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
4 changes: 1 addition & 3 deletions src/v1/compile.dag
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ fn test_reference_debt() -> List<TestReferenceDebtRow> {
test_reference_row(module_name: "test.claim.spark.serving_arm_launch_witness_test", referrer: "w_all_serving_arm_launch_claims_hold", target: "test.claim.spark.serving_arm_launch_witness_test.w_every_rank_names_this_fleets_leg_and_hca", occurrences: 1),
test_reference_row(module_name: "test.claim.spark.serving_arm_launch_witness_test", referrer: "w_all_serving_arm_launch_claims_hold", target: "test.claim.spark.serving_arm_launch_witness_test.w_the_engine_argv_states_the_profiles_batching_bounds", occurrences: 1),
test_reference_row(module_name: "test.claim.spark.serving_arm_launch_witness_test", referrer: "w_all_serving_arm_launch_claims_hold", target: "test.claim.spark.serving_arm_launch_witness_test.w_the_group_b_arm_plans_exactly_four_ranks", occurrences: 1),
test_reference_row(module_name: "test.claim.spark.serving_arm_launch_witness_test", referrer: "w_all_serving_arm_launch_claims_hold", target: "test.claim.spark.serving_arm_launch_witness_test.w_the_utilisation_argv_is_the_profiles_value_at_full_precision", occurrences: 1),
test_reference_row(module_name: "v2.test.manual.cross_language_add_python_to_typescript", referrer: "<import>", target: "v2.test.manual.typescript_effect_io_emit.ts_effect_io_emit_holds", occurrences: 1),
test_reference_row(module_name: "v2.test.manual.cross_language_add_python_to_typescript", referrer: "cross_language_add_python_to_typescript_chain_status_holds", target: "v2.test.manual.typescript_effect_io_emit.ts_effect_io_emit_holds", occurrences: 1)
test_reference_row(module_name: "test.claim.spark.serving_arm_launch_witness_test", referrer: "w_all_serving_arm_launch_claims_hold", target: "test.claim.spark.serving_arm_launch_witness_test.w_the_utilisation_argv_is_the_profiles_value_at_full_precision", occurrences: 1)
]
}

Expand Down
2 changes: 1 addition & 1 deletion src/v1/stage0/src/v1_compiler_compile.rs

Large diffs are not rendered by default.

45 changes: 33 additions & 12 deletions src/v2/compiler/03_name_resolve.dag
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import v2.std.language_model { LanguageModel }

import v2.compiler.symbol_index_fill { symbol_index_fill_module_roots }
import v2.compiler.normalized_tree { NormalizedTree, normalized_tree_roots_to_nodes }
import v2.std.declaration_marker { TestCodeIndex, test_code_index_add_module, test_code_index_empty }
import v2.std.symbol_index { SymbolIndex, empty_symbol_index }
import v2.compiler.resolve {
DeclaredBinding,
Expand Down Expand Up @@ -102,9 +103,12 @@ type Admission {
// Shared by every subject admitted against the same language and root collection.
// The Outcome stays with the caller so validation diagnostics retain their original
// per-subject refusal boundary when the context is constructed before admission.
// `test_code` is every root's test-marker channel keyed by the paths resolution binds to, built in
// the same pass that names the roots, so no root can be resolvable while its markers are unread.
type ValidatedModuleRoots {
roots: FreeMonoid<NormalizedTree>
by_name: Map<QualifiedName, NormalizedTree>
test_code: TestCodeIndex
}

type ResolutionContext {
Expand Down Expand Up @@ -147,7 +151,7 @@ type AdmissionState
| AdmissionRejected { diagnostics: NonEmptyDiagnostics }

type ModuleRootValidateState
= ModuleRootsValid { seen: Map<QualifiedName, NormalizedTree>, diagnostics: Diagnostics }
= ModuleRootsValid { seen: Map<QualifiedName, NormalizedTree>, test_code: TestCodeIndex, diagnostics: Diagnostics }
| ModuleRootsDuplicate { diagnostics: Diagnostics }
| ModuleRootsProjectionRejected { diagnostics: NonEmptyDiagnostics }

Expand Down Expand Up @@ -225,14 +229,14 @@ fn admit_export_symbol(
fn validate_module_roots(roots: FreeMonoid<NormalizedTree>) -> Outcome<ValidatedModuleRoots> {
match fold_list(
xs: roots,
empty: ModuleRootsValid { seen: empty_map(), diagnostics: v2.std.diagnostic.None },
empty: ModuleRootsValid { seen: empty_map(), test_code: test_code_index_empty(), diagnostics: v2.std.diagnostic.None },
cons: fn(acc, root) {
match acc {
ModuleRootsDuplicate { diagnostics: d } =>
ModuleRootsDuplicate { diagnostics: d }
ModuleRootsProjectionRejected { diagnostics: d } =>
ModuleRootsProjectionRejected { diagnostics: d }
ModuleRootsValid { seen: prior, diagnostics: acc_diag } =>
ModuleRootsValid { seen: prior, test_code: prior_test_code, diagnostics: acc_diag } =>
if well_formed(n: root.root) {
match qualified_name_from_module_node(root: root.root) {
Rejected { diagnostics: d } =>
Expand All @@ -245,6 +249,11 @@ fn validate_module_roots(roots: FreeMonoid<NormalizedTree>) -> Outcome<Validated
Absent =>
ModuleRootsValid {
seen: map_insert(m: prior, key: name, value: root),
test_code: test_code_index_add_module(
index: prior_test_code,
module_qn: name,
channel: root.test_markers
),
diagnostics: merged_diag
}
Present { value: _ } =>
Expand All @@ -262,8 +271,8 @@ fn validate_module_roots(roots: FreeMonoid<NormalizedTree>) -> Outcome<Validated
}
}
) {
ModuleRootsValid { seen: by_name, diagnostics: d } =>
Accepted { value: ValidatedModuleRoots { roots: roots, by_name: by_name }, diagnostics: d }
ModuleRootsValid { seen: by_name, test_code: test_code, diagnostics: d } =>
Accepted { value: ValidatedModuleRoots { roots: roots, by_name: by_name, test_code: test_code }, diagnostics: d }
ModuleRootsDuplicate { diagnostics: d } =>
Rejected {
diagnostics: rejected_with_pending(
Expand Down Expand Up @@ -566,7 +575,10 @@ fn admission_namespace_base(canonical_symbols: PointwisePower<Symbol>) -> Namesp
bindings: empty_map(),
canonical_symbols: canonical_symbols,
symbol_index: empty_symbol_index(),
module_qn: Empty
module_qn: Empty,
test_code: test_code_index_empty(),
declared_in: Empty,
imported_origins: empty_map()
}
}

Expand Down Expand Up @@ -606,7 +618,9 @@ fn admitted_subject_from_bindings(
base: Namespace,
subject_module_root: NormalizedTree,
symbol_index: SymbolIndex,
module_qn: QualifiedName
module_qn: QualifiedName,
origins: Map<Symbol, QualifiedName>,
test_code: TestCodeIndex
) -> AdmittedSubject {
AdmittedSubject {
namespace: Namespace {
Expand All @@ -616,7 +630,10 @@ fn admitted_subject_from_bindings(
),
canonical_symbols: base.canonical_symbols,
symbol_index: symbol_index,
module_qn: module_qn
module_qn: module_qn,
test_code: test_code,
declared_in: module_qn,
imported_origins: origins
},
subject_root: subject_module_root
}
Expand Down Expand Up @@ -681,14 +698,16 @@ fn namespace_for_subject_root(
Rejected {
diagnostics: rejected_with_pending(pending: validate_diag, rejected: d)
}
AdmissionAccepted { bindings: b, origins: _ } =>
AdmissionAccepted { bindings: b, origins: o } =>
Accepted {
value: admitted_subject_from_bindings(
bindings: b,
base: base,
subject_module_root: subject_module_root,
symbol_index: shared.symbol_index,
module_qn: admission.subject.name
module_qn: admission.subject.name,
origins: o,
test_code: shared.roots.test_code
),
diagnostics: validate_diag
}
Expand All @@ -702,14 +721,16 @@ fn namespace_for_subject_root(
index: index,
active_roots: active_roots
) {
AdmissionAccepted { bindings: b, origins: _ } =>
AdmissionAccepted { bindings: b, origins: o } =>
Accepted {
value: admitted_subject_from_bindings(
bindings: b,
base: base,
subject_module_root: subject_module_root,
symbol_index: shared.symbol_index,
module_qn: admission.subject.name
module_qn: admission.subject.name,
origins: o,
test_code: shared.roots.test_code
),
diagnostics: validate_diag
}
Expand Down
8 changes: 7 additions & 1 deletion src/v2/compiler/03_normalize.dag
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import v2.compiler.body_lowering_fold {
body_lower_is_deferred_lower_at_normalize
}
import v2.compiler.normalized_tree { NormalizedTree, admit_normalized_tree }
import v2.compiler.test_marker_capture { test_marker_capture }
import v2.compiler.namespace_graft {
module_header_containment_graft,
namespace_graft_is_graft_candidate
Expand Down Expand Up @@ -217,7 +218,12 @@ fn normalize(parse_tree: ParseTree) -> Outcome<NormalizedTree> {
Rejected { diagnostics: r } => Rejected { diagnostics: r }
Accepted { value: grafted, diagnostics: d1 } =>
if well_formed(n: grafted) {
admit_normalized_tree(root: grafted, diagnostics: d1)
match test_marker_capture(tree: parse_tree) {
Rejected { diagnostics: r } =>
Rejected { diagnostics: rejected_with_pending(pending: d1, rejected: r) }
Accepted { value: markers, diagnostics: _ } =>
admit_normalized_tree(root: grafted, test_markers: markers, diagnostics: d1)
}
} else {
Rejected {
diagnostics: rejected_with_pending(
Expand Down
Loading