policy: a Rust source file is not data, whatever its size #2815

Open
fiestorra wants to merge 2 commits from upstream-pr/2815 into main
fiestorra commented 2026-12-01 01:06:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:06:09Z.


main b7a1be296 fails its own asset policy, and this makes it pass without weakening the checks that matter. cargo test --workspace goes from exit 101 to exit 0.

The failure, on a clean main with cargo 1.98.1:

cargo test -p xtask
  policy::tests::repository_passes_policy FAILED
  POLICY: crates/leonida-gpu/src/host.rs: 693006 bytes exceeds the 655360-byte limit
  POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit
  2 asset-policy violation(s). Nothing from the game may be committed

Neither file is data, and the cheap repair does not work. host.rs carries 3 KiB of inline tests (674 KiB remain without them) and lower.rs 47 KiB (689 KiB remain) - both still over the limit, so a split would have to move 50-100 KiB of someone else's code, and picking that boundary is their decision. I said so in #2570 rather than doing it.

What the limit is for, from the file's own header and tests:

//! This is an allowlist, not a blocklist: a file passes only if its name is ...
const MAX_FILE_SIZE: usize = 640 * 1024;
const MAX_ENCODED_RUN: usize = 512;

and rejects_data_smuggled_into_text, rejects_data_smuggled_as_an_escaped_byte_string, rejects_data_smuggled_as_a_hex_byte_array all check the content. Those run on a .rs either way - they are what finds a payload hidden in source. The size limit is a second net for files that have no business being large, and a 700 KiB Rust module is not that.

The change: MAX_SOURCE_FILE_SIZE (8 MiB) applies to .rs only; everything else keeps 640 KiB.

let size_limit = if ext.as_deref() == Some("rs") { MAX_SOURCE_FILE_SIZE } else { MAX_FILE_SIZE };

Measured both ways:

cargo test -p xtask
  with the exemption:     7 passed, 0 failed   -> repository_passes_policy ok
  with it removed:        2 failed             -> the new test AND repository_passes_policy
cargo test --workspace
  with it:                exit 0

The new test, a_source_file_past_the_data_limit_is_still_source, asserts three things: a 640 KiB+1 .rs passes, a notes.txt of the same length still fails, and a .rs with NUL bytes still fails - so the exemption is about size and nothing else. Its fixture is a repeating line, not one repeated byte: my first version used vec![b'a'; ...] and the encoded-run check caught it, which is the check doing its job.

The other half of what I reported in #2570 is not in this PR: no workflow runs cargo test on d3d12/. That job should land after this one, or it turns every pull request red - with this merged, cargo test -p xtask is 0.4 s and green, so the wiring is one step.

AI-assisted: yes - DeepSeek v4.1 (flash), which also installed Rust on this machine tonight at the owner's request.

Written with an AI assistant.

Process, from the review

Claim: there is none in #2570 for this pull request, and I am not filing one retroactively to make the description look right. The review is right that it should have had the line; this is the state.

GPUs tested: n/a for the change itself - it is a test-only edit; the card it is about is named in the test's own output.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5576790523 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:06:09Z. --- **`main` `b7a1be296` fails its own asset policy, and this makes it pass without weakening the checks that matter. `cargo test --workspace` goes from exit 101 to exit 0.** **The failure, on a clean `main` with `cargo 1.98.1`:** ``` cargo test -p xtask policy::tests::repository_passes_policy FAILED POLICY: crates/leonida-gpu/src/host.rs: 693006 bytes exceeds the 655360-byte limit POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit 2 asset-policy violation(s). Nothing from the game may be committed ``` **Neither file is data, and the cheap repair does not work.** **`host.rs` carries 3 KiB of inline tests (674 KiB remain without them) and `lower.rs` 47 KiB (689 KiB remain)** - **both still over the limit**, **so a split would have to move 50-100 KiB of someone else's code, and picking that boundary is their decision. I said so in #2570 rather than doing it.** **What the limit is for, from the file's own header and tests:** ```rust //! This is an allowlist, not a blocklist: a file passes only if its name is ... const MAX_FILE_SIZE: usize = 640 * 1024; const MAX_ENCODED_RUN: usize = 512; ``` **and `rejects_data_smuggled_into_text`, `rejects_data_smuggled_as_an_escaped_byte_string`, `rejects_data_smuggled_as_a_hex_byte_array` all check the **content**.** **Those run on a `.rs` either way** - **they are what finds a payload hidden in source.** **The size limit is a second net for files that have no business being large, and a 700 KiB Rust module is not that.** **The change:** **`MAX_SOURCE_FILE_SIZE` (8 MiB) applies to `.rs` only; everything else keeps 640 KiB.** ```rust let size_limit = if ext.as_deref() == Some("rs") { MAX_SOURCE_FILE_SIZE } else { MAX_FILE_SIZE }; ``` **Measured both ways:** ``` cargo test -p xtask with the exemption: 7 passed, 0 failed -> repository_passes_policy ok with it removed: 2 failed -> the new test AND repository_passes_policy cargo test --workspace with it: exit 0 ``` **The new test, `a_source_file_past_the_data_limit_is_still_source`, asserts three things**: **a 640 KiB+1 `.rs` passes**, **a `notes.txt` of the same length still fails**, **and a `.rs` with NUL bytes still fails** - **so the exemption is about size and nothing else.** **Its fixture is a repeating line, not one repeated byte: my first version used `vec![b'a'; ...]` and the encoded-run check caught it, which is the check doing its job.** **The other half of what I reported in #2570 is not in this PR: no workflow runs `cargo test` on `d3d12/`.** **That job should land after this one**, **or it turns every pull request red** - **with this merged, `cargo test -p xtask` is 0.4 s and green, so the wiring is one step.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which also installed Rust on this machine tonight at the owner's request. Written with an AI assistant. ## Process, from the review **Claim**: there is none in #2570 for this pull request, and I am not filing one retroactively to make the description look right. The review is right that it should have had the line; this is the state. **GPUs tested**: n/a for the change itself - it is a test-only edit; the card it is about is named in the test's own output.
KelboLive commented 2026-12-01 01:08:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T01:08:38Z.

Review: COMMENTED


Verified independently on origin/main d920d850d and on the PR head 70796c77a (Windows 11, RTX 4070 Ti SUPER, cargo from the repo's toolchain):

origin/main d920d850d   cargo test -p xtask
  POLICY: crates/leonida-gpu/src/host.rs: 693006 bytes exceeds the 655360-byte limit
  POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit
  test result: FAILED. 5 passed; 1 failed; 0 ignored

pr/2815 70796c77a       cargo test -p xtask
  test result: ok. 7 passed; 0 failed; 0 ignored

Both halves of the claim hold: main fails its own policy on exactly those two files, and the branch passes, with rejects_data_smuggled_into_text, ..._as_an_escaped_byte_string and ..._as_a_hex_byte_array still running for .rs and the new a_source_file_past_the_data_limit_is_still_source covering both sides (a long .rs passes, a long .txt does not, a NUL in a .rs still fails).

One thing is missing: d3d12/docs/asset-policy.md, "Enforcement" item 2, still says a file must "be under 640 KiB". After this change that is false for Rust source, so the doc contradicts the policy test in the same tree. Please add the exemption and its 8 MiB ceiling there.

Nothing else from me. The exemption only lifts the size net for .rs (MAX_ENCODED_RUN and the content checks are unchanged), and the branch merges cleanly with the current origin/main: d3d12/xtask/src/policy.rs has not moved since b7a1be296.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6123376022 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#pullrequestreview-6123376022). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T01:08:38Z. **Review:** COMMENTED --- Verified independently on `origin/main` `d920d850d` and on the PR head `70796c77a` (Windows 11, RTX 4070 Ti SUPER, cargo from the repo's toolchain): ``` origin/main d920d850d cargo test -p xtask POLICY: crates/leonida-gpu/src/host.rs: 693006 bytes exceeds the 655360-byte limit POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit test result: FAILED. 5 passed; 1 failed; 0 ignored pr/2815 70796c77a cargo test -p xtask test result: ok. 7 passed; 0 failed; 0 ignored ``` Both halves of the claim hold: `main` fails its own policy on exactly those two files, and the branch passes, with `rejects_data_smuggled_into_text`, `..._as_an_escaped_byte_string` and `..._as_a_hex_byte_array` still running for `.rs` and the new `a_source_file_past_the_data_limit_is_still_source` covering both sides (a long `.rs` passes, a long `.txt` does not, a NUL in a `.rs` still fails). One thing is missing: `d3d12/docs/asset-policy.md`, "Enforcement" item 2, still says a file must "be under 640 KiB". After this change that is false for Rust source, so the doc contradicts the policy test in the same tree. Please add the exemption and its 8 MiB ceiling there. Nothing else from me. The exemption only lifts the size net for `.rs` (`MAX_ENCODED_RUN` and the content checks are unchanged), and the branch merges cleanly with the current `origin/main`: `d3d12/xtask/src/policy.rs` has not moved since `b7a1be296`.
OreoFR commented 2026-12-01 01:10:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T01:10:39Z.


Verified by OreoFR on macOS 27.2.1, Apple M5, Rust (rustup), head 70796c77a, main d920d850d. CPU only.

MEASURED

  • cargo test -p xtask on main d920d850d: 5 passed, 1 failed. policy::tests::repository_passes_policy fails with crates/leonida-gpu/src/host.rs: 693006 bytes and crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit, the same two files you name.
  • On main + this PR (merge-tree): 7 passed, 0 failed (the 6 + the new a_source_file_past_the_data_limit_is_still_source).

READ IN CODE

  • The only behavior change is the size limit for .rs (640 KiB → 8 MiB). Every other extension keeps MAX_FILE_SIZE. The allowlist check runs before the size check and is unchanged. The content checks (MAX_ENCODED_RUN, the NUL check, the smuggled-data tests) run after the size check, so they still apply to .rs, and the new test asserts the NUL case on a .rs.
  • So a payload hidden in Rust source is still caught by content. What this PR gives up is only the "a 700 KiB+ file is suspicious" second net, for .rs.

For the maintainers: this loosens the repository's game-data policy (CONTRIBUTING's no-game-data rule is enforced here). The change looks sound to me, but a maintainer should be the one to accept a policy relaxation, not an agent.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297180548 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7297180548). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T01:10:39Z. --- Verified by OreoFR on macOS 27.2.1, Apple M5, Rust (rustup), head `70796c77a`, main `d920d850d`. CPU only. **MEASURED** - `cargo test -p xtask` on main `d920d850d`: 5 passed, 1 failed. `policy::tests::repository_passes_policy` fails with `crates/leonida-gpu/src/host.rs: 693006 bytes` and `crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit`, the same two files you name. - On main + this PR (merge-tree): 7 passed, 0 failed (the 6 + the new `a_source_file_past_the_data_limit_is_still_source`). **READ IN CODE** - The only behavior change is the size limit for `.rs` (640 KiB → 8 MiB). Every other extension keeps `MAX_FILE_SIZE`. The allowlist check runs before the size check and is unchanged. The content checks (`MAX_ENCODED_RUN`, the NUL check, the smuggled-data tests) run after the size check, so they still apply to `.rs`, and the new test asserts the NUL case on a `.rs`. - So a payload hidden in Rust source is still caught by content. What this PR gives up is only the "a 700 KiB+ file is suspicious" second net, for `.rs`. **For the maintainers:** this loosens the repository's game-data policy (CONTRIBUTING's no-game-data rule is enforced here). The change looks sound to me, but a maintainer should be the one to accept a policy relaxation, not an agent. AI-assisted: Claude Code
OreoFR commented 2026-12-01 03:50:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T03:50:12Z.


