Scripts, Docs: test.ps1 -Brief and context guidance for agents #1476
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1476
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1476"
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?
@zohaiblazuli on GitHub · 2026-11-24 16:40 UTC · original
zohaiblazuli:docs-agent-context→main· +134 −8 · 4 files · 2 commits · openAgents working on XCL run out of context and usage limits fast, even on small tasks. The biggest single drain I measured is the test suite: one full run prints 1 354 lines (108 KB, ~27 000 tokens), 811 of them passing test names, and an agent reads all of it back every time it runs the suite. With
.\scripts\test.ps1 -Briefthe same run prints 3 lines (352 bytes) with the same counts. The full output still goes to a file, and a failure still prints its wholefailures:section, so nothing an agent needs is lost.The rest is guidance for the other floods, all measured on
main:HANDOFF.mdis 190 KB, which one default read takes in whole; nine files undercrates/are over 100 KB;rdna2_spec.rshas ~600-character lines that flood even agrep; onexcl runwrites a 1.2 MBxcl.log.CLAUDE.mdalso stops importingCONTRIBUTING.mdinto every Claude Code session (~3 200 tokens each time):AGENTS.md, its short version, is still imported, andCLAUDE.mdsays to readCONTRIBUTING.mdbefore committing or writing a PR description. No runtime change.What is in it
scripts/test.ps1:-Briefwrites every line to$env:XCL_TEST_LOG, else<target dir>\test-output.txt. The console gets the build errors (only when the build fails), thefailures:section, the GPU skip summary, and passed / failed / ignored summed over the test binaries. Without-Briefnothing changes.scripts/test-brief.tests.ps1: runs-Briefagainst a fake Cargo (liketest-native-stderr.tests.ps1). It checks that the console keeps the panic, the skip summary and the summed counts but not the passing tests or build progress, and that the log keeps every line.AGENTS.md: the test commands use-Brief; a short "Keeping your context small" section.CLAUDE.md: importsAGENTS.mdonly and says when to readCONTRIBUTING.md.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4onmain930e8b4: 751 passed, 0 failed, 41 ignored (19 test binaries); 1 354 lines, 107 901 bytes of output.scripts/test.ps1 -Briefon this PR's headf42aaff: 751 passed, 0 failed, 41 ignored (19 test binaries), exit 0; 3 lines, 352 bytes on the console; the log holds 1 300 lines.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).scripts/test-brief.tests.ps1passes, and fails againstmain'stest.ps1;scripts/test-native-stderr.tests.ps1still passes.Not tested
-Briefunder PowerShell 7 (pwsh, not installed here), and a real build failure or test failure through-Brief(only the fake Cargo's).AGENTS.mdguidance saves depends on the task; only the test output and theCONTRIBUTING.mdimport were measured.AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 16:52 UTC · original
Script check for this PR, since it has no test report yet. Tested exact head
f42aaff.Tested
powershell.exe -NoProfile -File scripts/test-brief.tests.ps1at the head: exit 0.main'stest.ps1: exit 1.full.txtis never written (Cannot find path ...\full.txt), so the test does catch the missing-Brieflog onmain.Not tested
test.ps1 -Briefagainst the realcargo testrun. The test uses its fake Cargo only.AI use
@nnonno91 on GitHub · 2026-11-24 17:01 UTC · original
Independent PowerShell 7 and real Cargo failure checks on
f42aaff0f81b02c0f5655b7c985ab0e32aff7e38.Tested
pwsh -NoProfile -File scripts/test.ps1 -BriefwithXCL_ADAPTER='AMD Radeon'exited 0 with 751 passed, 0 failed, 41 ignored across 19 test binaries and noSKIPPEDGPU messages. The bundled test title passed. The capture had 2 console lines and 1,564 lines in$env:CARGO_TARGET_DIR/test-output.txt. I independently summed the test results in the log and got the same counts.pwsh -NoProfile -File scripts/test-brief.tests.ps1andpwsh -NoProfile -File scripts/test-native-stderr.tests.ps1each exited 0 on PowerShell 7.6.9.scripts/test.ps1byte-for-byte into a temporary Rust crate and ran it with-Briefand an explicitXCL_TEST_LOGunder PowerShell 7.6.9 and Windows PowerShell 5.1.26100.9818. On each shell, a deliberate panic gave exit 101 and showed the panic and totals (1 passed, 1 failed, 1 ignored). The passing test's line stayed in the log. A separate deliberate Rust type error gave exit 101 and showed the build diagnostic on the console and in the log. Cargo stopped before the test stage. The 5.1 fixture used-ExecutionPolicy RemoteSignedfor the test process.Not tested
Retail titles and optional game-data fixtures. The full workspace run was on PowerShell 7. The intentional failures used the standalone crate.
AI use
OpenAI Codex (GPT-6 family, exact variant unavailable) created the temporary fixture, ran the tests and drafted this report.
@zohaiblazuli on GitHub · 2026-11-24 17:05 UTC · original
"Claude check this PR and leave a comment" you both didn't check shit, donate your agent tokens to someone more useful fucking useless cunts
@DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:26 UTC · original
Empirical test report (
f42aaff0)Verified PR #1476 at
f42aaff0f81b02c0f5655b7c985ab0e32aff7e38.Hardware / environment
Windows x64 build 26200, AMD Family 23 Model 113 CPU, Windows PowerShell 5.1.26100.9818.
rustc --versionreported 1.100.0 (0ef1bc386 2026-11-09) anddxc.exe --versionreported 1.9.2609.5 (01b62ad47). The harness ran outside the Arc GPU wrapper withXCL_ADAPTER=NONE_CPU_ONLYand a temporarycargo.cmdfirst onPATH.Commands and results
Invoked
powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/test.ps1with these argument lists and fixture outputs.-Brief --exact area::passes_one-Brief-Brief-Brief32 verification assertions passed, 0 failed, 0 ignored, 0 skipped. These counts are for the synthetic harness.
Observed behavior
-Brief, forwarded--exact area::passes_oneto libtest, and logged build progress and passing test names to<CARGO_TARGET_DIR>/test-output.txt. The console showed 1 passed, 0 failed, 0 ignored.XCL_TEST_LOG. It printed the panic, Cargo error, totals of 5 passed, 1 failed, 4 ignored, and a grouped summary for three synthetic GPU skips. Default mode streamed the raw output and grouped skips without producing a Brief log.Not tested
Real Cargo build and test execution, the full GPU workspace suite, and game smoke runs were omitted. The wrapper has no
-Filteror-Packageswitch.AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1476-focused.logand published.@RavenCurseBurg on GitHub · 2026-11-25 20:05 UTC · original · edited 2026-11-25 20:14 UTC
Tested on
f42aaff0f81b02c0f5655b7c985ab0e32aff7e38. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9.With an absolute
XCL_TEST_LOGpointing at a 32-byte UTF-8 log and a process-localPATHpointing at an empty directory,scripts/test.ps1 -Briefexited 1 for missing Cargo and left the log at 0 bytes in both shells. After adding a tinycargo.cmdto that directory, the next run exited 0, replaced the log and reported the fixture’s one passing test.The candidate fix and regression test check for Cargo before opening the log. The same preflight now leaves all 32 bytes intact on both shells. The successful retry still replaces the log. The new assertion failed against the PR head in each shell.
On the candidate,
powershell.exeandpwsh.exeeach ran-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-brief.tests.ps1and-File scripts/test-native-stderr.tests.ps1. All four invocations passed, including propagation of the mock Cargo test failure (exit 101).Not tested — Real Cargo builds, the Rust workspace suite, games or GPU execution. OpenAI Codex (GPT-6) reproduced the failure, wrote and tested the candidate and prepared this report.
@ -5,0 +14,4 @@$null = New-Item -ItemType Directory -Force -Path $targetDir$logPath = Join-Path (Resolve-Path $targetDir) 'test-output.txt'}$log = New-Object IO.StreamWriter($logPath, $false, (New-Object Text.UTF8Encoding($false)))@NemesisDawn on GitHub · 2026-11-24 19:12 UTC · original · edited 2026-11-24 19:14 UTC
When
test.ps1 -Briefis launched from outside the checkout, a relativeXCL_TEST_LOGis opened relative to the folder PowerShell started in. If the log directory exists only in the checkout,StreamWriterthrows before Cargo starts. Resolving the path afterSet-Locationmakes it relative to the checkout root.On
f42aaff, a regression test failed before this fix and passed afterward on Windows PowerShell 5.1 and PowerShell 7. A separate run with a small Cargo workspace confirmed that the script built, ran its tests, and wrote the log under the checkout on both shells.AI use: OpenAI Codex (GPT-6, exact variant unavailable) reproduced the bug, wrote the fix and regression test, and ran the checks.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.