Verification Matrix: Claims vs. Automated Evidence

September 2, 2026 · View on GitHub

This document provides a comprehensive, rigorous traceability matrix between every architectural claim made by dsh-continuum and its automated verification test.


1. System Invariants & Verification Traceability Matrix

Architectural Invariant / ClaimImplementation SourceAutomated Test SuiteTest LocationResult
Strict Sequence Monotonicity
Events are assigned strictly incrementing integer sequences (seqn+1=seqn+1seq_{n+1} = seq_n + 1). Non-positive/non-integer sequences rejected.
src/core/events.ts
src/domain/engine.ts
Core Events and Monotonicitytests/unit/events.test.tsPASSED
Sub-Millisecond Event Determinism
Events occurring in the exact same millisecond are deterministically ordered by unique monotonically incrementing sequence numbers.
src/core/events.ts
src/domain/state.ts
Core Events and Monotonicitytests/unit/events.test.tsPASSED
Optimistic Concurrency Control (OCC)
Entity mutations require expectedVersion. Concurrent writes with stale version throw typed VersionConflictError.
src/domain/engine.tsOptimistic Concurrency Controltests/unit/concurrency.test.tsPASSED
Strict Idempotency with Mismatch Detection
Replaying identical mutation returns cached result (isCachedResult: true). Reusing key with different entity/action throws IdempotencyMismatchError.
src/domain/engine.ts
src/storage/filesystem.ts
Strict Idempotency with Mismatch Detectiontests/unit/idempotency.test.tsPASSED
Task State Machine Invariants
Tasks strictly follow permitted state transitions (queued \to ready \to claimed \to running \to submitted \to verification \to completed/rejected). Illegal jumps throw InvalidStateTransitionError.
src/domain/tasks.tsTask State Machine Invariantstests/unit/state-machine.test.tsPASSED
Renewable Execution Leases
Claiming a task issues a renewable time-bound lease. Expired leases without renewal are automatically swept and returned to ready state with attempt counter incremented.
src/domain/engine.tsTask Execution Leasestests/unit/leases.test.tsPASSED
Separation of Duty (4-Eyes Principle)
When verificationPolicy is independent or dual, the implementer/claimer principal is forbidden from self-verifying. Violations throw SeparationOfDutyError.
src/domain/tasks.ts
src/domain/engine.ts
Separation of Duty Verification Enforcementtests/unit/separation-of-duty.test.tsPASSED
Deterministic Context Budgeting
Context Pack adheres to strict token limit (NN tokens) using deterministic 10-tier priority ranking. Active task, North Star, and unresolved conflicts receive top priority.
src/context/budget.ts
src/context/ranking.ts
src/context/builder.ts
Context Budgeting & Deterministic Rankingtests/unit/context-budget.test.tsPASSED
Untrusted Content Isolation
Third-party outputs, findings, and evidence are encapsulated in strict boundaries (<continuum:untrusted-finding>). Breakout tags are neutralized.
src/context/security.tsUntrusted Content Isolation & Data Delimitingtests/unit/security.test.tsPASSED
Property-Based Invariants (fast-check)
100 randomized executions verify: (1) Sequence numbers are monotonically increasing; (2) Event replay is completely deterministic; (3) Snapshot + tail fold is strictly equivalent to full fold.
src/domain/state.ts
src/core/events.ts
Property-Based Invariant Verification (fast-check)tests/unit/property.test.tsPASSED
Crash Recovery & Partial Line Truncation
Storage detects incomplete JSON fragment caused by power loss or SIGKILL at the tail of events.jsonl, truncates the partial fragment cleanly, and permits subsequent appends.
src/storage/filesystem.tsStorage Integration & Crash Recoverytests/integration/storage.test.tsPASSED
Cooperative File Locking with PID Liveness
Acquires cooperative write lock. If existing lock is held by a dead process, tests process.kill(pid, 0), detects process death (ESRCH), breaks stale lock safely, and acquires cleanly.
src/storage/locking.tsCooperative File Locking & Liveness Detectiontests/integration/locking.test.tsPASSED
Agent-Scoped Capability Enforcement & Zero Leakage
Tool restrictions applied to Agent A via ctx.tools.restrict do NOT leak to concurrent Agent B. Accurately distinguishes policy expressed vs. technically enforced when shell tools (bash) exist.
src/capabilities/pack.ts
src/capabilities/enforcer.ts
Agent-Scoped Capability Enforcement & Isolationtests/integration/capabilities.test.tsPASSED
Cryptographic Backup & Verified Restore
Exports complete project snapshot and event log into .continuum-backup bundle with SHA-256 digest. Rejects tampered files with checksum mismatch error. Faithful state restoration.
src/storage/migration.tsComplete Backup & Verified Restoretests/integration/backup.test.tsPASSED
Large Artifact Spilling (10KB Threshold)
Evidence content exceeding 10,000 bytes is automatically spilled to disk artifacts (artifacts/ART-EVD-*.bin), replacing the event payload with a 1,000-character snippet and SHA-256 hash.
src/domain/engine.ts
src/storage/filesystem.ts
End-to-End Multi-Agent Project Lifecycle & Continuitytests/e2e/continuity.test.tsPASSED
Complete End-to-End Multi-Agent Lifecycle
Simulates full collaboration across 4 agent roles (Orchestrator, Researcher, Implementer, Reviewer), red-team rejection, implementer remediation, approval, crash recovery, and context regeneration.
Entire subsystem stackEnd-to-End Multi-Agent Project Lifecycle & Continuitytests/e2e/continuity.test.tsPASSED
DSH Web UI Plugin Settings Integration
Mounts namespace dsh-continuum with Schemastery schema into DSH settings service. Dynamically syncs edits from Web UI and ~/.dsh/settings.yaml without requiring a process restart.
src/dsh/settings.ts
src/dsh/service.ts
DSH Web UI Plugin Settings Integrationtests/unit/settings.test.tsPASSED
Marketplace Distribution Package
npm pack produces clean tarball containing compiled JS, types, license, and notice, without test or development bloat. Installs and imports cleanly in isolated consumer projects.
Build & packaging pipelinePackage Smoke Testnpm pack + clean isolated runnerPASSED

2. Test Execution Summary

> tsx --test 'tests/**/*.test.ts'

ℹ tests 35
ℹ suites 15
ℹ pass 35
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 809.771417

All 35 test cases pass deterministically on Node.js 24 (Darwin ARM64 / macOS) and are configured to execute in GitHub Actions across Ubuntu and macOS on Node 20, 22, and 24.