Repository navigation
Work handed over by label, across an organisation (0.3.0) - #5
Merged
Merged
Conversation
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
… and double labels Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…gain Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…d repos (0.3.0) The labels target is now polled with poll_claims, dispatched on its key before any repos[index] lookup (which would have panicked out of bounds). Repo polls read the stored ClaimsState and tag activity on claimed items `claimed`. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…budgeted paged reads Trust is decided per label by its newest labeled event (a later unlabeled one cancels it), label names match in any case, a trusted claim that loses trust is released and kept untrusted, since follows the trusted label, a cut events list decides nothing, a newly trusted claim in a watched repo is read once, comments are paged, a poll stops at 60 requests, a moved item is released as gone, and claimed_numbers compares repositories in any case. FakeFeed::strict for the claims tests. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
… and duplicate targets GithubSource::target replaces indexing into repos in the worker; an undecodable stored claims state is logged. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…ource Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…ead once, reopen not repeated A label the search does not list is checked on the item; label_events keeps only labels that count; items read and not stored are remembered in skipped until they change; the cut-events gap id carries updated_at; a stored reopen is not mailed as activity; a missing repository_url means the same repository. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
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.
What this is
A person hands work to an agent by putting a label on it:
assigned:<tag>on an issue or pull request,review:<tag>on a pull request, where<tag>belongs to one mailbox. Until now mailroom polled a fixed list of repositories, taggedrouted:assignedonly when the bot was an assignee, and knew one optional review label per source. With this change the agent learns of the hand-over wherever in the organisation the item lives, hears what happens on it while the label stays, and is told when it is released.Design:
docs/superpowers/specs/2026-11-20-label-claims-design.md. The behaviour was settled with Nyx, whose own poller will switch over to match. Released as 0.3.0. It needs CycleFive/brokers 0.5.0 (the GitHub broker'sFeedanswers/search/issues), which is already deployed.Design
A GitHub source gains an optional block, which adds one poll target to it:
Each poll of that target (
poll_claims,crates/logic/src/claims.rs):labeledevent is not followed by anunlabeledone and the label is on the item, so a lagging search decides nothing.routed:assignedorrouted:reviewwhen trusted,untrusted-labelwhen not.claimed, also in a repository the mailbox does not otherwise watch. In a watched repository the per-repo poll carries that activity, after the claiming poll has read once what was said since the label.released, when the item is closed, loses the label, loses its trusted label, or is gone; only after reading the item itself confirms it. A reopened item that is still labelled is handed over again.claimed,releasedanduntrusted-labeldo not startrouted:, so they inform without calling for attention. Labels add to assignee and requested-reviewer routing; they do not replace it.Guards
labeledevent. A bot's label can neither create a routed hand-over nor keep a claim followed once the trusted label is gone.review_labelmay not be one of the two label names. The per-repo poll routesreview_labelwithout asking who applied it.incomplete_resultsfrom the search releases nothing.reposby target position; targets are resolved by key, and target keys are unique across an agent's sources.Checked
cargo fmt,cargo clippy -D warnings,cargo test --workspace(186 tests; 67 on the claims poller, each safety rule with a mutation check), the wasm32 build, and the door's typecheck and tests.poll_claimsagainst real GitHub for an existing tag: an issue labelled by an admin produced arouted:assignedclaim and one follow-up comment taggedclaimed; a pull request labelled by an app's bot produceduntrusted-labelwith no lookup and was not followed; the second poll made one request and mailed nothing.Not exercised before deploy: the request path through the broker's
Feedwith an installation token. After deploy,mailbox_infomust show nolast_errorongithub:<broker>:labels:<org>.After merge
Add
labelsto each mailbox's GitHub source in the mailbox manifest,npm run mailbox -- deploy --mailroomfrom CycleFive/brokers, deploy the door, verify, tagv0.3.0, release.🤖 Generated with Claude Code
https://claude.ai/code/session_017zqkE8grD6nh1bNnb2r1X8