Skip to content

fix(synthesize): report a mid-run change to a watched repo file as observed - #224

Merged
kunchenguid merged 4 commits into
kunchenguid:mainfrom
jadhavgaurav:fix/concurrent-edit-blame-199
Oct 26, 2026
Merged

kunchenguid merged 4 commits into
kunchenguid:mainfrom
jadhavgaurav:fix/concurrent-edit-blame-199

Conversation

@jadhavgaurav

@jadhavgaurav jadhavgaurav commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fix issue #199: when a concurrent process edits a watched in-repo memory or skill file during synthesis, assertRepoUntouched (src/synthesize.js) reports "synthesis changed X in the repository directly instead of the staging copy" and says the harness cannot be trusted. Name what was observed ("X changed in the repository during synthesis"), mention concurrent editors as a possible cause, and keep attributing to the harness only when the repo file now equals the staging copy. The abort itself stays. Closes #199.

What Changed

  • assertRepoUntouched (src/synthesize.js) now reports a changed watched file as "X changed in the repository during synthesis" instead of asserting the synthesis harness wrote it directly.
  • The harness is named as the likely cause only when the repository file's contents now match the staging copy; the abort error and guidance differentiate this write-through case from an unexplained change, suggesting a concurrent editor (another session or a scheduled job) as a possible cause for the latter.
  • assertRepoUntouched now takes the workspace object instead of just its root path, so it can compare the repository file against the corresponding staged file to determine the match.
  • Adds test coverage in test/synthesize.test.js for the new observed-change wording and the staging-copy comparison logic.
  • Review follow-up: rebaseFingerprint (src/workspace.js) points each staged skill's fingerprint at the text the rebuilt staging copy was built from, so a skill another process edits after the fingerprint but before the workspace is rebuilt is no longer read as a harness write-through.
  • Review follow-up: repoFilePath (src/workspace.js) resolves a fingerprint key the way repoFingerprint does, so a memory file configured by absolute in-repo path is read from that path and a real write-through to it keeps the stronger wording.
  • Review follow-up (Greptile P1): synthesizeProposal checks the repository against the fingerprint before rebuilding the workspace on every attempt after the first, so a direct write by a candidate that then fell through is reported instead of being absorbed by the rebase.

Risk Assessment

✅ Low: The change is a narrowly scoped, well-reasoned fix for two concretely reported races/bugs in synthesis fingerprinting, with regression tests that exercise real observable behavior and correctly reproduce each failure mode; no scope creep, no new subsystems, and existing abort semantics are preserved.

Testing

  • pnpm run check (eslint, prettier, tsc, 957 tests) passes on ea983f1; the head 2b60f7e adds only a pipeline comment rewrap on top.
  • Four tests added to test/synthesize.test.js: a skill edited by another process between the fingerprint and the workspace rebuild is not blamed on the harness; an edit after the rebuild is still reported even when an earlier one was absorbed; a write-through to a memory file configured by absolute path is still attributed to the harness; a direct write by a candidate that then falls through is reported, not absorbed by the next rebuild.
  • With only the src/ change of each follow-up reverted (saved patch, git apply -R), the first and third tests fail (first follow-up) and the fourth fails (second follow-up); the second is a control that passes either way.

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Concurrent repo edit before first harness attempt is reported as observed, not blamed on the harness ✅ pass live node --test test/synthesize.test.js -> "a change to a watched repo file during synthesis is reported as observed, not blamed on the harness" passes at HEAD
A repo file that now matches the staging copy is still attributed to the harness ✅ pass live node --test test/synthesize.test.js -> "a repo file that now equals the staging copy is still attributed to the harness" passes at HEAD
A first candidate writes directly to a repo skill, fails with a classifiable error, and falls through: the write must be reported, not absorbed into the next staging rebuild ✅ pass live node --test test/synthesize.test.js -> "a direct write by a candidate that then falls through is reported, not absorbed by the next rebuild" passes at HEAD; the same test fails at base commit 212562…
A skill edited by another process between fingerprinting and staging rebuild is absorbed without false alarm, while a post-rebuild edit on a later attempt is still caught ✅ pass live node --test test/synthesize.test.js -> "a skill another process edits after the fingerprint but before staging is rebuilt is not blamed on the harness" and "an edit after the staging rebuild is stil…
Write-through to a memory file configured by an absolute path is still attributed to the harness ✅ pass live node --test test/synthesize.test.js -> "a write-through to a memory file configured by absolute path is still attributed to the harness" passes at HEAD; fails at base commit
  • node --test test/synthesize.test.js (27/27 pass at target commit ea983f1)
  • node --test test/synthesize.test.js against src/synthesize.js and src/workspace.js reverted to base commit 2125624 to confirm the new regression tests fail pre-fix
  • git checkout HEAD -- src/synthesize.js src/workspace.js to restore the worktree to the target commit (verified clean via git status)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Issues

Closes #199

…served

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T09:43:02.594365Z 6a93b45 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the earlier fallback issue is fixed.

Reviews (3) · Last reviewed commit: "no-mistakes(document): fix: rewrap jsdoc..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a93b45da5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/synthesize.js Outdated
Comment on lines +193 to +195
return (
fs.readFileSync(path.join(workspace.root, staged), "utf8") ===
fs.readFileSync(path.join(repo.root, file), "utf8")

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 Badge Keep staging and fingerprint in the same snapshot

When another process edits a staged skill after the fingerprint is captured but before withFallthrough rebuilds the workspace, prepareWorkspace copies that concurrent edit into staging. This equality check then marks the skill as wroteThrough and emits the “harness cannot be trusted” hint even if the harness never touched the repository, recreating the false accusation this change is intended to remove. Preserve the fingerprinted originals in the rebuilt workspace or verify the fingerprint before copying live skill contents.

AGENTS.md reference: AGENTS.md:L30-L32

Useful? React with 👍 / 👎.

Comment thread src/synthesize.js Outdated
try {
return (
fs.readFileSync(path.join(workspace.root, staged), "utf8") ===
fs.readFileSync(path.join(repo.root, file), "utf8")

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 Badge Resolve absolute watched paths before reading them

When project memoryFiles contains an absolute path inside the repository, which resolveMemoryPath accepts, file is absolute but path.join(repo.root, file) prefixes the repository again rather than reading the watched file. The read therefore normally throws and matchesStaging returns false, so even matching repository and staging copies fall through to the generic concurrent-process wording. Resolve absolute keys the same way repoFingerprint does.

Useful? React with 👍 / 👎.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @jadhavgaurav, this is the right shape for #199. The abort stays, and the harness is only blamed when the repo file matches the staging copy. I reviewed the diff and approved CI for this fork, so the checks are running now.

This is waiting on you. Codex left two findings on 6a93b45 that look real to me. Please fix them or reply with why they don't apply:

  1. If another process edits a staged skill after the fingerprint is taken but before the workspace is rebuilt, prepareWorkspace copies that edit into staging. matchesStaging then sees a match and brings back the "cannot be trusted" accusation, which is the exact false blame this PR removes.
  2. An absolute in-repo memoryFiles path (which resolveMemoryPath accepts) gets read as path.join(repo.root, file), so the read fails and a real write-through falls back to the softer wording. Resolving absolute keys the way repoFingerprint does would fix it.

A regression test for each would be great. CI and the no-mistakes check also need to be green.

contract-class: restore. The unconfigured run still aborts the same way; only the error now names what was observed, which Failure is loud and named already promises.

VISION per-rule (main 2125624):

  • Evidence is the only currency: aligns (diagnostic only)
  • The human owns the weights: aligns (no write path change; abort kept)
  • Nothing the model says is taken on faith: aligns (attribution is now measured against the staging copy instead of assumed)
  • The budget is the constraint, not a setting: aligns (n/a)
  • It reads what you already have and owns nothing: aligns
  • Failure is loud and named: aligns (still terminal, now named accurately), pending finding 1
  • Scope: aligns

…g 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>
@jadhavgaurav jadhavgaurav changed the title fix(synthesize): report a mid-run change to a watched repo file as observed fix(synthesize): stop misattributing concurrent edits during a synthesis run Oct 23, 2026
@jadhavgaurav jadhavgaurav changed the title fix(synthesize): stop misattributing concurrent edits during a synthesis run fix(synthesize): report a mid-run change to a watched repo file as observed Oct 23, 2026
@jadhavgaurav

jadhavgaurav commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks. Both findings are fixed in fd7ec5b, with a regression test each. Greptile then raised a P1 on that commit (below); ea983f1 fixes it and the head is now 2b60f7e, which adds only a comment rewrap from the pipeline.

  1. rebaseFingerprint (src/workspace.js) points the fingerprint of each staged skill at the text the rebuilt staging copy was built from, right after prepareWorkspace. A skill another process edits between the fingerprint and the rebuild is now just the starting text of the run, so it no longer reads as a write-through. An edit after the rebuild is still reported (a second test pins that). The memory file is not rebased, since it is staged from text that was already loaded.
  2. matchesStaging now resolves the key with a shared repoFilePath, the same rule repoFingerprint uses, so an absolute in-repo memoryFiles path is read from where it is and a real write-through keeps the stronger wording.
  3. Greptile P1: the rebase also ran on every fallback attempt, so a candidate that wrote straight to a repository skill and then failed with a classifiable error would have had that write copied into the next staging copy and absorbed. Every attempt after the first now checks the repository against the fingerprint before rebuilding and aborts as before if it changed. A test makes a candidate write the skill and then fall through.

With only the src change of each follow-up reverted, the tests for the findings fail and the control passes. pnpm run check passes locally (957 tests). Not run: I have not seen GitHub Actions results on this head yet (the workflows were waiting for approval), and everything here ran against the fake acpx, not a real harness.

Comment thread src/synthesize.js Resolved
…ding

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>
@jadhavgaurav jadhavgaurav changed the title fix(synthesize): report a mid-run change to a watched repo file as observed fix(synthesize): detect direct repo writes before rebasing fingerprint on fallthrough Oct 23, 2026
@jadhavgaurav jadhavgaurav changed the title fix(synthesize): detect direct repo writes before rebasing fingerprint on fallthrough fix(synthesize): report a mid-run change to a watched repo file as observed Oct 23, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @jadhavgaurav, this looks good. I reviewed fd7ec5b, ea983f1, and 2b60f7e and approved CI for the new head. Both Codex findings are fixed with a regression test each, and the Greptile P1 (a fallback attempt absorbing a direct skill write) is fixed by checking the repo before every rebuild after the first. CI on ubuntu and macOS, the generated-files guard, and no-mistakes are all green.

This is waiting on you for one last thing: live evidence. So far everything ran against the fake acpx. Could you run a real synthesis with a real harness and, while it's running, edit a staged skill in the repo from another shell? Please post what the run prints. The useful cases are an edit after the workspace is built (it should abort and name the change as observed, without blaming the harness) and, if you can manage it, an edit that lands before the rebuild (the run should treat it as the starting text and carry on). If you can't get the timing, just say so and we'll work out next steps. Once that's posted, this is ready to merge.

contract-class: restore. The unconfigured run still aborts the same way on a mid-run change; only the error now names what was observed, which "Failure is loud and named" already promises.

VISION per-rule (main 3882b86, head 2b60f7e):

  • Evidence is the only currency: aligns (diagnostic only)
  • The human owns the weights: aligns (no write path change; the abort stays, including on fallback attempts)
  • Nothing the model says is taken on faith: aligns (blame is measured against the staging copy, not assumed)
  • The budget is the constraint, not a setting: aligns (n/a)
  • It reads what you already have and owns nothing: aligns
  • Failure is loud and named: aligns (still terminal, now named accurately)
  • Scope: aligns

@jadhavgaurav

Copy link
Copy Markdown
Contributor Author

Live run against a real harness, on head 2b60f7e. Summary first: case (a) behaved as intended, and case (b) landed in a real window before the rebuild and the run carried on. The timing for (b) is narrow and only reachable one way, described below.

Setup

  • macOS 27.0.1, Node 24.14.0, Claude Code 2.1.309, acpx@0.20.0 (installed to a scratch prefix and put on PATH for the runs only), backpass 0.1.38 from this branch (node bin/backpass.js).
  • A separate Claude Code sign-in on the same account (own CLAUDE_CONFIG_DIR), so it is the real harness and real model calls, not the fake acpx.
  • Target is a scratch git repo with a 5 bullet AGENTS.md and two small skills under .agents/skills/. Its input is ten of my own Claude Code transcripts from unrelated projects, copied with their cwd rewritten to the scratch repo so they associate with it (scan shows 10 matched). XDG_CACHE_HOME and XDG_CONFIG_HOME point at scratch dirs.
  • Analysis was run once first (analyze --harness claude --analysis-agent claude --jobs 4 --since all --limit 10, 8 analyzed, 2 too short), so the runs below reuse that evidence.
  • The "other shell" is a small node script that polls ps every 40 ms and appends one line to .agents/skills/commit-style/SKILL.md in the repo when it sees a trigger process. The line is - Squash fixup commits before pushing (appended from another shell).

Case (a): edit after the workspace is built

Command (synthesis pinned so the trigger is unambiguous):

node bin/backpass.js --harness claude --analysis-agent claude --synthesis-agent claude --synthesis-model claude-sonnet-5 --synthesis-effort medium --jobs 4 --since all --limit 10

The script edited the skill the moment the first synthesis edit prompt process (backpass-synth-<pid>, --approve-all) appeared. Watcher log (acpx paths shortened):

08:05:58.626 EDITED .agents/skills/commit-style/SKILL.md (229 -> 298 bytes) trigger=prompt
08:06:35.915 proc acpx claude sessions close backpass-synth-56589

backpass output after the edit turn finished:

· synthesizing with claude (claude-sonnet-5) effort=medium
error .agents/skills/commit-style/SKILL.md changed in the repository during synthesis; nothing was proposed
  inspect the change with `git diff` and re-run - another process (a concurrent agent session or a scheduled job) may have edited the file mid-run; run from a worktree snapshot if other writers share this directory, and if nothing else was writing, suspect the synthesis harness
EXIT=1

Afterwards git diff showed exactly the one appended line, and the staging copy of that skill did not contain it. So the message names the file as changed in the repository, does not say the harness wrote it (the "now matches the staging copy" clause is absent), and the run still aborts as before.

Case (b): edit before the rebuild

The fingerprint is taken before config.agents.resolve("synthesis"), and the workspace is rebuilt after it, so the window is whatever resolve takes. With a pinned synthesis agent that is milliseconds and I could not hit it. With synthesis unpinned and a cold probe cache, resolve runs a real acpx session probe, which takes a few seconds. I used that. I restricted ladders in the scratch .backpassrc.json to claude only (claude-sonnet-5 for analysis, claude-opus-5 for synthesis); an earlier attempt with the default ladder was stopped by me within a minute because it picked a non-Claude harness, and I am not counting or posting it.

Command:

node bin/backpass.js --harness claude --analysis-agent claude --synthesis-effort medium --jobs 4 --since all --limit 10

The script edited the skill as soon as the first backpass-probe- process appeared. Watcher log (acpx paths shortened):

08:09:53.888 proc acpx claude sessions new --name backpass-probe-22736-1
08:09:53.888 EDITED .agents/skills/commit-style/SKILL.md (229 -> 298 bytes) trigger=probe
08:09:57.175 proc acpx claude sessions close backpass-probe-22736-1
08:09:57.249 staging copy .backpass/synthesis/.agents/skills/commit-style/SKILL.md now contains the appended line
08:09:57.399 proc acpx --model claude-opus-5 claude sessions new --name backpass-synth-22736

backpass output:

· synthesis: claude (claude-opus-5) effort=medium
· synthesizing with claude (claude-opus-5) effort=medium

proposal · bpdemo-r1 · AGENTS.md · 1 edit(s) from 8 session(s) · interactive 8 · non-interactive 0
  budget [#...............................] 88 -> 116 / 5,000 tok
  e1 REWRITE  Name the failure mode in "keep answers short and concrete" (+28 tok, 3 transcript(s))
  tier-2 tokens: input=10 output=2,336 cache_read=175,872 cache_write=64,958 total=243,176

Review and apply with `backpass apply` (nothing has been written).
EXIT=0

The staged copy was rebuilt from the edited text (first seen at 08:09:57.249, right after the probe session closed), no abort, no harness blame, exit 0, and the run produced a proposal. The repo skill still held the appended line at the end of the run.

Not shown

  • Nothing prints a line saying the edit was taken as starting text; the evidence for (b) is the watcher log, no error and a normal proposal.
  • I did not get a real harness to write through to a repo skill, so the stronger "now matches the staging copy" wording was not exercised live.
  • The fallback attempt path (an edit between two candidates) was not run: it needs a classifiable failure from the first candidate.
  • One run per case, macOS only, one model each (sonnet-5 for (a), opus-5 for (b)). GitHub Actions is not part of this.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @jadhavgaurav for the careful live runs. Case (a) aborted and named the file as changed in the repository without blaming the harness, and case (b) took the pre-rebuild edit as the starting text and produced a normal proposal, which is exactly what this PR promises. Being upfront about what you couldn't exercise is appreciated. Head 2b60f7e is green on ubuntu, macOS, the generated-files guard, and no-mistakes, and it merges cleanly onto main 016e770, so I'm merging it now.

contract-class: restore. The unconfigured run still aborts the same way on a mid-run change; only the error now names what was observed, which "Failure is loud and named" already promises.

VISION per-rule (main 016e770, head 2b60f7e):

  • Evidence is the only currency: aligns (diagnostic only)
  • The human owns the weights: aligns (no write path change; the abort stays, including on fallback attempts)
  • Nothing the model says is taken on faith: aligns (blame is measured against the staging copy, not assumed; confirmed live)
  • The budget is the constraint, not a setting: aligns (n/a)
  • It reads what you already have and owns nothing: aligns
  • Failure is loud and named: aligns (still terminal, now named accurately; confirmed live in case (a))
  • Scope: aligns

@kunchenguid
kunchenguid merged commit 1a1a175 into kunchenguid:main Oct 26, 2026
7 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @jadhavgaurav — really appreciate you taking the time on this.

MrGTV-love added a commit to MrGTV-love/backpass that referenced this pull request Oct 26, 2026
* 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>
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.

Synthesis abort blames the harness when a concurrent process edits a watched file

2 participants