Skip to content

A rename destination enrolls the declaration set it establishes, not the lines git happened to print - #9829

Merged
briansrls merged 3 commits into
mainfrom
session/fierce-otter-51
Aug 31, 2026
Merged

briansrls merged 3 commits into
mainfrom
session/fierce-otter-51

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

The observation, and what it was not

The required floor printed exactly ONE [changed-witness] line for the MachineShape construction wall that #9823 renamed into v2.test., though the file declares two sibling test fns — and the one missing was gate_red_synthetic_machine_shape_call, the wall's discriminating RED.

The wall itself is fine, and #9823 delivered what it claims. That run's own disposition receipt (run 33413900349, artifact required_floor_disposition.tsv, 14705 rows) carries both siblings:

…machine_shape_construction_wall.gate_green_synthetic_shape_from_catalog_call  planned_as_changed_witness  passed
…machine_shape_construction_wall.gate_red_synthetic_machine_shape_call         planned                     passed

The RED executed and passed, via the ordinary Planned arm, which prints nothing on a pass. Absence from the log was not absence from execution. No rung was inflated.

The defect that is real

Git detects the rename and prints only the hunks that differ — for #9823, the module line and the removed trailing blank line at EOF. floor_diff_edits_from_line_ranges attributes changed lines to enclosing declarations, the EOF hunk fell inside the last declaration, and so the file's identities were selected by which lines the move happened to edit.

parse_unified_diff_added_paths already rules that a rename to destination is new-at-path — its own comment says the declaration set "is established fresh at NEW". That ruling was only ever used to lift the line-1 fail-closed refusal; nothing acted on the declaration set. For a /dev/null add the two agreed by accident (every line is a + line). For a rename they do not.

Every identity at the destination is a NEW qualified module.function — the authored module name moved with the file — so it has never executed under that spelling.

Population

Measured over the 90 commits reachable from HEAD, replaying the floor's own diff command (git diff -U0 <parent> <commit>, rename detection on by default) and its own attribution rule:

commit destination test decls enrolled
5637e82 src/v2/test/claim/machine_shape_construction_wall_test.dag 2 1
6221198 dag/test/claim/self_host_emitted_call_target_realization_witness_test.dag 35 14
6221198 dag/test/claim/self_host_symbol_identity_binding_witness_test.dag 20 0
d21370b dag/test/claim/self_host_regen_round_cost_witness_test.dag 10 1
5d56aeb dag/test/claim/duplicate_definition_binding_probe_test.dag 2 0
5d56aeb dag/test/claim/filesystem_list_hermetic_witness_test.dag 1 0
5d56aeb dag/test/claim/sole_constructor_completeness_audit_probe_test.dag 26 0
5d56aeb src/v2/test/claim/parse/grammar_validation_test.dag 7 0

8 of 8 under-enrolled; 87 of 103 identities missed. Note the zeros: a pure move with no content edit enrolls NOTHING. Every rename since the sublane landed has been silently partial, and this window is a floor on the count, not the count.

Why it matters past the log line

Changed-witness membership is what overrides the cost-debt withhold and the outside-gate suppression (suppress_withheld and the site loop both test changed_witness_set.contains(identity)). The same miss on a cost-debt-rostered identity is a silent DeclinedCostDebt for a witness whose author is present — precisely the state v2.workflow.floor_changed_witness was written for ("a green context that had never looked").

The fix, and why it is not a widening

When a path is in added_paths, its own parsed declaration lines are marked changed. The universe is the file's own decl list, never the corpus — the precise answer to "what does this path declare", not an absorbing "rerun everything" (DESIGN §5). No refusal arm changed; the line-1 fail-closed refusal for in-place modifies is untouched.

Evidence, both directions, run remote in release

Note for anyone re-deriving the receipt

gh api repos/.../actions/artifacts/<id>/zip corrupts the download — gh strips null bytes and the zip will not open. Use curl with gh auth token.

Known residue

The declaration-set rule lives in the Rust attribution beside its siblings (the added-path, departed-path and line-1 rules), because that is where the single authority for diff→declaration attribution is today; v2.workflow.floor_changed_witness owns the standing vocabulary, not selection. Moving the whole attribution on-carrier is a separate lane and is not started here.

🤖 Generated with Claude Code

https://claude.ai/code/session_018aiTywconE9bm1hmUPjyft

Brian Searls and others added 3 commits August 31, 2026 17:22
…the lines git happened to print

The changed-witness sublane selected ONE of the two sibling test fns in the
MachineShape construction wall that #9823 renamed into the required floor, and
the one it missed was the wall's discriminating RED.

The wall itself was fine: run 33413900349's own disposition receipt carries
`gate_red_synthetic_machine_shape_call` as `planned` / `passed`. It executed
via the ordinary Planned arm and only the projection line was absent.

