Skip to content

fix(runtime-core): apply runner workspace patches without whitespace rejection - #2640

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-2636-wp-codebox
Dec 5, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/issue-2636-wp-codebox

Conversation

@chubes4

@chubes4 chubes4 commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Runner workspace apply-back ran git apply --whitespace=error, so one whitespace issue in agent-written content (for example a new blank line at EOF) threw away all of a run's edits and no PR was opened. The host now applies the sandbox's canonical patch byte-for-byte. Whitespace style is left to the target repository's own lint and verification.

What changed

  • Apply-back's git apply --check and git apply use --whitespace=nowarn instead of --whitespace=error. Patches with trailing spaces or blank lines at EOF now apply.
  • nowarn also overrides a host apply.whitespace=fix config, so the host file is byte-identical to the sandbox file.
  • Seed identity, path validation, digest checks and validateAppliedWorkspace still guard integrity, unchanged.
  • New regression case in tests/runner-workspace-apply.test.ts covers trailing spaces, a trailing tab and a blank line at EOF with apply.whitespace=fix set.
  • scripts/artifact-patch-git-apply-smoke.ts uses the same flags as the host apply.

Verification

All gates passed on c321f0cb1dd2. Base main: gated on f1871b88cbd8, target now f1871b88cbd8, re-verified: no.

  • HOMEBOY_LINT_BASE=f1871b88cbd864fad990b9212a170434433f36fe homeboy --placement local review lint wp-codebox --path . --…: passed, 112040 ms; retained gate metadata.
  • npx tsx tests/runner-workspace-apply.test.ts: passed, 587 ms; retained gate evidence.
  • repro: none (no repro gate was declared, so these gates do not prove the issue).
  • CI: pending

Gate 2 output
runner workspace apply ok

Cook run
  • Cook ID: agent-task-3dffcc19-ae9a-4008-84bf-b3526f823164
  • Attempt run ID: agent-task-3dffcc19-ae9a-4008-84bf-b3526f823164-attempt-1-39ab3009
  • Gate 1: tree bb1ba68e2eec2466206bc0eb0dc8a1900e9a33e8
  • Gate 2: tree bb1ba68e2eec2466206bc0eb0dc8a1900e9a33e8

Delivery

  • Delivered: Drop --whitespace=error from apply-back check and apply
  • Delivered: Regression case in tests/runner-workspace-apply.test.ts

Evidence

  • Local check: node --import tsx tests/runner-workspace-apply.test.ts passed with the fix. With only the source change reverted, the new case failed with 'Host git apply failed: ... trailing whitespace'. Plain npx tsx could not run in this sandbox because its IPC pipe failed.
  • Local check: scripts/artifact-patch-git-apply-smoke.ts passed after the flag change.
  • The lint gate could not run locally: Homeboy could not read the nodejs extension manifest here. Gate results are left to Homeboy.

AI disclosure

Tool: Homeboy Cook. Agent: Homeboy (roadie). Model: roadie · route cook-heavy · served claude-opus-5-5. Cook time: 9m47s.

The AI read the issue, changed the git apply flags, wrote the regression test and checked it against the old and new code, under the direction of the Cook requester. Homeboy reports controller verification separately from this account of the AI's work. A human reviews before merge.

Refs #2636

@chubes4
chubes4 marked this pull request as ready for review December 5, 2026 15:21
@chubes4
chubes4 merged commit fcd3e47 into main Dec 5, 2026
4 of 5 checks passed
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.

1 participant