Skip to content

Pin the conflicted type names by identity, not by count - #2798

Merged
gHashTag merged 1 commit into
masterfrom
w706-type-conflict-ratchet
Aug 29, 2026
Merged

Pin the conflicted type names by identity, not by count#2798
gHashTag merged 1 commit into
masterfrom
w706-type-conflict-ratchet

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

feat(tri): pin the conflicted type names by identity, not by count

tri types dup found 79 type names with more than one definition and reported
them. Nothing held the line.

tri types ratchet --bless      # writes docs/reports/type_conflicts.json
tri types ratchet              # a NEW conflict fails; a RESOLVED one fails too

IDENTITY, NOT A COUNT, and the difference is the whole point. A count cannot see
a SWAP: one name resolved while another appears leaves the total at 79 and the
ledger wrong. Seen failing on purpose, three ways:

- Lexer removed from the ledger    -> "+ Lexer  NEW conflict",      exit 1
- a name added to the ledger       -> "- ZZZGone resolved",         exit 1
- one swapped for another at 79    -> BOTH lines,                   exit 1

The third is the one a count misses.

A RESOLVED name fails too, on purpose -- the same rule this repository already
applies to an unexpected PASS in the corpus ratchet. An entry that has stopped
being true and stays in the ledger is slack the next conflict hides in.

And absence is not amnesty (T31): with no ledger the command exits 1 and says to
bless once and commit the file, rather than passing quietly over an empty oracle.

Eleven tests. The three new ones cover the swap at a constant count, a resolved
name, and agreement being silence; drift is a pure function so they test the
production comparison rather than a re-implementation of it.

WHY THESE NAMES MATTER. A quantifier's domain size is computed from declared
types. For a conflicted name the answer is "unbounded" -- not because the type is
infinite but because WHICH type is undetermined. Any enumerating lowering of
forall hits the same wall, so this set has to stop growing before that decision
is worth making. See #2774.

Refs #2774

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

`tri types dup` found 79 type names with more than one definition and reported
them. Nothing held the line.

    tri types ratchet --bless      # writes docs/reports/type_conflicts.json
    tri types ratchet              # a NEW conflict fails; a RESOLVED one fails too

IDENTITY, NOT A COUNT, and the difference is the whole point. A count cannot see
a SWAP: one name resolved while another appears leaves the total at 79 and the
ledger wrong. Seen failing on purpose, three ways:

    - Lexer removed from the ledger    -> "+ Lexer  NEW conflict",      exit 1
    - a name added to the ledger       -> "- ZZZGone resolved",         exit 1
    - one swapped for another at 79    -> BOTH lines,                   exit 1

The third is the one a count misses.

A RESOLVED name fails too, on purpose -- the same rule this repository already
applies to an unexpected PASS in the corpus ratchet. An entry that has stopped
being true and stays in the ledger is slack the next conflict hides in.

And absence is not amnesty (T31): with no ledger the command exits 1 and says to
bless once and commit the file, rather than passing quietly over an empty oracle.

Eleven tests. The three new ones cover the swap at a constant count, a resolved
name, and agreement being silence; `drift` is a pure function so they test the
production comparison rather than a re-implementation of it.

WHY THESE NAMES MATTER. A quantifier's domain size is computed from declared
types. For a conflicted name the answer is "unbounded" -- not because the type is
infinite but because WHICH type is undetermined. Any enumerating lowering of
`forall` hits the same wall, so this set has to stop growing before that decision
is worth making. See #2774.

Refs #2774

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 10:53:42 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 7
PRs with All Checks Green 2
READY 1
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d25ac0cc159e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit d28f43d into master Aug 29, 2026
31 checks passed
@gHashTag
gHashTag deleted the w706-type-conflict-ratchet branch August 29, 2026 10:55
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