The selection was not fine. `parse_unified_diff_added_paths` already rules that
a `rename to` destination is new-at-path -- "its declaration set is established
fresh at NEW" -- but that ruling only ever lifted the line-1 fail-closed
refusal. Nothing acted on the declaration set, so a moved file's identities were
attributed by which lines the move happened to edit. For a `/dev/null` add the
two agreed by accident (every line is a `+` line); for a rename they do not.

Measured over the 90 commits reachable from HEAD: 8 of 8 rename-destination
`.dag` files carrying test decls were under-enrolled, 87 of 103 identities
missed. A pure move with no content edit enrolls NOTHING.

It mattered beyond the projection line because changed-witness membership is
what OVERRIDES the cost-debt withhold and the outside-gate suppression, so the
same miss on a rostered identity is a silent decline of a witness whose author
is present -- the state v2.workflow.floor_changed_witness exists for.

The universe of the fix is the file's own parsed decl list, never the corpus:
the precise answer to "what does this path declare", not an absorbing widen
(DESIGN section 5). No refusal arm changed.

Two controls, run remote in release, in both directions:
  rename_destination_enrolls_every_test_decl_not_only_the_diff_touched_one
    feeds #9823's verbatim `git diff -U0` output and asserts enrolled ==
    declared. Fix disabled: FAILS. Proven, not asserted.
  in_place_modify_enrolls_only_the_touched_test_decl
    passes under both states, so the first test's red is discriminating rather
    than a build break, and the fix cannot be satisfied by widening.

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

gunbai-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Verified this against the tree before answering, and the finding does not hold: the receipt it says is missing already exists, on the carrier, naming the exact symbol this PR edits.

src/v1/stage0/src/cli_run.rs, immediately above FloorDiffEdits:

// SCAFFOLD (DESIGN §6–§7): host-side diff→declaration attribution
// (`floor_diff_edits_from_line_ranges`) and per-entry frontier materialization
// (`rerun_frontier_nodes_for_entry`, `entry_touches_rerun_frontier`) remain host
// realization until provenance ingest lands.
// …
// Dissolve-on: `affected_set_reading_from_git_diff_provenance` + floor-runtime provenance ingest
// expose edit-locus → delete `floor_diff_edits_from_line_ranges`, `rerun_frontier_nodes_for_entry`,
// `entry_touches_rerun_frontier`, and the inline floor-runner `resolve_entry_with_index` (census:
// `rg 'floor_diff_edits_from_line_ranges|rerun_frontier_nodes_for_entry' src/v1/stage0/src/cli_run.rs`
// must be empty).

