2026-11-23 01:15:26 +01:00
|
|
|
# Asset policy (rule #1)
|
|
|
|
|
|
|
|
|
|
**Nothing from the game is ever stored in this repository.** Everything is
|
|
|
|
|
built on the user's machine from files the user supplies. The same applies
|
|
|
|
|
to other titles used for testing, and to any other proprietary material.
|
|
|
|
|
|
|
|
|
|
## Not allowed
|
|
|
|
|
|
|
|
|
|
In any form (files, string literals, fixtures, snapshots, docs):
|
|
|
|
|
|
|
|
|
|
* assets: models, textures, shaders, audio, video, text, archives;
|
|
|
|
|
* the executable or any part of it: data sections, strings, tables,
|
|
|
|
|
resources, code beyond the signatures below;
|
|
|
|
|
* anything derived from those: converted assets, decompiled or
|
|
|
|
|
disassembled code, shader dumps, extracted tables, screenshots.
|
|
|
|
|
|
|
|
|
|
## Allowed
|
|
|
|
|
|
|
|
|
|
* our own code that understands formats;
|
|
|
|
|
* build identities: BLAKE3 of an executable, CodeView GUID/age;
|
|
|
|
|
* per-build offsets of functions we hook, under names we choose;
|
|
|
|
|
* byte-pattern signatures that locate functions or data in the executable;
|
|
|
|
|
* small interoperability constants (magic numbers, enum values) we write;
|
|
|
|
|
* synthetic test data generated by our own code.
|
|
|
|
|
|
2026-11-23 23:10:01 +01:00
|
|
|
## The one exception
|
|
|
|
|
|
|
|
|
|
`crates/victory-formats/src/bcpack-tables.bin` (about 78 KB): the constant
|
|
|
|
|
tables of the BCPack format (entropy models, index rank tables, control
|
|
|
|
|
codes, per-format dictionaries). A BCPack stream cannot be decoded without
|
|
|
|
|
exactly these tables and they cannot be derived, so they ship with VIctory
|
|
|
|
|
by the project owner's decision (2026-11-23), entered as an exception in
|
|
|
|
|
`xtask/src/policy.rs`. They are part of the format, not our work, and the
|
|
|
|
|
repository's licence does not cover them. Nothing else of this kind is
|
|
|
|
|
accepted.
|
|
|
|
|
|
2026-11-23 01:15:26 +01:00
|
|
|
## Where data lives
|
|
|
|
|
|
|
|
|
|
Outside the repository, configured in `victory.toml`: `game_dir` (the
|
|
|
|
|
user's dump), `test_titles`, and `cache_dir` for everything derived
|
|
|
|
|
(default `%LOCALAPPDATA%\victory\cache`).
|
|
|
|
|
|
|
|
|
|
## Enforcement
|
|
|
|
|
|
|
|
|
|
1. `.gitignore` keeps common data types out of `git status`.
|
|
|
|
|
2. `cargo xtask policy` (run by the pre-commit hook; install with
|
|
|
|
|
`cargo xtask install-hooks`) is an allowlist: files must have an allowed
|
2026-11-25 16:13:05 -06:00
|
|
|
type, be under 640 KiB, contain no binary data or known binary
|
2026-11-23 01:15:26 +01:00
|
|
|
signatures, and hold no long hex/base64 runs. Exceptions need an entry
|
|
|
|
|
with a reason in `xtask/src/policy.rs`.
|
|
|
|
|
3. At runtime, everything that writes derived data calls
|
|
|
|
|
`victory_core::ensure_outside_repo`.
|
|
|
|
|
4. Tests that need real files take their paths from environment variables
|
|
|
|
|
and skip when unset. They assert on properties, never on snapshots.
|
|
|
|
|
|
|
|
|
|
## If something slips through
|
|
|
|
|
|
|
|
|
|
A follow-up commit is not enough. Rewrite history
|
|
|
|
|
(`git filter-repo --path <file> --invert-paths`), force-push, and have
|
|
|
|
|
everyone re-clone.
|