Problem
When AI assistants (like Claude Code / xgopilot) modify llcppg components (e.g., _xtool/internal/parser), they currently mark TestFromTestdata tests as "requires llcppsigfetch tool via CI" in PR descriptions:
- [ ] TestFromTestdata tests pass (requires llcppsigfetch tool via CI)
This is incorrect — the AI assistant can and should install these tools locally by running bash ./install.sh, then run the tests to verify changes.
Requested Change
Update CLAUDE.md to explicitly instruct AI assistants that:
- After modifying llcppg components (especially
_xtool/ code or anything affecting TestFromTestdata), they should run bash ./install.sh to install/rebuild llcppsigfetch, llcppsymg, and other LLGo-compiled tools locally.
- Then run
TestFromTestdata tests via go test -v ./cl/internal/convert -run TestFromTestdata to verify changes, rather than deferring to CI.
- Update the expected test data if the output format changes — use
gen:true to regenerate gogensig.expect files, verify correctness, then switch back to gen:false.
Suggested CLAUDE.md Addition
Add a section like:
### After Modifying LLGo-Compiled Components
When you modify code under `_xtool/` (e.g., `_xtool/internal/parser`), you MUST:
1. Run `bash ./install.sh` to rebuild and install the LLGo-compiled tools (`llcppsigfetch`, `llcppsymg`, etc.)
2. Run `go test -v ./cl/internal/convert -run TestFromTestdata` to verify the changes
3. If test output changes are expected, temporarily set `gen:true` in the test to regenerate expected output, verify it, then set back to `gen:false`
4. Do NOT skip these tests or mark them as "requires CI" — they can and should be run locally after `install.sh`
Context
Raised by @luoliwoshang in PR #637.
Problem
When AI assistants (like Claude Code / xgopilot) modify llcppg components (e.g.,
_xtool/internal/parser), they currently markTestFromTestdatatests as "requires llcppsigfetch tool via CI" in PR descriptions:This is incorrect — the AI assistant can and should install these tools locally by running
bash ./install.sh, then run the tests to verify changes.Requested Change
Update
CLAUDE.mdto explicitly instruct AI assistants that:_xtool/code or anything affectingTestFromTestdata), they should runbash ./install.shto install/rebuildllcppsigfetch,llcppsymg, and other LLGo-compiled tools locally.TestFromTestdatatests viago test -v ./cl/internal/convert -run TestFromTestdatato verify changes, rather than deferring to CI.gen:trueto regenerategogensig.expectfiles, verify correctness, then switch back togen:false.Suggested CLAUDE.md Addition
Add a section like:
Context
Raised by @luoliwoshang in PR #637.