{
  "checker": {
    "claims": [
      {
        "claim": "Converts agent session JSONL to LTF markdown",
        "command": "python3 ltf/ltf_converter.py <guest-path> --out <guest-path> --overwrite",
        "evidence": "written=1 skipped_unchanged=0 skipped_empty=0 blocked=0 stale_removed=0\n",
        "expected": "one session written",
        "input": "<guest-path> (one demo session JSONL)",
        "kind": "claim",
        "outcome": "Real input produced the expected result: written=1",
        "returncode": 0,
        "source": "- **Converts** agent session JSONL to clean LTF v1.0 markdown (redacts secrets and incidental private IPs, MACs, and emails; elides inline base64 images; summarizes tool output per LTF spec \u00a75.2)",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "Scans export and conversations for plaintext secret patterns",
        "command": "python3 ltf/ltf_converter.py --scan <guest-path>",
        "evidence": "scan_hits=0 files=1\n",
        "expected": "no secret hits",
        "input": "<guest-path> (converted LTF file with redacted secrets)",
        "kind": "claim",
        "outcome": "Real input produced the expected result: scan_hits=0",
        "returncode": 0,
        "source": "- **Scans** `export/` and `conversations/` for plaintext secret patterns before pushing \u2014 blocks the backup if anything looks like a credential",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "Exports GBrain pages to markdown",
        "command": "gbrain export --dir <guest-path>",
        "evidence": "Exported 1 pages to <guest-path>\n[export.pages] start\n[export.pages] 1/1 (100%)\n[export.pages] 1/1 (100%) done\n",
        "expected": "page exported to the fresh directory",
        "input": "gbrain brain holding one page (notes/backup-bridge-demo)",
        "kind": "claim",
        "outcome": "Real input produced the expected result: Exported 1 pages",
        "returncode": 0,
        "source": "- **Exports** your GBrain pages to markdown (`gbrain export --dir`)",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      }
    ],
    "cycle_checks": [
      {
        "claim": "Scheduled daily backup run",
        "command": "bash <guest-path>",
        "evidence": "written=1 skipped_unchanged=0 skipped_empty=0 blocked=0 stale_removed=0\nscan_hits=0 files=4\n2026-10-24 02:07:18 backup pushed: 1b2d4cc backup: gbrain+ltf 2026-10-24 02:07\nTo <guest-path>\n * [new branch]      main -> main",
        "expected": "converter, scan and commit/push run; output ends with backup pushed",
        "input": "SESSIONS_DIR=<guest-path> and the gbrain brain with one page",
        "kind": "cycle",
        "method": "run-once wrapper: one manual run of scripts/backup.sh against a fresh empty local bare remote (no external push, no source edits)",
        "outcome": "Triggered one cycle by hand (run-once wrapper: one manual run of scripts/backup.sh against a fresh empty local bare remote (no external push, no source edits); normal trigger: daily at 18:00 via system cron): written=1 skipped_unchanged=0 skipped_empty=0 blocked=0 stale_removed=0\nscan_hits=0 files=4\n2026-10-24 02:07:18 backup pushed: 1b2d4cc backup: gbrain+ltf 2026-10-24 02:07\nTo <guest-path>\n * [new branch]      main -> main",
        "returncode": 0,
        "schedule": "daily at 18:00 via system cron",
        "source": "cron/README.md",
        "verdict": "yes"
      }
    ],
    "details": {
      "argv": [
        "python3",
        "ltf/ltf_converter.py",
        "<guest-path>",
        "--out",
        "<guest-path>",
        "--overwrite"
      ],
      "kind": "cli",
      "needs_browser": false,
      "needs_credentials": false,
      "returncode": 0,
      "scope": "product operation",
      "stderr": "",
      "stdout": "written=1 skipped_unchanged=0 skipped_empty=0 blocked=0 stale_removed=0",
      "working": true
    },
    "evidence_strength": "readme_checked",
    "example_checks": [
      {
        "claim": "Repository tests run with pytest",
        "command": "<guest-path> -m pytest",
        "deferred": false,
        "evidence": "============================= test session starts ==============================\nplatform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.7.0\nrootdir: <guest-path>\nconfigfile: pytest.ini\ntestpaths: tests\ncollected 27 items\n\ntests/test_converter.py ...................                              [ 70%]\ntests/test_scripts.py ........                                           [100%]\n\n============================== 27 passed in 8.59s ==============================",
        "expected": "all offline tests pass",
        "input": "tests/ directory",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md Tests section (python3 -m pytest)",
        "verdict": "yes"
      },
      {
        "claim": "Shell scripts pass shellcheck",
        "command": "shellcheck scripts/backup.sh scripts/restore.sh",
        "deferred": false,
        "evidence": "",
        "expected": "no findings, exit 0",
        "input": "scripts/backup.sh scripts/restore.sh",
        "kind": "example",
        "outcome": "command completed successfully with no output",
        "returncode": 0,
        "source": "README.md Tests section (shellcheck scripts/backup.sh scripts/restore.sh)",
        "verdict": "yes"
      },
      {
        "claim": "Restore imports a backup clone into GBrain",
        "command": "<guest-path> <guest-path>",
        "deferred": false,
        "evidence": "ck/conversations/\n   open any .ltf.md in a markdown reader; tools can search this tree directly.\n\u2192 gbrain import (no embeddings; run 'gbrain embed' later for semantic recall)\nFound 1 markdown files\n\nImport complete (0.1s):\n  0 pages imported\n  1 pages skipped (1 unchanged, 0 errors, 0 malformed filenames)\n  0 chunks created\nrestore done.\n[gbrain phase] import.collect_files start dir=<guest-path> strategy=markdown\n[gbrain phase] import.collect_files done 36ms files=1\n[import.files] start\n[import.files] 1/1 (100%) imported=0 skipped=1 errors=0\n[import.files] 1/1 (100%) done",
        "expected": "gbrain import runs and restore prints restore done.",
        "input": "<guest-path> (fresh clone of the backup remote with export/)",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md Restore on a new machine section",
        "verdict": "yes"
      }
    ],
    "status": "PASS"
  },
  "deviations": [
    "scripts/backup.sh fails when invoked via a relative path (./scripts/backup.sh) because CONVERTER is resolved from $0 before cd into the backup repo. Workaround: invoke with an absolute path. This is a repo defect.",
    "scripts/backup.sh is not re-runnable: gbrain export --dir ./export/ fails on the second run with 'Export destination has an occupied, aliased or unsafe planned path'. This contradicts the README's 'Safe to re-run' claim. The skip-if-unchanged path was not verified.",
    "Checker child PATH comes from its own process environment, so a claim env PATH override does not make a ~/.bun/bin tool resolvable. Workaround: symlink bun and gbrain into /usr/local/bin (sudo) and use plain 'gbrain' in argv. This is an environment change outside the repo.",
    "Installed tools (python3-venv, unzip, bun, gbrain) were installed as prerequisites, not product source changes. No product source was hand-edited.",
    "The GBrain export claim writes to a fixed destination (<guest-path>). Replay fails with 'Export destination has an occupied ... path' if that directory already exists, so it must be removed before each checker run. This reflects the same non-idempotent export defect."
  ],
  "fault_owner": "product",
  "main_blocker": null,
  "operation": "Set up gbrain-localthink at pin 176a515e66f80c88717ba3198fb902760760fe82 and run the README's documented operations: LTF session conversion, secret scan, backup.sh (export, convert, scan, commit, push), restore.sh, pytest, shellcheck.",
  "operation_scope": "Local VM only. Local bare git remote used for backup. GBrain 0.60.416.0 installed via Bun 1.4.4 with keyless PGLite init. No external services, credentials, browser, or X/Twitter contact.",
  "outcome": "working",
  "plain_failure": "backup.sh cannot be invoked with ./scripts/backup.sh and cannot be re-run against the same export directory; both are product behavior. The first failure was 'can't open file .../ltf/ltf_converter.py'. The second was gbrain's 'unsafe planned path' error.",
  "steps": [
    "Checked out pinned commit and confirmed clean tree.",
    "Installed python3-venv and unzip with sudo apt-get; created <guest-path> and installed requirements-dev.txt.",
    "Installed Bun and gbrain via bun install -g github:garrytan/gbrain (README's documented install path).",
    "Ran gbrain keyless init and page put/get/search.",
    "Ran LTF converter on a fixture with a fake API key; confirmed redaction and written=1.",
    "Ran --scan on a clean LTF directory; scan_hits=0.",
    "Ran backup.sh via absolute path against a local bare remote; first run pushed.",
    "Ran restore.sh into a fresh clone; restore done.",
    "Ran pytest (27 passed) and shellcheck on scripts/backup.sh and scripts/restore.sh.",
    "Symlinked bun and gbrain into /usr/local/bin so the checker's child PATH can resolve them; re-ran checker: valid True, no problems."
  ],
  "stuck_step": null,
  "suggested_fix": "Resolve CONVERTER to an absolute path before cd (or use cd of script dir), and either use a fresh export destination per run or pass a clean export dir each time, so re-runs work. Document that gbrain must be on PATH for the checker or install it system-wide."
}
