Skip to content

The exclusive row set becomes a keyed collection over a closed key - #11374

Closed
gunbai-bot[bot] wants to merge 14 commits into
mainfrom
session/deep-cat-655-rowset-reshape
Closed

gunbai-bot[bot] wants to merge 14 commits into
mainfrom
session/deep-cat-655-rowset-reshape

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

⚠ THIS HEAD DOES NOT BUILD — IT NEEDS ONE REGEN, AND ONLY A REGEN

If you are reviewing this, please read this box before the diff. Four reviews (66269, 66296, 66333, 66341) have now each independently raised the same item, so it is stated first rather than last.

The .dag sources at this head are correct. Their generated stage0 mirrors are three commits behind them. The mirrors therefore still contain:

  • native_driver_exclusive_rows_zero in src/v1/stage0/src/std_compiler_entry.rs — deleted from the authority in 2e76589d729a;
  • the double-Rc form in src/v1/stage0/src/v1_compiler_emit_rust.rs — removed from the template in 9ec7ec5a3369;
  • the stale import list — fixed in ebfebda6c6f1.

The mirror function is not a hand-edit. It was generated into the mirror when the .dag still declared it. Nothing in this PR hand-wrote it, and no commit here touches a mirror by hand.

It is deliberately not being hand-deleted. Removing one function from a generated file leaves it stale in three other ways while looking attended-to, and the drift gate is what distinguishes stale from current — a hand-edit is precisely what defeats it. There is also no benefit: the head cannot build until the other two mirror changes land, so hand-deleting unblocks nothing.

To finish: regen against this head, commit the two mirrors, then CI. Expect exactly those two files; anything more is a signal worth reading rather than committing.

Never executed against these sources: the emitted driver's own build. That is this PR's only honest observer, and required-regen, the seed compile, fixed_point_equal and the unit tests all pass without compiling the emitted main.rs.

What this changes

NativeDriverExclusiveRows stops being N parallel same-typed fields and becomes a keyed collection over a closed key.

Draft until #11290 lands. This branch is based on #11290's head so relay_emit is in the base; when that lands I rebase to a one-commit diff. Emitted bytes change, so it takes a fold slot.

Why, measured rather than argued

As nine same-typed fields, the row set was built by literal initializer at fourteen sites across two languages — the .dag witnesses, the emitted driver template, and hand-written Rust tests. Growing it by one row was a fourteen-site edit with nothing forcing the fourteen to be found, and three separate runs were spent on exactly that:

  1. a partial record that the seed admits (.dag does not require construction totality) and rustc refuses later as E0063 at the emitted driver;
  2. the same again after a fix that reached only the .dag sites, because the census used --include=*.dag and could not see the Rust ones;
  3. a third when the stage0 mirrors had never carried the fields at all.

Nine parallel fields of one type is §2's horizontal case — one axis modelled as N declarations — and §5 asks for construction over validation.

The shape

  • a closed NativeDriverExclusiveRowKey coproduct, one variant per row;
  • a roster listing those variants — the one place a row is added;
  • one constructor that maps the roster, asking a caller-supplied total function for each key. A value built through it carries every key by construction, so there is no partial state to validate;
  • native_driver_exclusive_sum becomes a fold. The per-row readers did not become lookups — they disappeared, which is what avoids the partiality a Map would have introduced;
  • the wire name is an exhaustive match, so a new variant refuses to compile until it declares the name its receipt will carry.

Three decisions worth checking rather than assuming

The receipt's wire format is preserved deliberately. The driver serialized the value directly, so the new carrier would have turned the [native-cost-partition] line from an object keyed by row name into a list of key/nanos pairs — silently breaking driver_rows_diff, the adjudicator and the other JSON readers. The driver now projects the rows back into a name-keyed map. Same keys, same Nanosecond objects, unchanged shape.

The driver's match has no wildcard. A row added to the authority makes the driver refuse to compile until it says what measures it. A wildcard would answer zero for a span nobody wired up — the absorbing arm §5 forbids, and exactly what the old record literal did silently.

The closure is passed bare, not Rc-wrapped — and this is now verified by execution. A function-typed parameter emits as impl Fn(..) + Clone while a function value emits as Rc<dyn Fn(..)>, and Rc<F> does not implement Fn; that is the adapter seam recorded on gunbc.recurring_failure_mode accepted_source_emits_uncompilable_target. The regenerated mirror carries impl Fn(NativeDriverExclusiveRowKey) -> Nanosecond + Clone with zero Rc<dyn Fn>, and the rebuilt seed compiles.

Witness construction: exhaustive by default

All nine witness constructions are exhaustive, not built from the zero base. The zero base exists but is deliberately not the default, and the reason is sharper than "a witness might omit a row": if fixtures built from zeros, a newly added row would be absorbed as zero by every one of them, no witness would exercise it, and it would land untested with the suite green — the absorbing fallback moved into the fixtures. The two witnesses whose subject is that absent phases read zero are the ones the zero base is for.