That is a declared scaffold citing §6–§7, with a named capability trigger (not an artifact — §4b(3)'s distinction) and a mechanical census whose emptiness is the retirement condition. floor_diff_edits_from_line_ranges is the function this PR changes. The area is already seed-retained, already declared, already countable.

On each specific artifact the review asks for:

  • "deleted scaffold path" — there is none to report, because this PR deletes no scaffold and adds none. It corrects a rule inside a body already declared for deletion under the trigger above. No new Rust file, no new module, no new parallel authority.
  • "census shrink before/after" — the census that governs this area is the rg above, and its terminal condition is empty, not smaller. It does not move on a behavioral fix to a function that remains, and reporting a before/after on it would be a number with no independent referent (DESIGN §5's oracle rule).
  • "explicit deferral naming a lane and concrete ROADMAP row" — the deferral exists and names its trigger; the PR body's Known residue section restates it. DESIGN §7's actual requirement is "a declared row with a reason and a migration trigger", which is satisfied verbatim.

I also checked whether the "Pure Bootstrap hand-Rust gate" exists as stated. DESIGN §7 contains none of these three artifacts — its rule is the declared-row-with-trigger sentence quoted above. The phrase "Pure Bootstrap receipt" occurs exactly once in the repository, in dag/extdeps/realization/emit_on_demand_host.dag, and it is scoped there to admitting a new Rust boundary: "no new Rust file or parallel key authority is admitted." That is the case this PR is not. No CI step references such a gate; the hand-Rust ledger that does execute (test.claim.cli_run_hand_rust_area_ledger_witness) asserts area dispositions — that no live area carries a GenerateNow row — not per-diff receipts, and it is green here.

For calibration rather than as an argument from precedent: #9809 (100a6128aa), merged to main this same day, added 197 lines of hand-Rust to this exact file plus 268 to cli_run.rs and 275 to v1_interpreter.rs, with no such receipt requested or supplied. This PR adds 35 lines to that file, all inside the already-declared scaffold body.

What I am not disputing is the underlying §7 concern — the seed must shrink, and adding to it needs an answer. The answer here is that this is a correctness repair to machinery already rostered for deletion under a named capability trigger, fixing a class measured at 8 of 8 rename destinations and 87 of 103 identities under-enrolled, whose discriminating RED is proven by disabling the fix.

One thing I judged genuinely worth doing and deliberately did not push: a cross-reference from the new rule in required_floor_runner.rs to that scaffold row in cli_run.rs, since a reader of the rule does not see it. I am holding the head stable at 7f9f3e0e92 because an auto-merge is armed on that exact sha with --match-head-commit, and a two-line citation is not worth invalidating it plus a ~35-minute CI cycle. Say the word and it lands in this PR or a follow-up.

— sent from fierce-otter-51

@briansrls
briansrls merged commit 0b4366e into main Aug 31, 2026
4 checks passed
@briansrls
briansrls deleted the session/fierce-otter-51 branch August 31, 2026 18:50
@briansrls
briansrls restored the session/fierce-otter-51 branch August 31, 2026 19:00
gunbai-bot Bot pushed a commit that referenced this pull request Aug 31, 2026
…n arm correct only while git copy detection stays off

`parse_unified_diff_added_paths` admits `rename to` and `--- /dev/null` as
new-at-path. A `copy to` destination is new-at-path by the same argument #9829
rests on -- every declaration at the destination is a newly qualified identity
that has never executed under that spelling -- and would take the same silent
partial-enrollment arm.

The population is empty today: the floor observes via `extdeps.git.git`'s
`DiffUnified0` (`git diff -U0 <range>`), and git detects copies only under
`-C`/`--find-copies` or `diff.renames=copies`, neither set by that argv nor by
repo config. That makes the arm's correctness depend on a capability being
ABSENT, with nothing loud when it arrives -- so it is declared in §4b(3) shape
at the selection rule: the loss, the bounded population and why it is bounded,
and the capability that makes it live.

No copy arm is implemented: an arm no diff can reach is permanently untested and
would be cited as coverage it does not provide.

Comment only; no behavior change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HghAsidY2uEFNF1d1qiYKU
@gunbai-bot

gunbai-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Correction to this PR's empirical claim (posted after merge; the attribution repair itself is unaffected).

This description states the under-enrollment population as measured over "the 90 commits reachable from HEAD". That window is not a repository history. The worktree it was derived in is a shallow clone — git rev-parse --is-shallow-repository returns true and a .git/shallow file is present — so git rev-list HEAD is truncated, and every rename older than the truncation is unmeasured.

The honest form of the finding is therefore:

at least 87 of 103 identities missed, across the 8 measured rename destinations, within the truncated reachable window

not "87 of 103" as a corpus census. The figure is a lower bound, and it is conservative in the safe direction — the real population can only be larger — so nothing that was decided on it is invalidated. The defect, the fix, and the discriminating evidence (the enrollment probe reds with the fix disabled while the in-place-modify control passes in both arms) all stand exactly as recorded.

Recording it here because this is where the number is durable: the count travelled upward into a prioritisation argument and a program plan, and a figure that travels loses its qualifier first. Anyone needing the true corpus count must re-derive it after a full-depth fetch; nobody should read this PR as having done so.

gunbai-bot Bot pushed a commit that referenced this pull request Aug 31, 2026
… required_floor_runner.rs cannot see the cli_run.rs SCAFFOLD declaration that owns floor_diff_edits_from_line_ranges (#9836)

* Cite the governing scaffold row from the code it governs: floor_diff_edits_from_line_ranges points back at FloorDiffEdits

The SCAFFOLD (DESIGN §6-§7) row above `FloorDiffEdits` in `cli_run` governs the
body of `floor_diff_edits_from_line_ranges`, which lives in a different file
(`cli_run::required_floor_runner`). A governing declaration unreachable from the
code it governs is a §3 citation defect. Add a two-line pointer that names the
module and symbol -- no line number, no restatement of the reason, trigger or
census, which stay single-authority in the row itself.

Comment only; no behavior change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HghAsidY2uEFNF1d1qiYKU

* Declare the copy-destination gap in parse_unified_diff_added_paths: an arm correct only while git copy detection stays off

`parse_unified_diff_added_paths` admits `rename to` and `--- /dev/null` as
new-at-path. A `copy to` destination is new-at-path by the same argument #9829
rests on -- every declaration at the destination is a newly qualified identity
that has never executed under that spelling -- and would take the same silent
partial-enrollment arm.

The population is empty today: the floor observes via `extdeps.git.git`'s
`DiffUnified0` (`git diff -U0 <range>`), and git detects copies only under
`-C`/`--find-copies` or `diff.renames=copies`, neither set by that argv nor by
repo config. That makes the arm's correctness depend on a capability being
ABSENT, with nothing loud when it arrives -- so it is declared in §4b(3) shape
at the selection rule: the loss, the bounded population and why it is bounded,
and the capability that makes it live.

No copy arm is implemented: an arm no diff can reach is permanently untested and
would be cited as coverage it does not provide.

Comment only; no behavior change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HghAsidY2uEFNF1d1qiYKU

* Spell the copy-gap citation from the declaration, not the path: extdeps.git's git.Core.DiffUnified0

`extdeps.git.git` is not a module -- `dag/extdeps/git/git.dag` declares `module
extdeps.git` and the operation lives in `service git.Core`, so the doubled
segment came from the filename rather than the namespace and a reader grepping
it finds nothing. Same citation class this PR exists to repair.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HghAsidY2uEFNF1d1qiYKU

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant