Repository navigation
Skip branches HEAD already contains when harvesting - #129
Merged
moodmosaic merged 1 commit intoNov 3, 2026
Merged
Conversation
10 of 12 tasks
Contributor
Author
|
What this doesn't fix (we can brainstorm on how/if to fix it in another PR)
|
Member
|
Thank you, @orsissimo! Can you rebase this? |
orsissimo
force-pushed
the
fix/harvest-merged-branches
branch
2 times, most recently
from
November 3, 2026 16:18
8e4d369 to
2fe0744
Compare
Member
|
One more rebase, @orsissimo. 🚀 |
orsissimo
force-pushed
the
fix/harvest-merged-branches
branch
from
November 3, 2026 16:24
2fe0744 to
eed5ebd
Compare
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.
Summary
HEADalready contains before checking whether they descend fromHEAD.ad6237d), including Isolate runtime state and serialize engagement operations #125, Clone the bare repo and mirrors without hardlinks #127 and Avoid grep -q behind a pipe under pipefail in tests #128.Changes
harvest.sh: report 0 new commits and skip branches already contained inHEAD. If the ancestry comparison fails with an unexpected status, remove the temporary remote and exit with that status.tests/test_harvest.sh: add section 7.7 covering repeat harvests after merging agent and interactive work, including--dry, unchangedHEADand tag count, and remote cleanup. Check that an older interactive branch is skipped while new agent work is merged.CHANGELOG.md.Not in this PR: If agents keep pushing to
agent-workafter an interactive branch was harvested, or the user committed locally after start,agent-workstill does not descend fromHEADand harvest still refuses with the old "does not descend from HEAD" message. Telling this apart from rewritten upstream history needs the bare repo to record where it started, which belongs with step 2 of the bare repo lifecycle work in #115.Self-review checklist
Test plan
Validation after rebase onto
ad6237d(2026-11-03):./tests/test.sh --allpasses its unit and runtime phases; API and OAuth phases are skipped as noted below.git diff --checkpass.ANTHROPIC_API_KEYandCLAUDE_CODE_OAUTH_TOKENare not set in this session.Earlier validation, before this rebase:
bash tests/test_harvest.sh: 55 passed. With master'sharvest.sh, 8 checks in the new section 7.6 fail../tests/test.sh --unit: macOS Bash 3.2.57, 1403 tests; Ubuntu 24.04, 1415 tests as UID 501 and UID 1000. Each run covered 13 files with 0 failures in three full rounds../tests/test.sh --runtime: 16 passed on macOS and Ubuntu as UID 501 and UID 1000, in three rounds../tests/test.sh --oauth: passed with a real agent on macOS and Ubuntu as UID 501 and UID 1000.costs.sh,progress.sh, Cleanup andgit fsck. The harvest after post-process exits 0 with nothing new; master stops with "does not descend from HEAD" once the interactive branch is merged. Every other step matches master, including the object mode and Cleanup checks that fail on master and that Clone the bare repo and mirrors without hardlinks #127 fixes../tests/test.sh --all: not run.