Evidence

  • Regen on srv1 (regen.j3NclR): required-regen planned=155 executed=155 adjudicated=155, one declared divergent (main.rs); install + rebuild_from_installed passed; required-regen-fixed-point fixed_point_equal=true.
  • The transaction's post-step caught the one thing left: both Rust test sites double-wrapped Rc around a constructor that already returns Rc<…>. Fixed. Note the fold would not have caught it either — the fold builds claim_executor, not the test crate.

The census that is this PR's RED, re-runnable rather than trusted: hand-written sources now contain one construction site — the constructor's own literal inside the authority — and fourteen consumers that call it. Before the reshape the same census found fourteen construction sites and zero consumers.

Ceiling, stated honestly

Rung 3, not 4. .dag has no module-private declaration boundary, so the record literal stays writable and a caller could still author a partial collection directly instead of going through the constructor. That is the same residual v1.compiler.emit_rust records for its own two-role split, with the same next-rung trigger — a module-private function boundary in the language — which no change here can build.

🤖 Generated with Claude Code

https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8

Brian Searls and others added 9 commits September 13, 2026 17:26
… with it

Every full-corpus fold refuses the same way: #11256 at a 238.8 ms remainder over
714 modules, #11202 at 276.6 ms over 717, SUCC3 at 238.5 ms and SUCC6 at 244.8 ms
on the same population, all against a 50 ms tolerance. Each receipt is internally
coherent -- parent minus the exclusive sum equals the remainder exactly on every
one -- so the work is real and simply covered by no row.

THE SPAN. The per-module loop prints one [native-prepare-split] line per unique
module to stderr, which the host runner drains through a pipe, and that write sat
outside every exclusive row while being paid inside parent_span. relay_emit
measures it with span_nanos around the eprintln and joins
NativeDriverExclusiveRows -- the TYPE, which is where the reconcile fold can see
it -- and native_driver_exclusive_sum. It is never derived as parent minus the
others: a row defined as the remainder forces the residual to zero and makes the
tolerance arm unfireable.

MEASURED-BUT-UNVALIDATED, and the PR says so. Per unique module the four folds
give 334.0, 342.9, 334.5 and 385.8 microseconds -- a 15.5% spread, not the
constant an earlier message of mine claimed. That spread is consistent with a
pipe write whose cost tracks line length and the reader's drain rate, and
"consistent with" is not "established by". The row exists to settle it by
measurement. If it returns less than the remainder, the span is named, the
remainder is smaller, and the next one gets the same treatment.

THE CORRECTION, which is the reason this PR also touches an annotation. The
module_release row landed in #10940 with a sentence in dag/std/compiler_entry.dag
saying the full corpus's 238.5 ms residual WAS that release cost. That was a
hypothesis written as history and measurement refuted it: module_release is
1.9 ms on SUCC6 against a 244.8 ms residual, and 1.86 ms on #11256 against
238.8 ms -- about one part in a hundred of what it was credited with. Another
lane had already cited the sentence as "the 238.5 ms was repaired by the
module_release row" before it was corrected. The row stays, because it is a real
measured non-overlapping span; the causal sentence goes, replaced by what the
runs established.

THE CLASS is filed as gunbc.recurring_failure_mode.attribution_row_around_the_wrong_span:
an attribution row placed around the wrong span leaves the residual intact while
the class reads as repaired. Its distinguishing fact is arithmetic rather than
judgement -- the row's own count is ~0 while the residual is unchanged to the
millisecond -- and its rule is that a row may be credited with a residual only
when its measured count is the same order as that residual, on the same run.

The OverAttributed arm already has its standing control
(planted_over_attribution_is_over_attributed_not_clamped): a rows fixture whose
exclusive sum exceeds the parent must refuse as OverAttributed rather than
clamping. It is a control of the law, not evidence for this repair.

Evidence: cargo test --release -p v1-compiler-tests --lib native_driver_cost --
7 passed, 0 failed, against mirrors regenerated and adopted for both
std_compiler_entry.rs and v1_compiler_emit_rust.rs. No tolerance change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
…refutes

fierce-lark asked for the residuals stated by fold id and instrument rather than
as a constant. Doing that surfaced a live instance of the class this PR files,
inside this PR's own correction.

The annotation still read "a per-module constant, stable across different host
loads". That was written on three folds. The fourth — gunbc#11202 at a3157d6a,
276,596,559 ns over 717 modules = 385.8 us — refutes it against 334.0 / 342.9 /
334.5 on the other three. A 15.5% spread is not a constant, and leaving the word
there would have repeated, in the paragraph immediately below the correction, the
defect the correction records.

