Implementation Matrix
Statuses: NOT_STARTED, IN_PROGRESS, IMPLEMENTED, VERIFIED, BLOCKED. IMPLEMENTED means code exists. VERIFIED means tests exist and pass. Only VERIFIED rows count as done.
| Req ID | Requirement | Spec ref | Implementation | Tests | Status | | ------ | ------------------------------------------------------------------------ | ------------ | --------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------- | -------- | | C-01 | Deterministic canonical JSON (sorted keys, no whitespace, integers only) | spec 05 §5.2 | packages/crypto/src/canonical.ts | packages/crypto/test/crypto.test.ts | VERIFIED (internal tests; not RFC 8785 vectors) | | C-02 | RFC 8785 JCS conformance | spec 05 | none | none | NOT_STARTED | | C-03 | SHA-256 digest | spec 05 §5.3 | packages/crypto/src/hash.ts | crypto.test.ts (known vector) | VERIFIED | | C-04 | Ed25519 signing and verification | spec 12 | packages/crypto/src/signing.ts | crypto.test.ts | VERIFIED | | C-05 | Domain separation | spec 12 | packages/crypto/src/domain.ts | packages/crypto/test/domain.test.ts | VERIFIED | | C-06 | Key formats (JWK) | spec 12 | packages/crypto/src/jwk.ts | domain.test.ts | VERIFIED | | C-07 | Cross-implementation test vectors | spec 21 | none | none | NOT_STARTED | | A-01 | Authority declaration fields, strict parse | spec 05 §5.1 | packages/authority/src/body.ts | packages/authority/test/authority.test.ts | VERIFIED | | A-02 | Integer minor-unit limits (no floats) | master §6 | packages/authority/src/body.ts | authority.test.ts (rejects 50000.5) | VERIFIED | | A-03 | Signed authority, Ed25519 | master §5.1 | packages/authority/src/signing.ts | authority.test.ts | VERIFIED | | A-04 | Trust roots and key revocation | master §5.9 | packages/authority/src/trust.ts | authority.test.ts, authorization.test.ts (5c) | VERIFIED | | A-05 | Immutable, contiguous versions | master §5.1 | packages/authority/src/registry.ts | authority.test.ts | VERIFIED | | A-06 | Signed revocation | master §5.1 | packages/authority/src/registry.ts, signing.ts | authority.test.ts (revocation) | VERIFIED | | A-07 | Missing/invalid/expired/revoked/superseded/insufficient → DENY | master §5.1 | packages/authorization/src/evaluate.ts (standing) | authorization.test.ts §2–5b | VERIFIED | | A-08 | Delegated authority within parent bounds | master §5.1 | packages/authorization/src/evaluate.ts (delegationReason) | authorization.test.ts (delegation) | VERIFIED | | R-01 | Deterministic request normalization | master §5.2 | packages/authorization/src/normalize.ts | authorization.test.ts (normalization) | VERIFIED | | R-02 | Reject ambiguous/invalid input | master §5.2 | normalize.ts (parseRequestBody) | authorization.test.ts | VERIFIED | | R-03 | Material change changes digest | master §5.2 | normalize.ts (digestRequest) | authorization.test.ts | VERIFIED | | E-01 | Two-outcome engine (ALLOW | DENY only) | master §3, §5.3 | packages/authorization/src/evaluate.ts | authorization.test.ts ("returns only ALLOW or DENY") | VERIFIED | | E-02 | Deterministic, reproducible evaluation | master §5.3 | evaluate.ts (injected clock) | authorization.test.ts ("is reproducible") | VERIFIED | | E-03 | Signed decision | master §5.3 | evaluate.ts (signWithDomain) | authorization.test.ts ("signs each decision") | VERIFIED | | E-04 | Mandatory tests 1–10 | master §14 | evaluate.ts | authorization.test.ts | VERIFIED | | E-05 | Mandatory test 11 (approval absent → DENY) | master §14 | evaluate.ts (APPROVAL) | authorization.test.ts | VERIFIED | | E-06 | Approval cannot override authority (test 16, amount part) | master §14 | evaluate.ts | authorization.test.ts | VERIFIED (partial: approval verification not built) | | P-01 | Approval workflow states and binding | master §5.4 | none | none | NOT_STARTED | | P-02 | Mandatory tests 12–15, 17 (approval states, re-evaluation) | master §14 | none | none | NOT_STARTED | | X-01 | Protected execution boundary | master §5.5 | none | none | NOT_STARTED | | X-02 | Mandatory tests 18–20 | master §14 | none | none | NOT_STARTED | | V-01 | Evidence envelope and signatures | master §5.6 | none | none | NOT_STARTED | | L-01 | Append-only hash-chained ledger | master §5.7 | none | none | NOT_STARTED | | I-01 | Independent verifier | master §5.8 | none | none | NOT_STARTED | | K-01 | Connectors | master §5.10 | none | none | NOT_STARTED | | T-01 | Conformance suite | master §14 | none | none | NOT_STARTED | | D-01 | Persistent storage (PostgreSQL) | master §12 | none | none | NOT_STARTED | | B-01 | CI workflow runs on GitHub | master §17 | .github/workflows/ci.yml | not yet run on GitHub | IMPLEMENTED |
| D-02 | Container image, Compose file, non-root user, read-only filesystem, no secrets in the image | master §17 | Dockerfile, docker-compose.yml, .dockerignore | CI job docker builds the image | IMPLEMENTED: not built locally (no Docker daemon in the build environment); CI is the first build | | D-03 | Fail-closed server configuration and key loading from files | master §17 | apps/api/src/config.ts, apps/api/src/server.ts | apps/api/test/config.test.ts | VERIFIED | | D-04 | Executable examples reproduced on a clean install | master Phase 10 acceptance | examples/run.mjs | node examples/run.mjs (CI job examples) | VERIFIED: 4/4 pass locally | | D-05 | CI jobs for examples, image build, and production dependency audit | master §17 | .github/workflows/ci.yml | CI | IMPLEMENTED: the new checks have not yet run on GitHub | | D-06 | Database schema, migrations, backups, recovery | master §12 | none | none | NOT_STARTED: state is in memory | | D-07 | Server wired to durable storage; responses returned only after their changes are written | master §12 | apps/api/src/app.ts (flush in finally), apps/api/src/server.ts | apps/api/test/durable.test.ts | VERIFIED (file-backed PGlite) |
| G-01 | Formal specification: sections 1 to 21 required by the master instruction | master §7 | docs/spec/01 to 21 (drafts; each states its status) | none beyond the conformance fixtures | IMPLEMENTED as drafts: several sections are drafts rather than complete specifications; the rest match the code | | G-02 | Pluggable key management and KMS adapter | master §5.9 | packages/crypto/src/provider.ts (SigningProvider, LocalSigningProvider, signWithProvider); docs/KEY-MANAGEMENT.md (plan) | packages/crypto/test/provider.test.ts (4 tests) | PARTIAL: interface, local provider and AWS KMS adapter built and tested; sandbox checks passed against real KMS (docs/KEY-MANAGEMENT.md section 10); the server can sign with KMS keys (kmsKeyId), refusing to start unless the KMS public key matches the pinned trust root; the denied-sign drill remains | | G-03 | node-postgres adapter tested against a real PostgreSQL server | master §12 | packages/storage/src/pg.ts (fromPgPool, openPostgres) | packages/storage/test/pg.test.ts (runs only when DIP_TEST_PG_URL is set; CI job postgres uses a postgres:16 service) | IMPLEMENTED: the adapter and test exist; the CI job has not yet run. Locally only the statements were checked, against a PGlite socket server, which hangs on errors inside transactions and so cannot verify the rollback path. | | G-04 | Backup and restore tooling with ledger-head verification | master §12 | apps/cli/src/backup.ts; dip backup create|verify|restore in apps/cli/src/cli.ts | apps/cli/test/backup.test.ts (7 tests on file-backed databases) | VERIFIED for the file-backed server database; networked PostgreSQL backups are not covered | | G-05 | Retention policy | master §12 | docs/RETENTION.md (draft); no retention configuration (append-only by design) | none (policy is documentation; enforcement is append-only triggers and the chain check) | IMPLEMENTED as a draft: periods and personal-data points need owner and counsel decisions | | G-06 | Independent implementation run against the conformance fixtures | master §14 | conformance/ fixtures exist | none | NOT_STARTED | | G-07 | External security review | master §19 | docs/RELEASE-AUDIT.md (internal) | none | NOT_STARTED | | G-08 | Patent-risk review of approval and evidence designs (ADR-0014) | Parmana DECISIONS §2.3 | none | none | NOT_STARTED | | G-09 | Live integration verification for at least one connector, with sandbox credentials | master §5.10 | adapters use placeholder endpoints | none | NOT_STARTED | | R-03b | dip CLI: authority create, sign, inspect, revoke; request normalize; authorize; approval create, approve, reject, inspect; execute; evidence inspect; verify; ledger inspect and verify; conformance run. Exit codes per docs/CLI.md | master §11 | apps/cli/src/cli.ts | apps/cli/test/cli.test.ts (9 tests; uses the real API handler and the conformance fixtures) | VERIFIED: human and JSON output; no dip config file or interactive prompts |