Skip to content

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

Open
mahach666 wants to merge 1 commit into
mainfrom
api/raw-field-naming
Open

mahach666 wants to merge 1 commit into
mainfrom
api/raw-field-naming

Conversation

@mahach666

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, EventLevel (the last one named a value whose role the files
    do not confirm).
  • Stayed: BaseOffset, CurrentOffset, LastEventOffset — the byte offsets of the domain events, whose relations
    the reader checks against the values always seen (the spec records them as confirmed); Prologue, ListHeader,
    GuidRecords, C9Records, Sections, Payload unchanged.
  • The reader keeps checking every removed raw value against the values always seen and reports deviations in
    Warnings (word C, T[1], T[2], T[3], T[4], T[0] as an error); Payload holds all raw bytes.
  • The vector tests read the removed words back from Payload at their computed offsets, so the private vectors still
    verify them word by word.
  • 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.

This branch has not been deployed

No deployments
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