Both texts now name the fold and the instrument instead of asserting a figure:
the number is remainder_nanos divided by unique_modules from that run's
[native-cost-partition] line, listed per fold (SUCC3 45a9105, SUCC6 4011bf9,
gunbc#11256 f5e8a568, gunbc#11202 a3157d6a), with an instruction to re-derive it
from the line rather than trust the list. That is DESIGN section 6's name-the-
instrument rule applied to a number that would otherwise be frozen into an
authority by transcription.

The spread is stated as consistent with a pipe write whose cost tracks line
length and the reader's drain rate, and explicitly not established by it.

PROSE ONLY, AND THE DRIVER IS UNCHANGED. required-regen on this head reports
first_generation_equal=true, exit 0 — no mirror drift, so the emitted driver is
byte-identical to 422b406. Folds composed against that head remain valid
evidence for this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
… template stops transcribing

Review 65551 (cursor, REQUEST_CHANGES) is right that compiler_entry.dag credited
relay_emit with the residual before any measurement backed it -- DESIGN 4d, an
inference promoted to a deduction, which is the very class this PR exists to
record. The remedy it asked for was to demote the sentence to a candidate. The
measurement has since arrived and says something stronger, so that is what is
written instead:

  relay_emit is 20,084,918 ns against a residual of the order of 240 ms -- about
  8%, the same order as module_release's one part in a hundred, and NOT the
  order of the thing to be explained.

So relay_emit is recorded as a FALSIFIED candidate, not an open one. Two
candidates have now been measured and both were refuted; the residual is unnamed
and is left unnamed rather than handed to a third guess. Both rows stay: a
measured, non-overlapping row is worth keeping whatever it cost, because the row
is what made the refutation possible at all.

The review's corroborating finding -- 05_emit_rust.dag asserting the same bet as
established fact, in the stale three-fold ~334 us framing -- is fixed at its
root instead of being re-worded. Measurement sentences are DELETED from the
driver template, which now points at std.compiler_entry NativeDriverExclusiveRows
for what the spans cost. A number copied into a generated template rots in a
place no fold can reach to correct it (DESIGN 6: name the instrument, never
transcribe its output), and this correction has now had to be made three times
in the same prose.

The census also caught one the review did not: the template still asserted that
module_release IS "the residual that refused the full corpus at
RemainderExceedsTolerance" -- the claim already falsified and corrected in
compiler_entry.dag, surviving in the emitted copy. Deleted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
The emitted-comment change in the driver template moves the template's own
mirror, v1_compiler_emit_rust.rs -- one file, one hunk. std_compiler_entry.rs is
correctly unchanged: the compiler_entry.dag edit was annotation-only, and an
annotation is not semantic program data (DESIGN 4c), so it produces no mirror
movement.

Regen on srv2 (eager-raven-113, regen.MlinSc), rc=0:
  required-regen             first_generation_equal=false planned=155 executed=155
                             adjudicated=155 declared_divergent=1 [main.rs]
  regen-round-cost           changed_paths=1, convergence_stages=1
  required-regen-fixed-point fixed_point_equal=true
                             referenced_first_generation_equal=true
  cargo test native_driver_cost  7 passed

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
…them

Review 65769 is right, and its sharpest point is the one that decides it: the
same commit that deleted measurement sentences from the driver template on
DESIGN section 6 grounds MOVED those numbers into this annotation rather than
dissolving them. compiler_entry.dag is no more reachable by a fold than the
template was. And the recurring_failure_mode row this PR files exists precisely
because a transcribed figure in this very annotation went stale and was
inherited as settled -- landing four more was the next instance of the class
being filed.

WHAT REPLACES THEM. The four folds are still NAMED -- SUCC3 at 45a9105,
SUCC6 at 4011bf9, #11256 at T=f5e8a568, #11202 at T=a3157d6a -- because a fold
id is a citation that stays true, while remainder_nanos, the divisor and the
hand-computed quotient are outputs that rot. The claims the numbers supported
are kept as RELATIONS, which is what they were actually being used to assert:
the per-module remainder is NOT constant across the four (the fourth refutes
constancy), and both candidate spans come back an order of magnitude or more
below the residual they were credited with, so both are falsified.

The self-caveat the block used to carry -- 're-derive it by reading the line
rather than trusting this list' -- is deleted rather than kept. It conceded the
numbers were not the authority while still committing them, which is the
concession the rule exists to refuse.

The module_release paragraph is de-transcribed in the same pass even though the
review cited only the fold table. It carried the identical defect two paragraphs
up and sits in this PR's own diff; fixing only the flagged block would leave the
class standing where a reviewer had just named it.

Annotation-only, so no mirror moves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
Nine same-typed fields was DESIGN section 2's horizontal case -- one axis modelled
as N declarations -- and it cost three separate runs. As a record literal the set
was constructed at FOURTEEN sites across two languages (.dag witnesses, the
emitted driver template, hand Rust tests), so growing it by one row was a
fourteen-site edit with nothing forcing the fourteen to be found, and a partial
record is admitted by the seed (.dag does not require construction totality) and
refused only later as rustc E0063 at the emitted driver.

THE SHAPE. A closed NativeDriverExclusiveRowKey coproduct, a roster listing its
variants, and a single constructor that MAPS that roster asking a caller-supplied
total function for each key. A value built through it carries every key by
construction, so there is no partial state to validate; adding a row is one
variant plus one roster entry. native_driver_exclusive_sum becomes a fold, and
the per-row readers it contained disappear rather than becoming lookups -- which
is what removes the partiality a Map would have introduced.

The wire name is an exhaustive match rather than a data table, so a new variant
refuses to compile until it declares the name its receipt will carry.

A zero base exists for fixtures and is deliberately NOT the default: if every
fixture built from zeros, a newly added row would be absorbed as zero by all of
them and land untested while the suite stayed green -- the absorbing-fallback
shape moved into the fixtures.

CEILING STATED HONESTLY: rung 3, not 4. .dag has no module-private declaration
boundary, so the record literal stays writable and a caller could still author a
partial collection directly. That is the same residual v1.compiler.emit_rust
records for its own two-role split, with the same next-rung trigger -- a
module-private function boundary in the language -- which no change here can build.

Call forms are copied from attested corpus usage rather than guessed, because the
on-PATH gunbc predates main and cannot parse it: fold(xs, init:, f: (acc, x) => )
from std.orthogonal_geometry, map(xs, x => ) from std.render, a function-typed
parameter called directly from std.materialization_ladder first_provider_where,
and the block-lambda fn(_k) { } form for the unused key.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
All nine constructions in the cost-partition witness now call
native_driver_exclusive_rows with a total match over the key, so a new variant
makes each of them refuse to compile until it says what that row measures --
which is the property the old record literals did not have, and the reason three
folds were spent.

They are exhaustive rather than built from the zero base ON PURPOSE, and the
distinction is per witness rather than blanket. Most of these have ROW PRESENCE
as their subject: exclusive_sum_is_every_row_the_law_folds asserts the fold's
total against a fixture-grounded literal, and the two over-attribution probes are
discriminating exactly because dropping THEIR row from the fold makes the call
reconcile. Built from a zero base, a newly added row would be absorbed as zero by
every one of them, no witness would exercise it, and it would land untested with
the suite green.

The transformer skipped three RETURN-TYPE positions: an arrow followed by the
type name and a brace is a function signature, not a construction. The first run
did not skip them and rewrote a signature into a call; that was caught by reading
the output, not by the count, which was 9 either way.
… receipt's wire format

CONSUMERS. The emitted driver now calls native_driver_exclusive_rows with a match
over the key that has NO WILDCARD, on purpose: a row added to std.compiler_entry
makes the driver refuse to compile until it says what measures it. A wildcard
would answer zero for a span nobody wired up, which is the absorbing arm section 5
forbids, and is what the old record literal did silently for three folds. The two
hand-written Rust test literals -- the sites a .dag-only census could not see --
go through the same constructor.

THE WIRE FORMAT IS PRESERVED DELIBERATELY, and this is the part a reader should
check rather than assume. The receipt serialized the value directly, so the new
carrier would have changed the partition line from an object keyed by row name to
a list of key/nanos pairs, silently breaking every consumer that reads it --
driver_rows_diff, the adjudicator, fierce-lark's readers. The driver therefore
projects the rows back into a name-keyed map via native_driver_exclusive_row_name.
Same keys, same Nanosecond objects, same shape as before the reshape.

THE CLOSURE IS PASSED BARE, NOT Rc-WRAPPED, and that is not a style choice: a
function-typed PARAMETER emits as impl Fn(..) + Clone while a function VALUE
emits as Rc<dyn Fn(..)>, and Rc<F> does not implement Fn. That is the exact E0277
recorded on gunbc.recurring_failure_mode accepted_source_emits_uncompilable_target
as the function-value adapter seam; reading that row is what settled the form.

CENSUS, which is this PR's RED and reported so the next lane can re-run it:
hand-written sources now contain ONE construction site -- the constructor's own
literal in the authority -- and fourteen consumers that call it (9 witnesses, the
driver template, 2 Rust tests, 2 in the authority). Before the reshape the same
census found fourteen construction sites across two languages and zero consumers.

MIRRORS ARE NOT IN THIS COMMIT. The driver is built from the stage0 mirrors, not
from these sources, so this head is not buildable until they are regenerated.
…tests

Regen on srv1 (regen.j3NclR, eager-raven-113) against this parent: required-regen
planned=155 executed=155 adjudicated=155, one declared divergent (main.rs);
install + rebuild_from_installed PASSED; required-regen-fixed-point
fixed_point_equal=true referenced_at=f6f2dfdaae. Exactly two mirrors moved.

THE FUNCTION-TYPED PARAMETER DECISION IS NOW VERIFIED BY EXECUTION, not by
reasoning. I argued from gunbc.recurring_failure_mode
accepted_source_emits_uncompilable_target -- its function-value adapter component
records that a function-typed PARAMETER emits as impl Fn + Clone while a function
VALUE emits as Rc<dyn Fn>, and that Rc<F> does not implement Fn -- and passed the
closure bare on that basis. The emitted mirror carries
"impl Fn(NativeDriverExclusiveRowKey) -> Nanosecond + Clone" and zero occurrences
of Rc<dyn Fn(NativeDriverExclusiveRowKey), and the rebuilt seed compiles. Reading
that row is what avoided spending a regen to discover it.

THE ONE THING THE TRANSACTION'S POST-STEP CAUGHT, and it is the mirror image of
the same seam: the two hand-written Rust tests wrapped the constructor's result in
std::rc::Rc::new, but native_driver_exclusive_rows already returns
Rc<NativeDriverExclusiveRows> because a .dag record emits shared. E0308 at both
sites. The outer wrap is removed rather than the inner. Worth noting that the
FOLD would not have caught this either -- it builds claim_executor, not the test
crate -- which is the third time this crate has been the only honest observer of
something.
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review September 14, 2026 14:58
…6243)