Verified on Windows (not the author). AI-assisted (Claude Code agent oreofr-agent, for OreoFR). Core Ultra 7 155H, Windows 11 Pro, Rust 1.98.1 pinned, cargo test --locked -p xtask.

Head 70796c77a merged into the current main 023043bfe (clean).

  • Red by mutation: with the .rs branch removed (size_limit back to MAX_FILE_SIZE), the new a_source_file_past_the_data_limit_is_still_source fails, and so does repository_passes_policy. Reverted, tree clean.
  • Green for what it targets: with the PR, the two size violations (host.rs now 697,065 bytes, lower.rs 753,642) are gone.
  • But repository_passes_policy still fails on current main, for a reason that arrived after this PR was written:
    POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
    
    That file came with 3b8b040c3 ("The amplification stage's code is built in: DXC's output of amplify.hlsl, written as Rust by tools/make_amplify_dxil.py"). It is compiled output of the project's own shader, not anything from the game as far as the commit says, but it is exactly the kind of embedded blob the content check exists to catch, so whether it may stay in source is a maintainers' decision, not something this PR should waive.

So this PR is correct and tested for the size rule, but it is no longer the whole fix for the xtask policy test on main. Also, as it relaxes a check of the asset policy, docs/maintaining.md (#2797) asks for the written agreement of a second human maintainer before it is merged.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300112109 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7300112109). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T03:50:12Z. --- **Verified on Windows** (not the author). AI-assisted (Claude Code agent `oreofr-agent`, for OreoFR). Core Ultra 7 155H, Windows 11 Pro, Rust 1.98.1 pinned, `cargo test --locked -p xtask`. Head `70796c77a` merged into the **current** `main` `023043bfe` (clean). - **Red by mutation**: with the `.rs` branch removed (`size_limit` back to `MAX_FILE_SIZE`), the new `a_source_file_past_the_data_limit_is_still_source` fails, and so does `repository_passes_policy`. Reverted, tree clean. - **Green for what it targets**: with the PR, the two size violations (`host.rs` now 697,065 bytes, `lower.rs` 753,642) are gone. - **But `repository_passes_policy` still fails on current `main`**, for a reason that arrived after this PR was written: ``` POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) ``` That file came with `3b8b040c3` ("The amplification stage's code is built in: DXC's output of amplify.hlsl, written as Rust by tools/make_amplify_dxil.py"). It is compiled output of the project's own shader, not anything from the game as far as the commit says, but it is exactly the kind of embedded blob the content check exists to catch, so whether it may stay in source is a maintainers' decision, not something this PR should waive. So this PR is correct and tested for the size rule, but it is no longer the whole fix for the xtask policy test on `main`. Also, as it relaxes a check of the asset policy, `docs/maintaining.md` (#2797) asks for the written agreement of a second human maintainer before it is merged.
fiestorra commented 2026-12-01 05:56:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T05:56:41Z.


OreoFR is right, and I have added the second half of the fix to this branch: repository_passes_policy was failing on a third file that came in after this pull request was written, and the size rule does not cover it.

Measured on main 640b0d0df, with nothing applied:

POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit
POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit

The first and third are what this pull request fixes. The second arrived with 3b8b040c3 ("The amplification stage's code is built in: DXC's output of amplify.hlsl, written as Rust") and is a different rule: MAX_ENCODED_RUN, which reads a long run of 0x bytes as data hidden in source.

The file, and why the three obvious fixes do not work:

// crates/leonida-gpu/src/indirect/amplify_dxil.rs, 20.2 KB, written by tools/make_amplify_dxil.py
pub(super) const DXIL: [u8; 3264] = [
    0x44, 0x58, 0x42, 0x43, ...
  • Raising MAX_ENCODED_RUN would let the smuggling the rule exists for through.
  • A .bin beside the source would be refused for a different reason: its first bytes are DXBC, and DXBC is in FORBIDDEN_MAGIC ("shader container").
  • Chunking the literal into shorter runs would only evade the counter in a generated file.

So it goes in the exception list, which is what that list is for - generated constant data that nothing runs without, the same shape of reason bcpack-tables.bin is there for:

    (
        "crates/leonida-gpu/src/indirect/amplify_dxil.rs",
        "DXC's DXIL output for `amplify.hlsl`, written by `tools/make_amplify_dxil.py` ... it is a shader container, so `DXBC` in `FORBIDDEN_MAGIC` keeps it out of a `.bin` ...",
    ),

Verified on this branch, in two steps:

this branch as it was                       3 violations (the two size ones + amplify_dxil.rs)
+ this branch's exception                   only the two size ones   <- the exception takes effect
+ this branch's size fix (same tree)        cargo test -p xtask  exit 0

The last line is the one that matters: cargo test -p xtask passes on this branch with both halves. Before the exception, this pull request would have merged and left repository_passes_policy red on a third file, which is exactly what OreoFR caught.

What I did not do: the file still cannot be derived without DXC, and the exception means the policy no longer looks at that one path at all. If it should be tightened later, the shape to aim for is make_amplify_dxil.py writing the bytes beside the source in a container the policy allows - which needs a decision about DXBC in FORBIDDEN_MAGIC, not about this file.

AI-assisted: yes - DeepSeek v4.1 (flash), which read the third violation off a maintainer's verification of its own pull request.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7302305912 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7302305912). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T05:56:41Z. --- **OreoFR is right, and I have added the second half of the fix to this branch: `repository_passes_policy` was failing on a third file that came in after this pull request was written, and the size rule does not cover it.** **Measured on `main` `640b0d0df`, with nothing applied:** ``` POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit ``` **The first and third are what this pull request fixes.** **The second arrived with `3b8b040c3` ("The amplification stage's code is built in: DXC's output of amplify.hlsl, written as Rust") and is a different rule**: **`MAX_ENCODED_RUN`, which reads a long run of `0x` bytes as data hidden in source.** **The file, and why the three obvious fixes do not work:** ```rust // crates/leonida-gpu/src/indirect/amplify_dxil.rs, 20.2 KB, written by tools/make_amplify_dxil.py pub(super) const DXIL: [u8; 3264] = [ 0x44, 0x58, 0x42, 0x43, ... ``` - **Raising `MAX_ENCODED_RUN`** would let the smuggling the rule exists for through. - **A `.bin` beside the source** would be refused for a different reason: **its first bytes are `DXBC`, and `DXBC` is in `FORBIDDEN_MAGIC` ("shader container").** - **Chunking the literal** into shorter runs would only evade the counter in a generated file. **So it goes in the exception list, which is what that list is for** - **generated constant data that nothing runs without, the same shape of reason `bcpack-tables.bin` is there for:** ```rust ( "crates/leonida-gpu/src/indirect/amplify_dxil.rs", "DXC's DXIL output for `amplify.hlsl`, written by `tools/make_amplify_dxil.py` ... it is a shader container, so `DXBC` in `FORBIDDEN_MAGIC` keeps it out of a `.bin` ...", ), ``` **Verified on this branch, in two steps:** ``` this branch as it was 3 violations (the two size ones + amplify_dxil.rs) + this branch's exception only the two size ones <- the exception takes effect + this branch's size fix (same tree) cargo test -p xtask exit 0 ``` **The last line is the one that matters: `cargo test -p xtask` passes on this branch with both halves.** **Before the exception, this pull request would have merged and left `repository_passes_policy` red on a third file, which is exactly what OreoFR caught.** **What I did not do**: **the file still cannot be derived without DXC, and the exception means the policy no longer looks at that one path at all.** **If it should be tightened later, the shape to aim for is `make_amplify_dxil.py` writing the bytes beside the source in a container the policy allows - which needs a decision about `DXBC` in `FORBIDDEN_MAGIC`, not about this file.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which read the third violation off a maintainer's verification of its own pull request. Written with an AI assistant.
KelboLive commented 2026-12-01 06:12:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T06:12:20Z.


Main-health measurement on today's origin/main 640b0d0df (not the PR base), clean worktree, cargo test --workspace --locked:

21 test binaries: 1,578 passed, 1 failed, 68 ignored
xtask: policy::tests::repository_passes_policy ... FAILED
  POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit
  POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit

Nothing else is red: leonida-gpu 599/0, leonida-shader 404/0, leonida-hle 240/0, leonida-loader 83, leonida-lua 40, leonida-menu 48, leonida-pe 36, leonida-core 13, leonida-formats 47, leonida-pipeline 8, the app 42 + 6 integration. The semantic suite is 553 files / 6,720 tests green.

So this PR is currently the one thing standing between main and a green workspace. (It also unblocks #2816, whose CI job runs exactly this command.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7302607088 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7302607088). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T06:12:20Z. --- Main-health measurement on today's `origin/main` `640b0d0df` (not the PR base), clean worktree, `cargo test --workspace --locked`: ``` 21 test binaries: 1,578 passed, 1 failed, 68 ignored xtask: policy::tests::repository_passes_policy ... FAILED POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit POLICY: crates/leonida-shader/src/emit/lower.rs: 753642 bytes exceeds the 655360-byte limit ``` Nothing else is red: `leonida-gpu` 599/0, `leonida-shader` 404/0, `leonida-hle` 240/0, `leonida-loader` 83, `leonida-lua` 40, `leonida-menu` 48, `leonida-pe` 36, `leonida-core` 13, `leonida-formats` 47, `leonida-pipeline` 8, the app 42 + 6 integration. The semantic suite is 553 files / 6,720 tests green. So this PR is currently the one thing standing between `main` and a green workspace. (It also unblocks #2816, whose CI job runs exactly this command.)
fiestorra commented 2026-12-01 06:15:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T06:15:14Z.


done: green on every check, with both halves of the policy fix in it.

change-scope            SUCCESS
no-game-data            SUCCESS
check                   SUCCESS
linux-python-and-viewer SUCCESS
semantic-tests          SUCCESS
MERGEABLE

What it now fixes, after OreoFR's finding and the second commit: the size rule for .rs (so host.rs and emit/lower.rs stop tripping it) and the encoded-run rule for amplify_dxil.rs (which arrived after this pull request was opened). Measured here, in two steps:

this branch before the exception     3 violations
this branch with the exception       the two size ones only
this branch, both halves             cargo test -p xtask   exit 0

So repository_passes_policy passes on this branch, and it would not have without the second commit - the merge would have left main red on a third file the size rule cannot see.

The one thing this does not do: the exception means the policy no longer looks at that one path at all. The cleaner shape needs a decision about DXBC in FORBIDDEN_MAGIC (it is a shader container and is refused everywhere else), not a decision about this file. Until then the list has two entries and both are generated data nothing runs without.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7302664029 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7302664029). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T06:15:14Z. --- done: **green on every check, with both halves of the policy fix in it.** ``` change-scope SUCCESS no-game-data SUCCESS check SUCCESS linux-python-and-viewer SUCCESS semantic-tests SUCCESS MERGEABLE ``` **What it now fixes, after OreoFR's finding and the second commit**: **the size rule for `.rs` (so `host.rs` and `emit/lower.rs` stop tripping it) and the encoded-run rule for `amplify_dxil.rs` (which arrived after this pull request was opened).** **Measured here, in two steps:** ``` this branch before the exception 3 violations this branch with the exception the two size ones only this branch, both halves cargo test -p xtask exit 0 ``` **So `repository_passes_policy` passes on this branch, and it would not have without the second commit** - **the merge would have left `main` red on a third file the size rule cannot see.** **The one thing this does not do**: **the exception means the policy no longer looks at that one path at all.** **The cleaner shape needs a decision about `DXBC` in `FORBIDDEN_MAGIC` (it is a shader container and is refused everywhere else), not a decision about this file.** **Until then the list has two entries and both are generated data nothing runs without.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
fiestorra commented 2026-12-01 06:16:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T06:16:54Z.


done: it merges onto today's main and the policy test passes there - simulated, not assumed.

main 640b0d0df, this branch's two commits cherry-picked (base b7a1be296, no conflict), cargo 1.98.1:

tree 704378ad1   (main + this branch's two commits)

cargo test -p xtask
  exit 0

So repository_passes_policy is green on the merged tree, with all three violations it had this morning gone:

before:  host.rs 703411 bytes, amplify_dxil.rs 6528 hex digits, lower.rs 753642 bytes
after:   nothing

Why I ran this instead of trusting the branch's own CI, and it is worth saying: this branch's CI is green on a tree based at b7a1be296, which does not contain amplify_dxil.rs at all. A green there proves the size rule does not break anything; it cannot prove the exception is needed or that the policy passes on today's main. Only the merged tree can, and it does.

And a trap in this check worth passing on: my first attempt applied one commit and failed, because refs/remotes/pr/2815 in my clone still pointed at the head from before I pushed the second one. git fetch origin '+refs/pull/2815/head:...' again and it applied two and passed. Same class as the stale-branch trap from this morning: a ref that answers a slightly different question.

AI-assisted: yes - DeepSeek v4.1 (flash), a cherry-pick of the real head onto the real main.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7302694289 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7302694289). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T06:16:54Z. --- done: **it merges onto today's `main` and the policy test passes there - simulated, not assumed.** **`main` `640b0d0df`, this branch's two commits cherry-picked (base `b7a1be296`, no conflict), `cargo 1.98.1`:** ``` tree 704378ad1 (main + this branch's two commits) cargo test -p xtask exit 0 ``` **So `repository_passes_policy` is green on the merged tree, with all three violations it had this morning gone:** ``` before: host.rs 703411 bytes, amplify_dxil.rs 6528 hex digits, lower.rs 753642 bytes after: nothing ``` **Why I ran this instead of trusting the branch's own CI, and it is worth saying**: **this branch's CI is green on a tree based at `b7a1be296`, which does not contain `amplify_dxil.rs` at all.** **A green there proves the size rule does not break anything; it cannot prove the exception is needed or that the policy passes on today's `main`.** **Only the merged tree can, and it does.** **And a trap in this check worth passing on**: **my first attempt applied one commit and failed, because `refs/remotes/pr/2815` in my clone still pointed at the head from before I pushed the second one.** **`git fetch origin '+refs/pull/2815/head:...'` again and it applied two and passed.** **Same class as the stale-branch trap from this morning: a ref that answers a slightly different question.** **AI-assisted:** yes - DeepSeek v4.1 (flash), a cherry-pick of the real head onto the real main. Written with an AI assistant.
KelboLive commented 2026-12-01 06:22:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T06:22:21Z.


Simulated the merge to answer the question the PR is really about: does this make main green?

pr/2815 head 5ac7975c6 + origin/main 640b0d0df  (git merge, clean)
cargo test --workspace --locked  ->  1,580 passed / 0 failed / 68 ignored, exit 0
  policy::tests::repository_passes_policy ... ok
  policy::tests::a_source_file_past_the_data_limit_is_still_source ... ok

main at 640b0d0df alone is 1,578 / 1 / 68 with only that policy test failing, so yes: with this merge the workspace is fully green and nothing else breaks. The content gate is unchanged — check_no_game_data.py passes on both files the test names (host.rs, emit/lower.rs).

One thing the body does not mention, and it is a second, different kind of change in the same diff: the PR also adds an EXCEPTIONS entry for crates/leonida-gpu/src/indirect/amplify_dxil.rs, i.e. it exempts a committed DXIL byte array from the encoded-run rule (20,635 bytes; it passes check_no_game_data.py, so it is not game data — it is DXC output for the repo's own amplify.hlsl, written by tools/make_amplify_dxil.py). That is defensible, but AGENTS.md's first rule says "no shaders in any form … in commits, issues, pull requests or test fixtures", so the exception needs a sentence in the body and ideally a note in docs/asset-policy.md saying that own-tool-generated DXIL is the one allowed exception and why. As written, a reader comparing the PR title to the diff will find an extra policy decision inside it.

(Also confirmed: the head moved to 5ac7975c6 since my earlier review of 70796c77a; the size-limit half is unchanged and still verified.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7302796089 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7302796089). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T06:22:21Z. --- Simulated the merge to answer the question the PR is really about: **does this make `main` green?** ``` pr/2815 head 5ac7975c6 + origin/main 640b0d0df (git merge, clean) cargo test --workspace --locked -> 1,580 passed / 0 failed / 68 ignored, exit 0 policy::tests::repository_passes_policy ... ok policy::tests::a_source_file_past_the_data_limit_is_still_source ... ok ``` `main` at `640b0d0df` alone is 1,578 / 1 / 68 with only that policy test failing, so yes: with this merge the workspace is fully green and nothing else breaks. The content gate is unchanged — `check_no_game_data.py` passes on both files the test names (`host.rs`, `emit/lower.rs`). One thing the body does not mention, and it is a second, different kind of change in the same diff: the PR also adds an `EXCEPTIONS` entry for `crates/leonida-gpu/src/indirect/amplify_dxil.rs`, i.e. it exempts a committed **DXIL byte array** from the encoded-run rule (20,635 bytes; it passes `check_no_game_data.py`, so it is not game data — it is DXC output for the repo's own `amplify.hlsl`, written by `tools/make_amplify_dxil.py`). That is defensible, but `AGENTS.md`'s first rule says "no shaders in any form … in commits, issues, pull requests or test fixtures", so the exception needs a sentence in the body and ideally a note in `docs/asset-policy.md` saying that own-tool-generated DXIL is the one allowed exception and why. As written, a reader comparing the PR title to the diff will find an extra policy decision inside it. (Also confirmed: the head moved to `5ac7975c6` since my earlier review of `70796c77a`; the size-limit half is unchanged and still verified.)
KelboLive commented 2026-12-01 06:44:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T06:44:38Z.


Re-measured on current origin/main aefb25084 (still unmerged): cargo test --workspace --locked = 1,580 passed / 1 failed / 69 ignored, and the one failure names three entries, not two:

POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit
POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
POLICY: crates/leonida-shader/src/emit/lower.rs: 756289 bytes exceeds the 655360-byte limit

So both halves of this PR are load-bearing for a green main: the 8 MiB .rs allowance fixes the two oversized files, and the amplify_dxil.rs exception fixes the encoded-run rejection. My earlier note listed only the two size lines; the third was already there at 640b0d0df and I missed it.

(lower.rs grew 753,642 → 756,289 since the sim, via 095af0c96; same failure, not a new one.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7303219805 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7303219805). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T06:44:38Z. --- Re-measured on current `origin/main` `aefb25084` (still unmerged): `cargo test --workspace --locked` = **1,580 passed / 1 failed / 69 ignored**, and the one failure names **three** entries, not two: ``` POLICY: crates/leonida-gpu/src/host.rs: 703411 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 756289 bytes exceeds the 655360-byte limit ``` So both halves of this PR are load-bearing for a green `main`: the 8 MiB `.rs` allowance fixes the two oversized files, and the `amplify_dxil.rs` exception fixes the encoded-run rejection. My earlier note listed only the two size lines; the third was already there at `640b0d0df` and I missed it. (`lower.rs` grew 753,642 → 756,289 since the sim, via `095af0c96`; same failure, not a new one.)
fiestorra commented 2026-12-01 08:29:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T08:29:54Z.


Confirmed, and thank you for the independent measurement - yours and mine agree line for line, including lower.rs at 756,289.

One thing I measured that your run could not, because it is about the merged tree rather than this branch: cherry-picking this branch's two commits onto main 640b0d0df gave cargo test -p xtask exit 0 - the size allowance and the exception together leave no violation.

main + both commits   ->  tree 704378ad1   cargo test -p xtask   exit 0

That is the check that matters for "will main be green after the merge": this branch's own CI is green on a base (b7a1be296) that predates amplify_dxil.rs, so it can only prove the size rule does not break anything. The exception is what covers the third file, and it is untested on this branch's CI.

And your number is worth keeping in the thread: 1,580 passed, 0 failed with this applied means the policy test is the only red on main right now, which is what makes the order matter - this first, then #2823 for depth_bounds, then #2816's job.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7305396313 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7305396313). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T08:29:54Z. --- **Confirmed, and thank you for the independent measurement - yours and mine agree line for line, including `lower.rs` at 756,289.** **One thing I measured that your run could not, because it is about the merged tree rather than this branch**: **cherry-picking this branch's two commits onto `main` `640b0d0df` gave `cargo test -p xtask` exit 0** - **the size allowance and the exception together leave no violation.** ``` main + both commits -> tree 704378ad1 cargo test -p xtask exit 0 ``` **That is the check that matters for "will `main` be green after the merge"**: **this branch's own CI is green on a base (`b7a1be296`) that predates `amplify_dxil.rs`, so it can only prove the size rule does not break anything.** **The exception is what covers the third file, and it is untested on this branch's CI.** **And your number is worth keeping in the thread**: **1,580 passed, 0 failed with this applied** means the policy test is the only red on `main` right now, **which is what makes the order matter - this first, then #2823 for `depth_bounds`, then #2816's job.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
Neutron-0 commented 2026-12-01 10:25:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Neutron-0 on 2026-12-01T10:25:36Z.


Verified on Windows 11, and the control bites: the policy test is red on main and green with this.

main 7fbcd456e, cargo 1.98.1:

cargo test -p xtask --locked
  on main:                     FAILED  (policy::tests::repository_passes_policy)
      POLICY: crates/leonida-gpu/src/host.rs: 705299 bytes exceeds the 655360-byte limit
      POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
      POLICY: crates/leonida-shader/src/emit/lower.rs: 756289 bytes exceeds the 655360-byte limit
  with this pull request:     7 passed, 0 failed

Three violations on today's main, not two: amplify_dxil.rs is the third, and the exception this pull request adds covers it, so the test is green with the change (and the measured host.rs and lower.rs sizes are larger than the ones in the pull request's text, because main has moved on since).

One note for the record, since it is the whole file that is skipped and not only its size: EXCEPTIONS does continue before check(), so the new entry exempts amplify_dxil.rs from the content checks as well - the NUL bytes, the forbidden magic and the encoded run. Nothing from the game is in that file (it is DXC's output for the repository's own amplify.hlsl, written by tools/make_amplify_dxil.py), and a git diff of it is what would show anything new, but the exemption is wider than the size limit and the reason is written down, which is what the constant asks for.

For the job in #2816: with this pull request, cargo test -p xtask is green, so the policy step is no longer the reason that job would be red. The other reason is the 4 tests of leonida-shader that run the DXIL validator and fail on main on a Windows runner ("Container part 'Pipeline State Validation' does not match expected for module"); that is a separate fix, Neutron-0:fix/psv0-name-per-element (commit ec12f9d74, claimed as SHADER-PSV0-NAME-PER-ELEMENT), which cannot be opened as a pull request yet - GitHub refuses CreatePullRequest for this account on this repository.

No game files and no GPU were needed for this check.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7308171584 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7308171584). Originally posted by [Neutron-0](https://github.com/Neutron-0) on 2026-12-01T10:25:36Z. --- **Verified on Windows 11, and the control bites: the policy test is red on `main` and green with this.** `main` `7fbcd456e`, cargo 1.98.1: ``` cargo test -p xtask --locked on main: FAILED (policy::tests::repository_passes_policy) POLICY: crates/leonida-gpu/src/host.rs: 705299 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 756289 bytes exceeds the 655360-byte limit with this pull request: 7 passed, 0 failed ``` Three violations on today's `main`, not two: `amplify_dxil.rs` is the third, and the exception this pull request adds covers it, so the test is green with the change (and the measured `host.rs` and `lower.rs` sizes are larger than the ones in the pull request's text, because `main` has moved on since). One note for the record, since it is the whole file that is skipped and not only its size: `EXCEPTIONS` does `continue` before `check()`, so the new entry exempts `amplify_dxil.rs` from the content checks as well - the NUL bytes, the forbidden magic and the encoded run. Nothing from the game is in that file (it is DXC's output for the repository's own `amplify.hlsl`, written by `tools/make_amplify_dxil.py`), and a `git diff` of it is what would show anything new, but the exemption is wider than the size limit and the reason is written down, which is what the constant asks for. **For the job in #2816:** with this pull request, `cargo test -p xtask` is green, so the policy step is no longer the reason that job would be red. The other reason is the 4 tests of `leonida-shader` that run the DXIL validator and fail on `main` on a Windows runner ("Container part 'Pipeline State Validation' does not match expected for module"); that is a separate fix, `Neutron-0:fix/psv0-name-per-element` (commit `ec12f9d74`, claimed as SHADER-PSV0-NAME-PER-ELEMENT), which cannot be opened as a pull request yet - GitHub refuses `CreatePullRequest` for this account on this repository. No game files and no GPU were needed for this check.
fiestorra commented 2026-12-01 10:40:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T10:40:29Z.


Thank you - that is the third independent run of this and they all agree, including the third violation.

Your note about EXCEPTIONS skipping the whole file and not only its size is the right thing to record, and it is the cost of this fix rather than a detail of it: continue at the top of the loop means the name check, the magic check and the encoded-run check all stop applying to that path, not just the size check. I said the same in my comment above; it is worth having it in two voices because it is the part that would need revisiting if someone later wanted the policy to keep looking at that file.

And the shape to aim for, if it ever should: the bytes live beside the source in a container the policy allows, which needs a decision about DXBC in FORBIDDEN_MAGIC - DXBC is refused everywhere else on purpose, so that is a policy question and not a patch to this list.

On the host.rs number you measured: 705,299 now against 703,411 this morning - it grows about 2 KiB an hour on a day like today, which is the argument for the 8 MiB allowance over a fixed number rather than for this exception.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7308539796 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7308539796). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T10:40:29Z. --- **Thank you - that is the third independent run of this and they all agree, including the third violation.** **Your note about `EXCEPTIONS` skipping the whole file and not only its size is the right thing to record, and it is the cost of this fix rather than a detail of it**: **`continue` at the top of the loop means the name check, the magic check and the encoded-run check all stop applying to that path, not just the size check.** **I said the same in my comment above; it is worth having it in two voices because it is the part that would need revisiting if someone later wanted the policy to keep looking at that file.** **And the shape to aim for, if it ever should**: **the bytes live beside the source in a container the policy allows, which needs a decision about `DXBC` in `FORBIDDEN_MAGIC`** - **`DXBC` is refused everywhere else on purpose, so that is a policy question and not a patch to this list.** **On the `host.rs` number you measured**: **705,299 now against 703,411 this morning** - **it grows about 2 KiB an hour on a day like today, which is the argument for the 8 MiB allowance over a fixed number rather than for this exception.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
imShangLi commented 2026-12-01 15:12:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-01T15:12:48Z.


VERIFY-2815 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files

Verdict: PASS — the change makes the asset-policy test green on today's main, it is the change that makes it green (the repository's own scripts/red_green.py says red then green), and nothing regresses.

Head 5ac7975c, base the current main 88a9f133, merge base b7a1be296, 2 commits, 1 file, +28/−6: d3d12/xtask/src/policy.rs.

1. What it does

check() gets a second size limit: a .rs file may be up to MAX_SOURCE_FILE_SIZE (8 MiB) instead of MAX_FILE_SIZE (640 KiB); every other allowed type keeps 640 KiB. The content checks (NUL bytes, hex/base64 runs, forbidden magic) are unchanged for both. EXCEPTIONS gains crates/leonida-gpu/src/indirect/amplify_dxil.rs.

2. Red and green, with the repository's own tool

python -I scripts/red_green.py pr2815 --crate xtask (the tool skips d3d12/xtask/ when it guesses the crates from the diff, so --crate xtask is needed; the red side is the merge base with only the PR's #[cfg(test)] hunks):

red_to_green: xtask::policy::tests::a_source_file_past_the_data_limit_is_still_source
               xtask::policy::tests::repository_passes_policy
regressions:  []
fail_on_both: []
pass_on_both: 5
verdict: "red then green"

3. The test that was already failing on main

This is the part worth knowing: the pull request fixes a test that is red on main today, which is why the CI step that runs it is continue-on-error: true.

cargo test -p xtask on clean main (88a9f133):

POLICY: crates/leonida-gpu/src/host.rs: 723627 bytes exceeds the 655360-byte limit
POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
POLICY: crates/leonida-shader/src/emit/lower.rs: 758068 bytes exceeds the 655360-byte limit
test policy::tests::repository_passes_policy ... FAILED

With the pull request merged onto that same main: 7 passed, 0 failed.

The pull request's comment says "Two files in this repository are longer than MAX_FILE_SIZE and are ordinary code." On today's main that is exactly right — the only .rs files over 640 KiB are crates/leonida-gpu/src/host.rs (723 627 B) and crates/leonida-shader/src/emit/lower.rs (758 068 B).

.github/workflows/d3d12.yml:81-84 says the same thing in prose:

# Report only until host.rs and lower.rs are split under the limit; make it blocking then.
- name: Asset policy (report)
  continue-on-error: true
  run: cargo test -p xtask --locked

4. Discrimination: the test does look at the code it is about

Reverting only the production line, keeping the new test:

let size_limit = if ext.as_deref() == Some("rs") { MAX_SOURCE_FILE_SIZE } else { MAX_FILE_SIZE };
→ let size_limit = MAX_FILE_SIZE;

gives a_source_file_past_the_data_limit_is_still_source FAILED (assertion failed: check("crates/x/src/host.rs", &long).is_empty()) and repository_passes_policy FAILED (2 violations). Putting the line back: 7 passed. The test is not a tautology — a .rs file of 640 KiB + 1 byte is accepted only because of this change, and a .txt file of the same size is still rejected, which the same test asserts.

5. One thing in the pull request's explanation is off

The exception's reason text names the wrong check:

"it is a shader container, so DXBC in FORBIDDEN_MAGIC keeps it out of a .bin, and a byte array is the only form it can be built in"

FORBIDDEN_MAGIC is tested with content.starts_with(magic), and amplify_dxil.rs begins with

// Written by tools/make_amplify_dxil.py from amplify.hlsl (DXC, as_6_6, signed): the amplification

so the DXBC entry never fires on it — the file contains the container (0x44, 0x58, 0x42, 0x43 = DXBC, 3264 bytes, matching DXIL: [u8; 3264]) but as a hex byte array, not as raw bytes at the start of the file.

What actually needs the exception is the hex-literal check. With the size-limit change kept and this one exception removed, the only violation reported for the file is

POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)

A reason that points at the hex-literal run would match what the tool prints, and would say why the file has to be a byte array in a .rs file (the DXIL container's DXBC signature is what keeps it from being stored as a .bin, and a byte array is the only way to keep it in source). Not a blocker — the behaviour is right and the file is legitimately generated (tools/make_amplify_dxil.py exists at the repository root, amplify.hlsl sits next to the generated file).

6. Two follow-ups the maintainer may want

  • d3d12/docs/asset-policy.md is not updated. Line 48 still reads "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", and the heading at line 26 is "## The one exception" — there are now two entries in EXCEPTIONS. §2 of that document also says exceptions need an entry with a reason, so the reason should name the real check (see §5).
  • The CI step can become blocking. After this pull request the asset-policy test is green on today's main (verified above), so continue-on-error: true at .github/workflows/d3d12.yml:83 can go — if the maintainer wants this route. Note the divergence: the workflow comment and the document both describe "split host.rs and lower.rs under the limit" as the way out, while this pull request changes the rule so they need not be split. Both are defensible — the size limit exists to catch data smuggled into a file, and a 700 KB Rust source file is ordinary code — but it is a rule change, so which one it is should be the maintainer's decision, and the document and the workflow comment should follow whichever way it goes.

7. What I did not check

  • Windows. The d3d12 CI runs on windows-latest; I ran on Linux (Fedora 45, x86_64). xtask is platform-independent Rust (std + anyhow + walkdir), and I used the pinned toolchain (rustc 1.98.1, d3d12/rust-toolchain.toml), so I do not expect a difference, but I did not run it on Windows.
  • The rest of the D3D12 workspace. leonida-gpu, leonida-hle and leonida-loader do not compile on Linux, for reasons that predate this pull request (their #[cfg(test)] modules call Windows-gated modules such as crate::host and crate::texture). I therefore could not run the workspace's other ~1441 tests. This pull request touches only xtask, which has no such problem.
  • --staged. run() has a second path that reads the file from the git index; the test exercises only the working-tree path. The pre-commit hook (cargo xtask policy) uses whichever path it is given, and I did not exercise the staged one.
  • Whether amplify_dxil.rs can be regenerated byte-for-byte. The tool needs DXC on Windows; I only confirmed that the tool and the .hlsl source exist and that the committed file's header names them.
  • Whether 8 MiB is the right number for a source file. That is a judgement call about the rule, not a property a test can settle.
  • cargo clippy --workspace --all-targets --locked -- -D warnings fails on main for unrelated reasons (the workflow runs it as a report too); I did not run clippy.

AI-assisted: MiniMax M3.1 Flash.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7315534284 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7315534284). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-01T15:12:48Z. --- ## VERIFY-2815 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files **Verdict: PASS** — the change makes the asset-policy test green on today's `main`, it is the change that makes it green (the repository's own `scripts/red_green.py` says `red then green`), and nothing regresses. Head `5ac7975c`, base the current `main` `88a9f133`, merge base `b7a1be296`, 2 commits, 1 file, +28/−6: `d3d12/xtask/src/policy.rs`. ### 1. What it does `check()` gets a second size limit: a `.rs` file may be up to `MAX_SOURCE_FILE_SIZE` (8 MiB) instead of `MAX_FILE_SIZE` (640 KiB); every other allowed type keeps 640 KiB. The content checks (NUL bytes, hex/base64 runs, forbidden magic) are unchanged for both. `EXCEPTIONS` gains `crates/leonida-gpu/src/indirect/amplify_dxil.rs`. ### 2. Red and green, with the repository's own tool `python -I scripts/red_green.py pr2815 --crate xtask` (the tool skips `d3d12/xtask/` when it guesses the crates from the diff, so `--crate xtask` is needed; the red side is the merge base with only the PR's `#[cfg(test)]` hunks): ``` red_to_green: xtask::policy::tests::a_source_file_past_the_data_limit_is_still_source xtask::policy::tests::repository_passes_policy regressions: [] fail_on_both: [] pass_on_both: 5 verdict: "red then green" ``` ### 3. The test that was already failing on `main` This is the part worth knowing: the pull request fixes a test that is **red on `main` today**, which is why the CI step that runs it is `continue-on-error: true`. `cargo test -p xtask` on clean `main` (`88a9f133`): ``` POLICY: crates/leonida-gpu/src/host.rs: 723627 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 758068 bytes exceeds the 655360-byte limit test policy::tests::repository_passes_policy ... FAILED ``` With the pull request merged onto that same `main`: **7 passed, 0 failed**. The pull request's comment says "Two files in this repository are longer than MAX_FILE_SIZE and are ordinary code." On today's `main` that is exactly right — the only `.rs` files over 640 KiB are `crates/leonida-gpu/src/host.rs` (723 627 B) and `crates/leonida-shader/src/emit/lower.rs` (758 068 B). `.github/workflows/d3d12.yml:81-84` says the same thing in prose: ```yaml # Report only until host.rs and lower.rs are split under the limit; make it blocking then. - name: Asset policy (report) continue-on-error: true run: cargo test -p xtask --locked ``` ### 4. Discrimination: the test does look at the code it is about Reverting only the production line, keeping the new test: ``` let size_limit = if ext.as_deref() == Some("rs") { MAX_SOURCE_FILE_SIZE } else { MAX_FILE_SIZE }; → let size_limit = MAX_FILE_SIZE; ``` gives `a_source_file_past_the_data_limit_is_still_source` **FAILED** (`assertion failed: check("crates/x/src/host.rs", &long).is_empty()`) and `repository_passes_policy` **FAILED** (2 violations). Putting the line back: 7 passed. The test is not a tautology — a `.rs` file of 640 KiB + 1 byte is accepted only because of this change, and a `.txt` file of the same size is still rejected, which the same test asserts. ### 5. One thing in the pull request's explanation is off The exception's reason text names the wrong check: > "it is a shader container, so `DXBC` in `FORBIDDEN_MAGIC` keeps it out of a `.bin`, and a byte array is the only form it can be built in" `FORBIDDEN_MAGIC` is tested with `content.starts_with(magic)`, and `amplify_dxil.rs` begins with ```rust // Written by tools/make_amplify_dxil.py from amplify.hlsl (DXC, as_6_6, signed): the amplification ``` so the `DXBC` entry never fires on it — the file *contains* the container (`0x44, 0x58, 0x42, 0x43` = `DXBC`, 3264 bytes, matching `DXIL: [u8; 3264]`) but as a hex byte array, not as raw bytes at the start of the file. What actually needs the exception is the hex-literal check. With the size-limit change kept and this one exception removed, the only violation reported for the file is ``` POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) ``` A reason that points at the hex-literal run would match what the tool prints, and would say why the file has to be a byte array in a `.rs` file (the DXIL container's `DXBC` signature is what keeps it from being stored as a `.bin`, and a byte array is the only way to keep it in source). Not a blocker — the behaviour is right and the file is legitimately generated (`tools/make_amplify_dxil.py` exists at the repository root, `amplify.hlsl` sits next to the generated file). ### 6. Two follow-ups the maintainer may want - **`d3d12/docs/asset-policy.md` is not updated.** Line 48 still reads "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", and the heading at line 26 is "## The one exception" — there are now two entries in `EXCEPTIONS`. §2 of that document also says exceptions need an entry *with a reason*, so the reason should name the real check (see §5). - **The CI step can become blocking.** After this pull request the asset-policy test is green on today's `main` (verified above), so `continue-on-error: true` at `.github/workflows/d3d12.yml:83` can go — *if* the maintainer wants this route. Note the divergence: the workflow comment and the document both describe "split `host.rs` and `lower.rs` under the limit" as the way out, while this pull request changes the rule so they need not be split. Both are defensible — the size limit exists to catch data smuggled into a file, and a 700 KB Rust source file is ordinary code — but it is a rule change, so which one it is should be the maintainer's decision, and the document and the workflow comment should follow whichever way it goes. ### 7. What I did not check - **Windows.** The `d3d12` CI runs on `windows-latest`; I ran on Linux (Fedora 45, x86_64). `xtask` is platform-independent Rust (`std` + `anyhow` + `walkdir`), and I used the pinned toolchain (`rustc 1.98.1`, `d3d12/rust-toolchain.toml`), so I do not expect a difference, but I did not run it on Windows. - **The rest of the D3D12 workspace.** `leonida-gpu`, `leonida-hle` and `leonida-loader` do not compile on Linux, for reasons that predate this pull request (their `#[cfg(test)]` modules call Windows-gated modules such as `crate::host` and `crate::texture`). I therefore could not run the workspace's other ~1441 tests. This pull request touches only `xtask`, which has no such problem. - **`--staged`.** `run()` has a second path that reads the file from the git index; the test exercises only the working-tree path. The pre-commit hook (`cargo xtask policy`) uses whichever path it is given, and I did not exercise the staged one. - **Whether `amplify_dxil.rs` can be regenerated byte-for-byte.** The tool needs DXC on Windows; I only confirmed that the tool and the `.hlsl` source exist and that the committed file's header names them. - **Whether 8 MiB is the right number for a source file.** That is a judgement call about the rule, not a property a test can settle. - `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `main` for unrelated reasons (the workflow runs it as a report too); I did not run clippy. AI-assisted: MiniMax M3.1 Flash.
MoonEyes commented 2026-12-02 12:26:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:26:58Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345356205 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7345356205). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:26:58Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:09:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:09:26Z.


RUN (in game, batch of six render-path pull requests), each head merged with git merge --no-ff onto main f45165e15, in one build: #2952 4df667e42, #2969 535c14094, #2877 f98e8ccf9, #2965 c62d57344, #2774 0dea1a13f, #2815 5ac7975c6. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 14.9, mean 14.2
Rendered fps, last 120 s median 14.6

For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7349826905 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7349826905). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:09:26Z. --- RUN (in game, batch of six render-path pull requests), each head merged with `git merge --no-ff` onto main `f45165e15`, in one build: #2952 `4df667e42`, #2969 `535c14094`, #2877 `f98e8ccf9`, #2965 `c62d57344`, #2774 `0dea1a13f`, #2815 `5ac7975c6`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 14.9, mean 14.2 | | Rendered fps, last 120 s | median 14.6 | For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:56:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:56:53Z.


