Prerequisites
Before you begin, prepare:- a written success criterion and proof boundary for the integration under test;
- synthetic tenants, subjects, credentials, and lifecycle fixtures;
- redacted observability fields and a secure location for test evidence;
- an owner for rollback, cleanup, and unresolved qualification gaps;
- an acceptance assertion that proves every required package, auth, isolation, replay, outage, lifecycle, and cleanup lane is recorded.
1. Record the test subject
Before testing, capture:2. Prove the public packages
Use an empty temporary project rather than an existingnode_modules tree:
3. Run the API-key matrix
Create disposable personal-workspace keys with deliberately different scopes:
For every route, test:
- The correct key succeeds.
- A valid wrong-scope key fails closed.
- A revoked formerly-correct key fails closed.
- A malformed key fails with an authentication problem and no secret reflection.
- A resource ID from another tenant is not projected.
4. Test idempotency
For each mutation:5. Test tenant and subject isolation
Use two disposable tenants and two subjects per tenant:
Run this matrix for hosted memory candidates and any provider namespace mapper
used by
@praxa/sdk/memory.
6. Test memory degradation and provenance
- Query two healthy sources and record their source IDs.
- Disable one source and require aggregate
partial, notokand not an unexplained empty result. - Disable every source and require aggregate
failedreturned with source errors. - Return exact matching kind and text from two sources and require both matches to remain.
- Return contradictory text and require separate items.
- Verify every displayed memory can be traced to source, provider, record ID, origin, confidence, and capture time.
7. Test streams and webhooks
For SSE:- disconnect after a known event ID;
- reconnect with
Last-Event-ID; - require increasing IDs with no event after a terminal state;
- distinguish heartbeat comments from data events;
- treat EOF before terminal as incomplete unless the API documents otherwise.
- verify the HMAC before parsing JSON;
- reject an expired timestamp and modified body;
- deliver the same immutable
event_idtwice and require one logical effect; - process one run by
sequence, not HTTP arrival order; - return 2xx only after durable acceptance.
8. Test deletion and cleanup
For hosted candidates:- Delete using a stable idempotency key.
- Replay the deletion and require the same receipt.
- Query and export to confirm the candidate content is gone.
- Confirm the deletion receipt contains no content.
- Confirm the provider-owned source still exists unless you separately delete it there.
- revoke disposable keys and tokens;
- disable test webhook endpoints;
- remove disposable provider records;
- keep only non-secret receipts and identifiers needed for audit;
- record any verification that could not run.
Completion criteria
Call an integration production-qualified only when the package, application, authenticated API, negative authorization, isolation, degraded-state, cleanup, and user-workflow lanes required by that integration have all passed. A green subset must stay labeled as that subset.Troubleshooting
Best practices
- Define the expected observable result before running the test.
- Separate positive, denial, isolation, replay, degraded-state, and cleanup lanes.
- Use synthetic data and credential fingerprints rather than secrets.
- Record unresolved checks as pending instead of inferring success.
- Keep rollback and owner information beside the release evidence.
Optimize for production
- Run cheap contract and fake tests before authenticated canaries.
- Parallelize only independent test lanes and cap external side effects.
- Sample high-volume telemetry while retaining every denial, conflict, and terminal failure.
- Measure pass rate, p50/p95 latency, retry budget, isolation failures, cleanup completion, and time to diagnose.
Cleanup and next steps
- Revoke every disposable key and OAuth grant.
- Remove test endpoints, provider records, candidates, and local artifacts.
- Close or explicitly record unresolved runs and verification gaps.
- Publish only redacted results, exact versions, timestamps, and rollback instructions.