Publish work the executor committed itself, and gate when there is none #63

Merged
dongar merged 1 commits from publish-executor-commits into main 2026-09-29 16:23:20 +00:00
Collaborator

Found on the live end-to-end run. qwen3.8-27b finished milestone 1 (slugify and 12 passing tests) and committed the work itself, as Opus's milestone plan asked. The publisher only publishes a commit it makes, so it found a clean tree and reported "no changes to publish". It also left the agent in EXECUTING, where every message is answered "busy".

Changes

  • publish(): when commit_all has nothing to commit, publish anyway if the branch has commits that origin/<base> lacks. Report "no changes" only when it has none.
  • push_followup(): the same bug in the review loop. A fix the executor committed itself was reported as "no code change was needed". Now HEAD is compared with what the remote branch holds (git ls-remote; pushes go by URL, so there's no tracking ref).
  • GitRepo gains commits_since(ref) and remote_sha(url, branch).
  • Nothing to publish now gates to AWAIT_INPUT, and the reply returns to the still-approved milestone plan (the existing milestone_stopped path).

Tests: executor-committed work is published; an executor-committed follow-up is pushed, and a repeat with nothing new isn't; nothing to publish gates and can be left; the real git helpers run against a local bare remote. The test_pr_open case that expected the old stay-in-EXECUTING behaviour is updated. The new cases fail on main. 434 unit tests pass; lint and format clean.

Related: #62 (create the milestone branch when execution starts), which would also keep the executor's commits off local main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

Found on the live end-to-end run. qwen3.8-27b finished milestone 1 (slugify and 12 passing tests) and committed the work itself, as Opus's milestone plan asked. The publisher only publishes a commit it makes, so it found a clean tree and reported "no changes to publish". It also left the agent in `EXECUTING`, where every message is answered "busy". **Changes** - `publish()`: when `commit_all` has nothing to commit, publish anyway if the branch has commits that `origin/<base>` lacks. Report "no changes" only when it has none. - `push_followup()`: the same bug in the review loop. A fix the executor committed itself was reported as "no code change was needed". Now HEAD is compared with what the remote branch holds (`git ls-remote`; pushes go by URL, so there's no tracking ref). - `GitRepo` gains `commits_since(ref)` and `remote_sha(url, branch)`. - Nothing to publish now gates to `AWAIT_INPUT`, and the reply returns to the still-approved milestone plan (the existing `milestone_stopped` path). **Tests:** executor-committed work is published; an executor-committed follow-up is pushed, and a repeat with nothing new isn't; nothing to publish gates and can be left; the real git helpers run against a local bare remote. The `test_pr_open` case that expected the old stay-in-`EXECUTING` behaviour is updated. The new cases fail on `main`. 434 unit tests pass; lint and format clean. Related: #62 (create the milestone branch when execution starts), which would also keep the executor's commits off local `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added 1 commit 2026-09-29 16:17:42 +00:00
Publish work the executor committed itself, and gate when there is none
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m15s
f97e459bc7
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
dongar approved these changes 2026-09-29 16:23:16 +00:00
dongar merged commit 1ccea20a10 into main 2026-09-29 16:23:20 +00:00
dongar deleted branch publish-executor-commits 2026-09-29 16:23:20 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#63