Skip to content

Name raw values of unknown meaning by byte offset - #47

Merged
mahach666 merged 2 commits into
mainfrom
api/raw-field-naming
Nov 28, 2026
Merged

mahach666 merged 2 commits into
mainfrom
api/raw-field-naming

Conversation

@mahach666

@mahach666 mahach666 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11.

The raw values whose meaning is not known had two naming schemes in the public API: the fields of the .db1 id map
are named by byte offset (Db1Document.IdMapField65, IdMapField73), the DBV@ block fields by bare letters
(DbvDocument.B, C, L1, L2, T). One value, two schemes.

What changed

The scheme is: raw values of unknown meaning are named by byte offset; where the files confirm the role of a value,
it carries a role name; the rest stays in Payload.

  • Removed from DbvDocument: B, C, L1, L2, T, and the unreleased EventLevel (it named a value whose role
    the files do not confirm).
  • Stayed: BaseOffset, CurrentOffset, LastEventOffset — the byte offsets of the domain events (the spec records
    them as confirmed); Prologue, ListHeader, GuidRecords, C9Records, Sections, Payload unchanged.
  • The checks of the reader are unchanged: it warns about word C and T[1] to T[4] and rejects a file where T[0] differs
    from the record count word. L1 and L2 are not checked. Payload holds all raw bytes, and docs/public-api.md
    gives the offsets.
  • The vector tests read the words back from Payload at those offsets to check the vectors, and compare
    CurrentOffset and LastEventOffset with them.
  • DbvC9Record.R0–R3 and a few other raw values keep their names.
  • The removals are listed in src/TdbIO/CompatibilitySuppressions.xml for the package validation against 0.1.0 (the
    flow CONTRIBUTING.md already describes); the CHANGELOG entry is under Breaking. When 0.2.0 ships, the baseline
    moves to it and the suppressions shrink.

Verification

  • dotnet test: TdbIO.Tests 493 passed / 38 skipped (private inputs) on net8.0 and net10.0; TdbIO.Scene.Tests 13/13.
  • dotnet pack TdbIO.slnx -c Release passes the package validation with the suppression file; without it the pack
    fails with exactly the five CP0002 removals per target framework.
  • BuildNativeCoreOnly=true build passes.

The raw DBV@ fields had bare letters (B, C, L1, L2, T) while the raw fields
of the .db1 id map are named by byte offset (IdMapField65, IdMapField73).
One value, two naming schemes.

- Remove B, C, L1, L2, T and EventLevel from DbvDocument. The byte offsets
  of the domain events stay as BaseOffset, CurrentOffset and LastEventOffset;
  the reader checks every other raw value against the values always seen and
  reports deviations in Warnings, and Payload holds the raw bytes.
- The vector tests now read the removed words back from the payload at their
  computed offsets, so the vectors still verify them.
- List the removals in CompatibilitySuppressions.xml for the package
  validation against 0.1.0 and move the CHANGELOG entry under Breaking.

Fixes #11.
- Drop the claims of checks that do not exist: a base offset that is a multiple
  of 32, row numbers inside the event interval and checks of L1 and L2.
- State the changes of DbvDocument against 0.1.0 with their replacements, list
  the new properties as added and give the offsets of the words that have no
  property.
- Update the naming rule for values of unknown meaning in CONTRIBUTING.md.
- Skip L1 and L2 instead of reading them into arrays that nothing uses.
- Compare CurrentOffset and LastEventOffset in the vector test, and check the
  documented offsets in a unit test.
@mahach666
mahach666 merged commit f08dbec into main Nov 28, 2026
5 checks passed
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.

Use one naming scheme for raw fields of unknown meaning

1 participant