Repository navigation
✨ Durable one-PR-per-topic claims for long-lived agents - #18501
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Mutation testinggremlins found 4 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
ℹ️ 1 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first
Verdict: |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. hive/awaiting-ci: rebased onto v5 (one conflict in policy_overlays.go: busy-branch guard + topic tags merged into one formatter). CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
c28da3c to
bfa21ab
Compare
|
New changes are detected. LGTM label has been removed. |
|
scanner: CI is red but baseline triage says PR-local and stale-branch (action MERGE_BASE): the branch is behind v5 and the red checks (build-go, golangci-lint, test shards) should be re-evaluated after merging the base in. Not pushing to this human-authored branch; please merge/rebase v5 and re-run. Deferred this kick. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
|
cc @joerunde: this is part of the hive changes for the spyre-inference deps agent and sandboxed reviewer setup. |
Adds bd topic claim/get/list/release backed by the agent's bead store.
A second open claim for the same topic is refused; the governor follows
a claimed PR's renamed head branch, releases the claim when the PR
merges or closes, lists claims in the kick (and as ${TOPIC_CLAIMS}),
and tags claimed PRs in the FIX-BEFORE-NEW and held-PR blocks.
Fixes #18493
Signed-off-by: Andy Anderson <andy@clubanderson.com>
bfa21ab to
5ead062
Compare
Fixes #18493
What
A long-lived agent can now record which pull request carries an ongoing topic and find that PR by number on later kicks, even after a branch rename.
pkg/beads/topic.go. A topic claim is onein_progresschore bead in the agent's own bead store (external_reftopic:<key>, metadatatopic_key/repo/pr/branch/state), written under the existing cross-process flock. At most one open claim per key; re-claiming for the same PR is idempotent and updates the branch; a different PR is refused withErrTopicClaimed.bd topic claim <key> --repo <owner/name> --pr <n> [--branch] [--actor],bd topic get|list [--json],bd topic release <key>. Refusal exits 2 and names the holding PR.📌 Topic claimsblock in the dynamic tail when the agent holds claims, also available as the${TOPIC_CLAIMS}template variable (renders usage lines even with no claims). FIX-BEFORE-NEW and hold-gated PR rows carry[topic: <key>].SetPRTerminalObservedHook), and on each eval cycle from the actionable snapshot (Items/Held/Attributed), which also refreshestopic_branchwhen the head ref changed.src/docs/beads-cli.md"Topic claims"; changelog fragment.Tests
pkg/beads/topic_test.go,cmd/bd/topic_test.go,pkg/scheduler/topic_claims_test.go,cmd/hive/topic_claims_test.go.Related: #18488 (an in-use branch signal that a topic claim can feed).
🤖 Generated with Claude Code