{
  "schema": "omnius.chat-session-live-sidecar-verification.v1",
  "date": "2026-10-17",
  "scope": "Source-only bounded canonical-session live metadata persistence; one production file. No daemon restart, shared build, package deployment or model request.",
  "baseline": {
    "gitHead": "1b2f479a77b02b6f79a5da56aadb824d499ab33f",
    "sourceCopy": "Current integrated root chat-session.ts (title, legacy transcript and document revision changes included), captured before sidecar changes. Verification-only current dependencies copied and excluded from delivery.",
    "baselineSourceSha256": "8059352da0033fb8fb95ac2e0fafba1582c32b1ccdf8362a8f41315d8a5cbebc"
  },
  "owned": {
    "production": "packages/cli/src/api/chat-session.ts",
    "newTest": "packages/cli/tests/chat-session-live-sidecar.test.ts",
    "updatedTest": "packages/cli/tests/chat-session-document-revision.test.ts",
    "evidence": [
      "docs/work-orders/evidence/chat-session-live-sidecar-20261017.json",
      "docs/work-orders/evidence/session-live-sidecar-profile-20261017.json"
    ]
  },
  "hashes": {
    "packages/cli/src/api/chat-session.ts": "c1d65e18956795e7328e8bcada5d59eabee0038ee3d51f4c69435c642d611c4b",
    "packages/cli/tests/chat-session-live-sidecar.test.ts": "efe58b6e1bf42de51998d52eaf605f2faeb8acc298c90126ffd9f7235a273c66",
    "packages/cli/tests/chat-session-document-revision.test.ts": "2c28258fb48df9989a75a41ff0d4003c2d59f5d7d9b74b7115ffb9e9ecdefe03",
    "sourcePatch": "e75fa1bd1513aa9558fdd949175de66c282c12a8937450abee421b7bcb7f119a",
    "profileEvidence": "b1e8d6a95f544451b89d3e4ab77d9f81629a89457a53678b61fc2cc078a30aca"
  },
  "verification": {
    "tests": {
      "result": "PASS",
      "files": 12,
      "tests": 136,
      "newFocusedCases": 18,
      "counting": "136 is one complete focused batch including existing store, document-version, legacy restore, deletion, replay and web-session regression cases; counts overlap earlier receipts and must not be added.",
      "log": "/tmp/omnius-bounded-session-live-final-tests.log",
      "logSha256": "d9d387c68f332d9d289e053d484ea20250fbb3377cd1a7c0c6e089743476591c",
      "command": "pnpm exec vitest run --config /tmp/omnius-bounded-session-live-l4hoih1o/sidecar-vitest.config.mts --maxWorkers=3 --minWorkers=1 --reporter=verbose"
    },
    "typecheck": {
      "result": "PASS",
      "diagnostics": 0,
      "log": "/tmp/omnius-bounded-session-live-frozen-typecheck.log",
      "command": "pnpm exec tsc -p tsconfig.json --noEmit --incremental false --composite false"
    }
  },
  "contract": {
    "sidecar": "<filesystem-session-id>.live.json",
    "schema": "omnius.session-live.v1",
    "maxSerializedBytes": 12288,
    "liveRevision": "Independent monotonic per-session live counter; canonical revision and documentRevision remain unchanged by live-only commits. Session and catalog expose the additive liveRevision field.",
    "identity": "Exact session id, canonical birth timestamp, project digest, verified unchanged canonical file stamp and durable tombstone fence. Project digest is SHA-256 of normalized project root.",
    "reads": "Sync/async lookup, get, listing and startup merge validated bounded metadata. Missing is compatible with historical inline live data; malformed/foreign/symlink sidecars never become authoritative.",
    "writes": "Existing short per-store mutex, strict bounded regular-file reads, exclusive 0600 temporary JSON and atomic rename. Public held references are updated only after a successful commit.",
    "refresh": "Warm verified live writes do not read or rewrite canonical history; canonical file changes force a fresh read inside the mutex before the sidecar commit and in-place hydration.",
    "deletion": "Delete removes original sidecar path while holding store mutex and durable tombstone. If canonical unlink fails, the exact prior sidecar is restored and new tombstone rolled back; restoration failure retains the deletion fence.",
    "staleReceipts": "Rejects older timestamps and same-run terminal-to-running reversals. Actual different-run admission/owner fencing remains the caller/coordinator responsibility, unchanged from prior behavior.",
    "limits": "Authored partial text is bounded to 8192 UTF-8 bytes and phase to 160 characters; final encoded JSON also clamps escaped text to the complete sidecar byte budget. No endpoint, tool arguments or hidden reasoning is added."
  },
  "cases": [
    "Actual 5 MiB canonical document, ten live writes, zero canonical reads/writes on warm path, unchanged hash/inode/mtime and document version.",
    "Independent process appends authored content; next live write hydrates held object without overwriting external content.",
    "Independent process updates live metadata; sync lookup, async lookup and catalog see the new bounded revision.",
    "Atomic rename failure surfaces and leaves prior public/durable live metadata unchanged.",
    "Stale timestamp, terminal reversal and versioned null-clear ordering.",
    "Malformed JSON, wrong identity/root/birth, invalid timestamp, oversized payload, unknown fields and symlink rejection.",
    "Deletion, stale writer refusal and exact sidecar rollback on failed canonical unlink.",
    "Replaced canonical birth refuses stale held writer.",
    "Escaped Unicode/control text remains complete UTF-8 JSON within 12 KiB.",
    "Custom operator title remains eligible in listing even without an authored message."
  ],
  "profile": {
    "evidence": "docs/work-orders/evidence/session-live-sidecar-profile-20261017.json",
    "fiveMiBTenUpdates": {
      "targetMiB": 5,
      "initialCanonicalBytes": 5242880,
      "messages": 101,
      "updates": 10,
      "canonicalJsonBytesWritten": 0,
      "liveSidecarBytesWritten": 85161,
      "canonicalUnchanged": true,
      "totalElapsedMs": 2.9267639999999346,
      "totalCpuMs": 3.1479999999999997,
      "medianElapsedMs": 0.23751199999998107,
      "maxElapsedMs": 0.5657360000000153,
      "minElapsedMs": 0.20915599999995038,
      "documentRevisionUnchanged": true,
      "samples": [
        {
          "elapsedMs": 0.43028299999997444,
          "cpuMs": 0.437,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.3156089999999949,
          "cpuMs": 0.318,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.5657360000000153,
          "cpuMs": 0.289,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.2455269999999814,
          "cpuMs": 0.249,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.2216760000000022,
          "cpuMs": 0.287,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.20915599999995038,
          "cpuMs": 0.221,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.21437600000001567,
          "cpuMs": 0.217,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.22949699999998074,
          "cpuMs": 0.567,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.27343799999999874,
          "cpuMs": 0.275,
          "liveSidecarBytes": 8516
        },
        {
          "elapsedMs": 0.2214660000000208,
          "cpuMs": 0.288,
          "liveSidecarBytes": 8517
        }
      ]
    }
  },
  "integrationNotes": [
    "Update shared-session projection tests that expected revision increments from live flush: liveRevision now increments while canonical revision remains stable.",
    "Observers must fence bounded liveRevision and/or safe live payload as well as canonical document revision. Root callsite integration owns those changes.",
    "Metadata document-version fixture now counts only actual canonical token/get commits; ordinary full-content writes and prior cross-process append tests remain covered."
  ],
  "excludedVerificationOnlyDependencies": [
    "packages/cli/src/api/session-coordination.ts",
    "packages/cli/src/session-quality.ts",
    "packages/cli/src/api/session-summary.ts",
    "packages/cli/src/tui/session-restore.ts"
  ],
  "safety": {
    "blockedNetworkCalls": 0,
    "inferenceRequests": 0,
    "modelLoadRequests": 0,
    "servicesChanged": 0,
    "cudaWorkloads": 0,
    "sharedBuilds": 0
  }
}
