> node run-tests.mjs
TAP version 13
# Subtest: verified approval releases one immutable PDF and reader downloads exact digest
ok 1 - verified approval releases one immutable PDF and reader downloads exact digest
  ---
  duration_ms: 20.358745
  type: 'test'
  ...
# Subtest: pending metadata cannot be downloaded, reviewed or released
ok 2 - pending metadata cannot be downloaded, reviewed or released
  ---
  duration_ms: 8.29482
  type: 'test'
  ...
# Subtest: declared digest and size reject a different upload
ok 3 - declared digest and size reject a different upload
  ---
  duration_ms: 7.587895
  type: 'test'
  ...
# Subtest: non PDF content cannot pass verification by matching its own digest
ok 4 - non PDF content cannot pass verification by matching its own digest
  ---
  duration_ms: 6.906479
  type: 'test'
  ...
# Subtest: stored file survives finalization rollback and is recoverable
ok 5 - stored file survives finalization rollback and is recoverable
  ---
  duration_ms: 12.011396
  type: 'test'
  ...
# Subtest: upload and finalize retries retain one verification audit
ok 6 - upload and finalize retries retain one verification audit
  ---
  duration_ms: 11.223629
  type: 'test'
  ...
# Subtest: approval cannot be transferred between digests
ok 7 - approval cannot be transferred between digests
  ---
  duration_ms: 9.926677
  type: 'test'
  ...
# Subtest: an author cannot review their own revision even with reviewer role
ok 8 - an author cannot review their own revision even with reviewer role
  ---
  duration_ms: 9.695208
  type: 'test'
  ...
# Subtest: new revision makes earlier approval stale without moving current release
ok 9 - new revision makes earlier approval stale without moving current release
  ---
  duration_ms: 16.004503
  type: 'test'
  ...
# Subtest: release compare and swap checks expected release version
ok 10 - release compare and swap checks expected release version
  ---
  duration_ms: 11.183089
  type: 'test'
  ...
# Subtest: replacement release preserves superseded revision and digest
ok 11 - replacement release preserves superseded revision and digest
  ---
  duration_ms: 16.270804
  type: 'test'
  ...
# Subtest: rejected revision cannot be released or rewritten
ok 12 - rejected revision cannot be released or rewritten
  ---
  duration_ms: 10.455613
  type: 'test'
  ...
# Subtest: stale expected latest does not allocate a duplicate revision
ok 13 - stale expected latest does not allocate a duplicate revision
  ---
  duration_ms: 7.44506
  type: 'test'
  ...
# Subtest: reader access is checked on direct file route and metadata
ok 14 - reader access is checked on direct file route and metadata
  ---
  duration_ms: 9.924924
  type: 'test'
  ...
# Subtest: reconciliation reports missing, mismatched, orphan and pending objects separately
ok 15 - reconciliation reports missing, mismatched, orphan and pending objects separately
  ---
  duration_ms: 17.701994
  type: 'test'
  ...
# Subtest: export and restore preserve revisions, reviews, audit and PDF digests
ok 16 - export and restore preserve revisions, reviews, audit and PDF digests
  ---
  duration_ms: 34.891436
  type: 'test'
  ...
# Subtest: damaged export checksum is rejected before destination creation
ok 17 - damaged export checksum is rejected before destination creation
  ---
  duration_ms: 10.817078
  type: 'test'
  ...
# Subtest: seed is repeatable and includes a restricted drawing
ok 18 - seed is repeatable and includes a restricted drawing
  ---
  duration_ms: 15.347139
  type: 'test'
  ...
# Subtest: HTTP upload, verify, review, release and authenticated file download
ok 19 - HTTP upload, verify, review, release and authenticated file download
  ---
  duration_ms: 74.325463
  type: 'test'
  ...
# Subtest: HTTP roles block reader mutation, author release and unauthorized direct files
ok 20 - HTTP roles block reader mutation, author release and unauthorized direct files
  ---
  duration_ms: 34.729618
  type: 'test'
  ...
# Subtest: HTTP authentication, CSRF, Origin and Host are enforced
ok 21 - HTTP authentication, CSRF, Origin and Host are enforced
  ---
  duration_ms: 30.79975
  type: 'test'
  ...
# Subtest: HTTP exports a restorable bundle and serves bounded static paths
ok 22 - HTTP exports a restorable bundle and serves bounded static paths
  ---
  duration_ms: 56.639893
  type: 'test'
  ...
# Subtest: HTTP competing releases accept only the latest approved revision
ok 23 - HTTP competing releases accept only the latest approved revision
  ---
  duration_ms: 34.097291
  type: 'test'
  ...
# Subtest: restore rejects a current release with no matching approval
ok 24 - restore rejects a current release with no matching approval
  ---
  duration_ms: 15.848833
  type: 'test'
  ...
# Subtest: restore database failure removes only its own new destination
ok 25 - restore database failure removes only its own new destination
  ---
  duration_ms: 16.202967
  type: 'test'
  ...
# Subtest: a killed restore marker prevents startup of partial data
ok 26 - a killed restore marker prevents startup of partial data
  ---
  duration_ms: 0.480864
  type: 'test'
  ...
1..26
# tests 26
# suites 0
# pass 26
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 631.918574


> node complete.mjs
28/28 extended checks matched


> node evidence.ts
{
  "runtime": "v24.22.1",
  "platform": "linux x64",
  "document_bytes": 200710,
  "sha256": "39b9e35fbe3954d7963b7ae0f0a13052da058808f31427d92e6b7b0771f4e939",
  "released_revisions": 2,
  "release_version": 2,
  "replayed_request": true,
  "recovery_from_pending": "verified",
  "restored": {
    "drawings": 1,
    "revisions": 2,
    "objects": 2
  },
  "history_matches": true,
  "restored_digest_count": 2,
  "faults": {
    "missing": 1,
    "orphan": 1,
    "pending_stored": 1
  },
  "notes": [
    "Synthetic users, metadata and fixture documents. No real manufacturing approval is asserted.",
    "Both demonstration revisions intentionally use identical PDF bytes; the database retains separate revision and review identities.",
    "The fixture is a portfolio design brief used to exercise PDF upload, not a released engineering drawing."
  ]
}


