Repository navigation
Realization-cost fidelity: the structured cost form in CostShape's own home, and a per-operand join that consumes std.pareto - #11026
Conversation
…n home, and a per-operand join that consumes std.pareto The compile-obligation census's one row WITHOUT A HOME: the modeled cost of an operation and the cost its chosen realization actually has were two facts with nothing joining them, so a declared cost could be realized slower, or faster, and neither direction had a carrier able to state it. WHY NOT THE BRIEFED SHAPE. The brief homed the join on CostShape. CostShape names a growth RANK, so it cannot distinguish work over both operands from work over one — both are "linear" — and the join would have returned CostShapePreserved on exactly the specimen the class was written about (gunbc.recurring_failure_mode lens_prices_the_authority_while_the_lane_runs_the_realization: concat_contract declares work over both operands while the realization charges the right one only, so a cost model reading the contract convicts the correct construction). A wall whose RED is unauthorable for its own motivating case is DESIGN §4b's decoration. WHAT LANDED INSTEAD, per operator ruling: extend CostShape's OWN home rather than mint a second vocabulary beside a consumer. - dag/std/algebra.dag gains the structured form: CostFactor over a NAMED operand (constant / logarithmic / linear / linearithmic), CostTerm as a product of factors, StructuredCost as a sum of terms. CostShape stays, now as the PROJECTION of that expression via structured_cost_to_shape — partial and saying so: a cost linear in two operands has no CostShape image, and the absent arm is the vocabulary gap stated rather than a rounded rank. - dag/std/realization_cost_fidelity.dag joins modeled to realized PER OPERAND and CONSUMES std.pareto for the dominance algebra rather than restating it (DESIGN §3d), which also inherits Pareto's separation of Incomparable from DominanceUndecided. FIVE ARMS WHERE THE BRIEF ASKED FOR FOUR, both additions stated: RealizationDivergesByOperand is a proven trade-off — cheaper in one operand, dearer in another — and collapsing it into Unknown would be the absorbing fallback; ModeledCostNotStructured is the counted migration frontier for contracts not yet restated in the structured form. RealizationCostUnknown stays reachable only from a MISSING realization fact, never from a comparison. Evidence, by execution (claim_batch): 8 witnesses green, led by the specimen — concat modeled over both operands against realized over the right one comes out RealizationFasterThanModeled (the model over-prices the left operand). Its discriminator lives beside it in the corpus rather than in this message: the rank-only reading cannot see that divergence, which is why the structured form had to land first. NOT CARRIED, and declared rather than implied: the row population. Asserting a realized cost for a primitive without measuring the emitted compiler would be the fabricated fact this authority exists to catch, so the rows land with the measurement, and the contracts' migration to the structured form is the trigger that retires ModeledCostNotStructured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Conformance note, now that DESIGN §3b carries a decision/selection domain (#11010, landed after this branch was cut): that row's home authorities include Stating it here because the domain's whole point is that the answer is three-valued and the middle value has to be said out loud: this is conforms, not a stated divergence. Worth one more line on what that inheritance bought, since it is the part I would otherwise have had to argue for: Pareto's separation of — sent from calm-crane-722 |
…s (floor red) The floor refused at dag/std/algebra.dag:367 — "variant 'Empty' not found in type 'List'", same for 'Cons'. In dag/std, List and FreeMonoid are distinct types: `[]` and `concat([x], acc)` build the former, `Empty` and `Cons` the latter, and I had mixed them in four fold accumulators plus a match in structured_cost_to_shape. All five sites now use List's own idiom, and the projection reads the operand list with length() and first() rather than matching FreeMonoid variants against it. WHAT THIS COST, recorded because it changes what my evidence is worth in this layer: the local claim_batch run was GREEN on exactly the code the floor refused. The interpreter accepted the mixed constructors; the floor's resolve did not. For dag/std changes the floor is the oracle and a local pass is not evidence of one. The eight witnesses pass again after the repair, including the concat specimen (RealizationFasterThanModeled) and its rank-only discriminator. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
…diff (review 63523) Two findings, both real. 1. THE PROJECTION ROUNDED INSIDE THE FUNCTION THAT FORBIDS ROUNDING. rank 1 is LOGARITHMIC in the operand and CostShape has no logarithmic spelling, but shape_for_single_operand_rank answered ShapeConstant for it — a cost that grows reported as one that does not, which is exactly the fabricated answer the annotation three lines above says the authority exists to prevent. It answers absent now, like every other cost CostShape cannot say, and two witnesses keep the distinction executed rather than asserted: the logarithmic case must not project, and the neighbouring linear and linearithmic ranks still must. 2. THE FRONTIER WAS IN THE PR BODY, NOT IN THE DIFF. §3c admits a declaration whose consumer lands later only with the trigger stated BESIDE it, and names "consumption described in the PR body but absent from the diff" as a tell. The module now carries it: the named consumer (the compile-obligation census's realization-cost-fidelity row, joined per (primitive, target) through realization_cost_fidelity_rows, with the three counters as its reported populations), the route, and the trigger as a CAPABILITY — the emitted compiler being measurable per primitive, so a realized cost is an observation rather than an assertion. It also records why there are deliberately no RealizationCostFact rows yet: hand-authoring one would make the model and the realization agree by construction, which is the failure this join exists to make impossible. And it says plainly what a green run means today — the arms are proven against authored costs, and the population this will judge does not exist yet. Ten witnesses pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Both findings in review 63523 verified and fixed in 1. The projection rounded — inside the function whose own annotation forbids rounding. Two witnesses keep it executed rather than asserted: 2. The frontier was in the PR body, not in the diff — which §3c names as a tell in so many words ("consumption described in the PR body but absent from the diff"). Correct, and the fix is in the module rather than here:
The module also records why there are deliberately no On — sent from calm-crane-722 |
…match, not a slug table (review 63550)
Two findings, both real, and the first is the same defect one level deeper than
the last round's.
1. THE RANK ARITHMETIC COLLIDED, AND A COLLISION HAS NO REFUSAL DOOR. Growth was
a single ordinal (constant 0, log 1, linear 2, linearithmic 3) summed across the
factors of a term, so log(n)*log(n) and n both scored 2: cost_fidelity_of(modeled:
log^2 n, realized: n) answered CostShapePreserved, and structured_cost_to_shape
projected log^2 n as ShapeLinearScan. A real divergence reported as preserved, by
the module built to make that impossible — and, as the review put it, the absent
arm proves refusal was available while a collided rank offers no such door.
Growth in an operand is n^degree * (log n)^logs, which is two numbers. It is
carried as OperandGrowth { degree, logs }, multiplied within a term (a term is a
product, so the exponents add — separately) and maxed across terms under a
LEXICOGRAPHIC order, which is the true order of those functions: n beats
(log n)^k for every k. The projection follows: CostShape can say exactly
constant, linear and linearithmic in one operand, and logarithmic, quadratic and
log-squared each answer absent rather than rounding to the nearest thing it can
say.
The axis comparison moves from axis_comparison_int to axis_comparison(goal,
value_order:) accordingly. std.pareto still owns dominance; supplying the
ordering of a growth rate is this authority's own job.
2. TARGET EQUALITY MINTED A SECOND NAMING SCHEME. cost_realization_target_slug
gave each arm of a closed three-arm coproduct a string and compared strings —
names for arms the type already names (§3). realization_target_eq is a
structural match now, which also fails in the right direction: a fourth target
stops the match compiling, where a slug table would silently answer "not equal"
for a missing row.
Three new controls, thirteen witnesses green: log^2 versus linear must come out
RealizationSlowerThanModeled, and log^2 and one-operand-quadratic must each have
no CostShape.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Both findings verified and fixed in 1. The rank arithmetic collided, and a collision has no refusal door. You are right that this is not hypothetical — So growth stops being an ordinal. A cost in an operand is The axis comparison moves from 2. Target equality minted a second naming scheme. Correct, and it is the §3 violation in miniature: three arms the type already names, given string names so they could be compared. Three new controls, thirteen green: Worth saying plainly: two rounds in a row, the defect was in an arm my own witnesses did not exercise, in a module whose subject is fabricated cost answers. The controls are now written from the vocabulary's combinations rather than from the cases I happened to think of. — sent from calm-crane-722 |
…t vocabulary was missing (review 63577)
CostShape is not a pure growth vocabulary. ShapeIterateBody means "once per
element, times whatever the caller's body costs", and it is the cost
std.primitive_identity carries TODAY for fold_list and index_by. StructuredCost
had no factor for that, so when those primitives migrate the only honest
spelling was LinearInOperand — and the projection answered ShapeLinearScan, a
DIFFERENT arm of the same authority, silently. ShapeIterateBody had no preimage
and ShapeLinearScan had two: two names answering one question and disagreeing
(§3), and the rounding this function's own annotation forbids (§5).
The review offered two repairs and this takes the modelling one, because
refusing the linear case would leave ShapeIterateBody permanently unreachable
and the projection nearly vacuous, while the body is a real fact that belongs in
the vocabulary:
- CostFactor gains CallerBodyPerElementIn { operand }, and OperandGrowth gains a
bodies count.
- THE BODY IS NOT AN EXPONENT. It multiplies the work without changing growth in
the operand, so it counts separately and the order stays over (degree, logs).
- An axis whose growths agree and whose bodies differ is therefore
UndecidedOnEvidence — std.pareto's own word — because the body may be O(1).
Calling it Same hides a real difference; calling it worse invents one.
- That lands as a sixth arm, RealizationCostBodyDependent, rather than being
folded into RealizationCostUnknown, which stays reachable only from a MISSING
fact. Without the new arm the undecided case would have reported "not
measured" about something measured.
- The projection is total with exactly one preimage per arm: (0,0,0) constant,
(1,0,1) iterate-body, (1,0,0) linear-scan, (1,1,0) sort-body.
Three new controls, sixteen witnesses green: the two formerly-colliding arms
must project differently, a per-element-body difference must be undecided rather
than preserved, and a body must not outrank a real growth difference.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
review 63577 found a real §3 fork and I took the deeper of its two proposed repairs. Fixed in The finding, restated so the record is clear: Why the modelling fix rather than "refuse the linear case too": refusing linear would leave
Three new controls, sixteen green: This is the third round on this module where the defect sat in a combination the vocabulary admitted and no witness constructed — the pattern is filed as two receipts on — sent from calm-crane-722 |
…view 63603) Two findings, both real, both arms I introduced and did not enumerate. 1. THE BODY COUNT WAS DROPPED BY A GROWTH-DOMINATED TERM. operand_growth_max returned the winning term's OperandGrowth whole and consulted bodies only on an Equal tie, so modeled [n*n] against realized [n*n, body(n)] both collapsed to (2,0,0), compared Same, and answered CostShapePreserved — for a realization that runs a caller-supplied body per element where the model runs none. The fabricated preserved this module exists to refuse, produced by the function meant to keep those two facts apart. A cost is a SUM, so growth in an operand comes from the largest term; a body is a fact about the COST, not about the winning term. Growth now comes from the ordering and bodies are maxed independently — the same argument that keeps degree and logs separate rather than summed. 2. RealizationCostBodyDependent WAS COUNTED IN NO REPORTED POPULATION. Not a finding, not unmeasured, not unmigrated — so a measured-but-undecided row was invisible in all three counts the declared consumer reports. The arm exists so an undecided comparison is not read as preserved; being uncountable defeats it just as completely and more quietly. It has its own population now, count_cost_body_dependent, and the module's consumer statement names four populations rather than three. Two new controls, eighteen green: a body in a losing term must not be dropped, and the undecided arm must appear in a reported population — the second asserting all four counts on one ledger, so the type cannot gain an arm again without the accounting being revisited. THE PATTERN, fourth round running on this module: the defect sat in a combination the vocabulary admits and no witness constructed. #11031 files that class. This round sharpens it — adding an arm to a coproduct is not finished when the arm is REACHABLE, it is finished when every fold over that type has been revisited, and the counting folds are the ones that fail silently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Both findings verified and fixed in 1. The body count was dropped by a growth-dominated term. Traced exactly as you describe: The repair is the argument you make: a cost is a sum, so growth in an operand comes from the largest term, but a body is a fact about the cost, not about the winning term. Growth comes from the ordering; 2. Two new controls, eighteen green: One thing this round taught that the previous three did not, and I would rather write it down than repeat it: adding an arm to a coproduct is not finished when the arm is reachable — it is finished when every fold over that type has been revisited. The match arms fail loudly when a variant is added; the counting folds accept the new arm and silently exclude it from every population. Those are the folds that need looking at, and they are the ones that look fine. — sent from calm-crane-722 |
…mar (review 63628) LOCAL COMMIT, NOT PUSHED: #11026 is held and under a no-push rule. Committed so the work does not follow a branch switch, which is how the 4a drafts leaked into #11004 earlier today. std.induction already owns a sum-of-products cost algebra over named parameters: AtomicCost (PolyCost { param, exponent } / LogCost { param }), ProductBound, SumOfProductsBound — and owns it more completely than what I wrote, since PolynomialExponent carries fractional and log-based exponents my four-factor grammar could not express. The equivalences are exact: cost_nlogn IS linearithmic, and cost_graph_linear IS the concat specimen, already in the corpus. So I minted a second cost grammar — §2 failed decomposition, §3 nicknaming — in the change that argued a second cost vocabulary beside a consumer is the fork §3 forbids, in a module whose subject is a cost authority disagreeing with itself. I DFS'd CostShape and stopped there instead of following the concept DAG one step further. - std.algebra: CostFactor / CostTerm / StructuredCost deleted; CostShape stays, with an annotation recording the failed decomposition and naming CostBound. - std.induction: AtomicCost gains CallerBodyCost { param } plus cost_iterate_body — the one fact genuinely absent, and the reason a projection from this authority could not reach ShapeIterateBody at all. Nothing outside induction.dag matches on AtomicCost, so the arm adds no obligation elsewhere. - The growth derivation and the CostShape projection move to std.induction, beside the carrier they read: ParamGrowth { degree, logs, bodies, representable }, lexicographic on (degree, logs), body held out of the order, and representable:false for fractional exponents, log-based exponents, ForeverBound and ErrorBound — a real bound this reading cannot order says so rather than rounding. - The join consumes CostBound and speaks its vocabulary (param_*, not operand_*): having renamed the authority, keeping a second name for its parameters would be the same defect one scale down. Nineteen witnesses green, every verdict preserved across the migration, plus one control that only became AUTHORABLE on the richer authority: cost_sqrt exists in std.induction, and a fractional exponent must not round to a shape. The specimen witness now reads cost_graph_linear(v_param: "left", e_param: "right") — a constructor that was already there, which is the plainest statement of what the review caught. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Investigated. This one is mine and real — not the toolchain deleter and not the D1/G parse family — but it is not fixable on this head today, and I am not pushing because this PR is held under the D-train no-push rule. The failure: For the record on the other job: the Why the fix waits, and what it will be. The head that failed ( So the regeneration belongs to the un-hold step, against the rebuilt content, in one push: remerge main, regenerate the stage0 mirrors from the merged authorities, push once. Worth noting the mirror regen needs a cgroup-bound host (the producer-driven regen panics The general point this raises for the queue, since I am not the only lane touching — sent from calm-crane-722 |
…nd its own count (review 63797)
Both claimed silent wrong answers REPRODUCED by execution before I touched
anything:
cost_fidelity_of(modeled: cost_linear("n"), realized: cost_sqrt("n"))
-> RealizationFasterThanModeled (sqrt(n) reported cheaper than n)
cost_fidelity_of(ForeverBound, ConstantBound)
-> CostShapePreserved (unbounded reported as preserving)
The cause is the one the review names: ParamGrowth carries `representable` and
the PROJECTION consults it, while param_growth_order compares only (degree,
logs) — so an unrepresentable growth was ordered as (0,0), i.e. constant. The
module's own annotation says a reader reporting constant or linear for such a
bound "would be fabricating". The join did exactly that, three lines of
indirection away, which is the same shape as the two rounds before it: the
refusal existed and the consumer did not ask.
ForeverBound is worse and needed a second look: it names no parameters at all,
so the axis list was EMPTY, and an empty axis list is Equivalent in std.pareto.
"No axes" and "no difference" are not the same fact. That is why orderability is
a property of the WHOLE BOUND (cost_bound_is_orderable in std.induction) rather
than a per-parameter flag — a bound with no parameters has no per-parameter flag
to carry.
CostGrowthNotOrderable is its OWN arm, not overloaded onto
RealizationCostBodyDependent as the review warned against. They are different
ignorances with different repairs: body-dependent means both costs are fully
known and their ORDER turns on an unmodeled body cost; not-orderable means this
reading cannot place a bound on the lattice at all. Folding them together would
send a reader to model a body when the real gap is a fractional exponent.
The arm is COUNTED — count_cost_not_orderable, a fifth reported population — and
every existing fold over CostFidelity was revisited. That is the rule this module
learned two rounds ago after shipping a reachable arm no count reported: adding
an arm is not done when the arm is reachable, it is done when every fold over the
type has been revisited.
Five new controls, twenty-four green, including two_constants_still_compare_as_
preserved so the gate is about ORDERABILITY rather than about having no
parameters — without it I would have no evidence I had not simply broken the
constant case.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Fixed in √n reported as cheaper than n; unbounded work reported as preserving a constant. Your diagnosis of the cause is exact:
The arm is counted ( Five new controls, twenty-four green. One of them is there for a reason worth naming: Separately, for whoever reads this next: the — sent from calm-crane-722 |
…the join it now has
Review 63818, both findings.
ONE, by construction rather than by a later gate. `ParamGrowth.representable`
was an in-band sum: a growth this reading cannot place still carried a degree
and a log count, and param_growth_order compared them without consulting the
flag. That is how sqrt(n) came to order cheaper than n and an unbounded cost
came to compare equal to a constant; the orderability gate added last round
caught both AFTER the illegal comparison was written, which is validation
standing where construction was available (DESIGN 5).
type GrowthRank { degree, logs, bodies }
type ParamGrowth = OrderableGrowth { rank } | GrowthNotOrderable
fn param_growth_order(a: GrowthRank, b: GrowthRank) -> Ordering
A caller holding an unplaceable growth now has nothing to pass the order, so
the comparison the flag existed to prevent has no way to be written. The
construction found a live caller on its first run: the existing witness
the_rank_only_reading_cannot_see_the_concat_divergence was handing two
ParamGrowth values straight into param_growth_order, and the module refused it.
atomic_cost_is_orderable is now derived from the growth arm instead of
re-spelling the exponent match beside it. cost_bound_is_orderable stays,
because a bound with no parameters yields no per-parameter growth at all and
ForeverBound is exactly that shape -- that residue is what it covers, and the
annotation now says so. std.realization_cost_fidelity follows: the axis
comparison is AxisComparison? and the fold absorbs into CostGrowthNotOrderable
rather than rendering an unplaceable axis as UndecidedOnEvidence, which is a
different ignorance with a different repair.
TWO. The census row's NoHomeExists payload said nothing declares the
preservation join, and this head declares it -- a false payload is a meaning
fork of the modeling-state fact. `nearest` now points at
std.realization_cost_fidelity cost_fidelity_of, and the reason and trigger
state what is actually still missing: nothing reads a cost bound off an emitted
realization, so the join has no realized operand, and the home remains wherever
a target realization is selected.
Five new controls on the arms; 29 witnesses green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Review 63818, both findings verified against the head they were raised on and both fixed in b376035. Finding 1 — Declared as the coproduct: The order takes a rank, not a growth, so a caller holding an unplaceable growth has nothing to pass it — the comparison is unwritable rather than refused. It found a live caller on its first run: the existing witness
Finding 2 — the census row asserts Five new controls on the arms ( The remaining red on this PR is the — sent from calm-crane-722 |
…ties Build-lane regen candidate (claim_executor --required-ci --required-lane build) at b376035 on srv2; the only drifted mirror. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMR4u1m3S6WS5RM7pRSe2n
…serted otherwise flips Review 63838, both findings. ONE. rank_axis_comparison decided the axis from (degree, logs) alone on the Less/Greater arms and consulted the body count ONLY when growths were equal. The body is caller-supplied work this carrier cannot bound -- std.induction says exactly that in its own annotation -- so a body delta OPPOSING the growth delta can outweigh it by any amount. n x body(n) against n log n was answered RealizationSlowerThanModeled with confidence; at a body of O(n^2) the modeled side is n^3 and the realization is dramatically faster. The mirror direction is worse because the answer flatters the realization: a modeled n^2 against a realization running an unbounded body per element answered FASTER. And the wrong answer was enrolled as a GREEN witness. That is the part worth naming: a_body_does_not_outrank_a_real_growth_difference encoded my reasoning instead of testing it, so it could only ever confirm what I already believed. ONE RULE REPLACES TWO: the axis is decided exactly when the body delta agrees with the growth delta or is zero, and is UndecidedOnEvidence when they oppose. That SUBSUMES the equal-growth case -- growths equal with bodies differing is opposition at a growth delta of zero -- so this is one rule rather than a new arm beside the old one, and the module got smaller. Three controls, and they discriminate against each other by construction: the two opposing directions (which the old rule answered Slower and Faster) and an agreeing-delta control, so the repair is not a blanket retreat into undecided. 31 witnesses green. TWO. The arm-roster annotation opened with a count that went stale the moment this branch added an arm. Deleted rather than corrected: DESIGN section 4c says an annotation must not restate what the declaration structurally says, and a count is exactly that restatement -- it is the reason it could drift at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
Review 63838, both findings, fixed in a5087bd (on top of the regenerated Finding 1 — the body count is dropped whenever growth differs. Correct, and the reachable case you name is the one that matters most, because I had enrolled the wrong answer as a green witness. The repair is one rule replacing two rather than a new arm beside the old one:
That subsumes the equal-growth case — growths equal with bodies differing is opposition at a growth delta of zero — so Three controls, and they discriminate against each other by construction:
Passing all three is only possible under the intended rule. 31 witnesses green. Finding 2 — the stale arm count in the annotation. Correct, and deleted rather than corrected. §4c says an annotation must not restate what the declaration structurally says, and a count of arms is exactly that restatement — which is why it could drift. The paragraph now points at the declaration instead of counting it. The remaining CI red at the previous head was the — sent from calm-crane-722 |
|
srv2 closure receipt for #11026 at head a5087bd (overlay on main 44a0467; instrument Regressed files vs the main baseline (
Receipt-neutral by execution; the regenerated |
… partition is enforced Required repairs from the landing ruling. Two defects at two grains, repaired at the grain each belongs to. ONE, PER KEY: realization_cost_for stopped at the first matching (primitive, target) fact, so [linear, quadratic] and [quadratic, linear] answered DIFFERENTLY for one key. The verdict was decided by the caller's list order rather than by the realization -- a well-formed wrong answer, which is worse than a refusal because nothing about it looks wrong. The lookup is now three arms, and the fold reaches Duplicated from EITHER order, which is what makes the answer independent of how the list was built. The contradiction surfaces as a counted CostFidelity arm classified as a FINDING, because two facts disagreeing about one key is something a person must repair. A CONTRADICTED KEY IS NOT AN UNMEASURED ONE, and its own control says so. Both are "no usable realized cost", and collapsing them would file the repair against the wrong lane: unmeasured means nobody looked, contradicted means two people looked and disagreed. TWO, ACROSS KEYS: modeled and unstructured are the two halves of one question -- has this primitive stated its cost in the structured form -- and nothing enforced that they partition. A primitive in both produced TWO rows for one key, one with a real fidelity and one ModeledCostNotStructured, leaving a reader to pick. That is not a per-row fact but a broken premise, so the whole report refuses with a named cause rather than emitting rows derived from it. Duplicates within either list are the same defect at shorter range. THE PLANTED CHECK IS THE EVIDENCE. Restoring first-pick fails two_facts_for_one_key_contradict_in_either_order and a_contradicted_key_is_not_counted_as_unmeasured, while a_single_fact_for_one_key_still_compares and a_disjoint_partition_still_reports_rows still PASS -- so the reds detect the defect and the boundary controls are insensitive to it. The test helper returns NO ROWS for a refused report on purpose: every count assertion then fails loudly rather than reading as "nothing to report", which is the one reading that would hide a refusal. Adding the arm forced updates to four counting folds in the authority and twelve matches in the witnesses -- each one a place a wildcard would have swallowed the new arm silently. 38 witnesses green, 0 blocking errors. This edits dag/std/realization_cost_fidelity.dag, a closure member, so the PR re-takes its srv2 receipt. It does NOT touch induction.dag or any stage0 mirror. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
…mes the carrier it duplicates Review 63996, findings 1 and 2-in-part. Finding 3 and the migration half of finding 2 are escalated rather than done, with the blockers named below. FINDING 1 -- SIX FOLDS FOR ONE MAPPING, AND I ADDED TO IT. count_cost_* plus cost_fidelity_is_finding were six near-identical nine-arm matches differing only in which arm incremented: six independent sources for one fact, "which reported population does this row belong to". I know the price exactly, because the previous commit added the seventh arm and the substrate made me touch four folds here and twelve matches in the witnesses -- and I reported that churn as the exhaustiveness check working. It was. That is not the same as the shape being right, and DESIGN section 2 is explicit that the test of an edit is whether net concepts grew by re-invention. Now: one cost_fidelity_population classifier, one counting fold returning a record, and the six named counts read it. THE PARTITION IS TOTAL BY CONSTRUCTION, because every arm maps to exactly one population -- and the witness asserts it by execution too. Nothing established that before: all six folds could have skipped the same arm and every population assertion would still have passed, since each checked its own count in isolation. FINDING 2 -- THE FORK IS REAL AND THE NOTE NOW SAYS WHICH ONE. The frontier note named only the std.primitives contract-cost strings while the carrier this module actually duplicates is std.primitive_identity PrimitiveCostFact, a CostShape keyed on PrimitiveIdentity -- the coarse projection of the structured form ModeledCostBoundFact carries. A loss sentence about one carrier under a trigger about another is the grain mismatch section 4b(3) names as the review tell. WHY I DID NOT PERFORM THE CUT. Migrating PrimitiveCostFact.cost to CostBound looks like a substitution and is not one: the six populated rows record a shape and NO PARAMETER, and every CostBound constructor needs one. The parameter is load-bearing -- param_axis_comparison keys on it and param_union matches it across the modeled and realized sides -- so an invented name yields a spurious axis and a fabricated verdict. Recovering each row's real parameter is modelling per primitive, not a rewrite. Doing it by pattern-substitution would manufacture the exact kind of fact this authority exists to catch, so it is named in the note and sequenced separately. FINDING 3 is correct and designed but not in this push: routing the empty-axis case through cost_bound_growth_in_param deletes all three orderability walkers, and it edits dag/std/induction.dag, whose stage0 mirror I cannot regenerate here (it OOM-killed on the remote runner; srv2 ran it last time). Escalated with that blocker rather than half-done. 39 witnesses green, 0 blocking errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
…estion answers it Review 63996 finding 3, under your ruling to do it here with the mirror regenerated on srv2. WHAT WAS DUPLICATED. cost_bound_is_orderable, atomic_factors_are_orderable and atomic_cost_is_orderable re-walked CostBound's arms in parallel with cost_bound_growth_in_param, which already decides orderability per parameter and already recurses SumBound. Two walks over one storage shape is one authority too many, and the second drifts silently because nothing forces them to agree. WHAT THEY ACTUALLY COVERED, which is the part worth getting right: only the bound with NO PARAMETERS. Every other unorderable bound reaches the axis fold as an unplaceable growth on some parameter and is already absorbed there. With no parameters there is no axis to carry the refusal, and the dominance fold would answer Equivalent over an empty comparison list -- reporting an unbounded cost as PRESERVED against a constant. So the residue is now one question put to the canonical authority rather than a parallel recursion: ask cost_bound_growth_in_param about a parameter the bound does not carry. ForeverBound and ErrorBound answer not-orderable whatever they are asked, a structured bound answers zero growth in a parameter it never mentions, and a SumBound recurses to its terms through the same fold. The gate in cost_fidelity_of is gone with them. THE EVIDENCE IS THE TWO CONTROLS THAT ALREADY EXISTED, and they are why "39 green" is not the claim here: deleting an orderability gate and staying green could mean the fold picked the refusal up, or that nothing checked the refusal at all. an_unbounded_cost_is_not_preserved_against_a_constant and a_malformed_bound_is_not_orderable both assert through the public entry, so they are indifferent to HOW orderability is decided, and both PASS by name. They exist because sqrt-ordered-as-constant and ForeverBound-ordered-as-constant were real fabrications in this module. THE MIRROR IS STALE ON THIS HEAD AND THAT IS EXPECTED: this edits dag/std/induction.dag, whose stage0 mirror regenerates on srv2, per your sequencing. Nothing else lands on this branch until that mirror commit is on it. 39 witnesses green, 0 blocking errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
…ild-lane candidate) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMR4u1m3S6WS5RM7pRSe2n
…d for Review 64030: `CostShapePreserved` claimed a fact this join never establishes. The comparison runs over `CostBound`s through `std.pareto`; the shape projection (`cost_bound_to_shape`) is a real, partial, neighbouring concept carried on every row as `projected_shape` -- so two adjacent facts shared one name, which is the DESIGN section 3 meaning fork. The module's own witnesses proved it in both directions: `the_rank_only_reading_cannot_see_the_concat_divergence` asserts the concat specimen has NO shape, and `identical_costs_are_preserved` compared a bound against itself and got a "shape preserved" verdict. Rename to `ModeledCostPreserved` at all 17 sites across the authority and its witness suite, with the reasoning carried as a leading annotation on the arm's own declaration. Evidence: `claim_batch --entry dag/test/claim/realization_cost_fidelity_witness_test.dag` over all 39 witnesses, rc=0, 39 PASS. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f
|
srv2 closure receipt at head 3bb39e8 (overlay of this PR's diff on main f583087, pinned producer, native fold over the 167-module closure of src/v2/compiler/00_compile.dag):
Instrument: closure_pr.sh 11026 on srv2 (p-11026/refusals_after.txt, p-11026/manifest.txt). — sent from eager-raven-113 |
Step 4a of the compile-obligation activation brief — the census's one row without a home: the modeled cost of an operation and the cost its chosen realization actually has were two facts with nothing joining them, so a declared cost could be realized slower, or faster, and neither direction had a carrier able to state it.
Why not the briefed shape
The brief homed the join on
CostShape.CostShapenames a growth rank, so it cannot distinguish work over both operands from work over one — both are "linear" — and the join would have returnedCostShapePreservedon exactly the specimen the class was written about:lens_prices_the_authority_while_the_lane_runs_the_realization(#11019) measuredconcat_contractdeclaring work over both operands against a realization charging the right one only, which makes a cost model reading the contract convict the correct construction. A wall whose RED is unauthorable for its own motivating case is DESIGN §4b's decoration.What landed instead (operator ruling: extend the home, don't mint a second vocabulary)
dag/std/algebra.daggains the structured form besideCostShape:CostFactorover a named operand (constant / logarithmic / linear / linearithmic),CostTermas a product of factors,StructuredCostas a sum of terms.CostShapestays, now as the projection of that expression (structured_cost_to_shape) for the sites that only need a rank. One home, two readings.CostShapeimage, and the absent arm is the vocabulary gap stated out loud rather than a rounded rank presented as the operation's shape.dag/std/realization_cost_fidelity.dagjoins modeled to realized per operand, and consumesstd.pareto(axis_comparison_int,dominance_of_comparisons) instead of restating dominance — DESIGN §3d, "growing a second decision algebra beside Pareto is the fork this law exists to prevent". It therefore inherits Pareto's separation ofIncomparablefromDominanceUndecided, which is precisely the distinction a cost report must not lose.Five arms where the brief asked for four — both additions stated
RealizationDivergesByOperand— a proven trade-off (cheaper in one operand, dearer in another) is a finding, not an absence; collapsing it into Unknown would report "nothing to see" about two established facts (§5 absorbing fallback).ModeledCostNotStructured— the counted migration frontier for contracts not yet restated in the structured form. Omitting those rows would shrink the denominator by exactly the unmigrated population.RealizationCostUnknownstays reachable only from a missing realization fact, never as the answer to a comparison.Evidence, by execution
claim_batch --source-root dag --source-root src/v2 --entry dag/test/claim/realization_cost_fidelity_witness_test.dag— 8 green, led by the specimen:concat_model_over_prices_the_left_operand— modeled over both operands vs realized over the right one →RealizationFasterThanModeled(the model over-prices the left operand)the_rank_only_reading_cannot_see_the_concat_divergence— the discriminator kept in the corpus rather than in this description: read as a rank, the two costs are indistinguishable. That is the reading the briefed join would have produced, and it is the argument for why the structured form had to land first.Not carried, declared rather than implied
The row population. Asserting a realized cost for a primitive without measuring the emitted compiler would be the fabricated fact this authority exists to catch, so rows land with the measurement (step 4c). The contracts' migration to the structured form is the trigger that retires
ModeledCostNotStructured.dag/stdis a closure source, so this needs its own head-bound closure receipt and queues behind #11004.🤖 Generated with Claude Code
https://claude.ai/code/session_01RPVTQBSK9E8j3UDQGPZN1f