Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d6663c5
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
b17e400
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
8e6e5d5
fix(ci): restore rust gate step budgets that regressed to 10m
briansrls Jul 6, 2026
bfda98b
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
ed07660
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
7257f9c
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
9556b04
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 6, 2026
1a16e41
fix(affected-set): address blocking review on measure carriers and #6…
briansrls Jul 6, 2026
e0b8eb0
fix(measure): add Millisecond/Minute authority; consume in corpus probe
briansrls Jul 6, 2026
4270feb
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
913d578
fix(measure): ground Minute on Sixty scale, distinct from Second
briansrls Jul 7, 2026
6cffe45
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
e7e06df
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
6fb3386
fix(measure,entry-selection): refuse Sixty in scale_exponent; wire ex…
briansrls Jul 7, 2026
2c206a9
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
894b560
docs(measure,affected-set): on-carrier notes for refuse stub + Sixty …
briansrls Jul 7, 2026
6d296f1
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
5d66372
docs(rust-gates): on-carrier note for #6239 must-run widen
briansrls Jul 7, 2026
ae6afc2
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
adea549
fix(ci,rust-gates): NodeOccurrenceId import + witness interim semantics
briansrls Jul 7, 2026
ddacf7b
docs(affected-set): mark #6274 equivalence scaffold as orphan post-sl…
briansrls Jul 7, 2026
ef9f22c
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
4756b82
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
9478c12
fix(regen,selection): regen std_measure from dag; drop unused import
briansrls Jul 7, 2026
21fea8b
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
4894085
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
d8984d9
fix(selection): typecheck module_path_for_decl longest-prefix pick
briansrls Jul 7, 2026
4a96e7c
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
3918062
fix(compile-clean): substrate-gate scoped disposition witness
briansrls Jul 7, 2026
420c819
fix(ci): run emit-fresh before self-host provenance witness
briansrls Jul 7, 2026
83a95b6
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
fda129f
fix(cli): complete witness_exclusion_substrings migration
briansrls Jul 7, 2026
01de61d
WIP: Lever a slice 2: reground selection on DependencyView
briansrls Jul 7, 2026
7a3a58a
fix(ci_layer_roots): re-home whole-tree probe excludes in .dag authority
briansrls Jul 7, 2026
c556cf6
docs(measure): cite whole_tree_resolve_exclusion_substrings authority
briansrls Jul 7, 2026
7084c33
style(rust): cargo fmt after exclusion-substring migration
briansrls Jul 7, 2026
2e3bd14
fix(compile-clean): align floor_fast CI path with #6239 substrate gate
briansrls Jul 7, 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
14 changes: 14 additions & 0 deletions dag/gunbc/ci_layer_roots.dag
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ data witness_exclusion_substrings: List<String> = [
"test/claim/execution/"
]

data whole_tree_strict_resolve_exclusion_note: String = "Whole-tree strict-resolve policy beyond floor witness_exclusion_substrings: test trees, eval scaffolds, and modules that cannot strict-resolve under dag+src/v2 but are not floor-discovery roster members. Consumed by whole_tree_resolved_ctx hosts (measure_dependency_view_build, measure_whole_tree_resolve, fn_arrow_decl_substrate_is_whole_tree census, wiring_liveness_whole_tree). NOT folded into witness_exclusion_substrings — floor RunnableDiscoveryBatch scan-dir enrollment must keep src/v2/test/claim/manual visible while whole-tree resolve excludes the broader /test/ tree."

data whole_tree_strict_resolve_exclusion_substrings: List<String> = [
"test/fixture/",
"/test/",
"nat_semiring_rung",
"lens/application/empty_required_lenses_skip_gate.dag",
"lens/application/rejecting_lens_blocks_before_compile.dag"
]

fn whole_tree_resolve_exclusion_substrings() -> List<String> {
concat(witness_exclusion_substrings, whole_tree_strict_resolve_exclusion_substrings)
}

