Skip to content

SCM work - #8859

Closed
gunbai-bot[bot] wants to merge 3 commits into
mainfrom
scratch/8846-over-8853
Closed

gunbai-bot[bot] wants to merge 3 commits into
mainfrom
scratch/8846-over-8853

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session gentle-eagle-360.
Pushing to scratch/8846-over-8853 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

gunbc-ci-auto-heal added 3 commits August 22, 2026 01:33
…d and left

When the quadratic accumulator shape was fixed in image.dag and object_store.dag,
I recorded that checkout.dag carried one more and merge.dag nine, and left them.
That was the wrong disposition: DESIGN section 6 says a proven cost-shape defect
is always fixed regardless of the realized n, because "n is small here" is not a
fact that stays true under reuse. Declaring the debt is not the same as owing
less of it.

Three different shapes were hiding under one grep:

A PROJECTION IS A MAP. authored_role_names folded with concat-at-end to answer a
question that is one field read per element; replace_role and record_alternative
rebuilt a list to substitute one entry. As maps they are linear AND the intent is
visible in the shape -- every element kept, one substituted -- rather than
reconstructed by reading an accumulator.

A FILTER IS A PREPEND. target_roles and effective_dependencies drop elements, so
they stay folds; they now prepend and reverse once at the consumer.

A FLATTEN IS STILL A COPY PER STEP. all_proposal_dependencies appends a LIST per
proposal, and my first pass at this diff left it alone with a comment claiming
that made it linear. That is false -- concat(acc, xs) copies acc whatever xs is --
and the wrong reason was more dangerous than the defect, because a justified
exception stops being re-examined. It now prepends each proposal's dependencies
reversed and reverses once, and the comment records the error rather than the
conclusion.

THE REVERSES ARE LOAD-BEARING WHERE ORDER IS THE PROGRAM. checkout_record hands
its edges to node_synthetic in order, and under a positional discipline the order
IS the meaning, so a dropped or doubled reverse would rebuild f(x, y) as f(y, x)
silently. That is not caught by inspection; it is caught by the existing claims.

EVIDENCE, executed: all 12 merge claims, all 29 object-store claims and all 16
image claims green. The order-sensitive ones are the point --
arm_a_is_order_independent, arm_b_is_order_independent,
every_distinct_alternative_is_accumulated_regardless_of_order,
an_independent_sibling_is_preserved_exactly, and
round_trip_reconstructs_the_exact_program are what a mis-applied reverse breaks.

No behavior is intended to change and none did.
…equired

Main's witness floor has been red since #8833 with 16 failures, all reading
`non-exhaustive pattern match on: OccurrenceId { value: N }` across
body_lowering.statement_let_bind and fold_lowering. The scrutinee in that message
is the defect: a total match over `Node.occurrence_id` received a bare
`OccurrenceId` record, which is not a member of the coproduct that field holds.

`Node.occurrence_id` is a `NodeOccurrenceId` -- SyntheticOccurrence or
MintedOccurrence -- and `std.occurrence_identity.OccurrenceId` is the PAYLOAD
inside one of those arms. dag_int_literal_node_from_magnitude declared its
parameter as the payload and assigned it straight into the field, so the
declaration had been wrong since it was written. #8833 did not introduce that; it
changed the CALL SITE to agree with the wrong signature, replacing
node_occurrence_minted(id: minted.id) with minted.id, which is what turned a
latent type defect into a live runtime failure.

So the repair is at the declaration, not the call site: both int-literal
constructors now take NodeOccurrenceId, and 02_parse re-wraps through
node_occurrence_minted like its four sibling sites already do. The now-unused
OccurrenceId import is dropped.

WHAT THIS EXPOSES AND DOES NOT FIX: nothing refused a payload stored where its
coproduct was declared. That is a floor-class hole -- values inhabit declared
types -- and it is why the failure surfaced 2,000 lines away as a match with no
arm rather than at the assignment. This change restores green; it does not close
that hole, and I am not claiming it does.

EVIDENCE, executed on the remote runner. Before, with only main's content:

  FAIL fold_probe_ingest_is_accepted (non-exhaustive pattern match on:
       OccurrenceId { value: 79 })  ... 12 more, 4 PASS
  FAIL statement_let_then_reference_lowers_holds ... 4 total

After, both entries fully green: 16/16 fold_lowering and 4/4
statement_let_bind. The failing set and the fixed set are the same set.
@gunbai-bot

gunbai-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Closing: this is a scratch verification branch, not a deliverable. It was pushed as a side effect of a remote build dispatch and auto-attached as a draft.

Its purpose was to measure — rather than infer — that #8846 goes green once #8853 lands. Composed result, 80/80:

fold_lowering            planned=16 pass=16 fail=0
statement_let_bind       planned=4  pass=4  fail=0
scm_merge_witness        planned=15 pass=15 fail=0
scm_object_store_witness planned=29 pass=29 fail=0
scm_image_witness        planned=16 pass=16 fail=0

The real work is in #8853, #8846, #8840 and #8838.

— sent from gentle-eagle-360

@gunbai-bot gunbai-bot Bot closed this Aug 22, 2026
@gunbai-bot
gunbai-bot Bot deleted the scratch/8846-over-8853 branch August 22, 2026 02:44
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