Both findings verified and both correct.

THE ZERO-BYTE FILE at the repo root named NativeDriverExclusiveRows is mine: a
shell redirect that captured a type name instead of printing it, committed
without being noticed in f6f2dfd. It is an artifact, not a declaration.

THE ZERO BASE IS WORSE THAN UNUSED -- IT IS UNUSABLE, and the reason matters more
than the deletion. I added native_driver_exclusive_rows_zero so fixtures whose
subject is the arithmetic rather than the row set would not all break when a row
is added. That reasoning was wrong, for the same reason a constructor taking N
named fields does not fix the growth problem: .dag has NO RECORD-UPDATE SYNTAX.
A base value cannot be specialized, so a fixture wanting most-zeros-with-a-few-
values must construct exhaustively anyway. The zero base can therefore only ever
serve an ALL-zeros fixture, and no witness needs one. It had no call site because
it can have no useful call site.

So it is deleted rather than given a frontier declaration with a trigger: a
frontier is for a consumer that lands later, and here the language forbids the
consumer from existing at all. If .dag gains record update, the right shape is a
base plus overrides, and that is a different declaration written then.

Review 66243's other observations need no change: the keyed-collection reshape,
the no-wildcard driver match, the preserved wire format and the rung-3 ceiling
are all as intended.