fn witness_layer_source_flags(roots: List<String>) -> String {
fold(roots, init: "", f: (acc, r) => concat(acc, concat(" --source-root ", r)))
}
Expand Down
2 changes: 2 additions & 0 deletions dag/gunbc/ci_spec.dag
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ fn ci_repo_root_shell() -> String {

data ci_release_build_regen_stage0_note: String = "regen_stage0 is built here (unconditionally, via cargo) alongside claim_executor/gunbc — NOT lazily via ensure_regen_stage0_built's build-if-absent. On the self-hosted runners target/release/ persists across jobs, so build-if-absent would run a STALE regen_stage0 from a prior commit; the ci_regen job's RegenVerifyGate then compares against a stale --emit-fresh / --verify output. cargo build is source-change-aware, so listing --bin regen_stage0 here guarantees a fresh binary (the same stale-binary hazard formerly bit the removed ci_regen_ratchet's no-count refusal, receipt run 28841755357 @ 7927413). discover_source_root_ingest is listed for the same reason — batch-3 SourceRootIngestGate must not cold-compile under parallel host-effect load (receipt run 28899262773 @ 85731657415 returned Bool(false) when the bin was absent from the release build line)."

data ci_release_build_discover_source_root_ingest_note: String = "discover_source_root_ingest is built here (unconditionally, via cargo) alongside claim_executor/gunbc/regen_stage0 — NOT lazily via ensure_discover_source_root_ingest_built's build-if-absent during batch-3 SourceRootIngestGate. Receipt: CI runs 28894057709 @ 9c020d57 — source_root_ingest_gate_passes returned Bool(false) while emit_host_gate_passes ran in parallel; lazy build-if-absent races parallel cargo under fleet pressure. Pre-building removes the race (same class as regen_stage0 above)."

fn ci_release_build_line() -> String {
concat(
concat(
Expand Down
90 changes: 72 additions & 18 deletions dag/std/measure.dag
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type Scale =
| Micro
| Milli
| One
| Sixty
| Kilo
| Mega
| Giga
Expand All @@ -50,25 +51,30 @@ type Scale =
| Gibi
| Tebi

fn scale_exponent(s: Scale) -> Int {
data sixty_scale_note: String = "Scale.Sixty is the sexagesimal time factor (60 seconds per unit); Minute = Measure<Time, Sixty, Nat> is distinct from Second = Measure<Time, One, Nat>. Conversion authority: time_scale_factor_seconds. scale_exponent refuses Sixty (none) — not a decimal 10^k exponent."

data scale_non_decimal_taxonomy_dissolution_trigger: String = "🟡 dissolve-on: Scale currently mixes decimal SI prefixes (Milli…Exa), binary memory prefixes (Kibi…Tebi), and sexagesimal time (Sixty). Each new non-decimal factor requires arms in time_scale_factor_seconds / memory_scale_factor_bytes / scale_exponent. DISSOLVES WHEN gunbc.plans.realization_measurement_loop Phase 0 \"Converge the time authorities\" splits per-quantity Scale at the type level (TimeScale vs DecimalScale vs BinaryMemoryScale) — ROADMAP plan row dag/gunbc/plans/realization_measurement_loop.dag § Phase 0; not blocking #6335 merge."

fn scale_exponent(s: Scale) -> Int? {
match s {
Atto => -18
Femto => -15
Pico => -12
Nano => -9
Micro => -6
Milli => -3
One => 0
Kilo => 3
Mega => 6
Giga => 9
Tera => 12
Peta => 15
Exa => 18
Kibi => 10
Mebi => 20
Gibi => 30
Tebi => 40
Atto => Present { value: -18 }
Femto => Present { value: -15 }
Pico => Present { value: -12 }
Nano => Present { value: -9 }
Micro => Present { value: -6 }
Milli => Present { value: -3 }
One => Present { value: 0 }
Sixty => none
Kilo => Present { value: 3 }
Mega => Present { value: 6 }
Giga => Present { value: 9 }
Tera => Present { value: 12 }
Peta => Present { value: 15 }
Exa => Present { value: 18 }
Kibi => Present { value: 10 }
Mebi => Present { value: 20 }
Gibi => Present { value: 30 }
Tebi => Present { value: 40 }
}
}

Expand All @@ -80,6 +86,33 @@ fn kibi_factor() -> Nat {
1024
}

fn seconds_per_minute() -> Nat {
60
}

fn time_scale_factor_seconds(s: Scale) -> Nat? {
match s {
One => Present { value: 1 }
Sixty => Present { value: seconds_per_minute() }
Atto => none
Femto => none
Pico => none
Nano => none
Micro => none
Milli => none
Kilo => none
Mega => none
Giga => none
Tera => none
Peta => none
Exa => none
Kibi => none
Mebi => none
Gibi => none
Tebi => none
}
}

fn memory_scale_factor_bytes(s: Scale) -> Nat? {
match s {
One => Present { value: 1 }
Expand All @@ -93,6 +126,7 @@ fn memory_scale_factor_bytes(s: Scale) -> Nat? {
Nano => none
Micro => none
Milli => none
Sixty => none
Kilo => none
Mega => none
Giga => none
Expand Down Expand Up @@ -290,6 +324,16 @@ fn microsecond_count(m: Microsecond) -> Nat {
measure_count(m)
}

type Millisecond = Measure<Time, Milli, Nat>

fn millisecond(count: Nat) -> Millisecond {
Millisecond { count: count }
}

fn millisecond_count(m: Millisecond) -> Nat {
measure_count(m)
}

type Second = Measure<Time, One, Nat>

fn second(count: Nat) -> Second {
Expand All @@ -300,6 +344,16 @@ fn second_count(s: Second) -> Nat {
measure_count(s)
}

type Minute = Measure<Time, Sixty, Nat>

fn minute(count: Nat) -> Minute {
Minute { count: count }
}

fn minute_count(m: Minute) -> Nat {
measure_count(m)
}

type Percent = Measure<Dimensionless, One, Nat>

fn percent(count: Nat) -> Percent {
Expand Down
33 changes: 12 additions & 21 deletions dag/test/claim/rust_stage0_gates_witness_test.dag
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
module test.claim.rust_stage0_gates_witness

import tools.rust_stage0_gates { path_is_rust_monolith, should_run_gates, unit_must_run }
import tools.rust_stage0_gates {
path_is_rust_monolith,
should_run_gates,
unit_must_run,
witness_dag_only_gates_when_substrate_ready,
witness_empty_paths_gates_when_substrate_ready,
witness_declared_unit_unaffected_by_other_dag_when_substrate_ready
}

fn w_rs_selects() -> Bool { path_is_rust_monolith(path: "src/v1/stage0/src/lib.rs") }
fn w_cargo_toml_selects() -> Bool { path_is_rust_monolith(path: "src/v1/stage0/Cargo.toml") }
Expand All @@ -13,10 +20,6 @@ fn w_mixed_fires() -> Bool {
should_run_gates(paths: ["src/v2/std/text.dag", "src/v1/stage0/src/main.rs", "README.md"], git_success: true)
}

fn w_dag_only_no_fire() -> Bool {
should_run_gates(paths: ["src/v2/std/text.dag"], git_success: true) == false
}

fn w_rs_substring_no_select() -> Bool {
path_is_rust_monolith(path: "docs/notes.rs.md") == false
}
Expand All @@ -25,10 +28,6 @@ fn w_generic_config_no_select() -> Bool {
path_is_rust_monolith(path: "docs/config.toml") == false
}

fn w_empty_no_fire() -> Bool {
should_run_gates(paths: [], git_success: true) == false
}

fn w_git_fail_fires() -> Bool {
should_run_gates(paths: [], git_success: false) == true
}
Expand All @@ -37,10 +36,6 @@ fn w_closure_dag_fires() -> Bool {
should_run_gates(paths: ["src/v2/std/node_query.dag"], git_success: true) == true
}

fn w_out_of_closure_dag_no_fire() -> Bool {
should_run_gates(paths: ["src/v2/std/text.dag"], git_success: true) == false
}

fn w_undeclared_unit_must_run() -> Bool {
unit_must_run(unit: "some_undeclared_rust_test", paths: ["src/v2/std/text.dag"]) == true
}
Expand All @@ -49,10 +44,6 @@ fn w_declared_unit_affected_by_closure_dag() -> Bool {
unit_must_run(unit: "coproduct_reflection_conformance_test", paths: ["src/v2/std/node.dag"]) == true
}

fn w_declared_unit_unaffected_by_other_dag() -> Bool {
unit_must_run(unit: "coproduct_reflection_conformance_test", paths: ["src/v2/std/text.dag"]) == false
}

test fn rust_stage0_gates_witnesses() -> Bool {
w_rs_selects() &&
w_cargo_toml_selects() &&
Expand All @@ -61,14 +52,14 @@ test fn rust_stage0_gates_witnesses() -> Bool {
w_cargo_config_selects() &&
w_cargo_lock_selects() &&
w_mixed_fires() &&
w_dag_only_no_fire() &&
witness_dag_only_gates_when_substrate_ready() &&
w_rs_substring_no_select() &&
w_generic_config_no_select() &&
w_empty_no_fire() &&
witness_empty_paths_gates_when_substrate_ready() &&
w_git_fail_fires() &&
w_closure_dag_fires() &&
w_out_of_closure_dag_no_fire() &&
witness_dag_only_gates_when_substrate_ready() &&
w_undeclared_unit_must_run() &&
w_declared_unit_affected_by_closure_dag() &&
w_declared_unit_unaffected_by_other_dag()
witness_declared_unit_unaffected_by_other_dag_when_substrate_ready()
}
24 changes: 24 additions & 0 deletions dag/test/claim/time_scale_factor_derivation_test.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module test.claim.time_scale_factor_derivation

import std.logic { Bool }
import std.nat { Nat }
import std.measure { Scale, One, Sixty, time_scale_factor_seconds, scale_exponent }

fn factor_is(s: Scale, expected: Nat) -> Bool {
match time_scale_factor_seconds(s: s) {
Present { value: n } => n == expected
Absent => false
}
}

test fn time_scale_factors_derive_correctly() -> Bool {
factor_is(s: One, expected: 1)
&& factor_is(s: Sixty, expected: 60)
}

test fn scale_exponent_refuses_sixty() -> Bool {
match scale_exponent(s: Sixty) {
Present { value: _ } => false
Absent => true
}
}
50 changes: 33 additions & 17 deletions dag/tools/dag_compile_clean_scope.dag
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ module tools.dag_compile_clean_scope
import gunbc.ci_layer_roots { witness_layer_roots }
import tools.dag_compile_clean_partition { compile_clean_partition_boundary }
import tools.dag_compile_clean_shard_roster { compile_clean_shard_entry_paths }
import v2.lens.module_graph {
entry_affected_by_touched_paths
import v2.lens.affected_set.corpus_dependency_view {
corpus_dependency_view_per_pr_substrate_ready
}
import v2.lens.affected_set.entry_selection {
entry_affected_by_dependency_view
}
import std.types { String, Bool, List, list_length }

Expand Down Expand Up @@ -53,7 +56,7 @@ fn compile_clean_affected_entry_paths(
compile_clean_shard_entry_paths(),
init: [],
f: fn(acc, entry_path) {
if entry_affected_by_touched_paths(
if entry_affected_by_dependency_view(
entry_path: entry_path,
pool_roots: pool_roots,
touched_paths: touched_paths
Expand All @@ -69,20 +72,32 @@ fn compile_clean_affected_entry_paths(
fn compile_clean_scope_disposition_from_touched(
touched_paths: List<String>
) -> CompileCleanScopeDisposition {
let pool_roots = compile_clean_pool_roots()
let affected = compile_clean_affected_entry_paths(
pool_roots: pool_roots,
touched_paths: touched_paths
)
if list_length(items: affected) > 0 {
ScopedRun { entry_paths: affected }
} else if compile_clean_touches_allow_skip(touched_paths: touched_paths) {
SkipNoAffectedEntries {
reason: "no compile-clean entry import-closure intersects touched paths"
if compile_clean_touches_allow_skip(touched_paths: touched_paths) {
if list_length(items: touched_paths) == 0 {
SkipNoAffectedEntries {
reason: "no compile-clean entry DependencyView frontier intersects touched paths"
}
} else {
SkipNoAffectedEntries {
reason: "docs-only diff — no compile-clean entry selection required"
}
}
} else {
} else if corpus_dependency_view_per_pr_substrate_ready() == false {
RequireWholeTree {
reason: "non-empty non-docs diff with no shard intersection — whole-tree baseline"
reason: "DependencyView per-PR selection blocked-on-#6239 (fn_arrow_decl_substrate_is_whole_tree false)"
}
} else {
let pool_roots = compile_clean_pool_roots()
let affected = compile_clean_affected_entry_paths(
pool_roots: pool_roots,
touched_paths: touched_paths
)
if list_length(items: affected) > 0 {
ScopedRun { entry_paths: affected }
} else {
RequireWholeTree {
reason: "non-empty non-docs diff with no shard intersection — whole-tree baseline"
}
}
}
}
Expand Down Expand Up @@ -144,7 +159,8 @@ fn touched_path_disposition_matches(row: ScopeDispositionRow) -> Bool {
RequireWholeTree { reason: _ } =>
match row.expect {
ExpectSkip => false
ExpectScopedContaining { required_entry: _ } => false
ExpectScopedContaining { required_entry: _ } =>
!corpus_dependency_view_per_pr_substrate_ready()
ExpectWholeTree => true
}
}
Expand All @@ -163,4 +179,4 @@ fn lever_a_local_receipts_hold() -> Bool {
&& witness_pool_roots_match_witness_layer_roots()
}

data lever_a_local_verify_scaffold_note: String = "LOCAL-DEV-ONLY scaffold (scripts/lever_a_local_verify.sh is a pure claim_batch sequencer — no bash verdict logic). dissolves-on: GATE 3 CI self-demonstration of scoped compile-clean in budget retires the script. GATE 1d host refusal (cli_run Refused on diff/disposition failure): cargo test scoped_plan_refuses_on_invalid_diff_base until a host witness enrolls. GATE 1b/1c: inject break inside vs outside disposition entry_paths closure — scoped RED vs GREEN; nightly whole-tree #6299 is catcher. GATE 2: replay merged PR diffs locally; whole-tree baseline cited from runs 28780252806 and 28748751115 only. Core-query soundness: cite #6274 (entry_affected_by_touched_paths equivalent to Rust frontier on 25 entries)."
data lever_a_local_verify_scaffold_note: String = "LOCAL-DEV-ONLY scaffold (scripts/lever_a_local_verify.sh is a pure claim_batch sequencer — no bash verdict logic). dissolves-on: GATE 3 CI self-demonstration of scoped compile-clean in budget retires the script. GATE 1d host refusal (cli_run Refused on diff/disposition failure): cargo test scoped_plan_refuses_on_invalid_diff_base until a host witness enrolls. GATE 1b/1c: inject break inside vs outside disposition entry_paths closure — scoped RED vs GREEN; nightly whole-tree #6299 is catcher. GATE 2: replay merged PR diffs locally; whole-tree baseline cited from runs 28780252806 and 28748751115 only. Core-query soundness: production selection is entry_affected_by_dependency_view (entry_selection.dag); #6274 import-closure equivalence is a separate orphan host receipt (module_grain_affected_equivalence_tests), dissolves when deliverable-3 DependencyView differential receipt lands."
Loading