Implemented with executed synthetic and operational validation
Drawing release register
A drawing register with PDF uploads, revision-specific review, controlled releases, file reconciliation and verified export/restore.
Implementation
The upload workflow creates a pending revision, stores the PDF without overwriting an existing object, then verifies its size and SHA-256 before marking it available. An interrupted finalization can be retried using the same revision.
Review is tied to the exact file digest. Only a separate reviewer can approve and release the latest revision. The release transaction supersedes the prior revision and increments a release version; competing requests must agree on that version.
Authors, reviewers and readers have different permissions. Access groups are checked for list, detail and download requests. Reconciliation reports missing, mismatched, orphaned and pending files. Export captures metadata and PDF bytes; restore verifies checksums into a new directory.
A partial restore carries an incomplete marker until verification finishes. Startup refuses that marker, and ordinary errors clean the new destination. Client export messaging identifies a prepared file rather than claiming browser save completion.
Inputs and assumptions
- All accounts and document metadata are synthetic. The sample PDF is a portfolio design brief used as an upload fixture, not an approved manufacturing drawing.
- Node.js 24+ runs TypeScript with native type stripping and node:sqlite. No npm dependencies are required.
- PDFs are limited to 10 MiB each. A reference export is limited to 48 MiB of PDF content.
Recorded results

Machine-readable result summary
{
"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."
]
}Verification
26 of 26 tests passed. Failures: 0. Errors: 0.
26 database/HTTP tests, 10 client-source workflow checks, eight process/recovery checks and 10 theoretical deployment cases. Exact client export bytes restore the verified PDFs and history.
node run-tests.mjs node complete.mjs node evidence.ts
Run locally
Node.js 24+ / Python 3 only to regenerate the HTML report
node --experimental-strip-types app.ts --seed --port 8012 # Open http://127.0.0.1:8012 node run-tests.mjs node --experimental-strip-types evidence.ts # Optional report regeneration with Python 3: python build_report.py node complete.mjs
Source and evidence
- Application and release workflow
app.ts - SQLite schema
schema.sql - Synthetic upload fixture
fixtures/sample-document.pdf - Revision and approval history
results/release-history.json - Interrupted upload recovery
results/upload-recovery.json - Restore verification
results/restore-check.json - Complete demonstration export
results/sample-export.json - Database and HTTP tests
tests.test.ts - Extended verification report
completion-report.html - Acceptance matrix and source hashes
completion.json - Operation, recovery and deployment assessment
OPERATIONS.md - Client upload and export rehearsal
client-rehearsal.mjs - Process crash and recovery rehearsal
operations.mjs
Limits
- Fixed local demo accounts are a role model, not production authentication. Keep the server bound to localhost. Sessions expire after one hour or restart.
- PDF validation checks the header, end marker, size and digest. It does not inspect engineering content or scan for malware. Downloads are attachments.
- SQLite and a local object directory replace the earlier hosted database/object-storage plan. Directory metadata is not explicitly fsynced; abrupt power loss has not been qualified.
- Client upload/export received an executed DOM simulation with actual hashing, server requests and restorable Blob bytes. This does not claim Chrome file-picker or operating-system download behavior.
- Exports include only accessible groups. Ordinary restore errors clean their new destination; incomplete-restore markers block serving a store left by process termination.