docs(skill): backend test authoring rules (call the test fn + sandbox limits)#5
Closed
fyZhang66 wants to merge 2 commits into
Closed
docs(skill): backend test authoring rules (call the test fn + sandbox limits)#5fyZhang66 wants to merge 2 commits into
fyZhang66 wants to merge 2 commits into
Conversation
…x limits Two authoring gaps surfaced while debugging CLI backend tests that silently passed: 1. The runner executes --code-file top-to-bottom (not pytest), so a defined-but- uncalled test_* function never runs its assertions. Tell agents to call their test function(s) at the end of the file. 2. The execution sandbox only has stdlib + requests + pytest + numpy + scipy. Tests that import the project's own source modules or other packages (torch, pandas, local app modules) fail to run. Tell agents to test the API over HTTP with requests and not import app internals / unavailable packages. Applies to testsprite-verify.skill.md (full note) + testsprite-verify.codex.md (bullets). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Test Coverage Report
|
Author
|
Closing — this backend-test authoring guidance belongs in the internal testsprite-cli dev lineage (src/assets/agent-skill/gundam.*), not the public repo's skills/. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Debugging real CLI backend tests surfaced two authoring gaps that produced misleading results:
--code-filetop-to-bottom (notpytest), so adef test_*(): assert …that's never called never runs its assertions → green regardless.requests+pytest+numpy+scipy. Tests thatimportthe project's own source modules or other packages (torch,pandas, local app modules) die withModuleNotFoundError.Change (skill assets only — markdown)
skills/testsprite-verify.skill.md: backend example now ends with a module-level call to the test fn, plus a new "Execution environment (backend)" note (supported package set + "test the API over HTTP withrequests, don't import app source / unavailable packages").skills/testsprite-verify.codex.md: two terse mirroring bullets.No code/behavior change.
Related
The execution image is gaining
numpy/scipyso the "supported set" above is accurate.🤖 Generated with Claude Code