Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bfd48a4
Census the first() interpreter/emitted divergence, and repair the hal…
Aug 31, 2026
eccd062
Census: report a disposition per site, not a shape tally
Aug 31, 2026
95079cb
Census: step 1 re-scoped — the signature carrier exists; the gap is i…
Aug 31, 2026
32606e4
Census: enumerate the 442 from the artifact, and record that this cla…
Aug 31, 2026
79ac1aa
Merge main into session/still-swift-363
Aug 31, 2026
59f24ae
Record the measured blast radius against a trunk control, and name th…
Aug 31, 2026
3b4d565
Merge main into session/still-swift-363
Aug 31, 2026
f5e05e4
Derive phase equality from one exhaustive ordinal instead of a 7x7 wi…
Aug 31, 2026
abee235
Delete floor_probe.sh: experimental residue that hard-codes the infer…
Aug 31, 2026
7d7524d
Merge remote-tracking branch 'origin/main' into session/still-swift-363
Aug 31, 2026
dd61cc0
Census: the drift gate is a second measured victim, and the compositi…
Aug 31, 2026
5f460a2
Correct the build-lane cause: it is the coercion arm plus the deliber…
Aug 31, 2026
f052c05
Merge main into session/still-swift-363
Sep 1, 2026
2201637
Merge main into session/still-swift-363
Sep 1, 2026
adad2b0
Merge remote-tracking branch 'origin/main' into session/still-swift-363
Sep 1, 2026
91b4f5e
The coercion fired on a free type variable: silently unwrapping Prese…
Sep 1, 2026
1b0f02a
Locate builtin refusals at the call node: `parse_int expects a string…
Sep 1, 2026
62f11ae
Census superseded: its population was a spelling, and the larger half…
Sep 1, 2026
55cf946
Refusal before migration: `Optional` against a bare value under `==` …
Sep 1, 2026
cf93085
Census: 23 is a lower bound, and the completion criterion is that the…
Sep 1, 2026
5a0ca7f
Census: state the rule that covers both times this document's numbers…
Sep 1, 2026
c2be673
Delete two empty files a `git add -A` swept in
Sep 1, 2026
e9af320
Merge main into session/still-swift-363
Sep 1, 2026
eb76d83
Regenerate the ledger projection after the roster merge
Sep 1, 2026
613136e
Regenerate DESIGN.md after the roster merge
Sep 1, 2026
4ed8c14
Merge main into session/still-swift-363
Sep 1, 2026
01f550b
Narrow the Optional/Null wall: only Absent-vs-none is a straddle; Pre…
Sep 1, 2026
2d5f58d
Optionality judgement selects the receiver's profile row, and judges …
Sep 1, 2026
df35678
Merge main into session/still-swift-363; fold the row to the one-line…
Sep 1, 2026
3825e4a
Move the optionality decision into dag/std/algebra.dag and enroll the…
Sep 1, 2026
30568aa
Failure mode: a mutation control applied to the wrong artifact of a g…
Sep 1, 2026
af5e1a6
Merge main into session/still-swift-363
Sep 1, 2026
f407ab9
first(): migrate the field-access population to a match, and declare …
Sep 1, 2026
430f8f0
Repair two codemod-mangled witness sites, and project the declared row
Sep 1, 2026
1f9a836
Recurring failure mode: an entry-scoped green over a corpus-wide edit
Sep 1, 2026
806607a
Three more first() populations the field-access census could not see
Sep 1, 2026
76e41fa
Merge main, and close the comparison population main kept growing
Sep 1, 2026
fa11d87
A fifth first() shape: the prefix-call form with a field read
Sep 1, 2026
e7afae6
Migrate the three prefix-call value-position first() sites in roadmap…
Sep 1, 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: 4 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ At a service boundary, rung honesty has a commercial consequence: a dimension ma

Every newly discovered error class — incident, review finding, runtime exception, falsifier divergence — files or updates one row: invalid state, harm, distinguishing facts, rung found at, ceiling with reason, next trigger. Declared drops are rostered in full — previous rung, temporary rung, reason, population, restoration trigger — in [docs/design-ledgers.md](docs/design-ledgers.md), authority `gunbc.rung_drop`. A drop is retired BY ITS TRIGGER AND BY NOTHING ELSE, so the trigger is the whole check. The ones standing today:

- **An Optional actual flowing into a parameter declared non-optional, at the call seam, in BOTH the interpreter and the Rust emission arm** — declared 2026-09-01
- **Emitted-bytes fixture witnesses in a required lane** — declared 2026-09-01
- **Direct-call argument TYPE-COMPAT judgment inside v2.* modules (one of two arms; inhabitance still runs)** — declared 2026-09-01
- **CI required-run composition** — declared 2026-08-15
Expand Down Expand Up @@ -221,6 +222,9 @@ One row per class, each carrying its recognition rule and its receipts, in [docs
- `restoration_promise_names_a_route_that_does_not_exist`
- `restored_bytes_reviewed_as_authorship`
- `review_summary_inverts_roles_and_affirms_the_join`
- `coarser_parallel_authority`
- `mutation_applied_to_the_wrong_artifact_of_a_generated_pair`
- `entry_scoped_green_over_a_corpus_wide_edit`
- `accepted_source_emits_uncompilable_target`

## Building & checks
Expand Down
101 changes: 73 additions & 28 deletions dag/extdeps/bmc/pid_control_decode.dag
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,18 @@ fn decode_curve_side(container: JsonValue, path: DocumentPath, side: CurveSide)
}
} else {
match hits.first() {
JsonObject { members } =>
curve_side_fold(
path: path_field(parent: path, field: field),
side: side,
members: members,
acc: CurveSideDecoded { entries: [] },
)
other => CurveSideRefused { refusal: CurveSideNotAnObject { path: path, side: side } }
Present { value: hit } =>
match hit {
JsonObject { members } =>
curve_side_fold(
path: path_field(parent: path, field: field),
side: side,
members: members,
acc: CurveSideDecoded { entries: [] },
)
other => CurveSideRefused { refusal: CurveSideNotAnObject { path: path, side: side } }
}
Absent => CurveSideRefused { refusal: CurveSideMissing { path: path, side: side } }
}
}
}
Expand All @@ -351,10 +355,54 @@ fn decode_curve_side(container: JsonValue, path: DocumentPath, side: CurveSide)
// split between the language-semantics question and the type-conformance half that is below floor
// regardless of how the first is answered. What is claimed HERE is only the local fact: the rename
// to `magnitude` is a workaround, and no compiler guarantee is claimed by this module.
fn indexed_decimal_value_at(entries: List<IndexedDecimal>, index: Int) -> ExactDecimal {
let matched = indexed_decimal_entries_with(entries: entries, index: index)
let entry = matched.first()
entry.magnitude
// THE LOOKUP ANSWERS AN OPTIONAL BECAUSE THE LIST MIGHT NOT HOLD THE INDEX, and saying so is what
// keeps its one caller total. It previously read `matched.first()` into a binding and took
// `.magnitude` off it, which read the OPTIONAL's own payload rather than the entry's field -- the
// same confusion the note above this module's decode records, in the module that records it.
fn indexed_decimal_value_at(entries: List<IndexedDecimal>, index: Int) -> Optional<ExactDecimal> {
match indexed_decimal_entries_with(entries: entries, index: index).first() {
Present { value: entry } => Present { value: entry.magnitude }
Absent => Absent
}
}

// THE POINT SET IS BUILT BY A FOLD THAT CAN REFUSE, not by a map that cannot. A map has no arm for
// a missing output, so the only ways to write it are to fabricate a magnitude or to let an Optional
// reach a declared non-optional field -- the first is forbidden outright and the second is the
// coercion this PR declares as debt. The refusal is DERIVED rather than invented: an indexed
// reading whose output the join cannot supply is exactly `CurveReadingWithoutOutput`, which the
// caller already raises for the same condition measured a different way. Accumulating by PREPEND
// keeps the fold linear, and the caller's `sort_by` over the point index restores the order.
fn curve_points_fold(
path: DocumentPath,
readings: List<IndexedDecimal>,
outputs: List<IndexedDecimal>,
) -> CurveDecode {
fold(
readings,
init: CurveDecoded { points: [] },
f: fn(acc, r) {
match acc {
CurveRefused { refusal } => CurveRefused { refusal: refusal }
CurveDecoded { points } =>
match indexed_decimal_value_at(entries: outputs, index: r.index) {
Present { value: magnitude } =>
CurveDecoded {
points: concat(
[DemandCurvePoint {
index: r.index,
reading: decimal_celsius(value: r.magnitude),
output: zone_demand_value(value: magnitude),
}],
points,
),
}
Absent =>
CurveRefused { refusal: CurveReadingWithoutOutput { path: path, index: r.index } }
}
}
},
)
}

type CurveDecode
Expand All @@ -375,23 +423,20 @@ type CurveDecode
fn curve_join(path: DocumentPath, readings: List<IndexedDecimal>, outputs: List<IndexedDecimal>) -> CurveDecode {
let unpaired_reading = filter(readings, r => indexed_decimal_entries_with(entries: outputs, index: r.index).length() == 0)
let unpaired_output = filter(outputs, o => indexed_decimal_entries_with(entries: readings, index: o.index).length() == 0)
if unpaired_reading.length() > 0 {
CurveRefused { refusal: CurveReadingWithoutOutput { path: path, index: unpaired_reading.first().index } }
} else if unpaired_output.length() > 0 {
CurveRefused { refusal: CurveOutputWithoutReading { path: path, index: unpaired_output.first().index } }
} else {
CurveDecoded {
points: sort_by(
map(readings, r =>
DemandCurvePoint {
index: r.index,
reading: decimal_celsius(value: r.magnitude),
output: zone_demand_value(value: indexed_decimal_value_at(entries: outputs, index: r.index)),
}
),
point => point.index,
),
match unpaired_reading.first() {
Present { value: stray_reading } =>
CurveRefused { refusal: CurveReadingWithoutOutput { path: path, index: stray_reading.index } }
Absent =>
match unpaired_output.first() {
Present { value: stray_output } =>
CurveRefused { refusal: CurveOutputWithoutReading { path: path, index: stray_output.index } }
Absent =>
match curve_points_fold(path: path, readings: readings, outputs: outputs) {
CurveRefused { refusal } => CurveRefused { refusal: refusal }
CurveDecoded { points } =>
CurveDecoded { points: sort_by(points, point => point.index) }
}
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion dag/extdeps/bmc/types.dag
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ fn bmc_redfish_surface_for(
if count == 0 {
SurfaceShapeUncatalogued { firmware: firmware }
} else if count == 1 {
SurfaceShapeKnown { shape: matches.first().shape }
match matches.first() {
Present { value: only } => SurfaceShapeKnown { shape: only.shape }
Absent => SurfaceShapeUncatalogued { firmware: firmware }
}
} else {
SurfaceShapeAmbiguous { firmware: firmware, matches: count }
}
Expand Down
30 changes: 16 additions & 14 deletions dag/extdeps/languages/json/member_conservation.dag
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ fn first_path_mismatch(partition_path: NonEmptyStr, occurrences: List<JsonMember
// object and still report every source member as covered.
fn conservation_verdict(partition: ObjectMemberPartition) -> ConservationVerdict {
let stray_source = first_path_mismatch(partition_path: partition.object_path, occurrences: partition.source)
if stray_source.length() > 0 {
PartitionSourcePathMismatch {
partition_path: partition.object_path,
occurrence_path: stray_source.first().identity.object_path,
ordinal: stray_source.first().identity.ordinal,
}
} else {
match stray_source.first() {
Present { value: stray } =>
PartitionSourcePathMismatch {
partition_path: partition.object_path,
occurrence_path: stray.identity.object_path,
ordinal: stray.identity.ordinal,
}
Absent =>
let lost_or_repeated = fold(
partition.source,
init: MembersConserved { member_count: partition.source.length() },
Expand Down Expand Up @@ -370,13 +371,14 @@ fn element_conservation_verdict(partition: ArrayElementPartition) -> Conservatio
array_path: partition.array_path,
occurrences: partition.source,
)
if stray_source.length() > 0 {
PartitionSourcePathMismatch {
partition_path: partition.array_path,
occurrence_path: stray_source.first().identity.array_path,
ordinal: stray_source.first().identity.index,
}
} else {
match stray_source.first() {
Present { value: stray } =>
PartitionSourcePathMismatch {
partition_path: partition.array_path,
occurrence_path: stray.identity.array_path,
ordinal: stray.identity.index,
}
Absent =>
let lost_or_repeated = fold(
partition.source,
init: MembersConserved { member_count: partition.source.length() },
Expand Down
12 changes: 8 additions & 4 deletions dag/extdeps/languages/yaml/ingest.dag
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ fn yaml_strip_indent(line: String, indent: Int) -> String {
fn yaml_lines_from_source(src: String) -> List<String> {
let raw = split(s: src, delimiter: "\n")
let n = raw.length()
if (n > 0) && (raw.skip(n: n - 1).first() == "") {
raw.take(n: n - 1)
} else {
raw
match raw.skip(n: n - 1).first() {
Present { value: last_line } =>
if last_line == "" {
raw.take(n: n - 1)
} else {
raw
}
Absent => raw
}
}

Expand Down
5 changes: 4 additions & 1 deletion dag/extdeps/sudo/nopasswd_execute_probe_check_op.dag
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ fn sudo_nopasswd_grant_list_line_admits_probe(
if length(xs: parts) != 2 {
false
} else {
parts.skip(n: 1).first().trim() == probe as String
match parts.skip(n: 1).first() {
Present { value: tail } => tail.trim() == probe as String
Absent => false
}
}
}

Expand Down
12 changes: 8 additions & 4 deletions dag/extdeps/tailscale/acl.dag
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,14 @@ fn tag_dashboard_admin_plane_holds(policy: TailscaleAclPolicy) -> Bool {
fn dashboard_cutover_ip_is_transient_in_tag_ci_grant(policy: TailscaleAclPolicy) -> Bool {
let ci_grants = policy.grants |> filter(g => grant_src_is_tag_ci(g: g))
(length(ci_grants) == 1)
&& selector_list_contains(
items: ci_grants.first().dst,
needle: sel_ipv4(address: dashboard_cutover_mac_ip)
)
&& match ci_grants.first() {
Present { value: only } =>
selector_list_contains(
items: only.dst,
needle: sel_ipv4(address: dashboard_cutover_mac_ip)
)
Absent => false
}
}

fn ssh_rule_matches(
Expand Down
7 changes: 3 additions & 4 deletions dag/extdeps/transports/rest.dag
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ fn rest_fixture_scan(
invocation: RestBoundOperationInvocation,
scan: RestFixtureScan,
) -> RestFixtureScan {
if fixtures.count() == 0 {
scan
} else {
let fixture = fixtures.first()
match fixtures.first() {
Absent => scan
Present { value: fixture } =>
let matches = fixture.store == store
&& rest_bound_invocation_eq(a: fixture.invocation, b: invocation)
let next = if matches {
Expand Down
24 changes: 16 additions & 8 deletions dag/extdeps/version/pep440.dag
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,24 @@ fn pep440_compare_release_rest(a_rest: List<NonNegativeInt>, b_rest: List<NonNeg
if a_rest.length() == 0 && b_rest.length() == 0 { Equal }
else if a_rest.length() == 0 {

if b_rest.first() == 0 {
pep440_compare_release_rest(a_rest: a_rest, b_rest: b_rest.skip(n: 1))
} else {
Less
match b_rest.first() {
Present { value: b0 } =>
if b0 == 0 {
pep440_compare_release_rest(a_rest: a_rest, b_rest: b_rest.skip(n: 1))
} else {
Less
}
Absent => Equal
}
} else if b_rest.length() == 0 {
if a_rest.first() == 0 {
pep440_compare_release_rest(a_rest: a_rest.skip(n: 1), b_rest: b_rest)
} else {
Greater
match a_rest.first() {
Present { value: a0 } =>
if a0 == 0 {
pep440_compare_release_rest(a_rest: a_rest.skip(n: 1), b_rest: b_rest)
} else {
Greater
}
Absent => Equal
}
} else {
match pep440_compare_non_negative_int(a: a_rest.first(), b: b_rest.first()) {
Expand Down
5 changes: 4 additions & 1 deletion dag/gunbc/accelerator_demo/accelerator_demo_plan.dag
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ fn recognize_float_fma_fused_kernel_when_contraction_refused() -> AcceleratorRec
}

fn demo_plan_fused_op_count(plan: RealizationPlan<Nano>) -> Int {
let batch = plan.schedule.first()
match plan.schedule.first() {
Absent => 0
Present { value: batch } =>
match batch.first() {
Absent => 0
Present { value: runnable } => match runnable {
Expand All @@ -142,6 +144,7 @@ fn demo_plan_fused_op_count(plan: RealizationPlan<Nano>) -> Int {
RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, exclude_substrings: _, discovery_scope_dirs: _, profile: _ } => 0
}
}
}
}

fn demo_plan_has_three_fused_ops(plan: RealizationPlan<Nano>) -> Bool {
Expand Down
7 changes: 3 additions & 4 deletions dag/gunbc/bmc/bmc_fan_converge.dag
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,9 @@ type BmcFanTypedMutationResult

fn bmc_fan_observation_value(lines: List<String>, key: String) -> String? {
let prefix = concat(key, "=")
if lines.length() == 0 {
none
} else {
let line = lines.first()
match lines.first() {
Absent => none
Present { value: line } =>
if starts_with(s: line, prefix: prefix) {
Present {
value: substring(
Expand Down
6 changes: 3 additions & 3 deletions dag/gunbc/bmc/bmc_fan_monitor.dag
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ fn bmc_fan_assess_monitoring_samples_rec(
required_elapsed: Second,
maximum_sample_gap: Second,
) -> BmcFanMonitoringResult {
if remaining.length() == 0 {
match remaining.first() {
Absent =>
let receipt = BmcFanMonitoringReceipt {
sample_count: sample_count,
elapsed: previous_elapsed,
Expand All @@ -51,8 +52,7 @@ fn bmc_fan_assess_monitoring_samples_rec(
receipt: receipt,
}
}
} else {
let sample = remaining.first()
Present { value: sample } =>
let sample_gap_seconds = second_count(sample.elapsed) - second_count(previous_elapsed)
let receipt = BmcFanMonitoringReceipt {
sample_count: sample_count + 1,
Expand Down
Loading
Loading