Repository navigation
Re-verify-free finalization, prompt no-CI handoff, pipefail-safe checks, revision names, fence protect paths - #188
Merged
Merged
Conversation
…ore (#183) Build previously computed verification success before finalizeRepos ran, so when run_repo_finalize committed a new or updated .gitignore after initial verification passed, a pull request could be published whose diff violated an approved file-scope acceptance criterion. Snapshot target repositories before finalization and re-run verification and git-scope assertions whenever finalization changes HEAD, working-tree status, or .gitignore before deciding whether the build succeeded.
…hecks start (#186) WatchPRChecks previously waited for the entire wait_seconds cap (1500s by default) when gh pr checks reported zero checks, delaying build completion by 25 minutes on repositories without CI. Detect workflow-free local git repositories to return no_checks on the first empty poll, and bound the initial no-check startup wait by NoCheckGraceSeconds while continuing to wait up to the full wait_seconds cap once any check registers.
critcheck previously ran criterion commands under sh -c without pipefail and left '| grep -c <pat> | grep -qx 0' pipelines untouched, even though grep -c exits 1 on zero matches and makes that pipeline unsatisfiable under bash -o pipefail. Run criterion checks under bash -o pipefail -c when bash is available and rewrite '| grep -c <pat> | grep -qx 0' into '| { grep -c <pat> || true; } | grep -qx 0' in FixPlan and Reconcile so zero-match assertions give identical verdicts with and without pipefail.
namedPattern in revision_check.go previously captured the first word immediately following named or called, so feedback such as 'one additional named table subtest zero_width_space' captured 'table' instead of 'zero_width_space' and reported 'table' in the revised plan summary. Skip un-backticked descriptive category nouns before the target identifier and ignore un-backticked prose stopwords while preserving explicitly backticked code names.
… SWE_FENCE scope (#187) SWE_FENCE isolated sibling builds under the shared workspace root while leaving parent or external operator directories on the host readable. Add SWE_FENCE_PROTECT (Scope.Protect) to hide configured operator files and directories outside the allowed build in both Seatbelt and bubblewrap, while documenting the sibling-build read-scope limitation.
AbirAbbas
marked this pull request as ready for review
November 12, 2026 23:31
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing deployments are unchanged by default. The only default differences are the defects' own corrections: finalization no longer adds its own
.gitignoreor other unrequested commits after verification, a repository with no CI configuration hands off without the 25-minute wait,pipefailno longer flips a zero-count check, and the revision summary no longer names a prose word.SWE_FENCEstays off by default andSWE_FENCE_PROTECTunset gives byte-identical fence arguments.Fixes #183. Fixes #184. Fixes #185. Fixes #186. Fixes #187.
Five defects in the Go node, found while running
build_issuethrough the factory loop..git/info/exclude, it stages no untracked files, and it commits nothing when it only removed its own debris. If a finalization still changes tracked content, the build drops that change (keeping only its removal of artifacts the run itself created) and opens the pull request with the verified tree, saying so in the result. There is no new failure path: a build that opens a pull request today still opens one. This also closes Repo-finalize step commits untracked scratch tests the verifier excluded ("chore: finalize repo for handoff"), breaking CI on the build PR #162 on the Go node.no_checkson the first poll. A repository WITH CI behaves exactly as before by default: it polls up to the full wait cap, so checks that register late still count. A shorter no-check grace for such repositories is opt-in:SWE_CI_NO_CHECK_GRACE_SECONDS, or therun_ci_watcherinputno_check_grace_seconds(unset = off).pipefail. Zero-countgreppipelines are repaired so the verdict is the same with and withoutpipefail.SWE_FENCEon, a verifier could read operator notes in parent folders. An optionalSWE_FENCE_PROTECTlists paths outside the workspace root to hide; unset, the fence's profile and arguments are byte-identical to today's. The fence's scope is documented.Checked
go build ./...,go vet ./...,go test ./...,gofmt, and a macOS cross-build undergo/. One unrelated test in an untouched package failed once in the full run and passes alone on this branch and onmain.Live check (Linux, one machine, real control plane and models)
The first version of the #183 fix re-verified after finalization and, in a live build, withheld the pull request when finalization committed
.gitignore. It was reworked as described above and rerun: an unsteeredbuild_issueopened its pull request on the first run, finalization made no commit and touched no tracked file, and the verifier ran once. The CI watcher (#186) passed in 31 seconds on a repository with CI.Still open after this change (not part of it): the planner's
run_git_initstep edits.gitignoreon the feature branch before any coding, so the pull request still carries that edit.Checked on macOS 15.6 (arm64): build, vet and the full test suite; the seatbelt fence's 8 tests passed 3 of 3 with real
sandbox-execruns and no skips. Three tests that fail on macOS fail onmaintoo (a BSD grep wording gap in critcheck and two furrow tests that point at/bin/false); they are not from this change.Mac check list
Run from
/path/to/SWE-AF/goon macOS (no model key or network required):Finalization adds .gitignore after strict file-scope verification passes (related to #162) #183 — Finalization adding
.gitignorere-verifies and withholds scope-violating PRfinalization_adding_gitignore_fails_strict_two-file_scope_and_withholds_PRverifiesrun_verifieris re-invoked after finalization adds.gitignore, final verification fails on the 3-file diff, andrun_github_pris not called;finalization_adding_gitignore_when_criterion_excludes_gitignore_still_publishes_PRverifiesrun_github_prstill runs when.gitignoreis allowed).A repository without CI delays the factory PR handoff by about twenty-five minutes #186 — Repository without CI returns
no_checkspromptly instead of polling for 25 minutesworkflow-free_git_repo_returns_no_checks_on_first_poll_without_sleepingfinishes in 1 poll / 0 sleeps / 0s;no_checks_starting_within_startup_grace_returns_no_checks_well_before_1500s_capfinishes within the 60s startup grace window).Generated acceptance commands give different verdicts with shell pipefail enabled #184 — Zero-match
grep -cacceptance pipelines pass identically with and withoutpipefailFixPlanrewrites| grep -c '^-[^-]' | grep -qx 0into| { grep -c '^-[^-]' || true; } | grep -qx 0which exits 0 under bothsh -candbash -o pipefail -c;Reconcilemarks the zero-deletion checkRepairedand marksRepairedFailedwhen a deletion exists).Plan revision summary reports table instead of the requested subtest name #185 — Plan revision summary reports
zero_width_spaceinstead oftablePASS—readReviewRequests,howThePlanChanged, andPlanReviewMarkdownreportthe plan now includes `zero_width_space`.and do not reporttable.Limitation: a verifier can read parent operator notes with SWE_FENCE enabled #187 —
SWE_FENCE+SWE_FENCE_PROTECThides parent operator notes under macOSsandbox-execwhile keeping the allowed build and toolchain usablePASSon macOS using/usr/bin/sandbox-exec(Seatbelt): the fenced launcher readsprd.mdin the allowed build directory, fails to read sibling build B'sprd.md, fails to read the parent operatorNOTES.mdand externalSPEC.mdprotected bySWE_FENCE_PROTECT, and leaves the hostNOTES.mdintact.🤖 Generated with Claude Code