Files
6gbvram---16gb-ram/docs/asset-policy.md
T
MarvisandClaude Sonnet 5.5 f4504f6413 Initial commit
Rust workspace for VIctory: PE analysis, loader, HLE skeleton,
DXBC/DXIL parsing with a GFX10 decoder, conversion cache, CLI and
asset-policy enforcement.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-23 01:15:26 +01:00

50 lines
2.0 KiB
Markdown

# 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.
## 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
type, be under 512 KiB, contain no binary data or known binary
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.