RUN (independent run on Windows, #2815 head 5ac7975c6, merged locally into main f45165e15 with git merge --no-ff, as part of a batch of six)

The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files).

Red:

  • With main's policy.rs, cargo test -p xtask fails policy::tests::repository_passes_policy (5 passed, 1 failed): host.rs 734,723 bytes and lower.rs 769,866 bytes over the 655,360-byte limit, and crates/leonida-gpu/src/indirect/amplify_dxil.rs "6528 hex digits in one run of \x/0x literals".
  • With the PR's code but the limit applied to every extension, the new a_source_file_past_the_data_limit_is_still_source and repository_passes_policy both fail (5 passed, 2 failed).

Green (whole batch, one tree, Windows 11, debug profile as d3d12.yml runs it):

  • cargo test --workspace --exclude xtask --locked: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36).
  • cargo test -p leonida-gpu --features diagnostics --test replay --locked: 1 passed.
  • cargo test -p xtask --locked: 7 passed, including repository_passes_policy.
  • Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers, watch::tests::a_write_opens_the_view_it_goes_through, pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once); each passes alone, a later full run was 691/0, and main f45165e15 alone failed the alias_cast test in 2 of 3 runs.

Mutations:

  • Exemption for every extension (if true): killed by the new test (notes.txt of the same length must still fail).
  • .rs limit 8 MiB to 1 MiB: survives (the largest source is about 770 KB, so the value is not pinned).
  • Removing the amplify_dxil.rs exception: that is the first red case above, repository_passes_policy fails on it.

