Executed verification / synthetic and theoretical inputs
Offline service notes
The offline shell was exercised with simulated install, activation, cache eviction, connection loss and server failures. Real subprocesses exercised HTTP writes, conflicting updates, abrupt termination, replay and snapshot recovery.
39 of 39 specified outcomes matched. Rejected overload and unsafe deployment cases are expected outcomes, not passing operating conditions.
Method
Each row identifies the method. Real HTTP, database, file and process checks are separate from modeled browser and deployment behavior. Inputs are synthetic. No customer deployment, physical device trial or production availability is claimed.
| Scenario | Expected | Observed | Method | Verification |
|---|---|---|---|---|
| Install every shell dependency before activation | 8 assets cached and skipWaiting called once | {"assets":8,"skip_waiting":1} | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Cache contains the local HTML and module dependency graph | All referenced shell modules and stylesheet are present | ["index.html","styles.css","app.mjs","store.mjs","protocol.mjs","manifest.webmanifest","icon.svg"] | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Missing precache asset aborts installation | No partial batch and no skipWaiting | Install rejected before activation | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Activation removes this scope old cache and claims clients | Other scopes and unrelated caches retained | ["service-notes-shell-v2:https://example.test/notes/","service-notes-shell-v1:https://example.test/other/","unrelated:https://example.test/notes/"] | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Reload cached workspace with network rejected | Cached HTML returned for root and query-string workspace | 3 navigation routes served from cache | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Load modules and style after offline navigation | All 7 named assets returned without a network request | 7 cache hits; 0 network calls | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Reload during upstream 503 | Cached shell replaces server error | Cached HTML, status 200 | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Unknown navigation while network responds | 404 retained rather than masked | 404 retained | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Authenticated API reads and writes bypass cache | Worker does not respond to API GET or POST | No interception | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Foreign requests and out-of-scope paths bypass worker | No interception or cache writes | 3 URLs and POST excluded | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Reload after cache eviction and network failure | Explanatory 503, not undefined response | Navigation and asset fail visibly with 503 | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Successful navigation uses current server page | Network result returned | Network first | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Unrelated older cache cannot supply current assets | Current named cache is used | Current shell retained | Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network | Matched |
| Start a new deployment directory | 3 synthetic assigned visits | 3 | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Commit 100 ordered notes | Final version 101 with final text | {"id":"visit-101","asset":"AHU-014","location":"North plant room","notes":"Synthetic service update 100","checks":{"isolated":true,"inspected":true,"returnedToService":false},"version":101,"updated_by":"alex"} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| 20 concurrent writers use one base version | 1 confirmation and 19 explicit conflicts | {"confirmed":1,"conflicts":19} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Kill the server without graceful close after an acknowledged write | Committed version 103 and exact note survive | {"id":"visit-101","asset":"AHU-014","location":"North plant room","notes":"Committed before abrupt process termination","checks":{"isolated":true,"inspected":true,"returnedToService":false},"version":103,"updated_by":"alex"} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Retry a response-lost operation after restart | Original version 103 with replay marker | {"replayed":"true","version":103} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Create consistent database snapshot while service is running | Snapshot passes integrity check | Online SQLite backup created | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Start service directly from validated snapshot | Version 103, 121 operation outcomes and integrity ok | {"version":103,"operations":121,"integrity":"ok"} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Replay retained operation after restore | No second write or version advance | {"replayed":"true","version":103} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Reject invalid identity on restored database | 401 and unchanged version | 401 | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Preserve expiry through process restart | 401; restart does not silently renew token | 401 | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Record local HTTP commit timings for the 100-write run | Measurement only; no production latency target | {"requests":100,"median_ms":1.709,"p95_ms":3.23,"max_ms":9.219} | Real Node child process, HTTP requests and SQLite on disposable synthetic data | Matched |
| Create snapshot using shipped CLI | Exit 0; manifest has 3 visits | {"exit":0,"stderr":""} | Execute shipped snapshot and restore CLIs on temporary real SQLite databases | Matched |
| Restore snapshot using shipped CLI | Exit 0; three visits retained | {"exit":0,"visits":3} | Execute shipped snapshot and restore CLIs on temporary real SQLite databases | Matched |
| Attempt restore over existing directory | Nonzero exit; existing file retained | 1 | Execute shipped snapshot and restore CLIs on temporary real SQLite databases | Matched |
| Attempt snapshot into existing destination | Nonzero exit; original manifest remains | 1 | Execute shipped snapshot and restore CLIs on temporary real SQLite databases | Matched |
| Restore checksum-mismatched bytes | Nonzero exit; destination not created | 1 | Execute shipped snapshot and restore CLIs on temporary real SQLite databases | Matched |
| Evaluate selected backup and restore schedule | RPO <=15 min and RTO <=15 min under declared timings | {"rpo_minutes":15,"rto_minutes":8} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| Evaluate an old daily snapshot against 15 min target | Daily snapshot rejected | {"rpo_minutes":1440,"accepted":false} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| Evaluate slow operator recovery | RTO breach visible | {"rto_minutes":33,"accepted":false} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| Combine independent illustrative network, proxy and host availabilities | Product below 99.9%; no high-availability claim | {"component_availability":[0.999,0.999,0.995],"series_availability":0.993010995,"expected_minutes_per_30_days":301.9250159999997} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| loopback reference with demo identities | Policy decision true | {"allowed":true,"scope":"Theoretical deployment policy, separate from the localhost application"} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| public listener with demo identities | Policy decision false | {"allowed":false,"scope":"Theoretical deployment policy, separate from the localhost application"} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| public listener without TLS | Policy decision false | {"allowed":false,"scope":"Theoretical deployment policy, separate from the localhost application"} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| modeled private authenticated gateway | Policy decision true | {"allowed":true,"scope":"Theoretical deployment policy, separate from the localhost application"} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| Bound stored notes plus operation history for a 7-day fixture | Fits declared 16 MiB budget | {"visits":140,"bytes":11760000,"budget":16777216} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
| Ten times the reference offline demand | Budget breach rejected | {"bytes":117600000,"accepted":false} | Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned | Matched |
Reproduce
node complete.mjs
Operations and deployment decisions / Machine-readable checks and source hashes / Execution log
Evidence boundaries
- The worker tests run actual sw.js with a CacheStorage and lifecycle model. They do not claim an observed Chrome offline reload.
- The existing Chrome run verifies real IndexedDB and UI sync/conflict workflows. Secure-context browser registration remains an environment boundary.
- Remote hosting and identity are a completed theoretical deployment study. The delivered server is localhost-only with synthetic accounts.
- SIGKILL tests process failure, not physical power loss.
Source notes
W3C Service Workers describes the lifecycle and cache contract used by the shell simulation. Node SQLite documentation describes the native database and backup API. The deployment capacity and recovery calculations use the declared inputs in deployment-inputs.json; they are assumption studies.