Skip to content

Re-verify-free finalization, prompt no-CI handoff, pipefail-safe checks, revision names, fence protect paths - #188

Merged
AbirAbbas merged 9 commits into
mainfrom
fix/e2e-findings-2026-11-12
Nov 12, 2026
Merged

AbirAbbas merged 9 commits into
mainfrom
fix/e2e-findings-2026-11-12

Conversation

@AbirAbbas

@AbirAbbas AbirAbbas commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Existing deployments are unchanged by default. The only default differences are the defects' own corrections: finalization no longer adds its own .gitignore or other unrequested commits after verification, a repository with no CI configuration hands off without the 25-minute wait, pipefail no longer flips a zero-count check, and the revision summary no longer names a prose word. SWE_FENCE stays off by default and SWE_FENCE_PROTECT unset 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_issue through the factory loop.

Checked

  • Tests per fix, each failing on the unchanged tree for the right reason.
  • go build ./..., go vet ./..., go test ./..., gofmt, and a macOS cross-build under go/. One unrelated test in an untouched package failed once in the full run and passes alone on this branch and on main.

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 unsteered build_issue opened 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_init step edits .gitignore on 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-exec runs and no skips. Three tests that fail on macOS fail on main too (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/go on macOS (no model key or network required):

  1. Finalization adds .gitignore after strict file-scope verification passes (related to #162) #183 — Finalization adding .gitignore re-verifies and withholds scope-violating PR

    go test -v -count=1 -run '^TestFinalizationAddingGitignoreReverifiesAndWithholdsScopeViolatingPR$' ./internal/orch
    • What you should see: Both subtests pass (finalization_adding_gitignore_fails_strict_two-file_scope_and_withholds_PR verifies run_verifier is re-invoked after finalization adds .gitignore, final verification fails on the 3-file diff, and run_github_pr is not called; finalization_adding_gitignore_when_criterion_excludes_gitignore_still_publishes_PR verifies run_github_pr still runs when .gitignore is allowed).
  2. A repository without CI delays the factory PR handoff by about twenty-five minutes #186 — Repository without CI returns no_checks promptly instead of polling for 25 minutes

    go test -v -count=1 -run '^TestNoChecksReturnsPromptlyWithoutConsumingFullWaitCap$' ./internal/cigate
    • What you should see: Both subtests pass (workflow-free_git_repo_returns_no_checks_on_first_poll_without_sleeping finishes in 1 poll / 0 sleeps / 0s; no_checks_starting_within_startup_grace_returns_no_checks_well_before_1500s_cap finishes within the 60s startup grace window).
  3. Generated acceptance commands give different verdicts with shell pipefail enabled #184 — Zero-match grep -c acceptance pipelines pass identically with and without pipefail

    go test -v -count=1 -run '^TestZeroMatchGrepCountPipelineUnderPipefail$' ./internal/critcheck
    • What you should see: Both subtests pass (FixPlan rewrites | grep -c '^-[^-]' | grep -qx 0 into | { grep -c '^-[^-]' || true; } | grep -qx 0 which exits 0 under both sh -c and bash -o pipefail -c; Reconcile marks the zero-deletion check Repaired and marks RepairedFailed when a deletion exists).
  4. Plan revision summary reports table instead of the requested subtest name #185 — Plan revision summary reports zero_width_space instead of table

    go test -v -count=1 -run '^TestNamedTableSubtestCapturesRequestedIdentifierNotProseWord$' ./internal/orch
    • What you should see: PASS — readReviewRequests, howThePlanChanged, and PlanReviewMarkdown report the plan now includes `zero_width_space`. and do not report table.
  5. Limitation: a verifier can read parent operator notes with SWE_FENCE enabled #187 — SWE_FENCE + SWE_FENCE_PROTECT hides parent operator notes under macOS sandbox-exec while keeping the allowed build and toolchain usable

    go test -v -count=1 -run '^TestProtectedOperatorPathsAreHiddenWhileBuildAndToolchainStayUsable$' ./internal/fence
    • What you should see: Both subtests run and PASS on macOS using /usr/bin/sandbox-exec (Seatbelt): the fenced launcher reads prd.md in the allowed build directory, fails to read sibling build B's prd.md, fails to read the parent operator NOTES.md and external SPEC.md protected by SWE_FENCE_PROTECT, and leaves the host NOTES.md intact.

🤖 Generated with Claude Code

…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 AbirAbbas changed the title HOLD: re-verify after finalization, prompt no-CI handoff, pipefail-safe checks, revision names, fence protect paths Re-verify-free finalization, prompt no-CI handoff, pipefail-safe checks, revision names, fence protect paths Nov 12, 2026
@AbirAbbas
AbirAbbas marked this pull request as ready for review November 12, 2026 23:31
@AbirAbbas
AbirAbbas merged commit b281a4c into main Nov 12, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment