WIP: test(docs): anchors from the functions behind design.md's rules to their docs, and a check they resolve #25
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!25
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:feat/doc-anchors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The functions that keep design.md's hard-won rules (cross-queue waits, captures instead of live guest memory, passes split for clears and hazards) don't say so where they are defined, so an agent reading one sees a wait or a capture that looks redundant and may "simplify" it away. This puts a one-line pointer to the written rule above each, and a check that the pointers stay valid.
What changed
renderer:
// doc: docs/design.md#4-the-lessons-from-mkw-as-rules-hereanchors above the functions behinddocs/design.md§4's rules. Comments only; no code changes:submit_jobingpu/vk/vk_replay.cpp(cross-queue event waits);gpu/vk/vk_memory.cpp(theRX_VK_CAPTURE_POOL_MBcomment above them: nothing the replay reads comes from live guest memory);register_texture_queuedingpu/vk/vk_replay.cpp(registrations in order with the submits);NOP_REPORT_COUNTER's timestamp scaling inreplay(),gpu/vk/vk_replay.cpp(GPU timestamps drive dynamic resolution);clear_after_drawsanddraw_hazardsingpu/vk/vk_draw.cpp(a clear after draws, and a draw that samples what its pass wrote, get a pass of their own).build:
rss_mbinnx2/build.pypoints todocs/compiler-memory-accounting.md.tests: new
tests/test_doc_anchors.py(standard library):doc:anchor in our code (host/,gpu/,nx2/,scripts/,builder/; not eden, sirit or third_party) names a file underdocs/and, after#, one of its headings, by GitHub's anchor rule (slug(),anchors_of(): a repeated heading gets-1);REQUIRED).A renamed heading or a deleted anchor fails with the file and line.
Flags and settings
None
Measurements
Nothing to measure in the game: the change is comments and a check; no code changes.
What was run, on the GitHub version (NotRexed/Hookshot#2942), not on Longshot:
#4-lessons), and on the anchor aboverss_mbdeleted. It also checks the anchor rule itself (punctuation, code marks, underscores).run_all.pywith the Builder's tools, Windows: 201 pass. The 6 that fail (nx2/test_dll.py,test_driver_cache_folder,test_fpx_sticky,test_linux_driver_fault_guard,test_linux_update,test_readback_wait_bounded) fail the same way onmainon that PC.Testing
Tested: the runs under Measurements (on the GitHub version) and the game-free checks this description names.
Not tested: in the game (comments only, nothing runs differently); the checks ran on Windows only.
Needs other testers: None
Screenshots
Nothing on screen.
Risk and rollback
Nothing runs differently: the source changes are comments. The new check can fail a later PR that renames a heading in
docs/design.mdordocs/compiler-memory-accounting.md, or reshapes one of the seven functions so its marker moves; the message names the file and line. Reverting the commit is enough.Reviewer notes
Carried over from NotRexed/Hookshot#2942 with the move to Longshot: the same change on Longshot's
main, with its rename applied. Its review and discussion are there.The dev-loop proposal's F2 (NotRexed/Hookshot#2636). Other functions can take anchors in later PRs, as their docs are written; the check covers every new one.
The checks were run on the GitHub version; this branch is the same change with the rename applied (the same files and line counts). Forgejo runs no checks, and they were not run again here. Only the checks that read the changed files were run, not the whole
run_all.py.Issues
See NotRexed/Hookshot#2636 (F2).
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged).mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
test(docs): anchors from the functions behind design.md's rules to their docs, and a check they resolveto WIP: test(docs): anchors from the functions behind design.md's rules to their docs, and a check they resolveBack to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.
Description brought to Longshot's PR template (#48). Still WIP: its numbers are from the GitHub version, and it isn't rebased on current main; it gets measured on Longshot (main against this PR, at named commits) before it is marked ready.
Description moved to the template's Testing section and whole checklist (#72): what was tested, what wasn't, and what needs other testers (their test requests to open while this is WIP).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.