Repository navigation
AGENTS.md: the translator suite's real runtime, the ctest step, and the rules an agent breaks - #6732
Conversation
… agent breaks - "run in seconds" was wrong for the translator suite: 433 files and 5 821 tests take 224 s on 16 cores, so run one file while iterating and the suite once before the pull request. Add the one-file form with unittest discover -p. - The runtime lines now match CONTRIBUTING.md: no -G Ninja, --config RelWithDebInfo, and the ctest run. Add the LEONIDA_GAME_DIR SKIP behaviour, the portable subset on Linux and macOS, and loader_test's %TEMP% folder that antivirus can block. - Say which test files need pytest rather than python -I. - Point at scripts/check_no_game_data.py from the no-game-data rule, name run_semantic_tests.py in the folder map, give a fallback for the claim lookup when gh has no auth, and restate the newline="\n" writer rule. Leaves the viewer/ line to ItsNotRexed#6482.
shayderrr
left a comment
There was a problem hiding this comment.
Summary
AGENTS.md refresh: lists run_semantic_tests.py and check_no_game_data.py under scripts/, documents the byte-sniffing no-game-data check and the no-gh-auth fallback, corrects build commands (cmake -S runtime -B runtime/build; cmake --build ... --config RelWithDebInfo; ctest ...), records the translator suite's real runtime (~224 s, 433 files, 5,821 tests) with a one-file example, and adds the newline-\n text-write rule.
Why merge
Agents following the old guidance would use stale cmake flags and badly underestimate suite time; the update makes contributor instructions match the repository.
Verdict: Approve
Summary
Why mergeAgents following the old guidance would use stale cmake flags and badly underestimate suite time; the update makes contributor instructions match the repository. Verdict: Approve |
Claimed in the coordination issue as: no item ID — claimed as "AGENTS.md - real timings for the translator suite, the
runtime build/test commands aligned with CONTRIBUTING.md, which test files need pytest rather than
python -I, thenewline="\n"writer rule" in#6414 (comment)
Depends on: none. #6482 edits the
viewer/line of the same file, which this deliberately leaves alone; #4901 adds a## Delegation and contextsection at the end, so whichever lands second has a small context conflict in## Conventions.What and why
AGENTS.mdtells an agent what to run before it changes anything, so a wrong line there costs everyone's time:python -I scripts/run_semantic_tests.py tests/semantic,which is 433 files and 5 821 tests: 224 s with 16 jobs here. An agent that expects seconds treats a slow run as a
hang, and one that expects the whole suite to be cheap runs it after every edit. The section now says what takes how
long, and adds the one-file form
python -m unittest discover -s tests/semantic -p test_<name>.pyso iterating does not need the whole suite.AGENTS.mdhadcmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo; cmake --build runtime/build,CONTRIBUTING.md has no generator plus
--config RelWithDebInfoand actestrun, which is what actually executesthe tests. The
ctestline was missing fromAGENTS.mdaltogether. Added with the two facts an agent needs next toit: the retail-package tests print
SKIPwhenLEONIDA_GAME_DIRis unset (so a green run may have tested nothing),Linux and macOS configure only the portable subset, and
loader_testwrites small PEs to%TEMP%\leonida_loader_testwhich antivirus can block.import pytest, orno
__main__block — they fail to import underpython -I), so it is one clause now instead of a guess.scripts/check_no_game_data.pymatches the magics of the package's formats, soit catches a renamed file the extension check in
.github/workflows/no-game-data.ymlmisses. One line points at it.scripts/run_semantic_tests.pywas not in the folder map; the claim lookup now has a fallback for whenghhas noauth (an unauthenticated
gh issue listprints a login hint and no issues, which reads as "nothing claimed"), andthe
newline="\n"writer rule thattests/test_text_write_line_endings.pyenforces is restated in Conventions,since editing any tool's output writer is a common way to break it.
Docs-only: no code, no test, no runtime change.
Tested
Windows 11, Python 3.14, no GPU or driver needed, no game files, on
origin/mainat1cc6e3c12with this changeapplied:
The timing in the new sentence is measured, not copied:
python -I scripts/run_semantic_tests.py tests/semanticon1cc6e3c12->433 files, 5821 tests, 0 files failed in 224 s with 16 jobs.Checklist
docs/design.md, with how it was confirmed. — not applicable,no translator change.
AI-assisted: yes (Claude, driven by a coding-agent harness; every command above was run and its output checked).