Repository navigation
fix(babysitter): ignore executable bits the sandbox's filesystem dropped - #652
Conversation
Live run #2 (Cloud run ba91b3b1) fixed the reviewed defect, but its proposal was refused for 63 changed files: the sandbox checkout had lost the mode of all 61 executables in the repository, so each read as changed. The checkout now records core.fileMode=false (the agent's git status is clean), and the private git dir the proposal runs in sets it too, so a lost mode never reaches a proposal. A mode the agent sets is ignored as well; the publisher never applied mode changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 497569fc-550a-44a0-a906-35c233c27ba6 Session-Id: 497569fc-550a-44a0-a906-35c233c27ba6
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Session-Id: 497569fc-550a-44a0-a906-35c233c27ba6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Live run #2 of the Babysitter fixer (Cloud run
ba91b3b1-aaff-5242-b390-d4782587fc98, AgentWorkforce/cloud-e2e-sandbox#49, fixerf107bcf9) got past the EACCES that stopped run #1 (#646):agent-6fixed exactly the reviewed defect (aRangeErroron a badattempts, plus a test).But publication failed closed:
Cause: the sandbox checkout loses executable bits. cloud-e2e-sandbox has exactly 61 files at mode
100755at the PR head (git/trees/b232680e?recursive=1), and 61 plus the 2 files the agent edited = 63. Every executable read as a mode change. The agent's own initialgit statusshowed the same: "All other listed modifications were already present in the working tree before I started".Change (
examples/babysitter/fix.ts)checkoutHeadrecordscore.fileMode=falsein the fresh checkout's config, so the agent'sgit statusand the merge step (git -C <checkout>) are clean.proposeChangessetscore.fileMode=falsein its private git dir's environment. It never reads the checkout's config (fix(babysitter): propose from a private git dir, never the checkout's .git #646), so a lost mode never reaches a proposal.A mode the agent itself sets is now ignored too. The publisher (
buildCommitOperations) never applied mode changes anyway.New fixer digest:
fe9f2512421fdbeac327e360db078c2a33c2d3542590382807b75b65a666e4eb. Diagnose is unchanged at580bab1d…. Cloud's pin needs a one-line follow-up.Tests
task.test.ts: "a checkout whose filesystem dropped executable bits proposes only the real edits". Two executables committed at 755 and chmodded to 644 in the checkout, plus one real edit, givefiles: ['src/retry.ts'].fixer.test.ts: "a checkout whose filesystem dropped executable bits reads as clean". AftercheckoutHead, a chmodded executable gives an emptygit status --porcelain.Evidence (
examples/babysitter/evidence/p2-task-modes/)09-filemode-mutation.txt, from the committedscripts/filemode-mutation.sh, run verbatim:actual: [ 'scripts/a.sh', 'scripts/b.sh', 'src/retry.ts' ].git config core.fileMode falsein the checkout) fails the clean-status test.fix.tsis restored withgit restore --source=HEAD, and its sha256 matches the original,47b09cd1….02-all-babysitter-green.txt: 176 tests, 169 pass / 0 fail / 7 todo.03-artifact-check.txt: fixerfe9f2512….🤖 Generated with Claude Code
Note
Low Risk
Narrows proposal diffs by ignoring file-mode noise in checkout and proposal git; content changes are unchanged and modes were not published anyway.
Overview
Fixes Babysitter fixer runs that were refused for “changes 63 files” when the sandbox checkout lost executable bits on tracked scripts—only a couple of real edits were intended.
Checkout (
checkoutHead) now setscore.fileMode=falseon the fresh repo after init, sogit statusstays clean for the agent when the filesystem no longer matches index modes.Proposal (
proposeChanges) adds the same setting to the isolated private git environment (alongside existing hooks/quotePath overrides), so mode-only diffs are not counted toward the patch file list or caps.The shipped babysitter-fixer artifact and manifest digest are updated (
fe9f2512…). New tests simulate chmod 755→644 on executables; mutation evidence (filemode-mutation.sh) shows each half of the fix is required.Reviewed by Cursor Bugbot for commit 9a46d05. Bugbot is set up for automated code reviews on this repo. Configure here.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes Babysitter proposals tripping the 50-file cap when the sandbox checkout loses executable bits, because every executable read as changed.
checkoutHeadrecordscore.fileMode=falsein the fresh checkout, so the agent'sgit statusand the merge step are clean.proposeChangessetscore.fileMode=falsein its private git dir, so a lost mode never reaches a proposal; a mode the agent sets is ignored too, and the publisher never applied modes anyway.Written for commit 9a46d05. Summary will update on new commits.
Agent Relay sessions
claudesession497569fc· opened viagh pr create· last active 2026-10-10claudesession5863fddb· contributor · rangh prcommands · last active 2026-10-10