Repository navigation
feat(ai): AI step on by default, read-only path-value sources, no AI tool -> without it - #17
Merged
Merged
Conversation
…tool -> without it - generate uses a console AI tool when one is found (API_AI / --ai-runner, else claude, else codex); none found, a failing tool or --no-ai -> generated without it, exactly as before. - New AI task: where an existing value of a path parameter can be read (brandId <- GET /brands #/0/id). Checked against the spec (a safe list operation callable as is, a pointer through a list element, a fitting identifier type, no low confidence). Tests built from it only read: list, then the record; skipped with the reason when there is no record or the list is refused; marked ai-proposed (pytest ai_proposed); listed in the report. - Answers cached in the suite (_support/ai-sources.json): regeneration, maintain (never calls the AI) and runs without AI reproduce the same tests. Reviewed form in the deps file: "sources". - Unconfirmed write dependencies stay proposals; --ai-max-calls default 25. Toolshop: 8 sources, 8 more passing tests, 8 skipped with the reason, MISSING_RESOURCE_SOURCE 22 -> 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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
The AI should take part in creating tests by default, and when no AI tool is available the agent should work without it.
What
On by default, never required.
generateuses a console AI tool you are logged in to:API_AI/--ai-runner, elseclaude, elsecodexon PATH. No API keys.--no-aiis passed, the run says so and is generated exactly as before. Verified on the demo: same 125 cases, same gaps.New AI task: read-only sources of path values. A safe operation such as
GET /brands/{brandId}was blocked withMISSING_RESOURCE_SOURCE, because there was no real id to call it with.The AI picks the list operation and field that hold existing ids, e.g.
brandId ← GET /brands #/0/id.Spec check before use. The source must be:
/total;Low confidence is rejected.
The test only reads: list → record by id. It is skipped with the reason when there is no record, or when the list is refused (e.g. it needs another role).
Marking:
ai-proposedannotation (pytest markerai_proposed), plus a report section "AI participation".Reproducible. Answers are cached in the suite (
_support/ai-sources.json, part of the generation manifest). A regeneration,maintain(which never calls the AI) and a run without AI all give the same tests.Reviewed form: the deps file
"sources": [{ "operationId", "param", "from", "pointer" }].Unchanged. Unconfirmed write dependencies stay proposals (
ai-deps.proposed.json): an AI answer never creates or deletes data. The--ai-max-callsdefault is now 25.Results
Toolshop, real stand, through Claude Code:
GET /usersanswers 403 to a non-admin.MISSING_RESOURCE_SOURCE22 → 15. Nothing left on the stand.Unit tests: 242 passed, 2 skipped. Seven are new, using a fake console tool:
Limitations
run(analysis of an existing project) keeps its opt-in--ai.