Skip to content

feat(discovery): add opt-in OMP session discovery to the Pi adapter - #151

Merged
kunchenguid merged 26 commits into
kunchenguid:mainfrom
MrGTV-love:fm/backpass-omp-adapter-20-clean-pr
Oct 12, 2026
Merged

kunchenguid merged 26 commits into
kunchenguid:mainfrom
MrGTV-love:fm/backpass-omp-adapter-20-clean-pr

Conversation

@MrGTV-love

@MrGTV-love MrGTV-love commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Update upstream PR 151 (opt-in OMP session discovery in the Pi adapter, discovery.includeOmp default false) to answer the maintainer's 2026-10-09 change request. (1) In src/discovery/adapters/pi.js the nested two-level walk, subagent tagging, ancestor-header linkage and title-header parsing must apply only to the ~/.omp store when includeOmp is on; the default Pi store, PI_CODING_AGENT_DIR (unless it is the same dir as the OMP store) and bridge dirs must list and read exactly as on main. Decision recorded: a PI_CODING_AGENT_DIR pointing at a different omp dir gets no nested walk; do not add another opt-in. (2) The fold-side root fallback (gapOwnerOf) and native sightingIds ownership routing are reverted to main's route.ownerOf over cluster sessions; that routing, the unattributed-to-root rule and their tests belong to the separate upstream PR 205 and were deliberately removed from this PR, so do not re-add them. (3) scan --json on a plain Pi store with includeOmp unset must be identical to main (observer fields omitted unless a transcript shares an observer). Greptile findings on the earlier head were skipped on purpose: OMP-off-by-default is the approved design, AGENTS.md is untouched, and the proposal.js misroute is main behavior fixed by PR 205.

What Changed

  • Adds a new config option, discovery.includeOmp. It defaults to false, and setting it to a non-boolean value is an error. When it is true, the Pi adapter (src/discovery/adapters/pi.js) also reads ~/.omp/agent/sessions/, on the local machine and on SSH hosts (the flag is passed through hosts.js and remote/probe.js). In the OMP store only, the adapter accepts a title line before the session header, walks nested subagent files up to two levels deep, links each subagent to the headers of its parent sessions, tags it as a subagent source, and reads model as well as modelId. Each OMP file in the scan cache also stores a fingerprint of its parent sessions (cacheDependency), so a change to a parent file makes the scan read that file again. The default Pi store, a PI_CODING_AGENT_DIR that points at a different directory, and bridge directories are listed and read the same way as on main.
  • Adds a shared "observer" identity (corroborationIdentityOf in src/transcript.js). An OMP subagent shares one observer with its parent session, and matching copies on synced SSH hosts share one too. The gap ledger, the fold, and the proposal evidence floors now count distinct observers, not separate files, so linked files cannot add extra votes. Old ledger entries move to the new keys only when they match the selected sample. Ownership routing stays on main's route.ownerOf. OMP subagents always count as non-interactive. Standalone propose now uses the interaction signals from the current scan for cached evidence.
  • scan --json leaves out the observer fields when a transcript's observer is its own identity, so a plain Pi store prints the same output as on main. The README documents the opt-in, the nested OMP layout, and the switch to counting observers. New tests and an omp-session.jsonl fixture cover the adapter, the ledger, the fold, the proposal, interaction, and remote discovery.

Risk Assessment

⚠️ Medium: The latest fix round correctly applies R1–R7, and tracing shows the plain Pi path is unchanged from main for listing, reading, scan cache and scan --json, but the change still adds a large set of ledger-provenance and cross-host observer-aliasing rules that touch every harness's gap ledger, so it deserves careful follow-up rather than blocking.

Testing

I ran the real backpass CLI from this branch and from a main snapshot. Both ran against disposable fake HOME stores. These were a plain Pi store, an OMP store with root, child, grandchild and a too-deep file, and an alternate OMP-shaped PI_CODING_AGENT_DIR. A fake-ssh remote ran the real probe. A fake acpx stood in for model calls. Every scenario passed: 27/27 scan checks, plus the analyze-model, ledger-upgrade and observer-counting checks. The 109 targeted tests also passed, including the nested-routing CLI test. A first analyze attempt was polluted by a personal config left behind by the SSH step. That config named host mac-home, so that one run tried a real BatchMode ssh to mac-home. Nothing came back from it. I fixed the driver to clear that config and re-ran everything on a fresh temp root. I removed the temp roots. The worktree is clean. This is a CLI-only change, so there is no visual artifact. The evidence is JSON and text CLI output.

  • Live validation: ✅ go - 13 of 13 scenarios driven live against the product
Scenario Result Live Evidence
Plain Pi store with OMP store present and includeOmp unset: scan --json and human scan output are byte-identical to main, with no corroboration*/parentSession* fields ✅ pass live drive.mjs S1; s1-main-scan.json == s1-branch-scan.json; s1-*-scan.txt
Adversarial: a nested session dir and a title-led file inside the plain ~/.pi store are ignored, as on main, even with includeOmp on ✅ pass live drive.mjs S1/S3 (pi-nested-child, pi-titled absent)
Upgrade: a scan cache written by main is reused by the branch (perHarness.pi.cached equal, output identical) ✅ pass live drive.mjs S2; s2-cache-parity.json
includeOmp:true finds the OMP root, child and grandchild but not depth-3 files. Subagents are non-interactive and share the root's corroboration identity ✅ pass live drive.mjs S3; s3-branch-includeOmp-scan.json
Toggling includeOmp off→on→off with a warm scan cache reclassifies correctly and the cached on-run matches the fresh run ✅ pass live drive.mjs S4; s4-toggle.json
Adversarial: PI_CODING_AGENT_DIR at a different OMP-style dir gets no nested walk and no title parsing, with includeOmp off or on. With it off, output is byte-identical to main ✅ pass live drive.mjs S5; s5-main-alt.json == s5-branch-alt.json
PI_CODING_AGENT_DIR = ~/.omp/agent: with includeOmp on, it merges into the OMP store with no duplicates. With it off, output is byte-identical to main ✅ pass live drive.mjs S6
Adversarial: a non-boolean discovery.includeOmp is refused by name ✅ pass live drive.mjs S7; s7-invalid-config.txt (exit 1, 'config.discovery.includeOmp must be a boolean')
SSH host: with includeOmp off, the remote OMP store is not read and output is byte-identical to main. With it on, the remote OMP root and child are found and linked to one observer ✅ pass live drive.mjs S8 (fake ssh running real probe); s8-*.json
Adversarial: during analyze, a plain Pi model_change that has only model reports no model, as on main. The OMP title-led root reports its model ✅ pass live drive-analyze.mjs; drive-analyze-stdout.txt / s9-analyze-model.json
Upgrade: a gap ledger written by main for plain Pi sessions keeps the same session slots and firstObservedAt, with no duplicate sightings, when the branch re-reports it ✅ pass live drive-ledger.mjs; s10-ledger-main-era.json, s10-ledger-main-rerun.json, s10-ledger-branch-rerun.json
Adversarial: an OMP root plus its subagent quoting the same gap counts as one observer and is dropped below minGapEvidence=2. Two independent sessions count as two and stay eligible ✅ pass live drive-observers.mjs; s11-observer-counting.json
Nested memory routing still uses main's route.ownerOf over cluster sessions. Each lesson lands in the file that owns it, with no root fallback re-added ✅ pass live test/nested-cli.test.js (real CLI + fake acpx) in targeted-tests.txt, 109/109 pass
Evidence: Scan driver log (27/27 checks)

== S1 plain Pi store, includeOmp unset: branch vs main scan --json ==
main ids:   pi-a, pi-model-only
branch ids: pi-a, pi-model-only
PASS: S1 scan --json byte-identical to main (plain Pi, OMP store present but opt-in off)
PASS: S1 no corroboration*/parentSession* fields on any plain transcript
PASS: S1 plain-store nested dir and title-led file ignored
PASS: S1 OMP store not read without opt-in
PASS: S1 human scan output identical to main

== S2 main-written scan cache reused by branch (no cacheVersion invalidation) ==
main 2nd run perHarness.pi: {"scanned":3,"matched":2,"cached":3,"skipped":1,"self":0,"error":null}
branch after main cache perHarness.pi: {"scanned":3,"matched":2,"cached":3,"skipped":1,"self":0,"error":null}
PASS: S2 branch scan after main cache: perHarness identical to main's cached run
PASS: S2 branch scan output identical to main's second run

== S3 includeOmp: true discovers OMP root + nested subagents ==
ids: omp-child, omp-grandchild, omp-root, pi-a, pi-model-only
  omp-root: interaction="interactive" source=undefined parentSessionId=undefined corroborationNativeId=undefined
  omp-child: interaction="non-interactive" source=subagent parentSessionId=omp-root corroborationNativeId=omp-root
  omp-grandchild: interaction="non-interactive" source=subagent parentSessionId=omp-root corroborationNativeId=omp-root
PASS: S3 OMP root, child, grandchild discovered
PASS: S3 depth-3 file not walked
PASS: S3 plain Pi store still ignores nested + title-led files
PASS: S3 plain Pi sessions still present
PASS: S3 subagents tagged non-interactive
PASS: S3 child + grandchild share the root's corroboration identity
PASS: S3 OMP root serialized without observer fields (own observer)
PASS: S3 plain Pi serialized without observer fields

== S4 scan cache transitions when includeOmp is toggled ==
off: pi-a,pi-model-only | on: omp-child,omp-grandchild,omp-root,pi-a,pi-model-only | on again cached=6 | off again: pi-a,pi-model-only
PASS: S4 enabling after a cached off-run discovers OMP with correct subagent linkage
PASS: S4 cached on-run gives same transcripts as fresh
PASS: S4 disabling again returns to the plain set

== S5 PI_CODING_AGENT_DIR -> different omp-shaped dir ==
includeOmp unset: alt-plain, pi-a, pi-model-only
PASS: S5 (includeOmp unset) alt dir: plain file read, title-led file and nested Sub ignored
PASS: S5 (includeOmp unset) alt dir scan --json byte-identical to main
includeOmp true: alt-plain, omp-child, omp-grandchild, omp-root, pi-a, pi-model-only
PASS: S5 (includeOmp true) alt dir: plain file read, title-led file and nested Sub ignored

== S6 PI_CODING_AGENT_DIR = ~/.omp/agent ==
PASS: S6 (includeOmp true) same dir merged as the OMP store: same transcripts as S3, no duplicates
includeOmp unset branch: pi-a, pi-model-only
PASS: S6 (includeOmp unset) scan --json byte-identical to main

== S7 includeOmp must be boolean ==
exit=1 stderr=error config.discovery.includeOmp must be a boolean
PASS: S7 non-boolean includeOmp refused by name

== S8 SSH host (fake ssh, real probe) honors includeOmp ==
off: remote ids = r-pi
PASS: S8 (off) remote OMP store not read; remote plain Pi read
PASS: S8 (off) scan --json with SSH host byte-identical to main
on: remote ids = r-child, r-pi, r-root
PASS: S8 (on) remote OMP root + child discovered, child linked to root observer
Evidence: Plain Pi scan --json, main
{
  "repo": "repo",
  "scope": "project",
  "perHarness": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 0,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "perHost": [],
  "mix": {
    "interactive": 2,
    "nonInteractive": 0,
    "total": 2
  },
  "transcripts": [
    {
      "harness": "pi",
      "id": "pi-pi-model-only",
      "nativeId": "pi-model-only",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-01-00.000Z_pi-model-only.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656120076,
      "mtimeMs": 1791659660077.2983,
      "bytes": 977,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "bd82b55a8bcf2cbca5a3afea31ae95a7af2aad1f5655747bb00ad5eb38ac9d37",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-a",
      "nativeId": "pi-a",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-00-00.000Z_pi-a.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656060074,
      "mtimeMs": 1791659660076.716,
      "bytes": 887,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "f4fa4b2ca4bb38652cb41314c0667d25c082d61f9d29224a019265290ccf0380",
      "interaction": "interactive"
    }
  ]
}
Evidence: Plain Pi scan --json, branch (byte-identical)
{
  "repo": "repo",
  "scope": "project",
  "perHarness": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 0,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "perHost": [],
  "mix": {
    "interactive": 2,
    "nonInteractive": 0,
    "total": 2
  },
  "transcripts": [
    {
      "harness": "pi",
      "id": "pi-pi-model-only",
      "nativeId": "pi-model-only",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-01-00.000Z_pi-model-only.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656120076,
      "mtimeMs": 1791659660077.2983,
      "bytes": 977,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "bd82b55a8bcf2cbca5a3afea31ae95a7af2aad1f5655747bb00ad5eb38ac9d37",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-a",
      "nativeId": "pi-a",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-00-00.000Z_pi-a.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656060074,
      "mtimeMs": 1791659660076.716,
      "bytes": 887,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "f4fa4b2ca4bb38652cb41314c0667d25c082d61f9d29224a019265290ccf0380",
      "interaction": "interactive"
    }
  ]
}
Evidence: Human scan output main vs branch
repo · 1 worktree(s) · since all

HOST   HARNESS  SCANNED  MATCHED  SELF  CACHED  NOTE
local  pi       3        2        0     0

