Files
foxhound/docs/asset-policy.md
readmet3xt-lab c232561589 Docs: an installed profile wins over loose files; wording; line widths
The quick start says that a profile installed with the button wins
over files placed beside the programs, so an update needs the new
profile loaded the same way. Saved shaders are named as such. Lines
left too long by the 0.8.4 docs are wrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:25:42 +05:30

4.0 KiB

Asset policy (rule #1)

No game files, code or assets are ever stored in this repository or distributed with its releases. The layer runs only files you already have the right to use; everything it derives from them is made on your PC and stays there. The same applies to any program used for testing, and to any other proprietary material.

The repository is generic: general console and system interfaces, and our own code that implements them. Nothing in it is specific to one title.

Not allowed

In any form (files, string literals, fixtures, snapshots, docs, comments):

  • assets: models, textures, shaders, audio, video, text, archives;
  • an executable or any part of it: data sections, strings, tables, resources, code;
  • anything derived from those: converted assets, decompiled or disassembled code, saved shaders, extracted tables, screenshots or footage;
  • what is specific to one title: hashes or identities of its executable or shaders, offsets or byte patterns in its code, names of its files, and descriptions of its internals;
  • title profiles (see below).

Allowed

  • our own code that understands formats and implements console and system interfaces;
  • small interoperability constants (magic numbers, enum values, structure layouts) we write;
  • synthetic test data generated by our own code, and made-up identities in tests.

Title profiles

What the engine needs to know of one title (patch sites, the roles its shaders play, data tables) lives in a title profile, a file read at run time from outside this repository (docs/title-profile-format.md describes the format). Title profiles are not part of this repository and are never committed to it, and none is distributed with its releases. Without one, the engine runs with the features that need it off.

No exceptions

The policy has no exception. The BCPack format's constant tables (a file of about 78 KB) shipped here from 2026-11-23 as the one exception; they no longer do. The decoder reads them at run time (Tables::parse):

  • from the title profile's bcpack table, a file beside profile.toml checked against the BLAKE3 hash the profile gives (title-profile-format.md); or
  • from the file VICTORY_BCPACK_TABLES names, which wins over the profile.

Without either, textures packed with BCPack are not decoded (said once in the log). .gitignore ignores the file, and xtask/src/policy.rs refuses any file named bcpack-tables*, whatever its extension.

Of that file:

  • The first 2,304 bytes, the 128 rANS probability models, are Microsoft's, published under the MIT licence in https://github.com/microsoft/silicon-rans (mdu_minirans.v, freq_table; checked value for value). See THIRD_PARTY_NOTICES.md.
  • The rest (index rank tables, BC7 control codes, per-format dictionaries, about 75.7 KB) has no public source we know of. It is part of the format, not our work, and the repository's licence does not cover it.

Where data lives

Outside the repository, configured in victory.toml or by the launcher: game_dir (the folder of the program to run), 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 640 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.