Repository navigation
gardener: pull the project root before the checks (pull: true) - #1267
Conversation
The daily gardener reads a project root that nothing brings up to date, so its checks drift behind main. A project may now set "pull": true: before the checks the root is pulled fast-forward only, without a prompt and with a 5-minute limit. Any failure (local commits, no upstream, a missing or hanging git) is one warning finding, gardener.root-not-pulled, and the checks read the root as it was. A dry run never pulls. Refs #1064 Co-Authored-By: Claude Opus 5.5 <[email protected]>
FixWhat failed: the daily gardener reads each project's |
The red check's copy of cli.py without the kill ('a hanging pull is
stopped with its children') waits for the fake git and its child to
end, so their 30 s sleep put 30 s on run.test.py and took it past its
CI weight. 10 s still fails that copy (the test wants under 8 s) and
the real run stops it after 1 s.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (code lens, round 1) · read at: 8f56696 major: a git config with Checked and fine: diverged root (local commit) is refused and named, never merged or rebased (git 2.43, with and without State question: runs again: a second pull is a no-op, and 🤖 Generated with Claude Code |
A root with uncommitted changes to tracked files is no longer pulled (git status first; untracked files do not count). The pull itself pins merge.autoStash and rebase.autoStash off and passes --no-rebase and --no-autostash, so a user's git config cannot stash, re-apply and leave a conflicted tree behind a pull reported as fine. A missing root folder is named as such instead of as git failing to start. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (code lens, round 2) · read at: de1a488 blocker: none Round 1, fixed: autostash. With State question:
🤖 Generated with Claude Code |
A refused pull's warning in report.md now says why, from git's first error:/fatal: line and the files it lists (an untracked file where the new commit adds one, a left-over index.lock, a skip-worktree edit), not git's closing "Aborting". git's words stay out of the issue. The README no longer says untracked files are always safe: an ignored file at a path the new commit adds is replaced, as plain git pull does (pinned by a test). Co-authored-by: Claude Opus 5.5 <[email protected]>
Refs #1064.
The daily gardener reads each project's
root, but nothing brings that checkout up to date, so its checks drift behind main (the t3-fork root is pulled by hand today).A project may now set
"pull": true:git status --porcelain --untracked-files=no), it is not pulled at all, not even moved under edits a new commit leaves alone. Untracked files do not count: a fast-forward never changes them, and git refuses one that would.git -c merge.autoStash=false -c rebase.autoStash=false pull --ff-only --no-rebase --no-autostash, so the user's git config can never stash, merge or rebase. It runs with no prompt (GIT_TERMINAL_PROMPT=0), in its own process group, with a 5-minute limit per git call (a hanging git is stopped along with its children).gardener.root-not-pulled, and the local report says why. The checks then read the root as it was, and the run still finishes and still writes its report.pullwithoutrootis refused. The default is off, so existing machine files keep working.State question:
--force. The next day's run (or a--force) checks again from scratch. It pulls once the cause is gone; until then it gives the same one warning every day. No pull state is kept: the checkout itself is the state..git). One killed while updating files can leave.git/index.lock, or the tree half moved. In that case the next run'sgit statuseither fails on the lock, or shows the half-moved files as uncommitted changes. Both give the warning naming why, and nothing is pulled over them until someone fixes it by hand. It is never hidden and never "fixed" by the gardener.pull: it defaults tofalse, and the run behaves exactly as before.rootwithpull: trueis refused when the config is read. A folder that is not a git checkout gives the warning with git's own words ("not a git repository"). A root folder that does not exist gives the warning "the root … is not a folder". The checks still run in each case.Tests:
Pullclass infork-kit/gardener/tests/run.test.py(9 tests). Fix round 1 added: auto-stash in the root's config (both through the status check, and with that check bypassed so the pull's own flags are tested), a dirty root whose edits do not touch the new commit, an untracked file that does not block, and a missing or non-git root. There are 8 RedCheck mutations for the pull. The whole file passes locally (47 tests, git 2.43).--no-rebaseis hardening for git before 2.33 only, and there is no test for it: git 2.43 already refuses withpull.rebase=true.🤖 Generated with Claude Code