Skip to content

COMPILER: delete the dead v1.compiler.* direct-call exemption - #8157

Merged
briansrls merged 1 commit into
mainfrom
compiler-applied-nominal-conformance
Aug 12, 2026
Merged

briansrls merged 1 commit into
mainfrom
compiler-applied-nominal-conformance

Conversation

@briansrls

@briansrls briansrls commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What this is

A one-predicate deletion with an executed behaviour-preservation receipt. It is the surviving half of a larger attempt; the other half was withdrawn on measurement and the finding is below, because it matters more than this commit does.

module_skips_direct_call_arg_check compared a 13-character slice against the 12-character literal "v1.compiler.":

string_length(s: module_name) >= 13 && substring(s: module_name, start: 0, end: 13) == "v1.compiler."

That arm has never returned true for any module. Compiler modules have been receiving the direct-call argument judgment the whole time, and the corpus is green under it.

Changing 13 to 12 would activate an exemption that has never been in force — silencing a judgment the tree currently passes. That is a behaviour change dressed as a typo fix, and it would need evidence of false positives nobody has. Deletion preserves live behaviour exactly and removes the dead branch together with the false claim attached to it: direct_call_shape_wall_note describes this exemption as protecting compiler modules from representation-gap false positives, and that protection was never real.

Receipt (executed, not argued)

A baseline binary built from main's committed generated Rust, and this binary, run over the same corpus with the same command, source roots, target and diagnostic projection:

diagnostics
baseline 74
after 74
diff empty — byte-identical sets

regen_stage0 --verify: regen_divergence_count=0.

The v2. arm is untouched and does fire.


Withdrawn: applied-nominal argument conformance, and why

This branch previously carried a second commit implementing resolved applied-nominal direct-call conformance — compare nominal declaration identity, then applied arity, then recurse into applied arguments. It was measured against the same baseline and withdrawn. The measurement is worth keeping:

976 new refusals against 74 baseline diagnostics, with zero confirmed real defects.

The root cause is not tuning. It is that the premise was false. At the direct_call_arg_mismatch_diags seam, formal and actual are resolved declarations, and Node.children there holds fields and variants — not applied type arguments. The renderer printed the proof:

Coproduct(ContentHash)<Product(Fnv1a64),Product(Sha256Hash),Product(Sha1Hash),Product(Sha512Hash)>

ContentHash takes no type parameters. Those are its four variants. So the "applied arity" comparison was comparing field counts and the "recursive argument comparison" was comparing fields. The remaining population was the four false-positive classes declared_type_conformance_note already enumerates — 398 same-declaration-spelled-two-ways (BitWidth vs std.measure.BitWidth), 477 the same plus a Primitive(Nat)/Node(Nat) rendering split, 43 optionality's two forms, 58 brand-vs-base pairs and unsubstituted generic variables T/M resolving to unrelated same-named declarations.

The consequence for the guarantee ladder, stated plainly: a phantom type parameter leaves no trace in the resolved type reaching this seam — the arguments are substituted away into field types before any judgment sees them. So Point3<RoomFrame> vs Point3<BuildingFrame> is not merely unjudged here; the information required to judge it is absent at this seam. Deciding that two type references denote the same declaration turns out to be the produced-type-identity problem met from the argument side, not a cheaper neighbour of it — same trigger, feature:conformance-produced-type-identity.

That vindicates the separate spatial repair rather than supplementing it: #8156 makes coordinate-frame identity carried runtime data with typed refusal, which is enforceable precisely because it does not depend on a type argument surviving resolution.

A cost note also worth recording: the first implementation peeled both sides through peel_nominal_alias_identity (which calls resolve_node_bounded) at every comparison level, and took whole-corpus regen from 100 seconds to past 31 minutes. Any future attempt at this seam must treat cost shape as part of the contract.

@gunbai-bot gunbai-bot Bot changed the title spatial modeling COMPILER: resolved applied-nominal direct-call argument conformance Aug 11, 2026
module_skips_direct_call_arg_check compared a 13-character slice against the
12-character literal "v1.compiler.", so that arm has never returned true for
any module. Compiler modules have been receiving the direct-call argument
judgment since the arm was written, and the corpus is green under it.

Changing 13 to 12 would ACTIVATE an exemption that has never been in force,
silencing a judgment the tree currently passes -- a behaviour change dressed
as a typo fix, needing evidence of false positives nobody has. Deleting the
arm preserves live behaviour exactly and removes both the dead branch and
the false claim attached to it: direct_call_shape_wall_note describes this
exemption as protecting compiler modules from representation-gap false
positives, and that protection was never real.

BEHAVIOUR-PRESERVATION RECEIPT, executed rather than argued. A baseline
binary built from main's committed generated Rust and this binary were run
over the same corpus with the same command, source roots, target and
diagnostic projection:

  baseline  74 diagnostics
  after     74 diagnostics
  diff      empty (byte-identical sets)

regen_stage0 --verify: regen_divergence_count=0.

The v2. arm is untouched and does fire.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot force-pushed the compiler-applied-nominal-conformance branch from dcd860c to c3f4e30 Compare August 11, 2026 21:57
@gunbai-bot gunbai-bot Bot changed the title COMPILER: resolved applied-nominal direct-call argument conformance COMPILER: delete the dead v1.compiler.* direct-call exemption Aug 11, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 11, 2026 21:58
@briansrls
briansrls merged commit 4eb0094 into main Aug 12, 2026
8 of 15 checks passed
@briansrls
briansrls deleted the compiler-applied-nominal-conformance branch August 12, 2026 02:04
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