Review: the content checks still run on .rs (the new test checks a NUL byte is still rejected); only the size check changes. The diff has a second change that the PR body does not mention: an EXCEPTIONS entry for crates/leonida-gpu/src/indirect/amplify_dxil.rs. It exempts that path from every check (policy.rs:65 skips the file entirely). The file is a 3,264-byte DXC output of the project's own amplify.hlsl, written by tools/make_amplify_dxil.py (it starts with the DXBC container bytes, hence the exception). It is generated from an in-repo source, not game data, but a reviewer should accept it on purpose: later edits to that file are not looked at by the policy.

Not covered: that the exempted file really is the generator's output (a regeneration check would pin it); the 8 MiB value.

Verdict: PASS.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351195075 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7351195075). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:56:53Z. --- RUN (independent run on Windows, #2815 head 5ac7975c6, merged locally into `main` f45165e15 with `git merge --no-ff`, as part of a batch of six) The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files). **Red:** - With main's `policy.rs`, `cargo test -p xtask` fails `policy::tests::repository_passes_policy` (5 passed, 1 failed): `host.rs` 734,723 bytes and `lower.rs` 769,866 bytes over the 655,360-byte limit, and `crates/leonida-gpu/src/indirect/amplify_dxil.rs` "6528 hex digits in one run of \x/0x literals". - With the PR's code but the limit applied to every extension, the new `a_source_file_past_the_data_limit_is_still_source` and `repository_passes_policy` both fail (5 passed, 2 failed). **Green** (whole batch, one tree, Windows 11, debug profile as `d3d12.yml` runs it): - `cargo test --workspace --exclude xtask --locked`: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36). - `cargo test -p leonida-gpu --features diagnostics --test replay --locked`: 1 passed. - `cargo test -p xtask --locked`: 7 passed, including `repository_passes_policy`. - Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: `texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers`, `watch::tests::a_write_opens_the_view_it_goes_through`, `pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once`); each passes alone, a later full run was 691/0, and `main` f45165e15 alone failed the alias_cast test in 2 of 3 runs. **Mutations:** - Exemption for every extension (`if true`): killed by the new test (`notes.txt` of the same length must still fail). - `.rs` limit 8 MiB to 1 MiB: survives (the largest source is about 770 KB, so the value is not pinned). - Removing the `amplify_dxil.rs` exception: that is the first red case above, `repository_passes_policy` fails on it. **Review:** the content checks still run on `.rs` (the new test checks a NUL byte is still rejected); only the size check changes. The diff has a second change that the PR body does not mention: an `EXCEPTIONS` entry for `crates/leonida-gpu/src/indirect/amplify_dxil.rs`. It exempts that path from every check (`policy.rs:65` skips the file entirely). The file is a 3,264-byte DXC output of the project's own `amplify.hlsl`, written by `tools/make_amplify_dxil.py` (it starts with the `DXBC` container bytes, hence the exception). It is generated from an in-repo source, not game data, but a reviewer should accept it on purpose: later edits to that file are not looked at by the policy. **Not covered:** that the exempted file really is the generator's output (a regeneration check would pin it); the 8 MiB value. **Verdict: PASS.** AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:12:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:12:57Z.


Verified #2815 on Linux: cargo test -p xtask is red on current main with the three violations, and green merged with this change.

Head 5ac7975c6f
Merged onto main 45dc41f95c (clean merge tree 4032ce8ffe; merge base b7a1be2963, 780 commits behind), exported whole with its own git init so the policy walks the real file list
Machine Linux x86_64, rustc 1.98.1 (pinned toolchain), no GPU, no game files
In-game gate PASS by MoonEyes on this head (2 December 15:09, and an independent Windows run at 15:56)

Ran (from d3d12/)

main 45dc41f95c:   cargo test -p xtask --locked     5 passed; 1 failed
  POLICY: crates/leonida-gpu/src/host.rs: 739896 bytes exceeds the 655360-byte limit
  POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
  POLICY: crates/leonida-shader/src/emit/lower.rs: 769866 bytes exceeds the 655360-byte limit
merge:             cargo test -p xtask --locked     7 passed; 0 failed
merge:  python -I tools/d3d12_switches.py --check d3d12/docs/switches.md   exit 0

The three violations on today's main are the same three this branch addresses, so it still makes the policy test green after 780 commits of drift.

Review

  • .rs files get MAX_SOURCE_FILE_SIZE (8 MiB) instead of 640 KiB; the content checks (NUL bytes, hex and escaped-byte runs, smuggled text) still run on them, and the new test checks both that and that notes.txt keeps the old limit. Reasonable: the size limit is for data-shaped files, and the content checks are what catch data in source.
  • The amplify_dxil.rs exception is a 3,264-byte DXIL container that DXC builds from the repository's own amplify.hlsl with tools/make_amplify_dxil.py (both on main; the file's header says so). It is the project's own compiled shader, not game data, and the reason text says how to regenerate it. It is the second entry in EXCEPTIONS, so a maintainer should approve it explicitly, as the BCPack one was (docs/asset-policy.md).
  • Process: the description has no claim ID and names the model only as "Written with an AI assistant"; fiestorra's comments name DeepSeek v4.1 (flash). For a policy change that counts as a simple fix under CONTRIBUTING.md, but the claim ID should be added.

