refactor(sdk): add vtx_transform and define the .vtx framing once - #49
Merged
Merged
Conversation
…ities; inspector File > Filter Entities - VTX::FilterReplayFile(src, dst, spec, progress): drop (blacklist) or keep (whitelist) entities by unique id glob, struct name glob or scalar property value (struct.field resolved through the file's schema; empty struct = any struct with that field). Every frame survives: the header block is copied verbatim, every chunk is re-serialized with the surviving entities (same frame ranges, same per-chunk compression, fresh xxHash64 checksums) and the footer keeps total_frames, duration and the per-frame time table; only the seek table changes. Timeline events are carried through the new SessionFooter::events (both policies) and pruned to entities that still exist. Progress callback with cancel; ReplayFilterResult reports kept/dropped, per-struct drops, event counts and sizes. ReplayFilterMatcher / GlobMatch expose the rule engine for previews. vtx_writer links vtx_reader privately; the entry point is compiled only when VTX_BUILD_READER is on. - tools/inspector: File > Filter Entities window -- struct checklist with current-frame counts, unique id globs, property rules, case-insensitive and event-pruning toggles, live preview on the current frame, worker thread with chunk progress and Cancel, result summary. - reader: GetFooter() now carries chunk_index[i].checksum on both backends (was always 0) and, for FlatBuffers, each event's entity_unique_id and location. - tests: ReplayFilterTest (both backends), ReplayFilterGlob, ReplayFilterMatcher. Docs: SDK_API.md section, CHANGELOG.
…the inspector - ReplayFilterRule::Bucket(pattern): selects every entity of the buckets whose schema name matches the glob, or of the bucket at that index when the pattern is digits only (also for buckets the schema does not name). Dropping a bucket empties it in every frame; the slot stays because bucket index is positional. A bucket rule that matches no schema bucket is an error listing the available names. ReplayFilterMatcher queries now take the bucket index (Matches / Keeps / Apply) and expose BucketMatches / BucketName; ReplayFilterResult adds dropped_by_bucket. - tools/inspector: Filter Entities gets a Buckets checklist (index, name, current-frame count) above the struct list; the outcome lists drops per bucket. - tests: DropByBucketName, KeepBucketCombinesWithOtherRules, BucketByIndexAndGlob (both backends, three-bucket schema) and BucketRulesResolveAgainstSchemaBuckets. Docs and CHANGELOG updated.
New module above vtx_reader + vtx_writer (VTX_BUILD_TRANSFORM, on by default) for every tool that modifies an existing .vtx. It is the only module linking both, so the writer no longer links the reader. - FilterReplayFile moves from vtx/writer/core to vtx/transform - RepairReplayFile / ReplayNeedsRecovery / RecoveryJournalPath move from vtx_writer to vtx_transform (RecoveryJournal / DurableFile stay in the writer: they are part of recording); the CrashRecovery* suite moves with them - The inspector's ReplayCutService is promoted to CutReplayFile / PlanCutFrames / PlanCutChunks, now on both backends and tested; the inspector links vtx_transform instead of vtx_writer vtx/common/vtx_replay_framing.h is the single definition of the on-disk framing (size prefixes, footer trailer, zstd-if-beneficial, xxHash64 checksums, layout probe), replacing four copies across both sinks, repair and filter. ChunkedNetworkSink now fills the seek-table checksum (was 0).
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.
New module above vtx_reader + vtx_writer (VTX_BUILD_TRANSFORM, on by default)
for every tool that modifies an existing .vtx. It is the only module linking
both, so the writer no longer links the reader.
vtx_writer to vtx_transform (RecoveryJournal / DurableFile stay in the
writer: they are part of recording); the CrashRecovery* suite moves with them
PlanCutFrames / PlanCutChunks, now on both backends and tested; the
inspector links vtx_transform instead of vtx_writer
vtx/common/vtx_replay_framing.h is the single definition of the on-disk
framing (size prefixes, footer trailer, zstd-if-beneficial, xxHash64
checksums, layout probe), replacing four copies across both sinks, repair
and filter. ChunkedNetworkSink now fills the seek-table checksum (was 0).