Skip to content

refactor(sdk): add vtx_transform and define the .vtx framing once - #49

Merged
virtexalejandro merged 4 commits into
mainfrom
feat/vtx-transform
Sep 10, 2026
Merged

virtexalejandro merged 4 commits into
mainfrom
feat/vtx-transform

Conversation

@virtexalejandro

Copy link
Copy Markdown
Contributor

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).

onur-zenos and others added 4 commits September 9, 2026 18:38
…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).
@virtexalejandro
virtexalejandro merged commit 1a5bad5 into main Sep 10, 2026
9 checks passed
@virtexalejandro
virtexalejandro deleted the feat/vtx-transform branch September 10, 2026 14:08
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.

2 participants