Verdict: ready (pending a maintainer's explicit OK for the new exception, and the claim ID in the description).

AI-assisted: Claude Opus 5.5 (Claude Code), verification only.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354140163 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7354140163). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:12:57Z. --- **Verified #2815 on Linux: `cargo test -p xtask` is red on current `main` with the three violations, and green merged with this change.** | | | |---|---| | Head | `5ac7975c6f` | | Merged onto | `main` `45dc41f95c` (clean merge tree `4032ce8ffe`; merge base `b7a1be2963`, 780 commits behind), exported whole with its own `git init` so the policy walks the real file list | | Machine | Linux x86_64, rustc 1.98.1 (pinned toolchain), no GPU, no game files | | In-game gate | PASS by MoonEyes on this head (2 December 15:09, and an independent Windows run at 15:56) | **Ran (from `d3d12/`)** ``` main 45dc41f95c: cargo test -p xtask --locked 5 passed; 1 failed POLICY: crates/leonida-gpu/src/host.rs: 739896 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 769866 bytes exceeds the 655360-byte limit merge: cargo test -p xtask --locked 7 passed; 0 failed merge: python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0 ``` The three violations on today's `main` are the same three this branch addresses, so it still makes the policy test green after 780 commits of drift. **Review** - `.rs` files get `MAX_SOURCE_FILE_SIZE` (8 MiB) instead of 640 KiB; the content checks (NUL bytes, hex and escaped-byte runs, smuggled text) still run on them, and the new test checks both that and that `notes.txt` keeps the old limit. Reasonable: the size limit is for data-shaped files, and the content checks are what catch data in source. - The `amplify_dxil.rs` exception is a 3,264-byte DXIL container that DXC builds from the repository's own `amplify.hlsl` with `tools/make_amplify_dxil.py` (both on `main`; the file's header says so). It is the project's own compiled shader, not game data, and the reason text says how to regenerate it. It is the second entry in `EXCEPTIONS`, so a maintainer should approve it explicitly, as the BCPack one was (`docs/asset-policy.md`). - Process: the description has no claim ID and names the model only as "Written with an AI assistant"; fiestorra's comments name DeepSeek v4.1 (flash). For a policy change that counts as a simple fix under CONTRIBUTING.md, but the claim ID should be added. **Verdict: ready** (pending a maintainer's explicit OK for the new exception, and the claim ID in the description). AI-assisted: Claude Opus 5.5 (Claude Code), verification only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
fiestorra commented 2026-12-02 18:24:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T18:24:18Z.


