Appearance
Testing
Smithers ships an unusually large test surface — 70+ spec files in src/actors/__tests__/ plus Playwright workbench tests in e2e/. The spec count reflects how many behaviours the constraint protocol has to enforce; each spec is small and targeted.
Test commands
From package.json:
jsonc
"scripts": {
"test": "node ../../scripts/run-node-tests.cjs -- src/actors/__tests__/*.spec.ts",
"test:ci": "node ../../scripts/run-node-tests.cjs -- src/actors/__tests__/*.spec.ts",
"test:e2e": "npx playwright test",
"test:unit": "node ../../scripts/run-node-tests.cjs -- src/actors/__tests__/*.spec.ts",
"type-check":"tsc --noEmit"
}pnpm --filter @open-matrix/smithers test runs the spec suite (Node --test via the workspace shared runner). test:e2e runs Playwright against a built workbench.
Unit / actor specs
src/actors/__tests__/ is organised by actor + concern. A representative slice:
SmithersSupervisor
SmithersSupervisor.spec.ts— base behaviour, op dispatch, state transitions.SmithersSupervisor.health.spec.ts—smithers.healthshape and uptime accounting.SmithersSupervisor.timeline.spec.ts—smithers.timelineprojection.SmithersSupervisor.error-log.spec.ts— error-log accumulation and limit.SmithersSupervisor.convergence-log.spec.ts— convergence log schema invariants.SmithersSupervisor.workspace-navigate.spec.ts—workspace.navigateop contract.SmithersSupervisor.rejection-feedback.spec.ts—_buildRejectionFeedbackformatting.smithers-supervisor-config.spec.ts—_persistConfiground-trip.smithers-supervisor-stop.spec.ts— full supervisor shutdown (timers cleared, child disposal).smithers-supervisor-state-change.spec.ts—$stateChangedemit invariants.smithers-supervisor-dynamic-loading.spec.ts— lazy actor instantiation.smithers-supervisor-signoff.spec.ts— sign-off forcing function.
ConstraintGraph
ConstraintGraph.summary.spec.ts,ConstraintGraph.kv-publish.spec.ts,ConstraintGraph.issueBody.spec.ts,ConstraintGraph.dependency-chain.spec.ts,ConstraintGraph.critical-path.spec.ts,ConstraintGraph.blocker-report.spec.ts, plus a separateconstraint-graph-*.spec.tsseries for each projection (neighborhood,topology,topology-rail,status,dependers,chat-constraints,ratchet,critical-path,blocker-report,dependency-chain).constraint-graph.issue-inspector.spec.ts—graph.issue-inspectorprojection (Inspector tab data).
Constraint domain
constraint-actor.spec.ts,constraint-group-actor.spec.ts,constraint-version-store.spec.ts,constraint-templates.spec.ts,constraint-collector.spec.ts,constraint-conflicts.spec.ts,constraint-formatter.spec.ts,constraint-prompt-builder.spec.ts,constraint-prompt-external-template.spec.ts,mechanical-checks-scoped.spec.ts,issue-body-constraints.spec.ts,issue-actor-lifecycle.spec.ts.
Convergence loop and review
convergence-lifecycle.spec.ts,convergence-log.spec.ts,full-convergence.spec.ts.review-barrier.spec.ts,reviewer-agent.spec.ts,rejection-restart.spec.ts,escalation-policy.spec.ts,provider-affinity-tracker.spec.ts,dual-agent-dispatch.spec.ts,dual-agent-fallback.spec.ts,evidence-extraction.spec.ts,evidence-extraction-new.spec.ts.ratchet-store.spec.ts.apply-patch.spec.ts— the patch-application validator.coding-agent-status.spec.ts— phase transitions in CodingAgent.
Workspace and UI
workspace-actor-select-issue.spec.ts,workspace-graph-mode.spec.ts,workspace-select-edge.spec.ts,workspace-set-queue.spec.ts,workspace-tree.spec.ts,WorkspaceActor.toggle-pin.spec.ts.smithers-color-tokens.spec.ts,smithers-visual-semantics.spec.ts,smithers-split-prefs.spec.ts,smithers-ui-preferences.spec.ts,status-bar.spec.ts.
Workstream / containers / sprints
smithers-workstream-requests.spec.ts— inbox semantics (queue, ack, message, dispatch, resolve).smithers-container-workers.spec.ts— heartbeat-based discovery and pruning.smithers-sdk-worker-dispatch.spec.ts— Path B dispatch flow.sprint-orchestrator.spec.ts— multi-issue coordination.smithers-active-agents.spec.ts,smithers-history.spec.ts,smithers-metrics.spec.ts,smithers-child-routing.spec.ts.
Architecture
architecture-doc-watcher.spec.ts— doc → constraint synchronisation.workbench-op-contracts.spec.ts— guards the static accept/emit shape exposed to the workbench.
Issue-driven regressions
issue-182-round-history.spec.ts,issue-184-governance.spec.ts.
End-to-end (Playwright)
projects/matrix-3/packages/smithers/e2e/:
| Spec | Coverage |
|---|---|
smithers-layout.spec.ts | Workbench renders, splits visible, every panel mounts |
smithers-user-workflow.spec.ts | Pick issue, dispatch, watch agent stream, sign-off, review barrier |
smithers-convergence-flow.spec.ts | Multi-round convergence with synthesised constraint projection |
smithers-phase2b.spec.ts | Phase-2 productization features (workstream requests, governance route) |
helpers.ts | Shared Playwright helpers |
playwright.config.ts configures the browser test runner. Run with pnpm --filter @open-matrix/smithers test:e2e. Like FlowPad, e2e tests require a built dist/.
Phase-style runner scripts
tests/:
e2e-phase2a.ts # Pre-Phase-2-b workflows still required
e2e-phase2b.ts # Phase 2-b orchestration
e2e-smithers.ts # Cross-cutting smoke
run-e2e.sh # Local convenience wrapperThese are not Playwright; they are tsx-driven scenario scripts that boot a Host, dispatch issues through mx-cli, and verify outcomes. Closer to integration tests than end-to-end UI tests.
Type checking
pnpm --filter @open-matrix/smithers type-check runs tsc --noEmit. Smithers must be --strict clean per project Rule 9.
Audit script
The repo's audit script — projects/matrix-3/scripts/audit-device-identity-schema.ts — must be run when any gated file changes. Smithers' container-related files count; CI will fail if device-identity audit invariants regress.
CI gating
The five-gate pre-merge gate (scripts/ci/premerge-local.sh) runs Smithers' test:ci, type-check, and the package-boundary guard. The dual-agent-dispatch and SDK-worker specs run as part of unit; the e2e tests run only on demand via the e2e workflow.
See also
Source:
projects/matrix-3/packages/smithers/src/actors/__tests__/,projects/matrix-3/packages/smithers/e2e/,projects/matrix-3/packages/smithers/package.jsonscripts.