This directory contains documentation for testing and verifying the substrate.
Primary reference for developers verifying changes, debugging failures, and validating deployments.
Contents:
- Substrate endpoint configuration
- Primary validation harnesses (failure-mode and stratified)
- Pre-push smoke test steps
- Verification by component (activity-api, development-vessel, auth, schema)
- Learning loop verification (Thompson α/β, dense search / MRR)
- Common scenarios: new template, debug failure, A/B variant learning
- Canary / production deployment verification
- Troubleshooting guide
- Quick reference card
Use when:
- Verifying a change before pushing
- Debugging a failed test or deployment
- Confirming the learning loop is working
- Deploying to canary or production
# Thompson learning + MRR (dense search)
bun run validation/scripts/stratified-harness.tsBoth harnesses read ~/.metabob/config.json for the substrate endpoint — no hardcoded URLs.
| Component | Test Location | Run Command |
|---|---|---|
| development-vessel | repos/development-vessel/test/ |
cd repos/development-vessel && bun test |
| Activity API | repos/activity-api/test/ |
cd repos/activity-api && bun test |
| Identity Vessel | repos/identity-vessel/src/**/*.test.ts (colocated) |
cd repos/identity-vessel && bun test |
- Determine test type (unit, integration, E2E)
- Create test file in
<vessel>/test/following the Bun test framework conventions - Write tests using the Arrange-Act-Assert pattern
- Add to CI/CD pipeline if integration-level
- Run locally to verify
Pattern:
import { describe, test, expect, beforeAll, afterAll } from 'bun:test'
describe('Feature', () => {
beforeAll(async () => { /* setup */ })
afterAll(async () => { /* cleanup */ })
test('should do X when Y', async () => {
const result = await featureUnderTest(input)
expect(result).toBe(expected)
})
})- CLAUDE.md (project root): Authentication model, substrate configuration, deployment workflow
- Architecture:
docs/architecture/IMPULSE_ACTIVITY_FOUNDATION.md - Substrate guide:
docs/SUBSTRATE.md