[pr-docs][shaders] AGENTS.md and module docs match main: anchors, figures, the shader cache key #408

Open
iBooM72 wants to merge 1 commit from iboom72/agents-anchors-match-main into main AGit
Contributor

What it changes

  • The problem on main: read from the code at f3840d73. Each item below was checked against the code.

The shader cache key. AGENTS.md, crates/darner-shader/build.rs and emit/cost.rs say switch values join the key through translation_fingerprint. That function has no caller. The key is shader_cache.rs build(): DARNER_TRANSLATOR, each name in KEYED, and host_settings(). #10 followed these docs and left its switch out of KEYED. The docs now name KEYED and the test every_switch_of_the_translator_is_in_the_key. AGENTS.md's Important Files gets a shader_cache.rs row.

AGENTS.md anchors and figures:

Was Now
run.rs:106 run.rs:337
host.rs:10219 host.rs:20069 (present_planes)
logging.rs:16-28 CAP at logging.rs:31-35
main.rs Command at :198 :354
bitcode.rs:1248-1257 written_bytes_unchanged, bitcode.rs:1677
darner-shader "51K lines" about 99K with its tests
"99-line" architecture.md "short" (104 lines today)
policy: 640 KiB, a single exception, policy.rs:17-19 1 MiB, ALLOWED_EXTENSIONS and EXCEPTIONS
"eleven blocks" of unsafe without a comment (also Cargo.toml) no count: blocks in several crates still lack one
darner-game "the only title-specific crate" title hooks with fixed offsets also live in darner-hle (also docs/architecture.md:45)
darner-gpu "117K lines" about 279K with its tests
1233 #[test] functions; "ten sibling *_tests.rs" about 3,500; 21
six integration test files ten: also darner-simd's float and memory, and apps/darner's cache_paths and picked_folders
482 DARNER_* names, 389 in darner-gpu, by the grep it gives about 1,260 and 1,080 by the same grep
170 shortcut: tags; 231 of 238 files open with //! about 180; about 410 of 437
620 poison recoveries in darner-gpu about 1,550
rust-version = 1.88 1.89, as in Cargo.toml
the lockfile hashed at build.rs:24-28, so "churning it" re-keys :275-276, and only the entries of the packages darner-shader is built from
Key Directories adds crates/darner-simd, locales/ and tools/
the CLI: nine subcommands the full list, from Command at main.rs:354
"CI gate 1/2/3", "not run by CI" "gate 1/2/3", "not run by the gates": there is no CI

Module docs:

  • darner-hle modules/mod.rs: the "planned areas" files, xaudio2 and xstore exist.
  • darner-pipeline lib.rs: it is the shader cache, not an offline converter.
  • lower.rs:84: the link is now RayQueries::tlas_srvs (the field moved).

The darner-shader edits are comments only. DARNER_TRANSLATOR drops comments (crates/darner-gpu/build.rs code()), and darner-shader's own build.rs is outside the hashed src, so the shader cache key is unchanged.

How it was tested

  • Tested revision: c7eaf931 (on main f3840d73)
  • Commands and results: cargo xtask policy: 555 files ok. git diff over crates/darner-shader/src has no line that is not a // comment. The counts come from git grep and git ls-files at f3840d73; a crate's lines are all its .rs files.
  • Changes a default: no
  • Gates run on that revision: none (docs and comments).
  • Gameplay: not relevant.
  • Coverage gaps: rustdoc was not built, so the one changed intra-doc link (RayQueries::tlas_srvs) was checked by reading only.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only). Docs and comments only.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #78, #205 and #271 also edit AGENTS.md, #130 and #205 edit Cargo.toml, #10 edits cost.rs, and 23 open PRs edit lower.rs. With git merge-tree against their current heads, none gets a conflict from this branch: those that conflict with main (#10, #33, #38-#41, #43-#49, #96) do so in the same number of places with or without it. #10 cited translation_fingerprint from these docs.
  • Replaces or overlaps: none found

Checked with AI assistance (Claude Code).

🤖 Generated with Claude Code

