Event format is defined twice (vicrec and victory-gpu record.rs) #240

Closed
opened 2026-12-02 15:24:16 +00:00 by github-bot · 1 comment
Owner

@⁠TheRifai on GitHub · 2026-12-02 15:23 UTC · original

Finding (TASKS "Event stream", line 952)

Seen on: main 963df8e (code read). The format is defined twice: greenfield/vicrec/src/event.rs (kinds, MAGIC, Entry via entries!) and crates/victory-gpu/src/record.rs (the same CALL..SAME, SLOTS, MAGIC, and a separate Entry enum). vicrec/src/event.rs even says "Copied from record.rs (kinds, Entry, each_event)". A new event kind has to be added in both places, and the two Entry enums can drift (vicrec has BarrierGroups = 47 etc., record.rs has its own list).

I did not merge them: victory-gpu is a Windows crate in the root workspace and has no dependency on the greenfield vicrec crate, so the fix is a cross-workspace dependency move, not a local edit. It needs a decision about which side owns the format before any code change (docs/AGENTS.md rule on coupling). No code change from me.

Next

Decide the owner (vicrec in greenfield, or a small shared crate in crates/), then re-export one definition and delete the duplicate, with a policy test that both sides agree on the numbers.

**@⁠TheRifai** on GitHub · 2026-12-02 15:23 UTC · [original](https://github.com/vktory6/VKtory/issues/240) ## Finding (TASKS "Event stream", line 952) **Seen on:** main `963df8e` (code read). The format is defined twice: `greenfield/vicrec/src/event.rs` (kinds, `MAGIC`, `Entry` via `entries!`) and `crates/victory-gpu/src/record.rs` (the same `CALL..SAME`, `SLOTS`, `MAGIC`, and a separate `Entry` enum). `vicrec/src/event.rs` even says "Copied from `record.rs` (kinds, `Entry`, `each_event`)". A new event kind has to be added in both places, and the two `Entry` enums can drift (vicrec has `BarrierGroups = 47` etc., record.rs has its own list). I did not merge them: `victory-gpu` is a Windows crate in the root workspace and has no dependency on the greenfield `vicrec` crate, so the fix is a cross-workspace dependency move, not a local edit. It needs a decision about which side owns the format before any code change (docs/AGENTS.md rule on coupling). No code change from me. ## Next Decide the owner (vicrec in greenfield, or a small shared crate in crates/), then re-export one definition and delete the duplicate, with a policy test that both sides agree on the numbers.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 15:24:16 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 16:13 UTC · original

Thanks. It's in the TASKS item "Event stream" (github.com/vktory6/VKtory@7c1ba48), and #235 is the PR that shares the kinds and entry numbers. Closing here; #235 is reviewed separately.

**@⁠vktory6** on GitHub · 2026-12-02 16:13 UTC · [original](https://github.com/vktory6/VKtory/issues/240#issuecomment-7351636487) Thanks. It's in the TASKS item "Event stream" (https://github.com/vktory6/VKtory/commit/7c1ba48), and #235 is the PR that shares the kinds and entry numbers. Closing here; #235 is reviewed separately.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#240
No description provided.