Following #68's close — confirming the replacement design before opening code so it matches the intended direction.
Plan:
- Keep the target checkout on
main (preserve the read-only invariant — do not materialize the PR as the working tree).
- Reuse the existing
fetchSourcePullRequestHead primitive (src/repair/source-pr-checkout.ts) to fetch refs/pull/<n>/head into a read-only refs/remotes/clawsweeper/... ref — no new parallel helper.
- Instruct Codex in
prompts/review-item.md to inspect via git diff origin/main...<ref> and git show <ref>:path.
- Slim
compactPullFilesForPrompt to file metadata only, dropping patch bodies. Verified .patch is consumed only by the prompt builder; repair/automerge gates run on the decision JSON + live git, so nothing downstream breaks.
Open question I want to get right: the main checkout is --filter=blob:none, so I'd pre-warm the PR diff blobs deterministically under ClawSweeper's control rather than let Codex trigger lazy promisor fetches inside the sandbox.
Net effect: deletes the truncation layer entirely, simpler core bot. @steipete does this match the direction from #68? I'll scope it as refactor(review): off fresh main.
Following #68's close — confirming the replacement design before opening code so it matches the intended direction.
Plan:
main(preserve the read-only invariant — do not materialize the PR as the working tree).fetchSourcePullRequestHeadprimitive (src/repair/source-pr-checkout.ts) to fetchrefs/pull/<n>/headinto a read-onlyrefs/remotes/clawsweeper/...ref — no new parallel helper.prompts/review-item.mdto inspect viagit diff origin/main...<ref>andgit show <ref>:path.compactPullFilesForPromptto file metadata only, dropping patch bodies. Verified.patchis consumed only by the prompt builder; repair/automerge gates run on the decision JSON + live git, so nothing downstream breaks.Open question I want to get right: the
maincheckout is--filter=blob:none, so I'd pre-warm the PR diff blobs deterministically under ClawSweeper's control rather than let Codex trigger lazy promisor fetches inside the sandbox.Net effect: deletes the truncation layer entirely, simpler core bot. @steipete does this match the direction from #68? I'll scope it as
refactor(review):off freshmain.