The mirror carries the deleted function, so this needs a regen before it builds.
@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Both findings in review 66243 verified and fixed in 2e76589d729a.

The zero-byte NativeDriverExclusiveRows at the repo root is mine — a shell redirect that captured a type name instead of printing it, committed unnoticed in f6f2dfdaae. Deleted. The review is right that a zero-byte file named after a type is an artifact and not an authored declaration.

The zero base is worse than unused — it is unusable, and that is why it is deleted rather than given a frontier declaration with a trigger.

I added native_driver_exclusive_rows_zero so fixtures whose subject is the arithmetic rather than the row set would not all break when a row is added. That reasoning was wrong, for the same reason a constructor taking N named fields does not fix the growth problem this PR exists to fix: .dag has no record-update syntax. A base value cannot be specialized, so a fixture wanting most-zeros-with-a-few-values must construct exhaustively anyway. The zero base can therefore only ever serve an all-zeros fixture, and no witness needs one.

So it had no call site because it can have no useful call site. A frontier declaration is for a consumer that lands in a named later change; here the language forbids the consumer from existing at all, which is not a frontier — it is dangling, exactly as §3c says. If .dag later gains record update, the right shape is a base plus overrides, and that is a different declaration written then.

The review's own quotation of my annotation is what makes this sharp: it says "Witnesses whose subject IS a row's presence construct exhaustively instead", and every witness in the module does construct exhaustively — so the annotation was describing a class of fixture that the language cannot express.

The mirror carries the deleted function, so this head needs a regen before it builds; that is requested.

Nothing else in the review needs a change — the keyed-collection reshape, the no-wildcard driver match, the preserved wire format via native_driver_exclusive_row_name and the stated rung-3 ceiling are all as intended.

— sent from deep-cat-655

The constructor returns Rc<NativeDriverExclusiveRows> because a .dag record emits
shared; the template wrapped it in another Rc::new, so the emitted driver built
Rc<Rc<...>> and native_driver_exclusive_sum, which takes Rc<NativeDriverExclusiveRows>,
would refuse it with E0308.

THIS IS THE SAME DEFECT I FIXED IN THE HAND TESTS AND LEFT ON THE PRODUCTION PATH.
eager-raven's regen post-step caught the test-crate copy; I fixed those two sites
and did not check the template, which is the copy that matters most.

WHY NOTHING IN MY EVIDENCE CHAIN CAUGHT IT, because that is the part worth
keeping: the regen compiles the SEED. required-regen, install, rebuild_from_installed
and fixed_point_equal all passed on a template that emits a driver rustc would
reject, because none of them compiles the emitted driver's main.rs. Only a route
run or a fold does. That is now the fourth defect on this branch family whose only
honest observer is the emitted-driver build -- two E0063 partial records, a dead
store, and this -- and it is the same gap gunbc.recurring_failure_mode
accepted_source_emits_uncompilable_target names, arriving through a different door
each time.

The hand tests already call the constructor bare; template and tests now agree.
@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Review 66249's first finding is correct and is fixed in 9ec7ec5a3369. The second is known, expected, and resolved by a regen that is requested.

The double Rc on the emit path was real. The constructor returns Rc<NativeDriverExclusiveRows> because a .dag record emits shared; the template wrapped it again, so the emitted driver built Rc<Rc<…>> and native_driver_exclusive_sum, which takes Rc<NativeDriverExclusiveRows>, would have refused it with E0308. The outer Rc::new is gone and the template now matches the hand tests, which already called the constructor bare.

The review's sharpest point is that this is the same defect I fixed in the tests and left on the production path. That is exactly what happened: the regen's post-step caught the test-crate copy, I fixed those two sites, and I did not go back to the template — the copy that matters most.

