Skip to content

fix: Stop offering to delete a module that is not the problem - #19

Merged
shmuto merged 1 commit into
mainfrom
claude/loving-hamilton-2r5kj3
Sep 11, 2026
Merged

shmuto merged 1 commit into
mainfrom
claude/loving-hamilton-2r5kj3

Conversation

@shmuto

@shmuto shmuto commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Reported from a real load — the conflict dialog raised on BRIDGE-MIB + MSTP-MIB, ending in "Choose which file to keep: Delete BRIDGE-MIB / Delete MSTP-MIB".

The detection is right; the advice was not

The two files really do claim the same OIDs:

  • RFC 4188 BRIDGE-MIB: dot1dConformance ::= { dot1dBridge 8 }
  • MSTP-MIB (the 802.1s draft, REVISION "0412050000Z" … "Draft 1"): mstpMib ::= { dot1dBridge 8 }

Both land on 1.3.6.1.2.1.17.8, and their children collide on .8.1 and .8.1.1. That is a real thing worth telling someone about, and reporting it is what the cross-module OID check added in #16 is for.

What was wrong is what the dialog then offered. It was the one written for the other kind of conflict — two files declaring the same module, where one is usually a stale copy and deleting it is the answer. Applied here it is wrong twice over: both modules are real and wanted, and deleting either resolves nothing, because a node is identified by its OID and the tree shows whatever is left exactly as before. The dialog was steering people into throwing away a MIB they need.

What changes

A conflict now records which kind it is (kind: 'module' | 'oid').

  • Same module, differing definitions — unchanged: the explanation, "Choose which file to keep", and a delete button per file.
  • Different modules, shared OID — says what has actually happened ("different modules that assign different names to the same OID; both may be correct"), titles each entry with the OID rather than one of the two names (the OID is the subject; the names are what disagree), and offers nothing but Close.

The banner under the header follows the same split, so "resolve" is not promised where there is nothing to resolve.

Conflicts recorded before the distinction existed carry no kind. They were all of the same-module sort, so they read as that.

Verification

Driven in a browser both ways:

  • BRIDGE-MIB + MSTP-MIB → three entries titled by OID, the explanation above, no delete buttons (screenshot below).
  • TEST-CONFLICT-A + TEST-CONFLICT-B → still "Both files declare the same module…", still offers to delete either.

194 tests pass, typecheck and build clean. tests/rebuild.test.ts gains an assertion that the shared-OID conflict is tagged oid, since that tag is the only thing standing between a user and a needless deletion.

🤖 Generated with Claude Code

https://claude.ai/code/session_018qyesKa9si8szMUe7w8HNK


Generated by Claude Code

Loading BRIDGE-MIB alongside MSTP-MIB raises a conflict, correctly: RFC 4188
puts `dot1dConformance` at 1.3.6.1.2.1.17.8 and the 802.1s draft MIB puts
`mstpMib` there, so the two really do claim the same three OIDs under different
names. But the dialog reporting it was the one written for two files declaring
the same module, and it ended with "Choose which file to keep" and a button to
delete each - which is the wrong answer twice over. Both modules are real, both
are wanted, and a node is identified by its OID, so the tree shows them
together whatever the user does.

A conflict now records which kind it is. The same-module kind keeps the dialog
it had, deletion and all. The shared-OID kind says what has happened, titles
each entry with the OID rather than one of the two names - the OID is the
subject, the names are what disagree - and offers nothing but Close.

Conflicts recorded before the distinction existed have no kind, and they were
all of the same-module sort, so they read as that.

Checked in the browser both ways: the BRIDGE-MIB/MSTP-MIB pair now explains
itself and cannot be "resolved" by deletion, and the TEST-CONFLICT-A/B
fixtures still offer it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qyesKa9si8szMUe7w8HNK
@shmuto
shmuto merged commit e8bedd3 into main Sep 11, 2026
4 checks passed
@shmuto
shmuto deleted the claude/loving-hamilton-2r5kj3 branch September 11, 2026 17:02
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.

2 participants