2 transcript(s) associated with this repo · tier1 2 (exact) · tier1.5 0 (sibling clone) · tier2 0 (remote) · tier3 0 (best-effort) · interactive 2 · non-interactive 0

HOST   HARNESS  SESSION       KIND         WHEN   SIZE  TIER  HOW
local  pi       pi-model-onl  interactive  today  1KB   t1    cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo
local  pi       pi-a          interactive  today  1KB   t1    cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo
Evidence: Cache parity after upgrade
{
  "mainSecond": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 3,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "branchAfterMain": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 3,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  }
}
Evidence: includeOmp:true scan --json (root/child/grandchild, shared observer)
{
  "repo": "repo",
  "scope": "project",
  "perHarness": {
    "pi": {
      "scanned": 6,
      "matched": 5,
      "cached": 0,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "perHost": [],
  "mix": {
    "interactive": 3,
    "nonInteractive": 2,
    "total": 5
  },
  "transcripts": [
    {
      "harness": "pi",
      "id": "pi-omp-grandchild",
      "nativeId": "omp-grandchild",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.omp/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-03-00.000Z_omp-root/Explore/Explore.Grand.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656420078,
      "mtimeMs": 1791659660078.6677,
      "bytes": 992,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {
        "source": "subagent"
      },
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "ac7cdc85dc5aa5efa20f4de1459b9ff0b333f56036303e8ce08b13c934f802fc",
      "parentSessionId": "omp-root",
      "corroborationIdentity": "0cabcc7dcc2a037e8636c6e1631de6903dae11b4865aa0c41265e399069b324c",
      "corroborationNativeId": "omp-root",
      "corroborationStartedAt": 1791656300078,
      "interaction": "non-interactive"
    },
    {
      "harness": "pi",
      "id": "pi-omp-child",
      "nativeId": "omp-child",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.omp/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-03-00.000Z_omp-root/Explore.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656360078,
      "mtimeMs": 1791659660078.5278,
      "bytes": 947,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {
        "source": "subagent"
      },
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "6d176acbbcfa3540ae4d5afa00f31165621ee82b6c49e7c87406aae588e339bc",
      "parentSessionId": "omp-root",
      "corroborationIdentity": "0cabcc7dcc2a037e8636c6e1631de6903dae11b4865aa0c41265e399069b324c",
      "corroborationNativeId": "omp-root",
      "corroborationStartedAt": 1791656300078,
      "interaction": "non-interactive"
    },
    {
      "harness": "pi",
      "id": "pi-omp-root",
      "nativeId": "omp-root",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.omp/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-03-00.000Z_omp-root.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656300078,
      "mtimeMs": 1791659660078.342,
      "bytes": 1002,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "0cabcc7dcc2a037e8636c6e1631de6903dae11b4865aa0c41265e399069b324c",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-model-only",
      "nativeId": "pi-model-only",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-01-00.000Z_pi-model-only.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656120076,
      "mtimeMs": 1791659660077.2983,
      "bytes": 977,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "bd82b55a8bcf2cbca5a3afea31ae95a7af2aad1f5655747bb00ad5eb38ac9d37",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-a",
      "nativeId": "pi-a",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-00-00.000Z_pi-a.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656060074,
      "mtimeMs": 1791659660076.716,
      "bytes": 887,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "f4fa4b2ca4bb38652cb41314c0667d25c082d61f9d29224a019265290ccf0380",
      "interaction": "interactive"
    }
  ]
}
Evidence: includeOmp toggle cache transitions
{
  "off1": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 0,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "on1": {
    "pi": {
      "scanned": 6,
      "matched": 5,
      "cached": 3,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "on2": {
    "pi": {
      "scanned": 6,
      "matched": 5,
      "cached": 6,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "off2": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 3,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  }
}
Evidence: Alternate PI_CODING_AGENT_DIR scan, main vs branch
{
  "repo": "repo",
  "scope": "project",
  "perHarness": {
    "pi": {
      "scanned": 5,
      "matched": 3,
      "cached": 0,
      "skipped": 2,
      "self": 0,
      "error": null
    }
  },
  "perHost": [],
  "mix": {
    "interactive": 3,
    "nonInteractive": 0,
    "total": 3
  },
  "transcripts": [
    {
      "harness": "pi",
      "id": "pi-alt-plain",
      "nativeId": "alt-plain",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/alt-omp/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-04-00.000Z_alt-plain.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656540081,
      "mtimeMs": 1791659660081.8313,
      "bytes": 874,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "6c2aa49e5fc330733155e9b1c68b0db7c97cd9cec709e262cf3038d8dbe6d645",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-model-only",
      "nativeId": "pi-model-only",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-01-00.000Z_pi-model-only.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656120076,
      "mtimeMs": 1791659660077.2983,
      "bytes": 977,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "bd82b55a8bcf2cbca5a3afea31ae95a7af2aad1f5655747bb00ad5eb38ac9d37",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-a",
      "nativeId": "pi-a",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-00-00.000Z_pi-a.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656060074,
      "mtimeMs": 1791659660076.716,
      "bytes": 887,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "f4fa4b2ca4bb38652cb41314c0667d25c082d61f9d29224a019265290ccf0380",
      "interaction": "interactive"
    }
  ]
}
Evidence: Invalid includeOmp refusal
exit=1
error config.discovery.includeOmp must be a boolean
  • Evidence: SSH host scan includeOmp on (local file: ~/.no-mistakes/evidence/01M4KHZCZW6D1F6D0NQV1HDG14/s8-branch-ssh-on.json)
Evidence: SSH host scan includeOmp off, branch vs main
{
  "repo": "repo",
  "scope": "project",
  "perHarness": {
    "pi": {
      "scanned": 3,
      "matched": 2,
      "cached": 0,
      "skipped": 1,
      "self": 0,
      "error": null
    }
  },
  "perHost": [
    {
      "host": "mac-home",
      "node": "v26.4.0",
      "platform": "darwin",
      "hostname": "Mac-Studio.local",
      "harnesses": {
        "pi": {
          "scanned": 1,
          "classified": 1,
          "self": 0,
          "error": null
        }
      },
      "scanned": 1,
      "matched": 1,
      "self": 0,
      "skipped": 0,
      "duplicates": 0,
      "warnings": [],
      "error": null
    }
  ],
  "mix": {
    "interactive": 3,
    "nonInteractive": 0,
    "total": 3
  },
  "transcripts": [
    {
      "harness": "pi",
      "id": "pi-r-pi",
      "nativeId": "r-pi",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/remote-home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-remote-home-code-demo--/2026-10-10T00-07-00.000Z_r-pi.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/remote-home/code/demo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656846141,
      "mtimeMs": 1791659666141.7395,
      "bytes": 846,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1.5,
        "confidence": "remote-clone",
        "reason": "cwd is in clone /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/remote-home/code/demo on mac-home",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": "mac-home",
      "identity": "f3414b738b2f7fcb581556661f6c99a5709bdebc0004c6cd0849d3f5ae79c2e6",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-model-only",
      "nativeId": "pi-model-only",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-01-00.000Z_pi-model-only.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656120076,
      "mtimeMs": 1791659660077.2983,
      "bytes": 977,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "bd82b55a8bcf2cbca5a3afea31ae95a7af2aad1f5655747bb00ad5eb38ac9d37",
      "interaction": "interactive"
    },
    {
      "harness": "pi",
      "id": "pi-pi-a",
      "nativeId": "pi-a",
      "path": "/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/home/.pi/agent/sessions/--private-var-folders-z8-7g01lsx95d77m5k2z1qzsngr0000gn-T-backpass-omp-live.XJBv7zxJv9-repo--/2026-10-10T00-00-00.000Z_pi-a.jsonl",
      "cwd": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "gitBranch": null,
      "title": null,
      "model": null,
      "startedAt": 1791656060074,
      "mtimeMs": 1791659660076.716,
      "bytes": 887,
      "contentSignature": null,
      "experimental": false,
      "association": {
        "tier": 1,
        "confidence": "exact",
        "reason": "cwd is worktree /private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
        "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo"
      },
      "extra": {},
      "interactionSignals": {},
      "project": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "projectRoot": "/private/var/folders/z8/7g01lsx95d77m5k2z1qzsngr0000gn/T/backpass-omp-live.XJBv7zxJv9/repo",
      "host": null,
      "identity": "f4fa4b2ca4bb38652cb41314c0667d25c082d61f9d29224a019265290ccf0380",
      "interaction": "interactive"
    }
  ]
}
Evidence: Analyze model-field capture (main vs branch)
node:1: command not found: _nvm_lazy_load
== mainPlain: exit=0
{
  "memoryFile": "AGENTS.md",
  "transcripts": 2,
  "summary": {
    "total": 2,
    "cached": 0,
    "analyzed": 2,
    "skipped": 0,
    "failed": 0,
    "usage": [
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      }
    ],
    "staleMemoryHash": 0,
    "quotesNotInTrace": 0
  }
}

  2026-10-10T00-00-00.000Z_pi-a.jsonl: gpt-5.6-sol
  2026-10-10T00-01-00.000Z_pi-model-only.jsonl: (no model line)
== branchPlain: exit=0
{
  "memoryFile": "AGENTS.md",
  "transcripts": 2,
  "summary": {
    "total": 2,
    "cached": 0,
    "analyzed": 2,
    "skipped": 0,
    "failed": 0,
    "usage": [
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      }
    ],
    "staleMemoryHash": 0,
    "quotesNotInTrace": 0
  }
}

  2026-10-10T00-00-00.000Z_pi-a.jsonl: gpt-5.6-sol
  2026-10-10T00-01-00.000Z_pi-model-only.jsonl: (no model line)
== branchOmp: exit=0
{
  "memoryFile": "AGENTS.md",
  "transcripts": 5,
  "summary": {
    "total": 5,
    "cached": 0,
    "analyzed": 5,
    "skipped": 0,
    "failed": 0,
    "usage": [
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      },
      {
        "agent": "pi",
        "usage": null
      }
    ],
    "staleMemoryHash": 0,
    "quotesNotInTrace": 0
  }
}

  2026-10-10T00-00-00.000Z_pi-a.jsonl: gpt-5.6-sol
  2026-10-10T00-01-00.000Z_pi-model-only.jsonl: (no model line)
  2026-10-10T00-03-00.000Z_omp-root.jsonl: cursor/composer-2.5
  Explore.Grand.jsonl: (no model line)
  Explore.jsonl: (no model line)
  • Evidence: Gap ledger: main-era vs main rerun vs branch rerun (local file: ~/.no-mistakes/evidence/01M4KHZCZW6D1F6D0NQV1HDG14/s10-ledger-branch-rerun.json)
  • Evidence: Observer counting summary (local file: ~/.no-mistakes/evidence/01M4KHZCZW6D1F6D0NQV1HDG14/s11-observer-counting.json)
  • Evidence: Targeted test run (109/109) (local file: ~/.no-mistakes/evidence/01M4KHZCZW6D1F6D0NQV1HDG14/targeted-tests.txt)
  • Evidence: Live driver scripts (local file: ~/.no-mistakes/evidence/01M4KHZCZW6D1F6D0NQV1HDG14/drive.mjs)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 warnings
  • 🚨 src/gap-ledger.js:219 - Default (non-OMP) Pi sessions no longer replace their own main-era ledger sighting. destinationAcceptsObservation only accepts a provenance-free prior when transcript.harness !== "pi". Every ledger observation written on main has no sourceSessionId. Concrete path, includeOmp off: day 0 on main, plain Pi session S records gap G at sessions[S.identity] with firstObservedAt=day0. After upgrade, on day 50 S is re-analyzed (for example after an apply changes the memory hash) and reports G again. Line 219 rejects the identity slot, line ~226 rejects it again, and recordGapObservations writes a new key JSON.stringify([S,S]) with firstObservedAt=day50 and no priors. normalizeGapLedgerSessions (line 427, ordinaryNative also excludes pi) never migrates the old record. Result: the day-0 key retires at day 90, but the new key keeps S corroborating G until day 140. This breaks the documented rule that re-analysis keeps the first-seen time (the 'does not restart its expiry clock' test only covers claude). The new key also drops the old record's phrasings and coveredBySkill citation, and the ledger gains duplicate keys. Sibling sites with the same Pi exclusion: src/gap-ledger.js:235 (takePriorObservations provenance backfill) and src/gap-ledger.js:427 (normalizeGapLedgerSessions ordinaryNative). Remedy: replace harness !== "pi" at all three sites with a signal that excludes only OMP descendants, for example interactionSignals?.source !== "subagent", on top of the existing !parentSessionId. Add a Pi variant of the expiry-clock regression.
  • 🚨 src/proposal.js:650 - Intent conformance: the intent says routing is 'reverted to main's route.ownerOf over cluster sessions; that routing, the unattributed-to-root rule and their tests belong to the separate upstream PR 205 ... do not re-add them.' The diff adds rootOwnsGap(sightings, routing.rootOwnedGaps ?? summary?.rootOwnedGaps). The fallback was added in 0e7fd41 and is not in main or in PR 205. In production the root pass (rootRouting in src/commands/propose.js:188) carries no rootOwnedGaps, so it now uses the root summary's list. This changes routing for every harness whenever nested memory files exist, with or without OMP. Example: a root cluster has sessions A and B (worked under apps/api) and C (apps/web), so it is root-owned. The model's root edit cites only the quotes from A and B. Main computes ownerOf([A,B]) = apps/api/AGENTS.md and refuses the edit in the root pass. This head treats it as root-owned and accepts it in AGENTS.md. Decide whether to drop ?? summary?.rootOwnedGaps (main behavior) or keep it, which goes beyond the stated scope.
  • ⚠️ src/discovery/adapters/pi.js:236 - Intent conformance: the intent says 'the default Pi store, PI_CODING_AGENT_DIR ... and bridge dirs must list and read exactly as on main.' read() now uses entry.modelId || entry.model || model for every Pi store, not only the OMP store. A plain Pi model_change record that has model but no modelId now reports a model, where main ignored it. Pi writes modelId, so the practical effect is likely nil. It is still OMP read logic applied outside the opt-in store. Decide whether to accept this or gate the fallback to OMP transcripts.
  • ⚠️ src/discovery/adapters/pi.js:38 - Simplification: the new generic cacheVersion mechanism (pi.js:38, checked at src/discovery/index.js:398, stored at :409, documented at :43) is not needed by the intent. The cacheDependency marker already forces reclassification in both directions: an OMP candidate yields "[]" or ancestor fingerprints against a cached undefined, and a plain candidate yields undefined against a cached OMP marker. Plain Pi classification is unchanged from main. So cacheVersion = 5 only invalidates every plain Pi cache entry once after upgrade. On that first run scan --json reports perHarness.pi.cached: 0 where main reports N, which goes against the 'identical to main' criterion for that run. Remedy: remove cacheVersion and its check, store and doc lines.
  • ⚠️ src/fold.js:444 - Simplification: some fields are left over from the removed native sightingIds ownership routing and nothing reads them. In clusterGapObservations, cluster items now carry sightingQuotes, sightingIds and unattributedSightings (fold.js:444-469). No code reads them after clustering, because routing uses only item.sessionId/quote and route.ownerOf over cluster.sessions. The ledger also persists sightingQuotes (src/gap-ledger.js:266 sightingQuotesOf, :394, :488, :585, :652), and no logic consumes it. No intent requirement needs these fields, since the intent removes that routing. Remedy: remove the cluster-item copies and the ledger sightingQuotes field. Keep the ledger sightingIds/unattributedSightings, which resolveGapObservationObserver uses.
  • ℹ️ src/fold.js:356 - summary.sourceObservers (fold.js:356) and summary.sourceSessions (fold.js:373) use the same sourceIdentitiesOf(...) expression with identical inputs. The ?? summary?.sourceSessions?.[label] fallback in src/proposal.js:647 is therefore redundant. Compute the map once and reuse it.
  • ℹ️ test/adapters.test.js:243 - The test 'pi discovery checks a missing parent path once per scan' always passes. It classifies plain (non-OMP) candidates, and since this change those never look up a parent, so parentProbes is always 0. Point it at OMP subagent candidates (omp: true, subagent: true) that share a missing parent, so it exercises the scanContext cache. Otherwise remove it.

🔧 Fix applied.
2 warnings still open:

  • ⚠️ src/acpx.js:909 - Simplification: recoverPiUsage now creates a scan context with piStore.createScanContext() and passes it to classify. The context is never used. piStore.enumerate() is called with no config, so includeOmp is unset and every candidate has omp: false and subagent: false. classify only reads scanContext in the subagent ancestor loop, which these candidates never enter. No intent requirement needs this. Pi usage recovery is not OMP discovery, and intent (1) says plain Pi stores read exactly as on main. Recommend reverting this hunk so the code matches main: piStore.classify(candidate).
  • ⚠️ .gitignore:7 - Simplification: commit 4809bae adds graft/.cache/ to .gitignore. This ignores a local Graft tool cache that has nothing to do with OMP discovery, the includeOmp opt-in, routing, or scan --json parity. No intent requirement needs it, and it would ship in upstream PR 151 as an unrelated change. Recommend removing the line from this PR. A personal ignore can live in .git/info/exclude.

🔧 Fix applied.
3 issues (2 warnings, 1 info) still open:

  • ⚠️ src/acpx.js:909 - Simplification: recoverPiUsage now creates a scan context with piStore.createScanContext() and passes it to classify. The context is never used. piStore.enumerate() is called with no config, so includeOmp is unset and every candidate has omp: false and subagent: false. classify only reads scanContext in the subagent ancestor loop, which these candidates never enter. No intent requirement needs this. Pi usage recovery is not OMP discovery, and intent (1) says plain Pi stores read exactly as on main. Recommend reverting this hunk so the code matches main: piStore.classify(candidate).
  • ⚠️ .gitignore:7 - Simplification: commit 4809bae adds graft/.cache/ to .gitignore. This ignores a local Graft tool cache that has nothing to do with OMP discovery, the includeOmp opt-in, routing, or scan --json parity. No intent requirement needs it, and it would ship in upstream PR 151 as an unrelated change. Recommend removing the line from this PR. A personal ignore can live in .git/info/exclude.
  • ℹ️ src/gap-ledger.js:77 - Simplification: the gapSource hunk is a leftover no-op restructure. It adds local startedAt and sourceId variables, and the output is the same as main's two-line body. No intent requirement needs this hunk, and it adds noise to the upstream PR diff. Revert gapSource to main's body.

🔧 Fix applied.
2 warnings still open:

  • ⚠️ src/acpx.js:909 - Simplification: recoverPiUsage now creates a scan context with piStore.createScanContext() and passes it to classify. The context is never used. piStore.enumerate() is called with no config, so includeOmp is unset and every candidate has omp: false and subagent: false. classify only reads scanContext in the subagent ancestor loop, which these candidates never enter. No intent requirement needs this. Pi usage recovery is not OMP discovery, and intent (1) says plain Pi stores read exactly as on main. Recommend reverting this hunk so the code matches main: piStore.classify(candidate).
  • ⚠️ .gitignore:7 - Simplification: commit 4809bae adds graft/.cache/ to .gitignore. This ignores a local Graft tool cache that has nothing to do with OMP discovery, the includeOmp opt-in, routing, or scan --json parity. No intent requirement needs it, and it would ship in upstream PR 151 as an unrelated change. Recommend removing the line from this PR. A personal ignore can live in .git/info/exclude.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 13 of 13 scenarios driven live against the product
Scenario Result Live Evidence
Plain Pi store with OMP store present and includeOmp unset: scan --json and human scan output are byte-identical to main, with no corroboration*/parentSession* fields ✅ pass live drive.mjs S1; s1-main-scan.json == s1-branch-scan.json; s1-*-scan.txt
Adversarial: a nested session dir and a title-led file inside the plain ~/.pi store are ignored, as on main, even with includeOmp on ✅ pass live drive.mjs S1/S3 (pi-nested-child, pi-titled absent)
Upgrade: a scan cache written by main is reused by the branch (perHarness.pi.cached equal, output identical) ✅ pass live drive.mjs S2; s2-cache-parity.json
includeOmp:true finds the OMP root, child and grandchild but not depth-3 files. Subagents are non-interactive and share the root's corroboration identity ✅ pass live drive.mjs S3; s3-branch-includeOmp-scan.json
Toggling includeOmp off→on→off with a warm scan cache reclassifies correctly and the cached on-run matches the fresh run ✅ pass live drive.mjs S4; s4-toggle.json
Adversarial: PI_CODING_AGENT_DIR at a different OMP-style dir gets no nested walk and no title parsing, with includeOmp off or on. With it off, output is byte-identical to main ✅ pass live drive.mjs S5; s5-main-alt.json == s5-branch-alt.json
PI_CODING_AGENT_DIR = ~/.omp/agent: with includeOmp on, it merges into the OMP store with no duplicates. With it off, output is byte-identical to main ✅ pass live drive.mjs S6
Adversarial: a non-boolean discovery.includeOmp is refused by name ✅ pass live drive.mjs S7; s7-invalid-config.txt (exit 1, 'config.discovery.includeOmp must be a boolean')
SSH host: with includeOmp off, the remote OMP store is not read and output is byte-identical to main. With it on, the remote OMP root and child are found and linked to one observer ✅ pass live drive.mjs S8 (fake ssh running real probe); s8-*.json
Adversarial: during analyze, a plain Pi model_change that has only model reports no model, as on main. The OMP title-led root reports its model ✅ pass live drive-analyze.mjs; drive-analyze-stdout.txt / s9-analyze-model.json
Upgrade: a gap ledger written by main for plain Pi sessions keeps the same session slots and firstObservedAt, with no duplicate sightings, when the branch re-reports it ✅ pass live drive-ledger.mjs; s10-ledger-main-era.json, s10-ledger-main-rerun.json, s10-ledger-branch-rerun.json
Adversarial: an OMP root plus its subagent quoting the same gap counts as one observer and is dropped below minGapEvidence=2. Two independent sessions count as two and stay eligible ✅ pass live drive-observers.mjs; s11-observer-counting.json
Nested memory routing still uses main's route.ownerOf over cluster sessions. Each lesson lands in the file that owns it, with no root fallback re-added ✅ pass live test/nested-cli.test.js (real CLI + fake acpx) in targeted-tests.txt, 109/109 pass
  • node drive.mjs <tmp> <worktree> <evidence>: real backpass scan --harness pi --since all [--json] on the branch and on a git archive 0268201c main snapshot, against a fake HOME (plain Pi store, OMP store, alternate OMP-shaped PI_CODING_AGENT_DIR, fake-ssh remote home); 27/27 checks passed
  • node drive-analyze.mjs: real backpass analyze --analysis-agent pi with a fake acpx that records the model: line from the trace prompt; main vs branch, includeOmp off and on
  • node drive-ledger.mjs: main analyze+propose writes gap-ledger.json; then branch analyze --force+propose re-reports on that ledger. Compared with a second main run
  • node drive-observers.mjs: branch analyze+propose --min-gap-evidence 2 with includeOmp on; gap quoted by OMP root+child vs by OMP root+plain Pi session
  • TMPDIR=$(getconf DARWIN_USER_TEMP_DIR) node --import ./test/helpers/hermetic-config.js --test test/nested-cli.test.js test/nested.test.js test/adapters.test.js test/remote-discovery.test.js (109/109 pass; nested-cli drives the real CLI for nested routing)
⚠️ **Document** - 1 info
  • ℹ️ AGENTS.md:32 - AGENTS.md still says edits need minGapEvidence distinct sessions and that the ledger holds one sighting per (gap, transcript). The code now counts distinct corroborating observers, and linked OMP subagents share one observer. For plain Pi and all other harnesses an observer equals a session, so the text stays true there. I did not edit it because the recorded intent keeps AGENTS.md untouched in this PR. README.md and the src/gap-ledger.js and src/fold.js headers already state the observer rule.
✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium impact] Adds opt-in discovery of Oh My Pi sessions with family-aware evidence tracking.

The PR does not appear safe to merge until nested-memory placement uses the cited transcripts' work-path attribution.

Reviews (7) · Last reviewed commit: "no-mistakes(review): Restore main's gapS..." · Reviewed by Greptile

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Reviewed head 09b9e1651acdfc2e10e872811cd31f4bbd518c47 (diff + fixture + live evidence in body) against VISION.md on main. This is the live help path over sibling #150 (same author/feature; #151 is the clean-history successor without .ignore / /graft/ artifacts; author asked to leave #150 unchanged).

Diff (high level): Pi adapter default scan adds ~/.omp/agent/sessions/; title-line session header; nested subagent depth-2; path-based root parent linking; shared corroborationIdentity / native id / start through analyze→fold→gap-ledger (including normalizeGapLedgerSessions); OMP subagents forced non-interactive; scan-cache version + ancestor dependency; README/AGENTS docs. Medium risk surface is durable identity/ledger key migration — tested and gated, but always-on.

VISION per-rule

  • Evidence is the only currency — aligns (real OMP JSONL; parent+subagent share one corroboration session so one tree cannot clear the two-session bar alone).
  • The human owns the weights — aligns (discovery/fold identity only; no write-path / review-gate change).
  • Nothing the model says is taken on faith — aligns (pinned omp-session.jsonl + adapter/ledger/fold/remote tests; not README-only).
  • The budget is the constraint — n/a (discovery/identity).
  • It reads what you already have and owns nothing — aligns (local OMP store; fail-soft; more harnesses welcome; path-based parent link prefers accuracy over loose cwd).
  • Failure is loud and named — aligns (non-session heads still null; ambiguous legacy ledger ids do not migrate).
  • Scope — aligns (adapter + corroboration identity; not a writer/provider).

contract-class: new-default — unconfigured scan gains a new always-on store root, and unconfigured fold/ledger behavior changes how related files count toward the two-session bar / durable keys. Same decision class as landing default OMP discovery (overlap with open #129). Not restore just because it fixes "couldn't see OMP"; not opt-in (no config flag).

Security: clean. Local read-only discovery; fs.writeFileSync / process.env only in tests; no secrets, egress, or workflow-file changes.

CI: fork workflows approved. Required checks green on this HEAD — CI ubuntu+macos 36060341084, Guard 36060341386, no-mistakes 36060341142 (attestation matches 09b9e165). Greptile pass — not a gate. Mergeable CLEAN on current tip; branch is 1 behind main (7bd9150 / #153 redact) — not rebasing (not auto-merge-eligible).

Hold: waiting on captain, not on the author. Auto-merge is blocked solely by the new-default decision. Flagging for Firstmate/captain merge-or-not. Overlap: #129 (mdc2122, narrower adapter-only) stays open until captain lands one; #150 stamped superseded by this PR.

Comment on lines +65 to +67
if (config?.discovery?.includeOmp === true) {
specs.push({ path: home(".omp", "agent", "sessions"), direct: false, nested: true });
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 OMP sessions skipped by default

An ordinary Pi scan does not visit ~/.omp/agent/sessions/ because discovery.includeOmp defaults to false. Users with OMP transcripts must discover and enable that setting before their sessions appear. This conflicts with the stated intent to discover the OMP store through the Pi adapter.

Context Used: If there is a VISION.md file at the root of the repo, the PR must not conflict / diverge / drift from it. If the PR description has an "Intent" section, respect that as the accepted user intent. - Do make comments if anything in the implementation ... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread AGENTS.md
- **backpass must never analyze itself**: keep `SELF_SESSION_SENTINEL` (`src/prompts.js`) at the start of every
model-facing prompt (`src/discovery/self.js` drops those sessions).
- **Gap evidence**: one ledger sighting per (gap, transcript) (`src/gap-ledger.js`); record before pruning;
never surface uncorroborated singletons; gap identity is judged by the consolidation call, with bigram

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 OMP guidance removed

The replacement guidance omits both ~/.omp/agent/sessions/ and the fact that parent and nested subagent files share the root corroboration identity. The stated intent requires both to be documented in AGENTS.md as well as README.md. Maintainers relying on this file lose that discovery and evidence-counting guidance, so this repository requirement must be met before merging.

Context Used: If there is a VISION.md file at the root of the repo, the PR must not conflict / diverge / drift from it. If the PR description has an "Intent" section, respect that as the accepted user intent. - Do make comments if anything in the implementation ... (source)

mdc2122 and others added 10 commits October 1, 2026 21:44
omp (Oh My Pi) writes the same version:3 JSONL session format as pi under
~/.omp/agent/sessions/, but prepends a fixed-width {type:"title"} record so
the {type:"session", cwd} entry is line 2, and nests subagent transcripts
one level deeper at <escaped-cwd>/<session-id>/<Name>.jsonl.

- Add ~/.omp/agent/sessions as a default nested store root (omp honors
  PI_CODING_AGENT_DIR, so an env redirect still dedupes against it).
- classify() scans the first head lines for the session entry instead of
  requiring it on line 1.
- enumerate() descends one extra level inside nested roots.
- read() accepts model_change.model as a fallback for modelId.
@kunchenguid
kunchenguid force-pushed the fm/backpass-omp-adapter-20-clean-pr branch from 5287c0d to 8afb786 Compare October 2, 2026 04:44
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Re-triaged head 8afb78628143fb4db1b44ef72364cfe40cff4e85 after newer activity (rebase onto main + discovery.includeOmp opt-in). Prior stamp was waiting-on-captain / new-default at 09b9e165.

Diff (high level, vs main 0268201c): Pi adapter can scan ~/.omp/agent/sessions/ only when discovery.includeOmp === true (default false); title-line session header; nested subagent depth-2 + path-based root parent linking; shared corroborationIdentity / native id / start through analyze→fold→gap-ledger (incl. normalizeGapLedgerSessions); OMP subagents forced non-interactive; scan-cache version + ancestor dependency; README + config docs. Unconfigured runs without nested parented files keep corroborationIdentity ≡ identity.

VISION per-rule

  • Evidence is the only currency — aligns (real OMP JSONL fixture; parent+subagent share one corroboration session so one tree cannot clear the two-session bar alone).
  • The human owns the weights — aligns (discovery/fold identity only; no write-path / review-gate change).
  • Nothing the model says is taken on faith — aligns (pinned omp-session.jsonl + adapter/ledger/fold/remote/config tests; not README-only).
  • The budget is the constraint — n/a (discovery/identity).
  • It reads what you already have and owns nothing — aligns (local OMP store fail-soft; more harnesses welcome; OMP default store gated; path-based parent link prefers accuracy).
  • Failure is loud and named — aligns (non-boolean includeOmp refused; non-session heads null; ambiguous legacy ledger ids do not migrate).
  • Scope — aligns (adapter + corroboration identity; not a writer/provider).

contract-class: opt-in — discovery.includeOmp defaults false; unconfigured scan does not open ~/.omp. Supporting corroboration/ledger plumbing is inert for non-parented sessions (falls back to existing identity). Not restore (OMP was never a specified default path). Prior new-default hold is lifted by the opt-in commit.

Security: clean. Local read-only discovery; no secrets/egress/workflow edits in the three-dot delta.

CI help done this pass

Author blocker (blocking): no-mistakes attestation still binds to 09b9e165; current head is 8afb78628143fb4db1b44ef72364cfe40cff4e85. Re-run git push no-mistakes so the PR body attestation matches this head (https://github.com/kunchenguid/backpass/actions/runs/36965877704). Cannot merge or re-flag captain while no-mistakes is red.

Notes: Sibling #150 remains the dirty-history twin — leave it; #151 stays the live path. #129 closed-stale earlier. Intent mentioned AGENTS.md OMP docs; tip documents the opt-in in README only (AGENTS.md unchanged vs main after the always-loaded trim) — not a merge blocker once attestation is current.

@MrGTV-love please re-attest on 8afb78628143fb4db1b44ef72364cfe40cff4e85. After no-mistakes is green we will re-stamp (opt-in is not auto-merged by cron; captain merge word still needed then).

@MrGTV-love MrGTV-love changed the title feat(discovery): discover OMP session transcripts in the pi adapter feat(discovery): add opt-in OMP transcript collection Oct 6, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Re-triaged head 188c543ff95f5df98dd67e7fdb3a3abae786b442 after the seven new no-mistakes commits (review, document, lint). It's 17 ahead and 0 behind main 0268201c. The prior stamp was waiting-author at 8afb786 because the attestation was stale. That's cleared now.

Delta since 8afb786 (src): observer-aware countSources in proposal.js (evidence counts distinct corroborating observers when sourceObservers is present); nested-routing owner falls back to root when any evidence item lacks a native session; the fold/gap-ledger reconcile copied and orphaned families across hosts and keep validated stored interaction stamps; Pi adapter cacheVersion 4→5 and depth-based source: "subagent" on enumerated nested files; README updates. No new runtime deps, no workflow, package, or generated-file edits. A security scan of the src delta found no exec, network, eval, env, or write additions.

VISION per-rule

  • Evidence is the only currency: aligns. Counting distinct observers instead of labels keeps one OMP tree from clearing the two-session bar alone, and one session still never counts twice.
  • The human owns the weights: aligns. Nothing changes in the write path or per-edit review.
  • Nothing the model says is taken on faith: aligns. Counts are still measured from the normalized quotes, and the new behavior is pinned by fold, ledger, proposal, nested, and remote tests.
  • The budget is the constraint: n/a.
  • It reads what you already have and owns nothing: aligns. OMP stays gated behind discovery.includeOmp (default false, boolean-only, verified in src/config.js at this head). Discovery is local or over the user's own SSH and stays fail-soft.
  • Failure is loud and named: aligns. Ambiguous legacy ledger provenance stays unknown rather than being invented.
  • Scope: aligns. This is the adapter plus corroboration identity, not a writer or provider.

contract-class: opt-in, with one caveat to weigh at merge time. OMP collection is off unless configured. One change does touch the default path: in buildProposal, nested routing now sends an edit to the root file when any of its evidence lacks a native session. Before, that evidence was just left out of ownerOf. That's an accuracy-first fallback, but it applies to unconfigured runs too.

CI this pass: I approved the fork workflows on this head. Required checks:

  • no-mistakes: green, attestation matches this head.

  • Guard: green (run 37532497363).

  • CI ubuntu: green.

  • CI macOS: red (run 37532497259). 927 pass, 2 fail, both new in this delta:

    • test/gap-ledger.test.js:826 "native aliases migrate while root-only observations keep unknown provenance"
    • test/gap-ledger.test.js:994 "ordinary non-OMP selected legacy observations keep their native routing identity"

    Both fail with TypeError: Cannot read properties of undefined (reading 'sessions'), meaning summary.gaps[0] is missing. Hunch to verify, not a diagnosis: both tests set cwd: h.root under the macOS tmpdir, where /var is a symlink to /private/var. A path comparison in workedPaths/routingFor or the fold may be mixing realpath and non-realpath forms, so the gap gets routed or dropped away from MEMORY_PATH. Ubuntu doesn't have the symlink, which would explain why it passes there.

Greptile is red but isn't a gate here, so I ignored it.

Author blocker: @MrGTV-love, please fix the macOS-only failures at the root (not by skipping on darwin) and re-attest via no-mistakes on the new head. Since your pipeline is actively driving this branch, I'm not pushing to it. Once every required check is green on one head, we'll re-stamp and take it to the captain for the merge decision. #150 stays the superseded twin.

…alpath-normalizing the temporary root once in harness(), matching production checkoutRoots behavior. This shared correction covers all four sibling routing consumers and keeps State paths, transcript cwd, and checkout roots consistent across macOS symlinked temporary directories. Product code, evidence semantics, and assertions are unchanged. Re-traced the failing and ordinary paths before verification. Ran node --test test/gap-ledger.test.js with TMPDIR set to the value returned by getconf DARWIN_USER_TEMP_DIR: all 49 tests passed, including both reported failures and sibling routing regressions; zero failures or skips. No pipeline-control or publication actions were performed; current-head forge verification remains with the outer executor
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Re-triaged head 974855b59e7c4d8fa8eb89fda0c5f93c2cded895 after the new no-mistakes CI commit. It's 18 ahead and 0 behind main 0268201c.

Delta since 188c543: one line in test/gap-ledger.test.js. The test harness now realpaths its mkdtemp root. Main's src/nested.js already canonicalizes roots and work paths with realpathDeepest, and real runs resolve the repo root through fs.realpathSync in src/config.js, so the fixture was the thing out of shape on macOS (where /var links to /private/var), not the product. That reads as a root fix of the test shape, not a darwin skip. No src, workflow, package, or generated-file changes; no security concerns. I approved the fork workflows on this head.

VISION per-rule (unchanged from the last pass apart from the fix rule)

  • Evidence is the only currency: aligns. Distinct-observer counting keeps one OMP tree from clearing the two-session bar alone.
  • The human owns the weights: aligns. No write-path or per-edit review change.
  • Nothing the model says is taken on faith: aligns. Behavior is measured and pinned by fold, ledger, proposal, nested, and remote tests.
  • The budget is the constraint: n/a.
  • It reads what you already have and owns nothing: aligns. OMP stays behind discovery.includeOmp (default false, boolean-only, re-checked in src/config.js at this head).
  • Failure is loud and named: aligns. The macOS failure was fixed where the mismatch actually came from rather than skipped; ambiguous legacy provenance stays unknown.
  • Scope: aligns. Adapter plus corroboration identity only.

contract-class: opt-in, with one default-path caveat. OMP collection is off unless configured. But in buildProposal, nested routing now sends an edit to the root file when any of its evidence lacks a native session, and that applies to unconfigured runs too. It's an accuracy-first fallback, but it's a default-behavior change, so it goes to the captain rather than auto-merge.

CI on this head: all required checks are green, and the PR is CLEAN and mergeable.

  • no-mistakes: green, attestation names this head.
  • Guard generated files: green.
  • CI ubuntu and macOS: both green (run 37580528603).

Thanks @MrGTV-love, the author blocker is cleared. This is now waiting on the captain's merge decision. #150 stays the superseded twin.

@MrGTV-love

Copy link
Copy Markdown
Contributor Author

Update on head 974855b59e7c4d8fa8eb89fda0c5f93c2cded895: this PR is rebased onto current main and OMP collection is now opt-in.

  • Opt-in: OMP discovery is off unless discovery.includeOmp is true. The default is false and only booleans are accepted. With no config, scan does not read ~/.omp/agent/sessions/. The README documents the setting.
  • Rebase: the branch is linear on main (0268201c) with all earlier commits kept.
  • Tests: on/off cases are added. A test-only macOS fix is included: the ledger test harness now realpaths its temp root.
  • Checks: all 5 required checks are green on this head.

#150 is the older duplicate; I am closing it in favor of this PR.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Thanks for the status update, @MrGTV-love. The head is still 974855b59e7c4d8fa8eb89fda0c5f93c2cded895 (18 ahead, 0 behind main 0268201), all required checks are green, and it's CLEAN. #150 is now closed. Nothing has changed since the last triage pass, so the per-rule VISION verdict and the contract-class (opt-in, with the default-path caveat that buildProposal nested routing falls back to root on incomplete attribution) still stand. This is waiting on Kun's merge decision. Nothing more is needed from you right now.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Thanks so much for all the work here, @MrGTV-love, and for chasing down the macOS test fix. Kun had a look and would like to split this into two PRs so each one can be reviewed on its own:

  1. Keep feat(discovery): add opt-in OMP session discovery to the Pi adapter #151 as the pure opt-in OMP discovery: discovery.includeOmp, default false.
  2. Move the buildProposal nested-session routing change into its own PR: the part that falls back to the root memory file when attribution is incomplete. That one changes the default path for everyone, so it deserves a separate review.

Once both are up and green, we'll pick them back up. Thanks again!

…change

Keep this branch to opt-in OMP discovery: an edit whose evidence lacks a native
session is routed as on main (the unattributed evidence is left out of ownerOf),
instead of falling back to the root memory file. The fallback moves to its own PR.
@MrGTV-love MrGTV-love changed the title feat(discovery): add opt-in OMP transcript collection feat(discovery): add opt-in OMP sessions with family-aware evidence Oct 9, 2026
Comment thread src/proposal.js Resolved
@MrGTV-love

Copy link
Copy Markdown
Contributor Author

Split done as requested. #151 (head 9fe2424a) is now the pure opt-in OMP discovery (discovery.includeOmp, default false), without the root-fallback. The buildProposal nested-session routing change is in its own PR: #205

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Thanks for doing the split so fast, @MrGTV-love. Moving the buildProposal completeness check into #205 is exactly what Kun asked for, and #205 is now queued for his review. I approved the fork workflows on 9fe2424. Guard and no-mistakes are green, and CI is still running.

I re-read the tip against main 0268201 with discovery.includeOmp left at false. Two pieces still change the unconfigured run, so #151 isn't pure opt-in yet:

  1. Default Pi discovery now recurses. In src/discovery/adapters/pi.js, enumerate walks sessionFiles(dir, SUBAGENT_DEPTH) for every nested store. That includes the default ~/.pi/agent/sessions and PI_CODING_AGENT_DIR, not just ~/.omp. On main it lists only <escaped-cwd>/*.jsonl. With this tip, any deeper .jsonl under a plain Pi store is picked up and marked subagent, classify links it to an ancestor (parentSessionId), and classifyInteraction forces it to non-interactive. Could the deeper walk and the subagent and ancestor linkage apply only to the OMP store when includeOmp is on? If plain Pi really writes that layout too, please point to it and add a pinned fixture. Then it can be its own change.
  2. A fold-side version of the root fallback is still here. In src/fold.js, gapOwnerOf returns null (the root file) when any item in the cluster has unattributedSightings or no sightingIds. That is now used for cluster owners and representativeGapItems instead of route.ownerOf([...cluster.sessions]). It's the same idea Kun asked to move out: incomplete attribution goes to the root. It applies to ledger observations on the default path too, because ledgerGapObservations marks any observation without sourceSessionId as unattributed. Could this move into fix: keep incompletely attributed instructions in root memory #205 (or a follow-up there), with feat(discovery): add opt-in OMP session discovery to the Pi adapter #151 keeping main's routing? Or can you show that it can't be reached without OMP?

Once those are split or gated, please post a short live run of backpass scan --json with includeOmp unset against a plain Pi store, showing the same transcripts and interaction labels as main. Then we'll pick this back up.

VISION per-rule (tip vs main):

  • Purpose / owns the backward pass: aligns (more harness coverage for the same backward pass).
  • Evidence is the only currency: aligns for OMP (related transcripts collapse to one observer, so a subagent can't double-count). The fold-side root fallback is a separate routing decision (item 2).
  • The human owns the weights: aligns (no write-path change).
  • Nothing the model says is taken on faith: aligns (observer identity comes from headers and layout, not the model).
  • The budget is the constraint: aligns.
  • It reads what you already have and owns nothing: aligns (local stores only, OMP opt-in).
  • More harnesses must not destabilise working ones: does not align yet (item 1 changes discovery and interaction labels for existing Pi users without opting in).
  • Best-effort association stays opt-in: does not align yet (nested-layout parent linkage runs on the default Pi store).
  • Failure is loud and named: aligns.
  • Scope: aligns.

contract-class: new-default as the tip stands (default Pi enumeration, interaction labels, and fold routing change with includeOmp=false). It becomes opt-in once items 1 and 2 are gated or split out.

…uting to main

With includeOmp unset, plain Pi stores now list and read exactly as on main:
the two-level walk, subagent tagging, ancestor lookup, and title-header parsing
apply only to the ~/.omp store when discovery.includeOmp is on. scan --json
omits the observer fields unless a transcript shares an observer with a parent.

Fold routing goes back to main's route.ownerOf over cluster sessions; the
incomplete-attribution root fallback and its native-ownership tests move to the
separate routing change.
@MrGTV-love MrGTV-love changed the title feat(discovery): add opt-in OMP sessions with family-aware evidence feat(discovery): add opt-in OMP session discovery to the Pi adapter Oct 10, 2026
const entries = readJsonl(ref.path);
const events = [];
let model = null;
const omp = entries[0]?.type === "title";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Title-free OMP models disappear

The OMP classifier accepts a session record on the first line, but read() recognizes OMP model metadata only when the first record is title. For an accepted title-free OMP transcript whose model_change uses model rather than modelId, the model is silently reported as unknown, making its session metadata less useful.

@greptile-apps

greptile-apps Bot commented Oct 10, 2026

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P1 Nested additions route to root src/fold.js:282 ▶

    When OMP children provide evidence for an apps/api/ instruction, this call passes their shared root observer ID to nested-memory routing. Work-path attribution is stored under each child's native transcript ID, so routing finds no path for the observer and assigns the gap to the root file. The proposal gate uses the same observer IDs, so it refuses a valid API-file addition even when the cited children worked only under apps/api/.

@MrGTV-love

Copy link
Copy Markdown
Contributor Author

Both points are addressed at head e82fa5e7, and the live scan you asked for is below.

  1. Pi discovery no longer recurses by default. The two-level walk, subagent tagging, ancestor linkage, and title-header parsing now apply only to the ~/.omp store, and only when discovery.includeOmp is true. The default Pi store, PI_CODING_AGENT_DIR, and the bridge directories list and read one level deep as on main. A PI_CODING_AGENT_DIR that points at a different OMP directory gets no nested walk; one that points at the OMP store itself is treated as that store. Pi cacheVersion is gone, so existing Pi cache entries stay valid.
  2. The fold-side root fallback is out. gapOwnerOf is removed, along with the native-ownership routing and its tests. Fold uses main's route.ownerOf again. That routing belongs with fix: keep incompletely attributed instructions in root memory #205, which can rebase on this PR.

Two more default-path differences turned up in review and are fixed: proposal.js no longer falls back to summary.rootOwnedGaps, and plain Pi sessions keep their main-era ledger slots (with a regression test). The .gitignore and acpx.js hunks are gone too.

Live backpass scan --json --harness pi --since all, includeOmp unset. The store is a plain ~/.pi/agent/sessions/<cwd>/ with three top-level sessions plus a deeper sidA/Helper.jsonl. Output from main 0268201 and from this head is byte-identical:

perHarness.pi: scanned 3, matched 3, cached 0, skipped 0, self 0, error null
mix: interactive 3, nonInteractive 0, total 3
transcripts: aaaa1111, bbbb2222, sidA (all interactive; no observer fields)

The same store at the previous head 9fe2424a reported scanned 4, nonInteractive 1, and listed helper01 as a subagent. A warm second run matches main as well (cached 3). With {"discovery":{"includeOmp":true}} set, the OMP store is walked and its subagent file is classified non-interactive; a CLI test covers both settings.

pnpm run check passes (925 tests). Main's own fold, ledger, proposal, nested, interaction, adapters, config, and remote-discovery tests also pass against this head's src/.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate.

Thanks @MrGTV-love, this is exactly the split Kun asked for, and the before/after scan against main is really helpful. I approved the fork workflows on e82fa5e. Guard, no-mistakes, and CI on ubuntu and macOS are all green, and the branch is up to date with main 0268201.

I re-read the tip against main with discovery.includeOmp left at false:

  • Pi discovery reads one level deep with a line-1 header, as on main. The two-level walk, title header, subagent tagging, and ancestor linkage only happen for the ~/.omp store when includeOmp is true. cacheDependency returns nothing for non-OMP files, so existing scan-cache entries stay valid.
  • Fold routing is back to main's route.ownerOf, and proposal.js no longer falls back to rootOwnedGaps. Without OMP, every transcript's observer identity is its own identity, so harm, non-compliance, gap sessions, and source counts key the same way as on main.
  • Gap ledger: new observations also store sourceSessionId and sightingIds, and old entries get that provenance filled in when their session is selected again. That's added bookkeeping, not a change in what counts. One small corner differs from main: a legacy id-keyed observation is only merged into the identity key when the id is unambiguous. On main, an ambiguous one was merged at record time, even though it was already excluded from the fold. I'm treating that as a safety tightening, not a new default.

VISION per-rule (tip vs main):

  • Purpose / owns the backward pass: aligns (more harness coverage for the same backward pass).
  • Evidence is the only currency: aligns. OMP subagents fold into one observer with their parent, so related transcripts can't count twice toward the two-session bar.
  • The human owns the weights: aligns (no write-path change).
  • Nothing the model says is taken on faith: aligns (observer identity comes from session headers and layout, not the model).
  • The budget is the constraint: aligns (no effect on edit sizing).
  • It reads what you already have and owns nothing: aligns (local or SSH stores only; OMP is opt-in).
  • More harnesses must not destabilise working ones: aligns now (byte-identical live scan with includeOmp unset, and main's own tests pass against this src/).
  • Best-effort association stays opt-in: aligns (nested-layout parent linkage runs only on the opt-in OMP store).
  • Failure is loud and named: aligns (bad includeOmp type is a named config error; a missing OMP store is skipped like any other store).
  • Scope: aligns.

contract-class: opt-in. With includeOmp unset, discovery, interaction labels, and routing match main.

This is ready on our side. Kun wanted to look at #151 and #205 together, so it's queued for his merge decision now. Thanks again for the patience through the split!

@kunchenguid
kunchenguid merged commit 9a4a773 into kunchenguid:main Oct 12, 2026
5 of 6 checks passed
MrGTV-love added a commit to MrGTV-love/backpass that referenced this pull request Oct 20, 2026
* fix(acpx): report acpx budget kills as timeouts, not empty-output (kunchenguid#145)

Closes kunchenguid#143.

Names acpx --timeout blank-quiet kills as timedOut on execOneShot and sessionPrompt (0.9 budget floor); leaves genuine fast blanks as empty-output; leaves synthesis openSession/prompt() alone.

* chore(main): release backpass 0.1.27 (kunchenguid#149)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(redact): stop secret redaction from eating benign tool arguments (kunchenguid#153)

* fix(redact): anchor ASSIGNMENT identifier, bound value, skip numerics

Benign telemetry names that merely contain a secret word
(max_output_tokens, prompt_tokens, token_count) no longer match:
the identifier must now end with the secret word. The value stops
at whitespace, a quote, or a comma, so comma-joined JS-literal
argument lists survive, and purely numeric values are left alone.
Genuine assignments (API_KEY=, GITHUB_TOKEN:, password=) still redact.

* no-mistakes(review): restore secret-word breadth, drop numeric redaction bypass

* no-mistakes(review): redact unterminated-quote secrets, pin value-bound tests

* no-mistakes(document): format new redaction tests, docs already accurate

* no-mistakes(document): align redact comment with final value pattern

* fix(redact): keep quoted values on one line

An unterminated quote no longer redacts across newlines: the
closed-quote alternatives exclude \n, so a truncated assignment
falls through to the bounded unquoted form and following trace
text survives.

* no-mistakes(ci): ci-4 fixed in src/redact.js. Invariant: a fully closed quoted secret value must be redacted whole, even across newlines, without a stray later quote swallowing benign prose. Change: the ASSIGNMENT pattern now tries two newline-spanning quoted alternatives first — `"([^"]{8,})"` and `'([^']{8,})'`, each gated by a lookahead `(?=[ \t]*(?:$|[,;})\]]))` with the `m` flag — before the existing single-line quoted alternatives and the bare fallback. Both quote directions (double and single) got the same edit, and the replace callback's group chain became `dqMulti ?? sqMulti ?? dq ?? sq ?? bare` so every alternative still feeds the already-redacted guard. Traced: `PASSWORD="abcdefgh\nijklmnop"` (closing quote at end of line) now masks both lines. `DB_PASSWORD="hunter2hunter2secret\nRun tests and note "done"` still fails the lookahead (the only candidate closing quote is followed by `done"`), so it falls through to the bare form and masks only the first-line value, leaving the Run-tests line visible. The single-line quoted alternatives remain reachable (e.g. `password="secretvalue" trailing words`). Comma/unterminated-quote cases from earlier rounds unchanged. Test added in test/distill.test.js next to the existing unterminated-quote case. `pnpm run check` exits 0: 692 tests pass, lint, format:check and typecheck clean

---------

Co-authored-by: firstmate <firstmate@local>

* docs: trim always-loaded agent guidance (kunchenguid#156)

* docs(agents): trim AGENTS.md to every-session invariants with pointers

AGENTS.md is loaded into every agent session. Keep only hard invariants and
orientation as short lines pointing at the source file that owns the detail.

Before: 406 lines, 4663 words, 33498 bytes. After: 87 lines, 907 words, 7001 bytes.
No detail moved to docs: every removed explanation already lives in the named
module's header/inline comments and tests. CLAUDE.md stays the @AGENTS.md pointer.

* no-mistakes(ci): Corrected AGENTS.md to state that skillSearchPaths skills are withheld from staging but remain fingerprinted, and restored the >= 20% placement table as prompt guidance rather than a buildProposal gate. pnpm run check passed (692 tests)

* chore(main): release backpass 0.1.28 (kunchenguid#155)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: train named nested memory files in monorepos (kunchenguid#159)

* test(harness-invoke): widen the signal-forwarding budget

The signal round-trip test spawns two node processes and forwards a
signal between them. Alone it finishes well under a second, but with
the whole suite running in parallel it intermittently exceeded the
2-second bound. A wrapper that swallows the signal never exits, so a
10-second bound still fails it.

* feat(memory): train nested memory files in a monorepo

Monorepos keep per-directory memory files (apps/api/AGENTS.md) that
harnesses load on top of the root file only when a session works under
that directory. backpass only trained the root file, and a nested file
listed in memoryFiles was misreported as a separate file to consolidate.

nestedMemoryFiles (project scope, default []) names each nested file a
human wants trained; nothing is discovered. Each named file is a weight
of its own:

- evidence: only sessions that worked under its directory, judged
  against it with the root file shown as already loaded, in its own
  state under .backpass/nested/
- attribution: deterministic, from the session cwd and the paths tool
  calls name in structured fields (plus apply_patch file headers),
  resolved against known checkouts of the repo; ssh sessions and paths
  outside every checkout stay unattributed and feed only the root file
- routing: a new instruction lands in the most specific named file
  whose directory every session behind it worked in; cross-cutting or
  unattributed evidence stays with the root file, enforced by fold and
  by a buildProposal gate on pure additions
- budget: nestedBudgetTokens (budgetTokens when unset), re-checked at
  apply against the accepted subset
- review: one proposal and one apply surface, each nested edit labeled
  with its file; the 2-session floor, verbatim evidence, and apply as
  the only writer are unchanged

The per-directory pointer model matches the root: a sibling CLAUDE.md
that imports the nested AGENTS.md is fine, and a nested entry that is
only a pointer is refused by name. --target on a nested file is refused
and --memory-file runs never train nested files. With nestedMemoryFiles
unset, runs are unchanged.

Closes kunchenguid#158

* no-mistakes(review): Fix nested evidence routing and per-directory memory checks

* no-mistakes(review): Correct nested attribution for tool paths and cwd

* no-mistakes(review): Guard nested apply scope and independent budgets

* no-mistakes(review): Allow nested proposals past unchanged over-budget roots

* no-mistakes(review): Share root-owned gap decisions with nested passes

* no-mistakes(test): Document root-owned gap route type in foldEvidence

* no-mistakes(document): Clarify nested targeting and apply scope in README

* no-mistakes(review): Require nested synthesis before exempting root budget

* no-mistakes(document): Clarify nested memory budgets and skipped training

* no-mistakes(review): Fix mixed-edit routing and relative path attribution

* no-mistakes(review): Protect named memory files during synthesis

* no-mistakes(review): Include nested ancestors in analysis context and hash

* no-mistakes(test): Fix tuple typing and formatting; focused tests pass, checks prohibited

* no-mistakes(test): Adjust nested formatting; focused tests pass, formatter verification prohibited

* no-mistakes(document): Clarify nested memory documentation and pass lint checks

* doc: Revise explanation of AGENTS.md and backpass functionality

Updated README to clarify the role of AGENTS.md and backpass.

* doc: Update README to include skills in backpass description

* fix(discovery): include Hermes TUI sessions with absolute cwd (kunchenguid#146)

* fix(hermes): discover TUI sessions with absolute cwd

* no-mistakes(document): Confirm Hermes documentation and format changed test

* feat(apply): keep reworded rejected edits suppressed and record optional reject reasons (kunchenguid#162)

* feat: remember rejected gaps and instruction units across rewordings

Rejecting an add, rewrite, or remove now stores measured gap and
instruction identities so a later proposal of the same decision in
different bytes stays suppressed until more sessions arrive. Extract
and move stay hunk-key only. The browser apply surface can attach an
optional reason; terminal review does not prompt for one.

* no-mistakes(review): Key rejections on unit hashes and absorbed gap aliases

* chore(main): release backpass 0.1.29 (kunchenguid#160)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* docs: trim trailing space in README (kunchenguid#170)

Prettier format:check fails on main because the scientific rigor
sentence has a trailing space after the period.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>

* test: isolate the suite's config home and temp fixtures per test process (kunchenguid#167)

* test: isolate the suite from the developer's personal config home

loadConfig layers $XDG_CONFIG_HOME/backpass/config.json under every run, and
the suite never set XDG_CONFIG_HOME, so a contributor with personal ladders in
~/.config/backpass/config.json saw 14 failures in agents.test.js and
config.test.js (0 with an empty config home). A setup module loaded with
--import gives every test process an empty config home of its own; tests
that need one still set and restore XDG_CONFIG_HOME themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* no-mistakes(ci): I fixed the Greptile P2 in `test/helpers/hermetic-config.js`, following your instructions. Before this, the temporary config home was only removed on a normal `exit`, so a test run stopped with SIGINT or SIGTERM left it behind in the temp directory. **Change:** the existing `exit` cleanup is unchanged, now through a shared `removeConfigHome` function. I added one `process.once` listener each for SIGINT and SIGTERM. When a signal arrives, the listener: - deletes the directory (recursive, force, and any error is ignored); - removes its own listeners for both signals; - re-sends the same signal with `process.kill(process.pid, signal)`, so the process still ends the normal way for that signal. Every process that loads the helper through `--import` gets this, and nothing else changed. **Verification:** - **Signals:** I started a process with the helper loaded, checked its config directory existed, then sent it a signal. After SIGTERM it exited with 143 and the directory was gone; after SIGINT it exited with 130 and the directory was gone. - **Tests:** `npm test` passed 738 of 738, with 0 failed and 0 cancelled. - **Lint, types, formatting:** eslint and `tsc --noEmit` pass, and prettier passes on the changed file. - **`pnpm run check`:** this still fails at `format:check`, but only on `README.md`, which this change doesn't touch. Open PR kunchenguid#166 already fixes that file. I have not committed the change; it is left in the worktree for the pipeline

* test: give each test process its own temp root so fixtures stop leaking

Tests create fixtures with fs.mkdtempSync(os.tmpdir()) and never remove them:
a full run left about 1,275 backpass-* directories (~130 MiB) in the system
temp dir, over 10,000 after a day of runs. The hermetic helper now points
TMPDIR (read by os.tmpdir() on every call, inherited by spawned CLI children)
at one per-process root and removes it on exit, SIGINT and SIGTERM. The config
home moves inside that root. Full suite 743/743 and 0 directories left behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: make the temp-root cleanup best-effort and survive read-only fixtures

Now that one root holds every fixture, a test that fails before restoring a
0o555 directory (apply-cli, proposal, user-apply tests) made rmSync throw
EACCES inside the exit listener: exit 1, an unrelated stack trace, and the
root left behind. Removal now restores write permission and retries, and never
throws from exit or signal handlers. Old vs new on that scenario: exit 1 +
stack + root left, vs exit 0 + clean + removed. Full suite 743/743, 0 leaked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(acpx): retry timed-out adapter verification instead of aborting the run (kunchenguid#168)

* fix(acpx): a timed-out adapter-config check fails the call, not the run

verifyHarnessInvocation read a timed-out `acpx config show` (code null) as a
permanent verification failure and raised a UserError, which analyze.js
rethrows: one slow node start on a loaded host (load average ~30) rejected the
analysis pool at 23/100 with advice to upgrade acpx. A timeout says nothing
about the adapter map, so it is now handled before generic exits: retried once
with three times the budget, then raised as a timed-out AcpxError, which the
analysis stage records per transcript and retries on the next run. The budget
is injectable (verifyTimeoutMs) so the tests do not wait on real timeouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* no-mistakes(review): Let pinned agents' timed-out acpx errors propagate unchanged

* no-mistakes(review): Print a retry hint for timed-out harness calls

* no-mistakes(review): Give verify timeouts their own accurate CLI hint

* no-mistakes(test): Isolate agents tests from host XDG config ladders

* no-mistakes(document): Strip trailing README whitespace failing format check

* no-mistakes(ci): Fixed Greptile finding ci-1 in AgentResolver.withFallthrough (src/agents.js), as the user instructed. The invariant: a timed-out AcpxError always propagates unchanged. It is never classified, demoted, or retried, for pinned and auto-picked agents alike. This matches the AGENTS.md rule that a timeout is never cached as a negative probe. Before the fix, a timeout whose stderr contained 'AUTH_REQUIRED' was classified as 'unauthenticated'. For a pinned pick, demote() returned false without throwing, so the loop called the same harness again with no end. For an auto-picked pick, the agent was demoted and written to the cache as a negative probe. The fix is one shared check at the top of the catch: `if (isAcpxError && err.timedOut) throw err;`. After that, the pinned conversion is back to plain `if (isAcpxError && pick.pinned)`, with the old `!err.timedOut` guard removed. All non-timeout pinned conversions (classifiable verdicts and 'failed unexpectedly') behave as before. The doc comment now says this. Tests added in test/agents.test.js: 1. A pinned synthesis pick whose fn throws a timed-out AcpxError with stderr 'AUTH_REQUIRED' rejects with that same error, and fn is called exactly once. 2. An auto-picked analysis candidate given the same error rejects with it once and is not demoted: resolve() still returns pi. Verification: - With src/agents.js reverted to the old code, the agents test file never finished inside 60s. That is the endless loop the finding describes. - With the fix, agents + config tests pass 52/52 under an isolated XDG_CONFIG_HOME. Lint, format:check and typecheck all exit 0. - Full `pnpm run check`: 741/743 pass. The 2 config.test.js failures come from this host's user config (~/.config/backpass sets a gpt-6-luna ladder), not from this PR: they fail identically with both changed files stashed and pass with an isolated XDG_CONFIG_HOME. - In a re-run under the isolated config home, the only failing test was gap-domain-cli ('an orchestration gap is counted…'). It exited 143 (SIGTERM after 30s) at host load average about 30, and passes 3/3 when run alone. That is host load, not this change. Changes are left uncommitted in the worktree for the outer executor

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* ci: add restricted workflow_dispatch path to republish npm 0.1.29 (kunchenguid#172)

Allow a one-off trusted-publishing republish of the already-tagged
backpass@0.1.29 release without bumping the version or creating a new
release-please release.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>

* chore(main): release backpass 0.1.30 (kunchenguid#171)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(agents): treat "does not support this model" as model-unavailable (kunchenguid#185)

* fix(agents): fall through when the harness is too old for the model

An adapter can advertise a model that its bundled harness cannot call.
The provider then rejects the first prompt with "does not support this
model". Classify it as model-unavailable so withFallthrough demotes the
candidate, caches the negative verdict, and tries the next rung.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(agents): label model-unavailable as "model not available"

The verdict now also covers a listed model that the harness is too old
to call, so "model not advertised" was wrong for that case.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: zxliu <zxliu@scientechresearch.io>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: isolate SQLite session raw transcripts and reclaim expired files (kunchenguid#178)

* fix(analyze): give a SQLite-store session a raw transcript of its own

The distilled trace ends with the raw transcript the analysis agent may
open when a claim needs the full text. For a file-backed store that is
the session's own file, and a session fetched over ssh already reads
from a cached file of its own events. For a local SQLite store (opencode,
hermes, cursor IDE) it was the store's path: one database holding every
session of every repository.

On a real run with an effortful model the analysis agent followed that
pointer and wrote SQL against a 560 MB OpenCode store to find its
session, turning minute-long calls into ones that hit the timeout - and
the database it was handed let it read sessions this repository never
associated.

For the length of the call, a local SQLite session now gets a file of
its own normalized events, one per line, under `.backpass/raw/` (mode
0600), and that is what the trace footer names. The file is removed when
the call returns, whatever the outcome. The new CLI test follows the
footer from inside a fake agent: it finds only that session's events,
never the database or another session, and the file is gone afterwards.

* no-mistakes(review): Fix SQLite raw-file lifecycle and adapter documentation

* no-mistakes(review): Reclaim orphaned raw transcripts without deleting live analysis files

* no-mistakes(review): Reclaim reused-PID raw files while preserving active analysis files

* no-mistakes(document): Clarify raw transcript scope and documentation ownership

* no-mistakes(ci): Fixed ci-1 by removing unsafe PID-based cross-run pruning from all analysis paths. Per-call and catchable-exit cleanup remain intact; SIGKILL leftovers now require manual removal, documented in README.md. Reproduced the same-PID deletion through the CLI before fixing it. All 100 relevant tests pass, along with targeted ESLint, Prettier, TypeScript, and git diff checks

* fix(analyze): reclaim a SQLite raw file once its lease runs out

A raw file left by an uncatchable exit such as SIGKILL was never removed,
leaving an unredacted session on disk. While its call runs, analysis now
renews the file's modification time every minute, and every analysis run
removes raw files untouched for 15 minutes from the root and nested state
directories. Liveness comes from the lease, never from a PID, so a live
analysis in another PID namespace keeps its file.

* no-mistakes(review): Remove redundant worker-level raw transcript reclamation

* no-mistakes(review): Simplify raw-file identity and restore reclamation test coverage

* no-mistakes(ci): Fixed both findings. Raised raw-file reclamation to 24 hours while preserving one-minute renewal. Directory scan failures now emit one warning and skip the affected directory without aborting analysis or healthy sibling cleanup. Updated README and comments. Reproduced failures through the CLI and added regressions covering clock skew, expired leases, and directory failures across root/nested, empty/cached runs. All 47 analysis tests passed, along with targeted ESLint, Prettier, typecheck, and git diff checks

* feat: support explicit per-edit decisions in backpass apply (kunchenguid#182)

* feat(apply): take a decision vector with --decisions

A reviewer who decided somewhere else, or a script someone chose to
trust with their own repo, had no way to hand apply its decisions: the
review surface needs a browser and --no-ui needs a terminal. --decisions
takes the vector the surface sends, e1=accepted e2=rejected:too-narrow,
parsed strictly so a typo writes nothing, and leaves unnamed edits
undecided. It is never a default, and every apply gate still runs.

* no-mistakes(ci): Fixed ci-1 by retaining every --decisions occurrence and validating them together through the existing strict parser. Earlier typos now stop all writes, and duplicate edit decisions across flags are refused. Updated help and README while preserving existing error messages. Added CLI regressions for invalid repeated flags, duplicate decisions, unchanged proposal/rejection state on failure, and successful combined decisions with rejection reasons. Reproduced the reported failure before the fix; afterward, all 144 relevant CLI, review-surface, scope, and writer tests passed. git diff --check passed

* fix(apply): refuse a blank --decisions vector among several

Joining repeated --decisions values let a blank one vanish next to a
valid one, so `--decisions " " --decisions "e1=accepted"` wrote e1 while
a blank vector alone is refused. Each supplied vector must now name an
edit on its own before the vectors are checked together.

* no-mistakes(document): Clarify scripted apply decisions and review defaults

* fix(state): skip unverifiable POSIX mode check for Windows user-profile state dirs (kunchenguid#195)

* fix: skip the POSIX mode read-back of the user state dir on Windows

On Windows, chmod only toggles the read-only attribute and stat always
reports 0o666, so State.ensure() could never verify 0o700 and every
user-scope command failed with "could not secure state directory ...
as mode 700 (got 666)". There, the directory's privacy comes from the
NTFS ACL it inherits from the user profile (SYSTEM, Administrators, the
user), so the read-back is skipped on win32 and kept everywhere else.

test/state-mode.test.js simulates Windows' stat and pins both sides:
the directory is accepted on win32 and still refused on other
platforms; each test goes red under the matching mutation of the guard.

Verified on Windows 11 / Node 26.7: `backpass scan --scope user`,
`status`, `analyze`, and `propose` now run end to end.

Fixes kunchenguid#115

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* no-mistakes(review): {"summary": "Narrow win32 mode-check skip to in-profile state dirs, warn otherwise"}

* no-mistakes(document): docs: reflect Windows --scope user state-dir support in README

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(discovery): support additional OpenCode stores and 2.x transcripts (kunchenguid#181)

* fix(opencode): drop backpass's own OpenCode sessions, and only those

acpx drives opencode, and opencode is on both default ladders, so every
analysis and synthesis call backpass makes through it is filed in the
opencode store under the repo's cwd - a tier-1 exact match on the next
run. Self-session detection only reads transcript files, and an
opencode store is one SQLite database, so three things went wrong:

- The file-head check read the database's first 256 KiB. Its pages hold
  every session's text, so a backpass prompt stored near the start of
  the file marked every session in the store as backpass's own, and a
  prompt stored further in was missed.
- With the head check unable to see them, backpass's own opencode
  sessions were analyzed as corpus - backpass auditing itself, which the
  self-session sentinel exists to prevent.
- Each agent probe (`acpx opencode sessions new`) leaves an empty
  session under the repo's cwd, which was listed and matched at tier 1.

The opencode listing query now reads each session's first user text
part, the part an acpx prompt lands in, and marks the row `self` when it
opens with the sentinel; discovery drops those rows and counts them in
SELF. A session with no user text at all recorded nothing and is not
listed. Discovery never reads a SQLite database as a transcript head.
The new cases in `test/self-session.test.js` put a genuine session, a
self session and a probe's empty session in one small opencode store;
they fail on all three counts before this change.

* no-mistakes(review): Keep OpenCode discovery fail-soft on malformed JSON

* no-mistakes(review): Exclude descendants of OpenCode self sessions locally and remotely

* no-mistakes(test): Preserve attachment-only OpenCode sessions while excluding empty probes

* no-mistakes(document): Clarify OpenCode session exclusions and discovery safety documentation

* no-mistakes(lint): Fix self-session assertion formatting

* no-mistakes(ci): Fixed both findings. OpenCode self detection now checks the first user message, preserving attachment-opening conversations and their descendants when later messages quote backpass prompts. Remote probes respect the adapter's explicit classification. Self ancestry is computed once per discovery instead of querying ancestors per child. Both regressions failed before the fixes and pass afterward. Verification passed: 103 relevant tests, targeted ESLint and Prettier checks, TypeScript checking, and git diff --check. The hosted Greptile check was not rerun in this phase

* feat(opencode): read OpenCode 2 stores (session_v2 and session_message)

OpenCode 2 no longer writes `session`, `message` and `part`. Its store
keeps each session in `session_v2` and the whole history as one typed
row per message in `session_message`. On a 2.x-only store the adapter's
listing query failed with `no such table: session`, so the harness was
skipped with a warning and none of those sessions could be analyzed.

The adapter now reads both layouts from the one database:

- Listing reads `session_v2`, and dates a session by its newest message:
  `session_v2.time_updated` does not move as messages arrive, so a
  session resumed today was otherwise outside every window.
- An in-place upgrade copies each 1.x session into `session_v2` under
  the same id and leaves the 1.x tables behind; a session in both is
  listed once and read from `session_v2`, where it continues. A store
  with neither table is reported as drifted instead of read as empty.
- Reading maps each message type deliberately. User and assistant turns
  keep their text, and tool calls stay in the order the model made
  them, with their text output or error message as the result. Text the
  harness injected - instruction files (the memory file itself),
  continue notices, system notices, and compaction summaries of turns
  still stored above them - never becomes a turn. A background subagent
  or shell reports back in an injected message; that completion becomes
  the result of the call that started the job. A shell command or skill
  the person ran from the prompt is kept as a call.
- A 2.x session follows the same rules as a 1.x one: it is backpass's
  own when its first user message opens with the self-session sentinel
  or it descends from such a session, and it is not listed when it has
  no messages at all.

Golden fixtures pin both layouts: `test/fixtures/opencode-v2-store.json`
and `opencode-v1-store.json` carry the DDL of real 2.0.18 and 1.18.32
stores and rows modeled field-for-field on real ones.

* no-mistakes(review): Simplify OpenCode recording detection and clean temporary test homes

* no-mistakes(ci): Fixed ci-1 in src/tui/render.js by replacing the unmeasured "1 sqlite query" claim with "sqlite store" at the shared OpenCode/Hermes rendering boundary. Reproduced the incorrect rendered output before fixing it. Updated rendering tests to cover both harnesses at three terminal widths while preserving session counts. All 23 rendering tests, targeted ESLint and Prettier checks, and git diff --check pass. Discovery behavior is unchanged

* feat(opencode): read more OpenCode stores named in personal config

A person's OpenCode sessions do not always live in the one store
backpass reads. The Windows OpenCode app, for one, keeps its store on
the Windows side, so a backpass running under WSL beside it never sees
the sessions that did the work in this distro's checkouts.

`discovery.opencodeStores` names more stores to read beside the default
one: an OpenCode data directory (holding `opencode.db`) or a database
file, such as a copy of the Windows app's store.

Why a config list, when Claude, Codex, Hermes and Pi stores are
relocated through the environment (`CLAUDE_CONFIG_DIR`, `CODEX_HOME`,
...): OpenCode's own relocation variables, `XDG_DATA_HOME` and
`OPENCODE_DB`, would reach the OpenCode that backpass runs for analysis
through acpx, which passes backpass's environment on. That OpenCode
must keep its own store and login, or its sessions would land in, and
its credentials be looked up in, the store being read. A list read only
by the adapter changes what backpass reads and nothing else, the way
`cloneRoots` and `skillSearchPaths` add places to look without changing
anything they name.

- Like `discovery.hosts`, the list is personal configuration: a
  checked-in `.backpassrc.json` that sets it is refused by name, since
  it would point every contributor's backpass at a transcript store. In
  user scope it defaults to the global file's top-level list.
- Entries are absolute (`~/` is expanded); a relative entry is refused,
  because a transcript store is not a repository path.
- Each session is read from the store that listed it. A store named
  twice (the default one again, or through a link) is read once, and a
  session id already listed from an earlier store is skipped, so a
  copied session never counts twice toward `minGapEvidence`.
- A configured store that is missing or unreadable is named in a
  warning and skipped, and the rest of the run continues. The default
  store's failure stays the harness's failure, as before.
- Remote hosts are unaffected: the probe reads each host's default
  store.

* no-mistakes(review): Restore test environment and clean up OpenCode store fixtures

* no-mistakes(review): Remove personal-only settings from project configuration example

* no-mistakes(document): Clarify OpenCode store discovery documentation

* no-mistakes(ci): Fixed all four Greptile findings: missing SQLite stores now raise named errors, notice-only 2.x sessions are excluded, attachment-only user turns survive reading and distillation, and bounded discovery filters old sessions in SQLite while preserving resumed sessions and self ancestry. Reproduced nine failing regression cases before fixing. All 113 targeted tests pass, including CLI and remote-probe coverage; ESLint, formatting, TypeScript, and git diff checks also pass

* fix: stop scheduling analysis after a fatal worker error (kunchenguid#180)

* fix(analyze): stop starting model calls once a run has failed

Per-transcript failures are recorded and the run goes on; an error that
fails the run - a pinned agent failing in a way nothing can classify,
say - propagated from one analysis worker and stopped only that one.
`Promise.all` reported the failure at once while the other workers kept
taking transcripts and making model calls in the background, and the
process only exited when the whole queue was done. On a real run with a
pinned OpenCode agent the error was printed within minutes and the
process kept analyzing for over an hour, starting a new max-effort call
every time one finished.

The pool now stops handing out transcripts after the first fatal error.
Calls already in flight finish and keep their evidence, and the first
error is rethrown once every worker has stopped, so nothing is still
running when it surfaces. The new CLI test runs two jobs over five
sessions with a pinned agent whose first call fails: before this change
all five calls ran, now only the two in flight do.

* no-mistakes(document): Document fatal analysis shutdown and evidence retention

* no-mistakes(ci): Addressed ci-1 in test/analyze-stop-on-fatal.test.js. The CLI regression now returns non-empty, trace-backed evidence and verifies after exit that the second session's persisted record has status "ok" and retains the complete evidence payload. Existing assertions still verify fatal error reporting and no queued model calls. No production changes were needed. Verification passed: 6 relevant tests, targeted ESLint and Prettier checks, and git diff --check

* chore(main): release backpass 0.1.31 (kunchenguid#186)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: recognize acpx exit code 3 as a timeout (kunchenguid#177)

* fix(acpx): name acpx's timeout exit (3) as a timeout

acpx 0.19 ends a model turn at its `--timeout` budget itself and exits
with its TIMEOUT code, 3 (`EXIT_CODES.TIMEOUT`), with only a zero-token
accounting line on stderr. backpass named a timeout only from its own
outer kill (`result.timedOut`, budget + 30s), which never fires once
acpx has exited, so the turn fell through to generic exit handling:

  error pinned analysis agent opencode (github-copilot/claude-opus-5.5)
  failed unexpectedly (acpx opencode session prompt failed (exit 3):
  [acpx] tokens: input=0 output=0 total=0)

With a pinned agent that stops the whole run after one long prompt.
Named a timeout, it is what the design already says it is: that
transcript is recorded as failed and retried next run, and the ladder
never falls through because a prompt ran long.

`ACPX_EXIT_TIMEOUT` is checked wherever `result.timedOut` is: the exec
one-shot, the session prompt, session create (so an adapter acpx gave up
starting is not reported as lacking session support), and the probe.

* no-mistakes(review): Distinguish acpx-owned timeout diagnostics from backpass budgets

* no-mistakes(review): Preserve timeout context and filter acpx accounting noise

* no-mistakes(review): Classify setup timeouts and preserve acpx error diagnostics

* no-mistakes(document): Clarify acpx timeout handling and retry documentation

* fix: prevent false session matches from Windows paths on POSIX (kunchenguid#173)

* fix(discovery): never resolve a Windows path against the POSIX cwd

A harness on Windows records `C:\work\repo` or a UNC path such as
`\\server\share\repo` (Windows tools also write `//server/share/repo`).
On macOS or Linux none of these is absolute, so `path.resolve` turned
them into a location under the process cwd - inside the checkout
backpass was started from - and every such session became a tier-1
match for whichever repo ran the scan (kunchenguid#164). The same resolution
also made a dead `C:/work/<repo-name>` a best-effort match, keyed
user-scope projects by the directory backpass ran in, and counted
Windows tool paths as in-repo work for nested memory files.

`src/discovery/paths.js` decides once whether a recorded path names a
place on this machine. Association, user-scope project keys and nested
attribution now refuse a Windows path on a POSIX host instead of
resolving it; a recorded remote still associates the session at tier 2.
On Windows the recorded spelling is already local, so nothing changes
there. The nested attribution cache version is bumped so cached
placements recompute.

Fixes kunchenguid#164

* no-mistakes(document): Clarify foreign-path handling and correct UNC safety rationale

* chore(main): release backpass 0.1.32 (kunchenguid#198)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(discovery): add opt-in OMP session discovery to the Pi adapter (kunchenguid#151)

* feat(discovery): discover omp session transcripts in the pi adapter

omp (Oh My Pi) writes the same version:3 JSONL session format as pi under
~/.omp/agent/sessions/, but prepends a fixed-width {type:"title"} record so
the {type:"session", cwd} entry is line 2, and nests subagent transcripts
one level deeper at <escaped-cwd>/<session-id>/<Name>.jsonl.

- Add ~/.omp/agent/sessions as a default nested store root (omp honors
  PI_CODING_AGENT_DIR, so an env redirect still dedupes against it).
- classify() scans the first head lines for the session entry instead of
  requiring it on line 1.
- enumerate() descends one extra level inside nested roots.
- read() accepts model_change.model as a fallback for modelId.

* fix(discovery): share OMP corroboration across subagents

* no-mistakes(review): Guard ledger id migration, narrow fold overlay, nest OMP subagents

* no-mistakes(review): Drop graft cache files, guard ledger recording aliases

* no-mistakes(review): Make shared OMP domain vote order-independent

* no-mistakes(review): Link OMP subagents by nested path, share ledger prior merge

* no-mistakes(document): Sync OMP interaction and scan-cache doc comments

* chore: ignore local Graft cache

* no-mistakes(document): Sync OMP identity docs and rewrap long comments

* feat(discovery): make OMP session collection opt-in

* no-mistakes(review): Fix OMP observer deduplication, native ownership, and descendant classification

* no-mistakes(review): Correct observer canonicalization, native attribution, and selected provenance migration

* no-mistakes(review): Fix conflicting cross-host descendant family corroboration

* no-mistakes(review): Fix copied-descendant corroboration and historical ledger provenance

* no-mistakes(review): Reconcile copied families and preserve validated evidence provenance

* no-mistakes(document): Correct observer documentation and format changed sources

* no-mistakes(lint): Fix regression fixture types and format affected tests

* no-mistakes(ci): Fixed ci-macos-1 in test/gap-ledger.test.js:52 by realpath-normalizing the temporary root once in harness(), matching production checkoutRoots behavior. This shared correction covers all four sibling routing consumers and keeps State paths, transcript cwd, and checkout roots consistent across macOS symlinked temporary directories. Product code, evidence semantics, and assertions are unchanged. Re-traced the failing and ordinary paths before verification. Ran node --test test/gap-ledger.test.js with TMPDIR set to the value returned by getconf DARWIN_USER_TEMP_DIR: all 49 tests passed, including both reported failures and sibling routing regressions; zero failures or skips. No pipeline-control or publication actions were performed; current-head forge verification remains with the outer executor

* refactor(proposal): leave nested-session root fallback to a separate change

Keep this branch to opt-in OMP discovery: an edit whose evidence lacks a native
session is routed as on main (the unattributed evidence is left out of ownerOf),
instead of falling back to the root memory file. The fallback moves to its own PR.

* no-mistakes(review): Refresh cached proposal interaction classification from discovery

* no-mistakes(document): Clarify OMP observer counting and cache documentation

* no-mistakes(lint): Format interaction regression test

* fix(discovery): confine OMP handling to the opt-in store and leave routing to main

With includeOmp unset, plain Pi stores now list and read exactly as on main:
the two-level walk, subagent tagging, ancestor lookup, and title-header parsing
apply only to the ~/.omp store when discovery.includeOmp is on. scan --json
omits the observer fields unless a transcript shares an observer with a parent.

Fold routing goes back to main's route.ownerOf over cluster sessions; the
incomplete-attribution root fallback and its native-ownership tests move to the
separate routing change.

* no-mistakes(review): Keep plain Pi ledger slots and main routing, drop leftovers

* no-mistakes(review): Revert unrelated acpx and gitignore hunks to main

* no-mistakes(review): Restore main's gapSource body in gap ledger

---------

Co-authored-by: mdc2122 <mdc2122@users.noreply.github.com>

* chore(main): release backpass 0.1.33 (kunchenguid#207)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(discovery): associate sessions in repos with separate git directories (kunchenguid#206)

* fix: associate sessions in repos with separate git directories

listWorktrees() now seeds its candidates with the normalized checkout
root before adding Git's reported paths, retaining the existing
deduplication. Regression tests cover exact and nested tier-1
association, strict-mode acceptance, exclusion of unrelated directories,
ordinary and linked checkout deduplication, and fallback outside a Git
repository.

Fixes kunchenguid#127

* fix: don't count a separate git dir as a worktree

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>

* chore(main): release backpass 0.1.34 (kunchenguid#208)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(memory): stop treating thematic breaks as instruction units (kunchenguid#213)

* fix(memory): skip thematic breaks when parsing instruction units

A break-only line (`---`, `***`, `___` and CommonMark variants) outside a
fence was parsed as its own instruction unit, inflating the status count,
taking an AG id, and matching any skill body break as a 1.00 overlap.
parseMemoryUnits now drops such lines and flushes the current unit. A
dash run directly under a plain paragraph is treated as a setext H2
heading, as in CommonMark; under a list item, quote, or fence it stays a
break.

Positional AG ids shift for unchanged memory text, so cached evidence
would point at the wrong units: bump ANALYSIS_INDEX_VERSION to 4.

Fixes kunchenguid#192

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* no-mistakes(review): Keep setext headings with their content when splitting removals

* no-mistakes(review): Limit split guard to ATX and setext headings

* no-mistakes(review): Skip thematic breaks when matching a heading to its content

* no-mistakes(ci): Fixed Greptile finding ci-1, as you asked. In `parseMemoryUnits` (src/memory.js), indented code was treated as a setext heading title. Because of that, ` npm test\n---\nNext.\n` dropped the command and used it as the section name for `Next.`. Rule that must hold: a line can only be a setext title if it has at most 3 leading spaces (CommonMark). A line indented 4+ spaces or with a tab is indented code; it stays a unit, and the `---` after it is a plain thematic break. Fix: one extra condition on the setext check, `/^ {0,3}\S/.test(buffer[0])`. Checking only `buffer[0]` is enough: indented code cannot interrupt a paragraph, so if the first line is indented, the whole buffer is code. The only other place that decides what a setext title is, `isSetextTitle` in `splitRemovalHunk` (src/workspace.js), already skips any line that belongs to a unit. The indented line is now a unit, so that function picks up the fix without a separate change. I added both the space-indented example from the finding and a tab-indented one to the existing "dash run under a list item, quote, indented code, or fence is a break" test in `test/memory-units.test.js`. That test fails on the original code (7 pass, 1 fail) and passes with the fix. `pnpm run check` (lint, format, typecheck, all tests) passes: 940/940

---------

Co-authored-by: Zexuan Liu <zxliu@scs336.sim>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(apply): refuse a proposal made under a different budget (kunchenguid#210)

* fix(apply): refuse a proposal made under a different budget

Apply gated the accepted subset against the budget in the current config,
not the cap the proposal was measured and gated under. A proposal made with
--budget 30000 and applied without it was judged "already over" a 10,000
cap and every addition refused; the reverse skipped the zero-sum the
proposal was held to.

Apply now compares each file an edit lands in (root and every nested file)
against the cap recorded in the proposal and, on a mismatch, refuses before
the review, naming both numbers and the remedy (re-run apply with
--budget N, or nestedBudgetTokens when it is set, or propose again). The
writer repeats the check for the accepted subset and writes nothing. A
proposal that recorded no cap is gated at the current config, as before.
The writer's nested cap now resolves through nestedBudget(), the same
helper propose uses.

Fixes kunchenguid#188

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* no-mistakes(ci): I added the test Greptile asked for; no source code changed. The bot was right that the writer's own root-budget check had no coverage. The existing root-mismatch tests in `test/apply-cli.test.js` all run the CLI, and `cmdApply` refuses before `applyDecisions` is ever called, so removing the writer's check would have left every test passing. **Invariant:** accepted edits to a file must never be gated or written under a budget different from the one the proposal was made under, and the writer (`applyDecisions`) has to enforce this by itself, not just `cmdApply`. Both files that can mismatch are now tested against the writer directly: nested files already had direct tests in `test/nested.test.js`, and the root file now has one too. **The new test** is "the writer itself refuses accepted root edits made under a different budget", in `test/apply-cli.test.js`. It builds a proposal at a 30,000-token budget, then calls `applyDecisions` directly with one edit accepted, one rejected, and the config set to 10,000. It checks that: - nothing is written, `AGENTS.md` is unchanged, and no skill directory is created; - the single failure message names the file, both numbers, and the `--budget 30000` remedy; - `rejectionsRecorded` is false and `.backpass/rejections.json` holds no entries. **Verification:** I temporarily turned the writer's check off and the new test failed; with the check back in place it passes. `pnpm run check` (lint, format, typecheck and tests) passes: 934 tests, 0 failures

---------

Co-authored-by: Zexuan Liu <zxliu@scs336.sim>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(status): show each nested memory file's sampled-session reach (kunchenguid#209)

A nested file trains only on sessions whose every in-repo work path stays
under its directory, so in repos where sessions cross directories it may
never reach minGapEvidence, and a run that proposes nothing there looked
the same as a file with no gaps.

Each attribution now records, per nested file, how many sampled sessions
worked only under its directory (.backpass/nested/reach.json). The run
summary and `backpass status` print that count and warn below
minGapEvidence, when no add, rewrite, or remove edit can reach the file.
`status --json` reports it as nestedAttribution, and the proposal's nested
entries carry sampledSessions, minGapEvidence, and belowMinGapEvidence.
The count comes from deterministic attribution and is report-only.

Refs kunchenguid#191

Co-authored-by: Zexuan Liu <zxliu@scs336.sim>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* chore(main): release backpass 0.1.35 (kunchenguid#215)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* docs: clarify apply UI dependency (kunchenguid#216)

* fix(memory): recognize CLAUDE.md symlinks as pointers (kunchenguid#217)

* fix(memory): recognize Claude memory symlinks

* no-mistakes(document): Document canonical memory symlink resolution

* chore(main): release backpass 0.1.36 (kunchenguid#218)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(omp): accept omp as an analysis and synthesis runner

omp (Oh My Pi) is an acpx custom agent. Its model and reasoning level now travel
over acpx: --model at session create, and the ACP `thinking` session option.

- harness-invoke: omp carries model and effort through the session path; a level
  omp does not advertise (off, auto, low, high, max) is refused before any call,
  so a level is never silently downgraded. omp is not a built-in adapter, so the
  agents.<name> replacement guard does not apply to it.
- agents: resolvedEffort gives omp no default that it cannot carry (analysis
  medium). A configured level is kept as written.
- acpx: omp's session effort key is `thinking`, so an exec fallback fails loudly.
- README: one runner line for omp.

Tests cover the transport, the refusal, the loud failure, the configured-agent
acceptance, the effort default, and the probe's openai-codex route mapping.

* no-mistakes(review): Qualify omp README ids, add omp to hints, test routes

* no-mistakes(document): Update stale effort-default comment for omp

* test(agents): use neutral providers in colliding omp ladder test

Replace literal openai/ and openrouter/ ids with neutral provider names.
The test still proves the qualified ladder id resolves to itself when
the same bare model is advertised by other providers.

---------

Co-authored-by: TNTHNGVDYNND <161745519+TNTHNGVDYNND@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrew Sweet <andrew.sweet@cantab.net>
Co-authored-by: firstmate <firstmate@local>
Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
Co-authored-by: Admin Athletics mind <dev@athleticsmind.com>
Co-authored-by: Rodrigo Díaz Jonguitud <dijongui@gmail.com>
Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Co-authored-by: Kenmege <205099287+Kenmege@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Pantoria <37699442+Pantoria@users.noreply.github.com>
Co-authored-by: zxliu <zxliu@scientechresearch.io>
Co-authored-by: Pawan <pawan161096@gmail.com>
Co-authored-by: Daniel Martinez Morales <dmmdea@hotmail.com>
Co-authored-by: mdc2122 <mdc2122@users.noreply.github.com>
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Zexuan Liu <zxliu@scs336.sim>
Co-authored-by: Som Samantray <92726151+SomSamantray@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants