Testing and Smoke Checks
Begin with mock providers and deterministic prompts. Add live provider tests only after policy, secrets, and audit handling are confirmed.
Smoke Checklist
- AIF classes autoload correctly.
- Mock provider execution succeeds.
- Policy deny returns a governed error.
- Prompt rendering handles expected inputs.
- Governed mode fails when context, policy, or persistent audit storage is missing.
- Review-required operations stop before side effects and approvals cannot be replayed.
- Access-controlled retrieval applies workspace and ACL filters before ranking.
- Durable queue retries and expired-lease recovery remain idempotent.
- Provider credentials are not exposed to the browser.
- Audit records include correlation ID and policy outcome.
- REST envelopes preserve
ok,data, anderror.
Example Test Shape
$response = $gateway->infer(new InferenceRequest(
input: 'Return a short test response.',
provider: 'mock',
));
assert($response->provider === 'mock');Repository Checks
The AIF release pipeline runs:
composer validate
composer test
composer analyse
composer lintIt also validates PHP 8.3 and 8.4, MySQL 8 migrations and rollback, immutable audit triggers, isolated Laravel and Symfony examples, and ZIP/drop-in autoloading.
Production Readiness
Before production use, verify bounded provider responses, timeouts, retry and circuit-breaker behavior, data retention, redaction policy, audit access, human review rules, queue recovery, retrieval ACL enforcement, and metrics cardinality.