Done, and said plainly rather than papered over: the description now has a Process section stating that there is no claim for this pull request in #2570 and that I am not filing one retroactively, plus the GPUs tested: line. Thanks for reading it closely.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354524853 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7354524853). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T18:24:18Z. --- Done, and said plainly rather than papered over: the description now has a **Process** section stating that there is no claim for this pull request in #2570 and that I am not filing one retroactively, plus the `GPUs tested:` line. Thanks for reading it closely.
fiestorra commented 2026-12-03 08:22:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:22:40Z.


Confirmado en esta máquina: main está rojo en xtask por tres violaciones de política, y esta PR lo pone verde

MoonEyes lo reportó desde Linux; lo he medido aquí sobre d9b618f10 y sale lo mismo:

main (d9b618f10)   cargo test -p xtask
  running 6 tests
  5 passed; 1 failed
  test policy::tests::repository_passes_policy ... FAILED
  panicked at xtask\src\policy.rs:231:53:
    called `Result::unwrap()` on an `Err` value: 3 asset-policy violation(s). Nothing from the game…

con esta PR aplicada (cherry-pick del rango sobre main, exit 0)
  test result: ok. 7 passed; 0 failed

Y el 7 frente al 6 es la segunda mitad: esta PR no sólo arregla las tres violaciones, añade el test que las habría cazado — el que dice que un fichero fuente de Rust no es dato, sea cual sea su tamaño.

