AI Test Lifecycle
AI-generated tests are proposals, not mutation verdicts. Every proposal must be checked by deterministic validation.
Lifecycle at a glance
validate automatically applies pending tests
For a pending proposal:
assertian ai-tests validate <proposal-id>
Assertian applies the proposed test as part of validation and then runs deterministic mutation validation.
For all pending proposals:
assertian ai-tests validate --all
You do not need to run ai-tests apply beforehand.
Retries
Use --retry N when a generated test does not kill its target:
assertian ai-tests validate --all --retry 1
The retry flow is:
pending proposal
↓
apply proposal
↓
deterministic validation
│
├── mutant killed ─────────────→ archive
│
├── mutant survives + retry ───→ AI revision
│ ↓
│ apply revision
│ ↓
│ validate again
│
└── behaviorally equivalent ───→ reject remediation
The retry count is bounded.
Proposal states
| State | Meaning |
|---|---|
| pending | A proposal is waiting for successful deterministic validation. |
| killed | The proposed test killed its target mutant during validation. |
| archived | A successfully validated proposal has been moved out of the active proposal set. |
| rejected | The proposal is not accepted as a valid remediation, including behaviorally equivalent cases. |
Why archive successful proposals?
A successfully validated proposal should not remain active work on every subsequent validate --all.
Validated artifacts are kept under:
.assertian/
└── ai-tests/
├── <active proposals>.json
└── archive/
└── <validated proposal>.json
This keeps the active set focused while preserving a local record of validated proposals.
Recommended workflow
# See pending work
assertian ai-tests list
# Apply + validate pending proposals automatically; retry once if needed
assertian ai-tests validate --all --retry 1
# See what remains active
assertian ai-tests list
Deterministic validation is authoritative
AI generation and revision are suggestions. A proposal succeeds only when deterministic validation demonstrates that it kills the intended mutation.
Behavioral equivalence
Equivalent mutations should not be distinguished with inspect.signature(), monkeypatching, spies, mocks, call capture, or other implementation metadata. The goal is a real observable behavioral distinction.
AI workload, budget, and failure controls
AI workload controls are separate from the overall mutation limit. Configure the common AI controls in .assertian.yml:
max_mutants: auto
ai:
max_input_tokens: 500000
max_output_tokens: 8000
max_requests: 3
timeout_seconds: 30
Mutation workload
max_mutantscontrols the overall mutation-testing workload.- AI operates on the mutation results that Assertian makes eligible for AI analysis.
- Provider-specific options belong under the selected
ai.<provider>block. See the Configuration guide for downloadable templates.
AI request budget
max_requests is a logical request budget shared by mutation explanations, test generation, and retry revisions within one Assertian command.
For example, one explanation plus one generated test consumes two logical AI requests. A revision consumes another request.
Provider transport retries are bounded and do not create additional logical budget units. A failed provider request still consumes one logical request budget unit.
Input and output controls
max_input_tokens is an explicit Assertian-side input budget ceiling. The default template uses 500000 as a high ceiling, but the effective request must still fit the selected model/provider capability.
max_output_tokens is an explicit integer and limits generated output for each AI request.
These are deliberately explicit limits rather than opaque auto values.
Timeout
timeout_seconds is an explicit positive integer and bounds each provider HTTP attempt.
Provider failures are reported as warnings; the deterministic mutation result remains authoritative.