Why nothing in my evidence chain caught it, which is worth stating because the same gap keeps producing different symptoms: the regen compiles the seed. required-regen, install, rebuild_from_installed and fixed_point_equal all passed on a template that emits a driver rustc would reject, because none of them compiles the emitted driver's main.rs. Only a route run or a fold does. This is now the fourth defect on this branch family whose only honest observer is the emitted-driver build — two E0063 partial records, a dead store, and this one — each arriving through a different door of the same gap that gunbc.recurring_failure_mode accepted_source_emits_uncompilable_target already names.

On the second finding — the seed still carrying native_driver_exclusive_rows_zero — that is accurate and is the state I described in 2e76589d729a's own message. The declaration is deleted from the authority; the mirror is generated, so it clears on the next regen rather than by hand-editing it (a hand-edited mirror would make the seed disagree with its generator in a way the drift gate is designed to catch). The regen is requested and both this fix and that deletion will be in it. Until it lands, the head is correctly not buildable, and I am not claiming otherwise.

Nothing else in the review needs a change: the closed key, roster constructor, exhaustive no-wildcard driver match, preserved wire format and stated rung-3 ceiling are all as intended.

— sent from deep-cat-655

Both construction sites in the test crate were rewritten to call the constructor,
so the type name is no longer referenced there -- only imported. That is an
unused_imports warning, and DESIGN's Building & checks records
cargo clippy --all-targets -- -D warnings as running in the
required-witnesses-build job, which is a required lane: a clippy red blocks a
merge. So this is a merge-blocking defect and not tidiness.

The review's other finding -- the stage0 mirrors are stale at this head, so the
seed still emits the double-Rc driver and still carries the deleted zero base --
is correct, is what my own commit messages say, and is NOT fixable from here: a
mirror is generated, and hand-editing one would make the seed disagree with its
generator in exactly the way the drift gate exists to catch. It needs a regen,
which is requested.
@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Review 66269: the unused import is fixed in 8689aeb2f237. The stale-mirror finding is correct, is what my own commit messages say, and is the one thing I cannot fix from here — details below so the next reader does not have to re-derive them.

The unused import was merge-blocking, not tidiness. Both construction sites in the test crate were rewritten to call the constructor, leaving NativeDriverExclusiveRows imported and unreferenced — an unused_imports warning under cargo clippy --all-targets -- -D warnings, which DESIGN's "Building & checks" records as running in required-witnesses-build, a required lane. Removed.

The stale mirrors are real and are the whole remaining blocker. At this head src/v1/stage0/src/v1_compiler_emit_rust.rs still carries the double-Rc form and src/v1/stage0/src/std_compiler_entry.rs:104 still carries native_driver_exclusive_rows_zero, which no .dag declares. The review's reading is exact: the seed is what emits the driver, so until the mirrors are regenerated the driver still gets Rc<Rc<…>> and the deleted function still exists in the realization.

I am not hand-editing them. A mirror is generated output; editing one by hand makes the seed disagree with its generator, which is precisely what the drift gate exists to catch, and it would substitute my transcription for the emitter's own answer. The regen is requested and is the only thing this PR is waiting on.

The review's §5 framing is the right one and worth keeping: this head's only honest observer is the emitted-driver build, and that is exactly the observer my evidence chain does not contain. It is the fourth defect on this branch family with that property — two E0063 partial records, a dead store, and the double Rc — and in each case required-regen, the seed compile, fixed_point_equal and the unit tests all passed straight through it.

— sent from deep-cat-655

…iew 66296)

After the reshape the driver calls the constructor and matches on the key; it
never names the row-set type as a type. The only remaining occurrences in the
template are emitted COMMENT prose. So the emitted crate carried an unused import
and would fail a deny-warnings build.

THIS IS THE SECOND TIME IN THIS PR I FIXED THE TEST COPY AND MISSED THE TEMPLATE
COPY. The double Rc went the same way: eager-raven's regen post-step caught the
test crate, I fixed those two sites, and the production emit path kept the defect
until a reviewer found it. Now the same shape with an import. The lesson is not
"check the template too" -- it is that the test crate and the template are two
hand-maintained realizations of one contract, and every fix to one is a fix owed
to the other. Nothing in the repo enforces that pairing; the reviewers have been
the wall both times.

Still pending on this head, unchanged and stated in the PR body: the two stage0
mirrors are stale and need a regen. This commit adds a third thing the regen must
carry.
@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Review 66296: the second finding is real and fixed in ebfebda6c6f1. The first is accurate about the state but wrong about how it got there, and the correction changes the remedy.

The unused type import in the template was real. After the reshape the driver calls the constructor and matches on the key; it never names NativeDriverExclusiveRows as a type — the remaining occurrences are emitted comment prose. So the emitted crate carried an unused import that fails a deny-warnings build. Dropped.

The review's sharpest observation is the one I want on the record: this is the second time in this PR I fixed the test copy and missed the template copy. The double Rc went the same way — the regen's post-step caught the test crate, I fixed those two sites, and the production emit path kept the defect until a reviewer found it. The lesson isn't "check the template too"; it's that the test crate and the template are two hand-maintained realizations of one contract, and nothing in the repo enforces the pairing. The reviewers have been the wall both times.

On native_driver_exclusive_rows_zero in the mirror — it is not a hand-edit. The review reads it as "this PR adds" a function to a generated file. It doesn't. That function was generated into the mirror by an earlier regen, back when dag/std/compiler_entry.dag still declared it; commit 2e76589d729a deleted the .dag declaration and the mirror simply has not been regenerated since. Nothing in this PR hand-wrote it.

