{
  "schema_version": 1,
  "evidence_type": "executed synthetic operations and theoretical deployment",
  "command": "node complete.mjs",
  "passed": true,
  "checks": [
    {
      "id": "shell-install",
      "description": "Install every shell dependency before activation",
      "expected": "8 assets cached and skipWaiting called once",
      "observed": {
        "assets": 8,
        "skip_waiting": 1
      },
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "asset-manifest",
      "description": "Cache contains the local HTML and module dependency graph",
      "expected": "All referenced shell modules and stylesheet are present",
      "observed": [
        "index.html",
        "styles.css",
        "app.mjs",
        "store.mjs",
        "protocol.mjs",
        "manifest.webmanifest",
        "icon.svg"
      ],
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "install-failure",
      "description": "Missing precache asset aborts installation",
      "expected": "No partial batch and no skipWaiting",
      "observed": "Install rejected before activation",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "activation",
      "description": "Activation removes this scope old cache and claims clients",
      "expected": "Other scopes and unrelated caches retained",
      "observed": [
        "service-notes-shell-v2:https://example.test/notes/",
        "service-notes-shell-v1:https://example.test/other/",
        "unrelated:https://example.test/notes/"
      ],
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "offline-navigation",
      "description": "Reload cached workspace with network rejected",
      "expected": "Cached HTML returned for root and query-string workspace",
      "observed": "3 navigation routes served from cache",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "offline-assets",
      "description": "Load modules and style after offline navigation",
      "expected": "All 7 named assets returned without a network request",
      "observed": "7 cache hits; 0 network calls",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "server-error",
      "description": "Reload during upstream 503",
      "expected": "Cached shell replaces server error",
      "observed": "Cached HTML, status 200",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "server-404",
      "description": "Unknown navigation while network responds",
      "expected": "404 retained rather than masked",
      "observed": "404 retained",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "api-private",
      "description": "Authenticated API reads and writes bypass cache",
      "expected": "Worker does not respond to API GET or POST",
      "observed": "No interception",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "scope-isolation",
      "description": "Foreign requests and out-of-scope paths bypass worker",
      "expected": "No interception or cache writes",
      "observed": "3 URLs and POST excluded",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "cache-eviction",
      "description": "Reload after cache eviction and network failure",
      "expected": "Explanatory 503, not undefined response",
      "observed": "Navigation and asset fail visibly with 503",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "online-fresh",
      "description": "Successful navigation uses current server page",
      "expected": "Network result returned",
      "observed": "Network first",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "cache-specific",
      "description": "Unrelated older cache cannot supply current assets",
      "expected": "Current named cache is used",
      "observed": "Current shell retained",
      "passed": true,
      "method": "Actual sw.js executed in Node vm with modeled CacheStorage, lifecycle and network"
    },
    {
      "id": "boot",
      "description": "Start a new deployment directory",
      "expected": "3 synthetic assigned visits",
      "observed": 3,
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "sequential-load",
      "description": "Commit 100 ordered notes",
      "expected": "Final version 101 with final text",
      "observed": {
        "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"
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "conflict-burst",
      "description": "20 concurrent writers use one base version",
      "expected": "1 confirmation and 19 explicit conflicts",
      "observed": {
        "confirmed": 1,
        "conflicts": 19
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "process-crash",
      "description": "Kill the server without graceful close after an acknowledged write",
      "expected": "Committed version 103 and exact note survive",
      "observed": {
        "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"
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "replay-restart",
      "description": "Retry a response-lost operation after restart",
      "expected": "Original version 103 with replay marker",
      "observed": {
        "replayed": "true",
        "version": 103
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "snapshot",
      "description": "Create consistent database snapshot while service is running",
      "expected": "Snapshot passes integrity check",
      "observed": "Online SQLite backup created",
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "restore",
      "description": "Start service directly from validated snapshot",
      "expected": "Version 103, 121 operation outcomes and integrity ok",
      "observed": {
        "version": 103,
        "operations": 121,
        "integrity": "ok"
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "restore-idempotency",
      "description": "Replay retained operation after restore",
      "expected": "No second write or version advance",
      "observed": {
        "replayed": "true",
        "version": 103
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "access-after-restore",
      "description": "Reject invalid identity on restored database",
      "expected": "401 and unchanged version",
      "observed": 401,
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "expired-session",
      "description": "Preserve expiry through process restart",
      "expected": "401; restart does not silently renew token",
      "observed": 401,
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "observed-latency",
      "description": "Record local HTTP commit timings for the 100-write run",
      "expected": "Measurement only; no production latency target",
      "observed": {
        "requests": 100,
        "median_ms": 1.709,
        "p95_ms": 3.23,
        "max_ms": 9.219
      },
      "passed": true,
      "method": "Real Node child process, HTTP requests and SQLite on disposable synthetic data"
    },
    {
      "id": "snapshot-cli",
      "description": "Create snapshot using shipped CLI",
      "expected": "Exit 0; manifest has 3 visits",
      "observed": {
        "exit": 0,
        "stderr": ""
      },
      "passed": true,
      "method": "Execute shipped snapshot and restore CLIs on temporary real SQLite databases"
    },
    {
      "id": "restore-cli",
      "description": "Restore snapshot using shipped CLI",
      "expected": "Exit 0; three visits retained",
      "observed": {
        "exit": 0,
        "visits": 3
      },
      "passed": true,
      "method": "Execute shipped snapshot and restore CLIs on temporary real SQLite databases"
    },
    {
      "id": "no-overwrite",
      "description": "Attempt restore over existing directory",
      "expected": "Nonzero exit; existing file retained",
      "observed": 1,
      "passed": true,
      "method": "Execute shipped snapshot and restore CLIs on temporary real SQLite databases"
    },
    {
      "id": "snapshot-no-overwrite",
      "description": "Attempt snapshot into existing destination",
      "expected": "Nonzero exit; original manifest remains",
      "observed": 1,
      "passed": true,
      "method": "Execute shipped snapshot and restore CLIs on temporary real SQLite databases"
    },
    {
      "id": "corrupt-snapshot",
      "description": "Restore checksum-mismatched bytes",
      "expected": "Nonzero exit; destination not created",
      "observed": 1,
      "passed": true,
      "method": "Execute shipped snapshot and restore CLIs on temporary real SQLite databases"
    },
    {
      "id": "recovery-window",
      "description": "Evaluate selected backup and restore schedule",
      "expected": "RPO <=15 min and RTO <=15 min under declared timings",
      "observed": {
        "rpo_minutes": 15,
        "rto_minutes": 8
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "stale-backup-rejected",
      "description": "Evaluate an old daily snapshot against 15 min target",
      "expected": "Daily snapshot rejected",
      "observed": {
        "rpo_minutes": 1440,
        "accepted": false
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "slow-restore-rejected",
      "description": "Evaluate slow operator recovery",
      "expected": "RTO breach visible",
      "observed": {
        "rto_minutes": 33,
        "accepted": false
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "single-host-availability",
      "description": "Combine independent illustrative network, proxy and host availabilities",
      "expected": "Product below 99.9%; no high-availability claim",
      "observed": {
        "component_availability": [
          0.999,
          0.999,
          0.995
        ],
        "series_availability": 0.993010995,
        "expected_minutes_per_30_days": 301.9250159999997
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "boundary-4",
      "description": "loopback reference with demo identities",
      "expected": "Policy decision true",
      "observed": {
        "allowed": true,
        "scope": "Theoretical deployment policy, separate from the localhost application"
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "boundary-5",
      "description": "public listener with demo identities",
      "expected": "Policy decision false",
      "observed": {
        "allowed": false,
        "scope": "Theoretical deployment policy, separate from the localhost application"
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "boundary-6",
      "description": "public listener without TLS",
      "expected": "Policy decision false",
      "observed": {
        "allowed": false,
        "scope": "Theoretical deployment policy, separate from the localhost application"
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "boundary-7",
      "description": "modeled private authenticated gateway",
      "expected": "Policy decision true",
      "observed": {
        "allowed": true,
        "scope": "Theoretical deployment policy, separate from the localhost application"
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "offline-capacity",
      "description": "Bound stored notes plus operation history for a 7-day fixture",
      "expected": "Fits declared 16 MiB budget",
      "observed": {
        "visits": 140,
        "bytes": 11760000,
        "budget": 16777216
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    },
    {
      "id": "offline-overload",
      "description": "Ten times the reference offline demand",
      "expected": "Budget breach rejected",
      "observed": {
        "bytes": 117600000,
        "accepted": false
      },
      "passed": true,
      "method": "Deterministic theoretical deployment calculation with declared inputs; no remote infrastructure is provisioned"
    }
  ],
  "source_sha256": {
    "server.mjs": "d37d49a383210c040b541f04927be2abb479b8fe26b345b7f0d21af228860540",
    "public/sw.js": "ab7656761a71aad2453635fd846956f5f8ddf4dfbdd5d2e253e7e8c563bbb48c",
    "public/app.mjs": "d4de8b60f8b825ac6634f9d1390c4aa7c288c4a84619e751d15d24d3090ae00b",
    "public/store.mjs": "ac9a1df3a7ad83c26c27d52496f11ca2ae8b4b3b9aee6eaaebc36de2e9987225",
    "public/protocol.mjs": "c00047379519279bbb7b10d4563bbf27b143284a402f38351a17c4302c40074e",
    "public/index.html": "03d308f057b20e1acea335c64d575afe31c1f25ca76f43cb80a07ee728df6849",
    "test-sw.mjs": "495a274ebe0d7b3d35a2f57680eec3eb7a1e4032049488e181be8f978ca7e604",
    "operations.mjs": "53c823e432e7964f230096cc40c96421e3454ebf39c17112f9db3cabc56a6002",
    "snapshot.mjs": "8b178f2e64a09f59da500a04970f8627151d2a872c8860d139e0692e9667e529",
    "restore.mjs": "26ce1dd88ddb47c9c6d05b4020e684bb8a4b87c26a4784ad2b0a612cc953a276",
    "test-snapshot.mjs": "970978098d10ab75da645707f39a191287bbff84c63654469c0cf9e8eea05f3b",
    "deployment-model.mjs": "a8c82d057ce97c33abbdac358c3320cb530f4dffe632de72ae943030124b570f",
    "deployment-inputs.json": "1d5e289365f4856abd6effda3ec9cdbb409c1dc2ccc504a0b272946cb5d66b72",
    "complete.mjs": "569233e1d11a78e1a7abed5b5163ea3ade77c4c90a3345e4cc93e9cc6180d1d8"
  },
  "report": "completion-report.html",
  "limitations": [
    "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."
  ],
  "generated_at": "2026-10-27T23:45:26.575Z"
}
