Publish work the executor committed itself, and gate when there is none
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m15s
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m15s
On the first live run the executor committed its milestone itself, as its plan asked. The publisher only published a commit it made, found a clean tree, reported "no changes to publish", and left the agent in EXECUTING, where every message is answered "busy". - publish(): with nothing left to commit, publish anyway when the branch has commits origin/<base> lacks; report no changes only when it has none. - push_followup(): same for review fixes, comparing HEAD with what the remote branch holds (ls-remote; pushes go by URL, so there is no tracking ref). - Nothing to publish now gates to AWAIT_INPUT, and the reply returns to the still-approved milestone plan. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
1 parent
8283e9eb1c
commit
f97e459bc7
6 files changed
+119
-11
No files matched your search
@@ -68,3 +68,20 @@ def test_git_error_on_bad_command(tmp_path: Path) -> None:
|
||||
repo.root.mkdir()
|
||||
with pytest.raises(GitError):
|
||||
repo.head_sha()
|
||||
|
||||
|
||||
def test_commits_since_and_remote_sha_against_a_local_remote(
|
||||
repo: GitRepo, tmp_path: Path
|
||||
) -> None:
|
||||
remote = GitRepo(tmp_path / "remote.git")
|
||||
remote.root.mkdir()
|
||||
remote._run("init", "-q", "--bare")
|
||||
(repo.root / "a.txt").write_text("a")
|
||||
base = repo.commit_all("base")
|
||||
repo.push(str(remote.root), "main")
|
||||
repo._run("update-ref", "refs/remotes/origin/main", "HEAD")
|
||||
assert repo.remote_sha(str(remote.root), "main") == base
|
||||
assert repo.remote_sha(str(remote.root), "absent") is None
|
||||
(repo.root / "b.txt").write_text("b")
|
||||
repo.commit_all("ahead")
|
||||
assert repo.commits_since("origin/main") == 1
|
||||
Reference in new issue
Block a user