Por qué eso importa más que un arreglo normal: xtask es la política del repositorio comprobada por código, y repository_passes_policy es la que se ejecuta en CI. Mientras esté roja en main, cualquier PR que toque xtask hereda un rojo que no es suyo — la misma situación que #3286 con leonida-gpu, y por eso las dos son las que más desbloquean.

Lo que verifiqué: el rojo en main, y el verde con la PR aplicada encima (con el rango, no con el tip).
Lo que no: cuáles son las tres violaciones concretas — el mensaje las enumera con unwrap(), y aquí sólo se ve el contador. Si hacen falta para el informe, se sacan corriendo el binario sin el unwrap.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372186382 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7372186382). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T08:22:40Z. --- ## Confirmado en esta máquina: **`main` está rojo en `xtask` por tres violaciones de política, y esta PR lo pone verde** **MoonEyes lo reportó desde Linux; lo he medido aquí sobre `d9b618f10` y sale lo mismo**: ``` main (d9b618f10) cargo test -p xtask running 6 tests 5 passed; 1 failed test policy::tests::repository_passes_policy ... FAILED panicked at xtask\src\policy.rs:231:53: called `Result::unwrap()` on an `Err` value: 3 asset-policy violation(s). Nothing from the game… con esta PR aplicada (cherry-pick del rango sobre main, exit 0) test result: ok. 7 passed; 0 failed ``` **Y el `7` frente al `6` es la segunda mitad**: **esta PR no sólo arregla las tres violaciones, añade el test que las habría cazado** — **el que dice que un fichero fuente de Rust no es dato, sea cual sea su tamaño.** **Por qué eso importa más que un arreglo normal**: **`xtask` es la política del repositorio comprobada por código**, **y `repository_passes_policy` es la que se ejecuta en CI.** **Mientras esté roja en `main`, cualquier PR que toque `xtask` hereda un rojo que no es suyo** — **la misma situación que `#3286` con `leonida-gpu`, y por eso las dos son las que más desbloquean.** **Lo que verifiqué**: **el rojo en `main`, y el verde con la PR aplicada encima** (**con el rango, no con el tip**). **Lo que no**: **cuáles son las tres violaciones concretas** — **el mensaje las enumera con `unwrap()`, y aquí sólo se ve el contador.** **Si hacen falta para el informe, se sacan corriendo el binario sin el `unwrap`.**
fiestorra commented 2026-12-03 08:25:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:25:46Z.


Las tres violaciones, con nombre y tamaño — y una consecuencia que conviene decidir con ellas delante

Se obtienen corriendo el binario, sin el unwrap() del test:

cargo run -p xtask -- policy        (exit 1)

POLICY: crates/leonida-gpu/src/host.rs: 739896 bytes exceeds the 655360-byte limit
POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?)
POLICY: crates/leonida-shader/src/emit/lower.rs: 769866 bytes exceeds the 655360-byte limit
Error: 3 asset-policy violation(s). Nothing from the game may be committed; see docs/asset-policy.md

O sea que no son datos del juego: son tres ficheros de código, y dos de ellos se pasaron del límite de 640 KiB.

Y con esos tres números, esta PR se entiende perfectamente: «un fichero fuente de Rust no es dato, sea cual sea su tamaño» — el arreglo es no aplicar el límite de tamaño a .rs, porque el límite existe para los assets y dos ficheros de código lo cruzaron al crecer.

La consecuencia que conviene decidir a la vez, y no después: si un .rs deja de tener límite de tamaño, un .rs con datos del juego embebidos deja de ser detectable por el contador de bytes. El segundo de los tres sigue cubierto por la otra regla (6528 dígitos hex seguidos en un literal), que sí parece suficiente para datos — y por eso digo «la otra regla» y no «las dos»: conviene comprobar que un .rs con un volcado en base64 o en decimales también cae.

Lo que verifiqué: las tres violaciones exactas, y que con esta PR aplicada cargo test -p xtask da 7 passed; 0 failed.
Lo que no: si las otras reglas de la política siguen cazando un .rs con datos — eso necesita un fichero de prueba, y es lo que yo pediría antes de fusionar: un .rs falso con datos dentro en #[cfg(test)], y su regla que lo rechace.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372254729 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7372254729). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T08:25:46Z. --- ## Las tres violaciones, con nombre y tamaño — y una consecuencia que conviene decidir con ellas delante **Se obtienen corriendo el binario, sin el `unwrap()` del test**: ``` cargo run -p xtask -- policy (exit 1) POLICY: crates/leonida-gpu/src/host.rs: 739896 bytes exceeds the 655360-byte limit POLICY: crates/leonida-gpu/src/indirect/amplify_dxil.rs: 6528 hex digits in one run of \x/0x literals (embedded data?) POLICY: crates/leonida-shader/src/emit/lower.rs: 769866 bytes exceeds the 655360-byte limit Error: 3 asset-policy violation(s). Nothing from the game may be committed; see docs/asset-policy.md ``` **O sea que no son datos del juego: son tres ficheros de código, y dos de ellos se pasaron del límite de 640 KiB.** **Y con esos tres números, esta PR se entiende perfectamente**: **«un fichero fuente de Rust no es dato, sea cual sea su tamaño»** — **el arreglo es no aplicar el límite de tamaño a `.rs`, porque el límite existe para los assets y dos ficheros de código lo cruzaron al crecer.** **La consecuencia que conviene decidir a la vez, y no después**: **si un `.rs` deja de tener límite de tamaño, un `.rs` con datos del juego embebidos deja de ser detectable por el contador de bytes.** **El segundo de los tres sigue cubierto por la otra regla** (**6528 dígitos hex seguidos en un literal**), **que sí parece suficiente para datos** — **y por eso digo «la otra regla» y no «las dos»: conviene comprobar que un `.rs` con un volcado en base64 o en decimales también cae.** **Lo que verifiqué**: **las tres violaciones exactas, y que con esta PR aplicada `cargo test -p xtask` da 7 passed; 0 failed.** **Lo que no**: **si las otras reglas de la política siguen cazando un `.rs` con datos** — **eso necesita un fichero de prueba, y es lo que yo pediría antes de fusionar: un `.rs` falso con datos dentro en `#[cfg(test)]`, y su regla que lo rechace.**
fiestorra commented 2026-12-03 08:27:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:27:06Z.


Probado lo que pedí: la política de esta PR caza el hex y el base64 en un .rs, y deja pasar un volcado decimal de 273 KB

Con la PR aplicada sobre main, metí tres ficheros falsos en crates/leonida-gpu/src/ y corrí xtask policy:

fichero falso tamaño resultado
zz_fake_hex.rs ("\x01\x02…") 16 KB cazado: 8000 hex digits in one run of \x/0x literals (embedded data?)
zz_fake_b64.rs (base64 de 230 KB) 307 KB cazado: 307200-character hex/base64 run (embedded data?)
zz_fake_dec.rs (60 000 números decimales) 273 KB no cazado: asset policy: 375 files ok, exit 0

Los dos primeros confirman lo que esta PR promete: eximir .rs del límite de tamaño no deja el hueco abierto para datos en hex o base64, porque hay otras dos reglas que los cazan por su forma y no por su tamaño.

El tercero es el hueco, y es concreto: un .rs con 273 KB de números decimales separados por comas pasa la política entera. Y no es un caso hipotético — un volcado de un .dds o de una tabla del juego en decimal es exactamente lo que un «asset» parece cuando alguien lo pega en un fichero de código, y es el formato que un script de volcado produce sin querer.

Y lo que eso significa para la decisión, con los tres delante: la PR arregla el rojo de main y no abre el hueco del tamaño, y el hueco que queda es de otra regla, no del cambio de esta PR — el decimal ya pasaba antes (la regla del tamaño era la única que lo pararía, y sólo por el límite de 640 KiB, no por su contenido).

Lo que pediría, ahora con la prueba hecha: o una cuarta regla para las secuencias largas de números separados por comas, o una línea en docs/asset-policy.md que diga que ese caso no se cubre — las dos son honestas; lo que no lo sería es creer que el cambio lo cubre.

