Skip to content

Import doors declare and count the names they make - #33

Merged
tmoosting merged 1 commit into
mainfrom
made-names-ship
Nov 22, 2026
Merged

tmoosting merged 1 commit into
mainfrom
made-names-ship

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Each import door now declares the names it makes (MADE_NAMES, a tuple of MadeName: kind, type, pattern, joined or the door's own, and a regex a reader applies with fits) and its report counts them, one line a kind, beside the elements and never in them.

On the real exports in the tests: LegendKeeper 80 of 280 elements (page-document 17, map-document 6, frame-corner 56, untitled-pin 1), 78 on the .lk; Kanka 2 (hidden-details); World Anvil, Campfire and Notion none. A test holds every name on all eleven exports: either the export's text, or a fit of exactly one declared kind of its type, counted under it.

Counted a second time apart from the tests: an outside name check over each door's real output gave the same counts, and every made name fit exactly one declared kind.

🤖 Generated with Claude Code

A name an element gets that is not one string of the export taken as
written is now declared and told, by kind and count, beside the
elements and never in them.

Two kinds of made name: joined (the export's words with the door's
between them, a LegendKeeper map document's Map named
"<resource>: <document>") and the door's own, for a thing the export
gives no name (a frame's corner Marker "<frame>: corner 1", an arrow
with no label "Board link").

Each door lists its kinds in MADE_NAMES, a tuple of MadeName (kind,
type, pattern, source, regex; MadeName.fits(type, name) reads one), in
a shared private module. Notion's is empty. Each ImportReport gains
made_names, kind to count, and prints one line a kind with its count
and pattern. A LegendKeeper card whose page is not in the project,
already named "Untitled card (<shape id>)", is counted too.

Tests: every real export the doors' tests read is converted and every
name is either the export's text (the rule of the outside converter
gate, ported) or fits exactly one declared kind of its type, with the
report counting what the names show (LegendKeeper 80 of 280 and 78,
Kanka 2 a file, the rest none); each declared kind is produced by a
test's input and its count checked through a conftest fixture; a meta
test fails when a declared kind has no such check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit f028e6f into main Nov 22, 2026
11 checks passed
@tmoosting
tmoosting deleted the made-names-ship branch November 22, 2026 02: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