Repository navigation
Name raw values of unknown meaning by byte offset - #47
Merged
Merged
Conversation
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.
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.
Fixes #11.
The raw values whose meaning is not known had two naming schemes in the public API: the fields of the
.db1id mapare 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.DbvDocument:B,C,L1,L2,T, and the unreleasedEventLevel(it named a value whose rolethe files do not confirm).
BaseOffset,CurrentOffset,LastEventOffset— the byte offsets of the domain events (the spec recordsthem as confirmed);
Prologue,ListHeader,GuidRecords,C9Records,Sections,Payloadunchanged.from the record count word.
L1andL2are not checked.Payloadholds all raw bytes, anddocs/public-api.mdgives the offsets.
Payloadat those offsets to check the vectors, and compareCurrentOffsetandLastEventOffsetwith them.DbvC9Record.R0–R3and a few other raw values keep their names.src/TdbIO/CompatibilitySuppressions.xmlfor the package validation against 0.1.0 (theflow 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 Releasepasses the package validation with the suppression file; without it the packfails with exactly the five CP0002 removals per target framework.
BuildNativeCoreOnly=truebuild passes.