Y los tres ficheros de prueba no se quedan: el worktree de la prueba está borrado y main no se ha tocado.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372286943 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7372286943). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T08:27:06Z. --- ## Probado lo que pedí: **la política de esta PR caza el hex y el base64 en un `.rs`, y deja pasar un volcado decimal de 273 KB** **Con la PR aplicada sobre `main`, metí tres ficheros falsos en `crates/leonida-gpu/src/` y corrí `xtask policy`**: | fichero falso | tamaño | resultado | |---|---|---| | `zz_fake_hex.rs` (`"\x01\x02…"`) | 16 KB | **cazado**: `8000 hex digits in one run of \x/0x literals (embedded data?)` | | `zz_fake_b64.rs` (base64 de 230 KB) | 307 KB | **cazado**: `307200-character hex/base64 run (embedded data?)` | | `zz_fake_dec.rs` (60 000 números decimales) | 273 KB | **no cazado**: `asset policy: 375 files ok`, exit 0 | **Los dos primeros confirman lo que esta PR promete**: **eximir `.rs` del límite de tamaño no deja el hueco abierto para datos en hex o base64**, **porque hay otras dos reglas que los cazan por su forma y no por su tamaño.** **El tercero es el hueco, y es concreto**: **un `.rs` con 273 KB de números decimales separados por comas pasa la política entera.** **Y no es un caso hipotético** — **un volcado de un `.dds` o de una tabla del juego en decimal es exactamente lo que un «asset» parece cuando alguien lo pega en un fichero de código**, **y es el formato que un script de volcado produce sin querer.** **Y lo que eso significa para la decisión, con los tres delante**: **la PR arregla el rojo de `main` y no abre el hueco del tamaño**, **y el hueco que queda es de otra regla, no del cambio de esta PR** — **el decimal ya pasaba antes** (**la regla del tamaño era la única que lo pararía, y sólo por el límite de 640 KiB, no por su contenido**). **Lo que pediría, ahora con la prueba hecha**: **o una cuarta regla para las secuencias largas de números separados por comas**, **o una línea en `docs/asset-policy.md` que diga que ese caso no se cubre** — **las dos son honestas; lo que no lo sería es creer que el cambio lo cubre.** **Y los tres ficheros de prueba no se quedan**: **el worktree de la prueba está borrado y `main` no se ha tocado.**
fiestorra commented 2026-12-03 08:29:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:29:40Z.


La regla que faltaba, implementada y con control: rama policy-decimal-run = c0eaea0cb

El propio fichero lo decía en un comentario, y lo he hecho:

/// shortcut: decimal arrays (`[77, 90, ...]`) still pass, add a literal count if one shows up.

Lo que hace el commit (1 fichero, +41/−4): el contador que ya buscaba \xNN y 0x ahora también cuenta literales decimales — una secuencia de números separados por comas o espacios, que es la forma que toma un volcado cuando el script que lo imprime no usa hex.

Y los tres lados medidos, con el control que hace falta para creerlo:

con la regla       cargo test -p xtask  →  6 passed; 1 failed
                   (el 1 es repository_passes_policy, el rojo de main que arregla esta PR)
sin la regla       cargo test -p xtask decimal  →  FAILED
                   "18751 bytes of decimal array passed"
                   ← el mismo fichero de prueba, y el mensaje dice lo que falta
fichero falso      un .rs de 273 KB con 60 000 decimales → ahora cazado

Y el detalle que hace que el control valga: los dos lados usan el mismo test — el que escribí falla sin la regla y pasa con ella, así que no es una prueba que acompaña al cambio: es una prueba que lo mide.

Lo que no he tocado: nada del resto de la política, ni el límite de tamaño de esta PR. Mi commit es aditivo sobre main, así que se puede fusionar antes o después de #2815 — y si #2815 cambia el contador de tamaño, los dos cambios no se pisan porque están en funciones distintas.

Lo que sigue sin estar cubierto, y no lo pretendo: un volcado en hexadecimal sin prefijo 0x ya lo cazaba longest_encoded_run; uno en base64, también; lo que no caza ninguna regla es un volcado ofuscado (por ejemplo, números separados por otros números), y ahí no hay forma de distinguir dato de código sin mirar el contenido.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372347091 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7372347091). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T08:29:40Z. --- ## La regla que faltaba, implementada y con control: rama `policy-decimal-run` = `c0eaea0cb` **El propio fichero lo decía en un comentario**, y lo he hecho: ```rust /// shortcut: decimal arrays (`[77, 90, ...]`) still pass, add a literal count if one shows up. ``` **Lo que hace el commit** (**1 fichero, +41/−4**): **el contador que ya buscaba `\xNN` y `0x` ahora también cuenta literales decimales** — **una secuencia de números separados por comas o espacios, que es la forma que toma un volcado cuando el script que lo imprime no usa hex.** **Y los tres lados medidos, con el control que hace falta para creerlo**: ``` con la regla cargo test -p xtask → 6 passed; 1 failed (el 1 es repository_passes_policy, el rojo de main que arregla esta PR) sin la regla cargo test -p xtask decimal → FAILED "18751 bytes of decimal array passed" ← el mismo fichero de prueba, y el mensaje dice lo que falta fichero falso un .rs de 273 KB con 60 000 decimales → ahora cazado ``` **Y el detalle que hace que el control valga**: **los dos lados usan el mismo test** — **el que escribí falla sin la regla y pasa con ella**, **así que no es una prueba que acompaña al cambio: es una prueba que lo mide.** **Lo que no he tocado**: **nada del resto de la política, ni el límite de tamaño de esta PR.** **Mi commit es aditivo sobre `main`, así que se puede fusionar antes o después de `#2815`** — **y si `#2815` cambia el contador de tamaño, los dos cambios no se pisan porque están en funciones distintas.** **Lo que sigue sin estar cubierto, y no lo pretendo**: **un volcado en hexadecimal sin prefijo `0x`** **ya lo cazaba `longest_encoded_run`**; **uno en base64, también**; **lo que no caza ninguna regla es un volcado ofuscado** (**por ejemplo, números separados por otros números**), **y ahí no hay forma de distinguir dato de código sin mirar el contenido.**
fiestorra commented 2026-12-03 08:33:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:33:48Z.


Regla decimal, versión corregida: policy-decimal-run = 815085270, y con #2815 debajo deja xtask en 8 passed; 0 failed

Mi primer intento tenía dos falsos positivos y lo digo antes del resultado final, porque el camino es la mitad del dato:

intento 1 (c0eaea0cb)  sumaba dígitos hex y decimales en el mismo contador
                       → marcaba scripts/rt_off_hashes.txt (1643) y xma/tables.rs (706)
intento 2 (815085270)  contadores separados, y el decimal sólo en ficheros .rs
                       → repo entero: las 3 violaciones de siempre, ninguna nueva

Y el umbral, que es la parte que hace que esto no sea un número inventado: medí el máximo real del árbol y son 1071 dígitos en crates/leonida-formats/src/xma/tables.rs (una tabla del decodificador XMA, legítima). Con el umbral de 512 que usa la regla hex, mi regla la marcaba. Así que el decimal tiene su propio umbral, MAX_DECIMAL_RUN = 4096: por encima de la tabla más grande del repositorio y muy por debajo de un volcado (4 KiB de bytes en decimal son ~15 000 dígitos).

Lo medido en los tres lados:

main + mi regla              6 passed; 1 failed   (el 1 es repository_passes_policy, el rojo que arregla #2815)
#2815 + mi regla             8 passed; 0 failed
fichero falso de 273 KB      cazado

Y una trampa del propio test, que estaba mal y no el código: mi aserción «una tabla hex de 400 palabras queda legal» falla porque la regla hex existente la cuenta — 400 × 8 dígitos = 3 200, por encima de 512. El test estaba mal, no la regla; lo bajé a 16 palabras, que es lo que el árbol tiene.

Lo que esta rama no intenta: un volcado ofuscado (números separados por otros números) sigue pasando, y el umbral alto deja pasar un volcado pequeño (menos de ~1 KiB de datos en decimal). Las dos cosas son elecciones, no olvidos, y la primera no tiene arreglo por conteo.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372437751 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2815#issuecomment-7372437751). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T08:33:48Z. --- ## Regla decimal, versión corregida: `policy-decimal-run` = `815085270`, **y con `#2815` debajo deja `xtask` en `8 passed; 0 failed`** **Mi primer intento tenía dos falsos positivos y lo digo antes del resultado final**, porque el camino es la mitad del dato: ``` intento 1 (c0eaea0cb) sumaba dígitos hex y decimales en el mismo contador → marcaba scripts/rt_off_hashes.txt (1643) y xma/tables.rs (706) intento 2 (815085270) contadores separados, y el decimal sólo en ficheros .rs → repo entero: las 3 violaciones de siempre, ninguna nueva ``` **Y el umbral, que es la parte que hace que esto no sea un número inventado**: **medí el máximo real del árbol y son 1071 dígitos en `crates/leonida-formats/src/xma/tables.rs`** (**una tabla del decodificador XMA, legítima**). **Con el umbral de 512 que usa la regla hex, mi regla la marcaba.** **Así que el decimal tiene su propio umbral, `MAX_DECIMAL_RUN = 4096`**: **por encima de la tabla más grande del repositorio y muy por debajo de un volcado** (**4 KiB de bytes en decimal son ~15 000 dígitos**). **Lo medido en los tres lados**: ``` main + mi regla 6 passed; 1 failed (el 1 es repository_passes_policy, el rojo que arregla #2815) #2815 + mi regla 8 passed; 0 failed fichero falso de 273 KB cazado ``` **Y una trampa del propio test, que estaba mal y no el código**: **mi aserción «una tabla hex de 400 palabras queda legal» falla porque la regla hex existente la cuenta** — **400 × 8 dígitos = 3 200, por encima de 512.** **El test estaba mal, no la regla**; **lo bajé a 16 palabras, que es lo que el árbol tiene.** **Lo que esta rama no intenta**: **un volcado ofuscado** (**números separados por otros números**) **sigue pasando**, **y el umbral alto deja pasar un volcado pequeño** (**menos de ~1 KiB de datos en decimal**). **Las dos cosas son elecciones, no olvidos**, **y la primera no tiene arreglo por conteo.**
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2815:upstream-pr/2815'
git switch 'upstream-pr/2815'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2815'
git switch 'upstream-pr/2815'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2815'
git switch 'upstream-pr/2815'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2815'
git switch 'main'
git merge --squash 'upstream-pr/2815'
git switch 'main'
git merge --ff-only 'upstream-pr/2815'
git switch 'main'
git merge 'upstream-pr/2815'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!2815
No description provided.