Skip to content

Firmware version parser reads one digit per component and drops the patch level #17

Open

Description

@lgnap

Contexte

FsStoryTellerAsyncDriver.parseDeviceInfosMeta6to7 reads the firmware version of a .md v6/v7 as readAsciiToShort(fis, 1) for the major, skips one byte, readAsciiToShort(fis, 1) for the minor. Verified on a device (FORMATS.md §2): the field is a 6-byte NUL-terminated ASCII string, 3.2.3\0 on that card. The parser yields 3.2 and silently drops the patch level; a firmware 3.10.x or 10.0.x would be misread (3.1, 1.0) and every offset after it would still be right only by luck of the fixed skip.

Description

Parse the field as the string it is: read the 6 bytes, cut at the first NUL, split on ., keep major/minor as today and expose the patch level (or the full string) on FsDeviceInfos. Keep the fixed-size read so the offsets of the serial and keys do not move.

Fichiers concernes

  • driver/src/main/java/studio/driver/fs/FsStoryTellerAsyncDriver.java:217-224
  • driver/src/main/java/studio/driver/model/fs/FsDeviceInfos.java — a patch level or version string
  • driver/src/test/java/studio/driver/fs/DeviceMetadataCharacterizationTest.java — cases 3.2.3, 3.10.1, 10.0.0, and a field without patch level

Plan d'implementation

  1. Characterize the current behaviour on 3.10.1 and 10.0.0 (KNOWN GAP style), then convert to specifications with the fix.
  2. Read 6 bytes, parse, keep the offsets.
  3. Surface the patch level where the UI shows the firmware version, if it does.

Criteres d'acceptation

  • 3.2.3 parses as 3.2.3, 3.10.1 as 3.10.1, 10.0.0 as 10.0.0
  • Serial and key offsets unchanged (existing metadata tests still green)
  • mvn -pl driver test green on Ubuntu and Windows CI

Complexite

S

Activity

  1. added
    bug
    on Sep 11, 2026
  2. lgnap commented on Sep 11, 2026

    @lgnap
    OwnerAuthor

    Prise en charge par Claude Code (instance tuxedo:40112:d397e957, branche fix/issue-17-firmware-version-parse).

  3. lgnap commented on Sep 11, 2026

    @lgnap
    OwnerAuthor

    Implemented in antoinevalentinHA#61. Firmware field read whole (3.2.3), major/minor kept, full string exposed and reported by the service; offsets unchanged; two new tests. CI green. Awaiting the upstream owner.

  4. added a commit that references this issue on Nov 19, 2026
    8a034bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions