Rename a program, a scan or a directory - #15
Merged
Merged
Conversation
An archive built from a template inherits the template's program name, and the console disambiguates on import rather than complaining: the capabilities load test was seeded from Potpourri_P1 and arrived on the scanner as "Potpourri_P1 (2)". Tidy, and also how a generated protocol ends up named after whichever export happened to seed it. Names are not in the protocol -- they hang off Instance.LabelElement_id on an EdfString node holding a locale table, which is what lets a scan be renamed without re-hashing the content. So rename rewrites that table and nothing else, and the test asserts the protocols come back byte-identical rather than merely that the archive still validates. Every entry in the table is set rather than the one the export happens to use: most write "" for the default and some write "en", and both spellings are in the corpus. It refuses a node whose label is shared with another. No corpus archive shares one -- checked, zero across every example -- but the store is content-addressed and nothing in the format forbids it, so the alternative is renaming two things while being asked to rename one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An archive built from a template inherits the template's program name, and
the console disambiguates on import rather than complaining. The capabilities
load test was seeded from
Potpourri_P1and arrived on the scanner asPotpourri_P1 (2)— tidy, and also how a generated protocol ends up namedafter whichever export happened to seed it.
What it does
Names are not in the protocol. They hang off
Instance.LabelElement_idon anEdfStringnode holding a locale table, which is precisely what lets a scanbe renamed without re-hashing the content. So
renamerewrites that table andnothing else, and the test asserts the protocols come back byte-identical
rather than merely that the archive still validates.
It works on any named node, which is three useful things:
EdfProgramEdfMeasurementStepEdfDirectoryTwo details
Every entry in the locale table is set rather than the one an export happens
to use: most write
""for the default and some write"en", and bothspellings are in the corpus. Reading only one is what once produced a
nameless tree.
It refuses a node whose label is shared with another. No corpus archive shares
one — checked, zero across every example — but the store is content-addressed
and nothing in the format forbids it, so the alternative is renaming two
things while being asked to rename one.
Testing
2351 passed, 17 skipped. Two new tests: renaming a program leaves every scanname and every protocol byte-identical, and renaming a scan does the same
while a node with no label of its own is refused.
🤖 Generated with Claude Code