<!-- Thanks for the pull request. Start the title with its type (pr-fix, pr-feature, pr-performance, pr-diagnostics, pr-refactor, pr-docs or pr-tests) and the area tags, like [pr-fix][memory]. This host has no labels yet, so the tags stay in the title. --> ## What it changes - The problem on main: read from the code at `f3840d73`. Each item below was checked against the code. **The shader cache key.** AGENTS.md, `crates/darner-shader/build.rs` and `emit/cost.rs` say switch values join the key through `translation_fingerprint`. That function has no caller. The key is `shader_cache.rs` `build()`: `DARNER_TRANSLATOR`, each name in `KEYED`, and `host_settings()`. #10 followed these docs and left its switch out of `KEYED`. The docs now name `KEYED` and the test `every_switch_of_the_translator_is_in_the_key`. AGENTS.md's Important Files gets a `shader_cache.rs` row. **AGENTS.md anchors and figures:** | Was | Now | |---|---| | `run.rs:106` | `run.rs:337` | | `host.rs:10219` | `host.rs:20069` (`present_planes`) | | `logging.rs:16-28` | `CAP` at `logging.rs:31-35` | | `main.rs` `Command` at `:198` | `:354` | | `bitcode.rs:1248-1257` | `written_bytes_unchanged`, `bitcode.rs:1677` | | darner-shader "51K lines" | about 99K with its tests | | "99-line" `architecture.md` | "short" (104 lines today) | | policy: 640 KiB, a single exception, `policy.rs:17-19` | 1 MiB, `ALLOWED_EXTENSIONS` and `EXCEPTIONS` | | "eleven blocks" of unsafe without a comment (also `Cargo.toml`) | no count: blocks in several crates still lack one | | darner-game "the only title-specific crate" | title hooks with fixed offsets also live in darner-hle (also `docs/architecture.md:45`) | | darner-gpu "117K lines" | about 279K with its tests | | 1233 `#[test]` functions; "ten sibling `*_tests.rs`" | about 3,500; 21 | | six integration test files | ten: also darner-simd's `float` and `memory`, and `apps/darner`'s `cache_paths` and `picked_folders` | | 482 `DARNER_*` names, 389 in darner-gpu, by the grep it gives | about 1,260 and 1,080 by the same grep | | 170 `shortcut:` tags; 231 of 238 files open with `//!` | about 180; about 410 of 437 | | 620 poison recoveries in darner-gpu | about 1,550 | | `rust-version = 1.88` | 1.89, as in `Cargo.toml` | | the lockfile hashed at `build.rs:24-28`, so "churning it" re-keys | `:275-276`, and only the entries of the packages darner-shader is built from | | Key Directories | adds `crates/darner-simd`, `locales/` and `tools/` | | the CLI: nine subcommands | the full list, from `Command` at `main.rs:354` | | "CI gate 1/2/3", "not run by CI" | "gate 1/2/3", "not run by the gates": there is no CI | **Module docs:** - darner-hle `modules/mod.rs`: the "planned areas" `files`, `xaudio2` and `xstore` exist. - darner-pipeline `lib.rs`: it is the shader cache, not an offline converter. - `lower.rs:84`: the link is now `RayQueries::tlas_srvs` (the field moved). The darner-shader edits are comments only. `DARNER_TRANSLATOR` drops comments (`crates/darner-gpu/build.rs` `code()`), and darner-shader's own `build.rs` is outside the hashed `src`, so the shader cache key is unchanged. ## How it was tested - Tested revision: `c7eaf931` (on `main` `f3840d73`) - Commands and results: `cargo xtask policy`: 555 files ok. `git diff` over `crates/darner-shader/src` has no line that is not a `//` comment. The counts come from `git grep` and `git ls-files` at `f3840d73`; a crate's lines are all its `.rs` files. - Changes a default: no - Gates run on that revision: none (docs and comments). - Gameplay: not relevant. - Coverage gaps: rustdoc was not built, so the one changed intra-doc link (`RayQueries::tlas_srvs`) was checked by reading only. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). Docs and comments only. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #78, #205 and #271 also edit AGENTS.md, #130 and #205 edit `Cargo.toml`, #10 edits `cost.rs`, and 23 open PRs edit `lower.rs`. With `git merge-tree` against their current heads, none gets a conflict from this branch: those that conflict with `main` (#10, #33, #38-#41, #43-#49, #96) do so in the same number of places with or without it. #10 cited `translation_fingerprint` from these docs. - Replaces or overlaps: none found Checked with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- AGENTS.md anchors: run.rs:337, host.rs:20069, logging.rs CAP at 31-35,
  main.rs Command at :354, bitcode.rs written_bytes_unchanged at 1677,
  the lockfile hashing at darner-gpu build.rs:275-276 (only the packages
  darner-shader is built from).
- AGENTS.md figures: darner-shader about 99K and darner-gpu about 279K
  lines with their tests; about 3,500 tests, 21 sibling *_tests.rs and
  ten integration test files; about 1,260 DARNER_* names (1,080 in
  darner-gpu), 180 shortcut: tags, 1,550 poison recoveries, 410 of 437
  files with a //! doc; rust-version 1.89; the policy limit is 1 MiB and
  its exceptions are EXCEPTIONS in policy.rs; the eleven-block count of
  undocumented unsafe is gone (Cargo.toml too).
- Key Directories lists darner-simd, locales/ and tools/, and the CLI
  row lists every subcommand. The gates are not "CI gates": there is no CI.
- The shader cache key is shader_cache.rs build() (KEYED, host_settings,
  DARNER_TRANSLATOR), not translation_fingerprint, which has no caller:
  AGENTS.md, darner-shader build.rs and emit/cost.rs said otherwise.
- Title hooks with fixed offsets also live in darner-hle (AGENTS.md,
  docs/architecture.md).
- darner-hle's "planned areas" exist; darner-pipeline is the shader
  cache, not an offline converter; lower.rs links RayQueries::tlas_srvs.

Comments only in darner-shader, so the shader cache key is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/408/head:iboom72/agents-anchors-match-main'
git switch 'iboom72/agents-anchors-match-main'

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 'iboom72/agents-anchors-match-main'
git switch 'iboom72/agents-anchors-match-main'
git rebase 'main'
git switch 'main'
git merge --ff-only 'iboom72/agents-anchors-match-main'
git switch 'iboom72/agents-anchors-match-main'
git rebase 'main'
git switch 'main'
git merge --no-ff 'iboom72/agents-anchors-match-main'
git switch 'main'
git merge --squash 'iboom72/agents-anchors-match-main'
git switch 'main'
git merge --ff-only 'iboom72/agents-anchors-match-main'
git switch 'main'
git merge 'iboom72/agents-anchors-match-main'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!408
No description provided.