Repository navigation
fix(agents): treat "does not support this model" as model-unavailable - #185
Conversation
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>
|
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>
|
Speaking as Kun's firstmate: contract-class: restore — unconfigured runs already promise fallthrough/demote on Helps #184 (gaps 2–3). No VISION:
CI / mergeability: fork workflows approved after diff review; CI + Guard + no-mistakes green; MERGEABLE/CLEAN. Security: clean (regex + label + unit test). Outcome: squash-merge. |
|
Speaking as Kun's firstmate: this is merged. Thank you @Pantoria — really appreciate you taking the time on this. |
…219) When the Claude ACP adapter rejects the requested model after session/new, acpx prints `Failed session/set_config_option for model "<id>": Invalid value for config option model` and exits 1. classifyAcpxFailure did not recognize that line, so openSession reported "has no session support" and an analysis pass with an effort stopped with "its acpx adapter does not support sessions - upgrade acpx or omit the effort override", although sessions worked and acpx was current. Seen with acpx 0.19.6, claude-agent-acp 0.81.2 and a Claude Code build whose advertised model list predates the pinned model. The classifier now reads that line as model-unavailable, the verdict #185 gave "does not support this model": a pinned pass names the model, and an auto-picked one falls through to the next candidate. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* 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>
* fix(acpx): treat a model the adapter turns down as model-unavailable (kunchenguid#219) When the Claude ACP adapter rejects the requested model after session/new, acpx prints `Failed session/set_config_option for model "<id>": Invalid value for config option model` and exits 1. classifyAcpxFailure did not recognize that line, so openSession reported "has no session support" and an analysis pass with an effort stopped with "its acpx adapter does not support sessions - upgrade acpx or omit the effort override", although sessions worked and acpx was current. Seen with acpx 0.19.6, claude-agent-acp 0.81.2 and a Claude Code build whose advertised model list predates the pinned model. The classifier now reads that line as model-unavailable, the verdict kunchenguid#185 gave "does not support this model": a pinned pass names the model, and an auto-picked one falls through to the next candidate. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(main): release backpass 0.1.37 (kunchenguid#222) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(workspace): keep VCS internals and binary files out of the staging copy (kunchenguid#220) * fix(workspace): keep VCS internals and binary files out of the staging copy prepareWorkspace walked every skill directory whole, so a skill checked out with its own .git, or one that ships compiled tools, was copied into .backpass/synthesis/ and read into `originals` as utf-8 text. On a 1.7 GB user skills directory (one skill carried a 173 MB object store and six ~82 MB executables) synthesis exhausted Node's 4 GB heap while building the staging copy, before the edit turn opened, and the process died with exit 134. The walk now prunes `.git`, `.hg` and `.svn` without descending into them, and a file whose first 8,000 bytes hold a NUL (git's own binary test) is not staged. Both are named in `unstageable` with their reason, so nothing is dropped silently. A binary read as utf-8 was never a faithful original, and no text edit applies to it. Supporting text files such as notes.txt are still copied whole. Fixes kunchenguid#75. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * no-mistakes(ci): Fixed ci-1 in src/workspace.js. The invariant is that nothing synthesis writes is silently dropped. measureWorkspace now passes a collector to its walkFiles call, so VCS entries (.git, .hg, .svn, directories or a .git file) that the walk prunes are reported in `stray`. The reason is a new named constant, STRAY_VCS: "synthesis wrote version-control internals, which are never carried or applied". Staging never copies a VCS entry, so any one found at measure time was written during synthesis. Pruning in walkFiles is unchanged: those entries are still never descended into or copied. Paths are named the way other stray notes are, mapped back to the logical repo path. To do that I pulled the existing mapping lookup and logical-path code into two small local helpers, `mappingFor` and `logicalFor`, which the normal stray loop now uses too. Binary files, confinement reasons and the other stray rules are untouched, and I added no tests. Checks: eslint and tsc are clean and prettier --write was applied. I ran test/workspace.test.js, test/synthesize.test.js and test/synthesis-cli.test.js: the same 46 tests fail before and after the change (compared by name). The ones I looked at fail with EPERM on fs.symlink, the Windows host limit noted in the intent. A one-off script confirmed the behaviour: prepareWorkspace still reports `.agents/skills/foo/.git` as unstageable, measureWorkspace shows no stray before a write, and after writing `.agents/skills/foo/.git/config` and a root `.git` file it reports both in `stray` with STRAY_VCS and zero changes --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(main): release backpass 0.1.38 (kunchenguid#223) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: run first Claude analysis call alone before fan-out (kunchenguid#226) * fix(analyze): run the first Claude analysis call alone before the fan-out At --jobs above 1 the first wave of analysis calls each starts with its own short-lived 'sessions new' helper. When Claude's OAuth token is due, one helper takes .oauth_refresh.lock and exits before the refresh ends, so every parallel session then fails with 'another Claude Code process is refreshing it' and the run dies before analysing anything. With the claude agent, run transcripts one at a time until one has made a model call (a skipped trivial session made none), so a due refresh finishes inside a single long-lived process, then fan out. Other agents keep the full fan-out. This is not a retry: nothing is re-run. Closes kunchenguid#203 Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> * no-mistakes(review): Fix warm-up to detect model-call attempts, not failure vs skip * no-mistakes(document): Fix no-useless-assignment lint error in analyze.js warm-up loop * no-mistakes(review): Fix outcome overwrite when writeEvidence throws after model call succeeds * no-mistakes(document): Format new warmup test file; no stale docs found * no-mistakes(ci): Addressed the Greptile finding (ci-1) in test/analyze-claude-warmup.test.js: the existing warm-up tests never exercised a failed first model call, so `err.modelCallAttempted` had no coverage. Added a new test case plus a corresponding branch in the fake acpx fixture: a session id starting with "fail" now returns unparseable text after the fake prompt call (a genuine model-call attempt that fails analysis afterward, not a blank/empty-output case, since a pinned agent turns empty-output into a fatal UserError that would abort the whole run). The new test asserts the failing first call still runs alone (new/prompt/failed, nothing else starts), counts as attempted/failed, and the remaining calls then run together (overlapping prompts) and succeed. Ran `pnpm run check` (lint, format:check, typecheck, full test suite — 956 tests) with zero failures --------- Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> * chore(main): release backpass 0.1.39 (kunchenguid#228) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: deduplicate symlinked skills in the analysis index (kunchenguid#231) * fix(skills): dedupe the analysis index by realpath List each shared skill file once in analysis prompts while preserving every loaded entry for per-copy budget accounting. Keep distinct same-name skills visible. Closes kunchenguid#202 * no-mistakes(document): Document realpath-deduplicated skill analysis indexing * chore(main): release backpass 0.1.40 (kunchenguid#232) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(synthesize): report a mid-run change to a watched repo file as observed (kunchenguid#224) * fix(synthesize): report a mid-run change to a watched repo file as observed assertRepoUntouched blamed the synthesis harness for any change to a fingerprinted in-repo file, so a concurrent editor in a shared workspace aborted the run with the wrong cause. Name the observation instead, list concurrent writers as a possible cause, and keep the harness attribution only when the repo file now equals the staging copy. Closes kunchenguid#199 Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> * fix(synthesize): keep the fingerprint in step with the rebuilt staging copy A skill another process edits after the fingerprint but before the workspace is rebuilt was copied into staging, so the later equality check named the harness for a change it did not make. Point each staged skill's fingerprint at the text its staging copy was built from. An absolute in-repo memory path was read as repo.root joined with the absolute path, so a real write-through got the softer wording. Resolve fingerprint keys the same way repoFingerprint does. Closes kunchenguid#199 Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> * fix(synthesize): report a write by an earlier candidate before rebuilding The fingerprint is re-pointed at the rebuilt staging copy so a concurrent edit made before the first harness runs is not blamed on it. A candidate after the first runs behind a harness that may have written to the repository, and rebuilding over that write would hide it. Check the repository first on every attempt after the first. Closes kunchenguid#199 Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> * no-mistakes(document): fix: rewrap jsdoc comment, clean lint/format/typecheck --------- Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> --------- Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com> Co-authored-by: Daniel Martinez Morales <4965968+dmmdea@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gaurav Vijay Jadhav <gaurav.vjadhav01@gmail.com> Co-authored-by: FocalFactotum <305704917+FocalFactotum@users.noreply.github.com>
What Changed
classifyAcpxFailure(src/acpx.js) now classifies a provider error containingdoes not support this modelasmodel-unavailable, the same verdict asdid not advertise that model. This error appears when an adapter lists a model that its bundled harness is too old to call, so the first prompt gets rejected. The header comment explains that the probe can't catch this case because it sends no prompt.model-unavailableverdict label insrc/agents.jschanges from "model not advertised" to "model not available", since it now also covers models that are listed but can't be called. The module header comment uses the new label too.test/agents.test.jsfor a real Claude CodeAPI Error: 400 ... does not support this model; version ... or newer is requiredstderr line.🤖 Generated with Claude Code
Risk Assessment
✅ Low: This is a one-regex widening of classifyAcpxFailure, so a harness-too-old prompt rejection is now classified "model-unavailable" and follows the existing withFallthrough/demote path. That rejection comes on the first prompt, before any real work, so the rule against switching models mid-work still holds. The negative cache TTL (30 min) applies as for other verdicts, the pinned and exhausted error paths just pick up the neutral "model not available" label, and the new test runs the real classifier on a real stderr sample.
Testing
I built a disposable git repo, a HOME holding one Pi session transcript, and fake acpx/claude/codex binaries under /tmp, then ran the real backpass CLI against them five times. The current build falls through from the too-old claude harness to codex and analyzes the transcript. The base build reproduces the bug: it marks the transcript failed and does not fall through. The pinned and exhausted-ladder errors show the new "model not available" label. An unrelated 400 error does not trigger fall-through. The targeted classification unit test also passes. CLI transcripts are saved as evidence, and the temp setup was removed. This is CLI-only, so there are no screenshots.
Evidence: Fall-through after fix (live CLI transcript)
warn analysis: claude (claude-x) model not available mid-run; falling through · analysis: codex (gpt-b) effort=medium skipped claude/claude-x: model not available 1 newly analyzed · 0 cached · 0 skipped (too short) · 0 failedEvidence: Baseline before fix reproduces the bug
warn pi session ...: acpx claude session prompt failed (exit 1): ... Claude Code 2.1.215 does not support this model; version 2.1.280 or newer is required. 0 newly analyzed · 0 cached · 0 skipped (too short) · 1 failedEvidence: Pinned agent error label
Evidence: Exhausted ladder table
Evidence: Unrelated 400 error does not fall through
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
backpass analyze --harness pi --since all --jobs 1(claude/claude-x then codex/gpt-b ladder in a disposable .backpassrc.json; fake acpx emits the harness-too-old stderr for claude): falls through to codex, exit 0Same command on a copy of the tree with base-commit (5bb4089) src/acpx.js and src/agents.js: no fall-through, the transcript is marked failed (reproduces the bug)backpass analyze ... --analysis-agent claude --analysis-model claude-x: pinned error with the 'model not available' label, exit 1backpass analyze ...with every candidate returning the too-old error: exhausted-ladder table with the 'model not available' label, exit 1backpass analyze ...with an unrelated 400 error ('does not support streaming'): no fall-through, transcript marked failednode --import ./test/helpers/hermetic-config.js --test --test-name-pattern "acpx failure classification" test/agents.test.js✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.