Conversation
The field is a NUL-terminated ASCII string in a 6-byte slot — "3.2.3\0" on a real v7 card (FORMATS.md §2). The parser took one digit for the major, skipped a byte, took one digit for the minor: the patch level was dropped, and a firmware "3.10.x" would have come back as 3.1, "10.0.x" as 1.0. Harmless today, since the version is only displayed, and exactly the kind of thing that bites the day code decides something from it. The field is now read whole and split on dots; major and minor keep their meaning, and FsDeviceInfos exposes the full string, which the service reports to the UI when present. The serial and the key material keep their offsets (the skip shrinks by what the read grew). A field without two components fails as a truncated .md did before. The two digit-only helpers this leaves unused are removed. Closes #17 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 11, 2026
Open
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.
What
parseDeviceInfosMeta6to7read the firmware version as one digit for the major, one skipped byte, one digit for the minor. On a real v7 card the field is a NUL-terminated ASCII string in a 6-byte slot —3.2.3\0(seeFORMATS.md§2, #59) — so the patch level was dropped, and a firmware3.10.xwould have come back as 3.1,10.0.xas 1.0. Harmless today, since the version is only displayed; exactly the kind of thing that bites the day code decides something from it.The field is now read whole and split on dots. Major and minor keep their meaning;
FsDeviceInfosexposes the full string, whichStoryTellerServicereports to the UI when present (the v1–3 path is untouched and still reportsmajor.minor). The serial and the key material keep their offsets — the skip shrinks by what the read grew. A field without two components fails as a truncated.mdalready did. The two digit-only helpers this leaves unused are removed.Tests
DeviceMetadataCharacterizationTestgains a fixture that writes the firmware field whole, and two tests:3.2.3\0→ 3.2 /"3.2.3",3.10.1→ 3.10,10.0.0→ 10.0,3.3(the old fixture shape) → 3.3; and the serial / key / IV read from the same bytes as before. The existing tests, including the truncated-.mdone, pass unchanged.Locally:
mvn … test→ 332 run, 0 failures (39 FAT32 opt-in skips).git diff --exit-codeclean.Tracked in lgnap#17.
🤖 Generated with Claude Code