docs: update CLAUDE.md to instruct AI to run install.sh and TestFromTestdata locally#639
Conversation
…estdata locally Add a new "After Modifying LLGo-Compiled Components" section that explicitly instructs AI assistants to run `bash ./install.sh` and then verify changes with `go test -v ./cl/internal/convert -run TestFromTestdata` instead of deferring to CI. Closes #638 Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #639 +/- ##
=======================================
Coverage 84.74% 84.74%
=======================================
Files 27 27
Lines 2314 2314
=======================================
Hits 1961 1961
Misses 310 310
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
@xgopilot only need tell the components need install , and the test like TestFromTestdata depend these component,so change the components ( or it's depend) we need reinstall these!
There was a problem hiding this comment.
Updated the "After Modifying LLGo-Compiled Components" section in CLAUDE.md to:
- Explicitly list the LLGo-compiled components that need
install.sh(llcppsigfetch,llcppsymg) - Note their shared internal packages under
_xtool/internal/ - Explain that
TestFromTestdatainvokesllcppsigfetchas a subprocess, so it depends on the installed binary being up to date - Clarify that modifying any code under
_xtool/(including its internal dependencies) requires reinstallation
Pushed in commit 0be7d62.
…n TestFromTestdata Expanded the "After Modifying LLGo-Compiled Components" section to explicitly list the LLGo-compiled tools (llcppsigfetch, llcppsymg), explain their shared internal packages, and describe how TestFromTestdata depends on these installed binaries — so modifying any _xtool/ code requires reinstallation. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
| **When you modify any code under `_xtool/` (including its internal dependencies), you MUST:** | ||
|
|
||
| 1. **Run `bash ./install.sh`** to rebuild and reinstall the LLGo-compiled tools | ||
| 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 (`gogensig.expect`), verify it is correct, 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` |
There was a problem hiding this comment.
Removed line 92 (Do NOT skip these tests or mark them as "requires CI"...) per request. Pushed in commit ff9865d.
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
Added guidance to run unit tests (e.g., _xtool/internal/parser, _xtool/internal/header) before running dependent tests like TestFromTestdata, to verify modified packages work correctly first. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
Requested by @luoliwoshang
Closes #638
Summary
CLAUDE.mdbash ./install.shto rebuild LLGo-compiled tools before testinggo test -v ./cl/internal/convert -run TestFromTestdatato verify changes locallyinstall.shgen:trueto regenerate expected output when test output changes are expectedTest plan