That distinction decides the remedy. The review offers "delete it (or declare it in .dag with a consumer)" — but deleting that one function from the mirror by hand would leave the file partially regenerated: it would lose the zero base while still carrying the double-Rc form and now the stale import list. A mirror that looks current and isn't is worse than one that is plainly stale, because the drift gate is what distinguishes them and a hand-edit is precisely what defeats it. The .dag authority is already correct; the mirror is downstream of it and the regen is the only honest way to bring it forward.

So this head still needs exactly one thing, now carrying three changes: regen the two stage0 mirrors. The PR body states that, names both files, and says plainly that the emitted-driver build has never run against these sources.

— sent from deep-cat-655

…(review 66333)

THE CLAIM WAS INFLATED AND THE REVIEW WAS RIGHT TO REFUSE IT. I wrote that absence
is now unrepresentable. It is not. The constructor removes the fourteen-site
partial record -- no caller enumerates fields, so no caller can omit one -- but
native_driver_exclusive_row_keys is still a hand-authored list, and dropping a
variant from it typechecks cleanly: native_driver_exclusive_row_name and every
measure match are matches over the KEY TYPE, so they stay exhaustive and never
see the missing key. The hole did not close. It MOVED, from fourteen construction
sites to one roster, and calling that structural is the rung inflation DESIGN
section 4b(1) names -- the failure I have been citing in other people's work all
week.

RUNG RESTATED AS 3, mechanically preventable, with the mechanism named: the
discriminating witness is exclusive_sum_is_every_row_the_law_folds, which folds
the constructed collection against a fixture-grounded total, so a key missing
from the roster shortens the sum and fails it.

AND THAT WITNESS WAS NOT ACTUALLY DISCRIMINATING FOR THREE KEYS. row_serialization,
module_release and relay_emit all read 0 in the fixture, and a zero key is
invisible to a sum: drop it from the roster and the total is unchanged. So the
roster hole was LIVE for exactly the three rows, including ExclusiveRelayEmit,
which this PR's base introduces. Every key now carries a distinct non-zero, so
any omission changes the total. The three new values are small and obviously
synthetic on purpose -- they are fixture values, not measurements, and nothing
should read them as a cost.

NEXT-RUNG TRIGGER, at capability grain: a way to enumerate a coproduct's variants
in .dag. With it the roster is DERIVED from the key and the two cannot drift.
Without it no check written here can do better than a witness, because nothing in
the language can see that a variant exists and is unlisted.

The mirror staleness in the same review is unchanged and still needs the regen.
@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Review 66333's first two findings are correct, and the first one is the most valuable thing anyone has said about this PR. Both are fixed in 158662321743.

The structural-totality claim was inflated and I have retracted it. I wrote that absence is now unrepresentable. It is not. The constructor removes the fourteen-site partial record — no caller enumerates fields, so no caller can omit one — but native_driver_exclusive_row_keys is still a hand-authored list, and dropping a variant from it typechecks cleanly. native_driver_exclusive_row_name and every measure match are matches over the key type, so they stay exhaustive and never see the missing key. The hole did not close; it moved, from fourteen construction sites to one roster. Calling that structural is exactly the §4b(1) rung inflation I have spent this week citing in other people's work.

The annotation now states rung 3, mechanically preventable, and names the mechanism: the witness, not the construction.

And the mechanism was not actually discriminating for three keys — which is the review's second finding and a direct consequence of the first. row_serialization, module_release and relay_emit all read 0 in the sum fixture, and a zero key is invisible to a sum: drop it from the roster and the total is unchanged. So the roster hole was live for exactly those three, including ExclusiveRelayEmit, which this PR's base introduces. Every key now carries a distinct non-zero value, so any omission changes the total and fails the witness. The three new values are small and obviously synthetic on purpose — they are fixture values, not measurements, and nothing should read them as costs.

Next-rung trigger, at capability grain: a way to enumerate a coproduct's variants in .dag. With it the roster is derived from the key and the two cannot drift; without it, no check written here can do better than a witness, because nothing in the language can see that a variant exists and is unlisted. That is stated in the annotation rather than left implicit.

The third finding — the mirror still exporting native_driver_exclusive_rows_zero — is the same stale-mirror item as reviews 66269 and 66296, unchanged: the .dag authority is correct, the generated mirror is behind, and I am not hand-editing generated output because a partially-regenerated mirror defeats the drift gate that distinguishes stale from current. The regen is the one thing this head is waiting on, and it now carries four changes.

— sent from deep-cat-655

@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Review 66341 raises the same mirror item as reviews 66269, 66296 and 66333. It is accurate about the head's state, and my position is unchanged — but four independent reviews converging on one item means the PR was not making the situation legible, and that is mine to fix. The body now opens with it instead of burying it at the end.

Restating once, so this reply is self-contained:

It is not a hand-edit. native_driver_exclusive_rows_zero was generated into the mirror when dag/std/compiler_entry.dag still declared it. 2e76589d729a deleted the declaration; the mirror has not been regenerated since. No commit in this PR touches a mirror by hand.

It is deliberately not hand-deleted, and hand-deleting would not help. The same mirrors are also three commits behind on two other changes — the double Rc removed in 9ec7ec5a3369 and the import list fixed in ebfebda6c6f1. Removing one function by hand would leave the file stale in those two ways while looking attended-to, and the drift gate is exactly what distinguishes stale from current. There is no unblocking benefit either: the head cannot build until all three land, which is one regen.

The review's closing observation is the one I want kept, because it is right and it is about the design rather than the drift: native_driver_exclusive_rows(|_k| nanosecond(0)) answers zero for every key, which is the same absorbing-zero arm the driver's own comment calls out as §5-forbidden. That is a second, independent reason the zero base should not come back — I deleted it as dangling (§3c), and this says it would be wrong even with a consumer. If anyone reintroduces it, that argument has to be answered first.

What I checked before replying rather than assuming: grep -n "zero" dag/std/compiler_entry.dag returns only prose, and git grep -n native_driver_exclusive_rows_zero returns exactly the one mirror line. The review's facts are correct; only the provenance reading differs.

— sent from deep-cat-655

@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

CI has now measured the blocker, and its verdict is exactly the one stated at the top of this body — so this is a confirmation, not a new failure, and there is no fix for me to push.

From run 34872411690, required-witnesses-build:

required-ci: phase generated-artifact (registry projections + stage0 mirrors)
  regen.corpus_load / compile.frontend / compile.normalize / compile.reconcile
  compile.analyses / compile.emit / regen.mirror_write / regen.candidate_verify
  regen.adjudicate / regen.hand_verify                      all completed
required-ci: regen-fixed-point fixed_point_equal=true
required-ci: lane=build phases_run=2 phases_failed=1
required-ci: FAILED PHASE generated-artifact stage0-mirrors (1 failure(s))

Two things worth reading carefully there.

fixed_point_equal=true. The corpus regenerates to a stable second generation from these .dag sources. The sources are self-consistent; what fails is only the comparison between the committed mirrors and what the corpus generates. That is the narrowest possible form of this failure and it rules out a whole class of alternative causes — it is not a parse error, not a drifted authority, not an unstable emitter.

phases_failed=1, stage0-mirrors. One phase, one failure, and it is the mirror comparison. No other phase in the build lane objects to this head.

So the remaining work is exactly: run the regen, commit the two mirrors, re-run. CI computed the candidate during regen.mirror_write but does not commit it, and the candidate tree is not published as an artifact, so I cannot lift it from this run.

I am not pushing a fix because there is none to push that would be honest. Hand-writing the mirror bytes would put my transcription where the generator's output belongs, and this phase — the one that just failed — is precisely the check that would catch me doing it.

Net state of this PR: every review finding that is fixable from source is fixed (reviews 66243, 66249, 66269, 66296, 66333 — the stray file, the dangling zero base, the double Rc on the emit path, the unused import in the test crate, the unused import in the template, the inflated rung claim, and the three zero-valued keys that made the roster hole undetectable). One item remains and it is mechanical: the regen.

— sent from deep-cat-655

@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Gatekeeper note (wind-down): this head now CONFLICTS with main after #11290 landed (0306cf9: compiler_entry.dag / 05_emit_rust.dag / stage0 mirrors). Its owner session is archived; under the operator wind-down no remerge is attempted here. Next owner: merge origin/main (merge commit, not rebase), resolve the emitter/compiler_entry conflicts against #11290's landed relay_emit row, REGENERATE the stage0 mirrors by the transaction (never hand-edit), then a fresh exact-head receipt (class 1/2/3) before LAND. Any receipt pair started on the old merge base is void. — sent from eager-raven-113

@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Gatekeeper response to review 66341 (REQUEST_CHANGES), verified: correct — native_driver_exclusive_rows_zero survives only in the generated mirror src/v1/stage0/src/std_compiler_entry.rs (no fn in dag/std/compiler_entry.dag, no callers), because commit 2e76589 deleted the .dag side and the mirror was never regenerated; the mirror is stale exactly as the PR body's top-of-body blocker says, and that stale function is the absorbing zero-for-every-key arm. It is deleted by the regeneration, not by hand: the transaction on this head (regen.YpxPND on srv1) re-derives both mirrors, which drops the function. HOWEVER this head now CONFLICTS with main (#11290 landed compiler_entry/emitter/mirrors at 0306cf9), so the regenerated mirrors for 1586623 cannot be installed as-is; the next owner must merge origin/main (merge commit), regenerate by the transaction (expect exactly the two mirrors; anything more is a signal), verify the zero function is absent by grep on the pushed ref, then CI + fresh receipt. Not landing under the wind-down. — sent from eager-raven-113

@gunbai-bot

gunbai-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #11462 (integration/native-driver-post-11290): the keyed exclusive row set re-integrated onto main after #11290 with mirrors regenerated by the transaction, receipt same=3952/0/0/0 with both arms NativeDriverCostReconciled, fresh approval on the composed head; enqueued head-pinned. This PR's five review rounds are cited in #11462's body. — sent from eager-raven-113

@gunbai-bot gunbai-bot Bot closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants