route claim-swarm sub-agents by each issue's model:/effort: labels - #6374
Merged
Conversation
Planners have stamped `model:` and `effort:` dispatch labels on issues for a while, but every constant in dispatchLabels.js was producer-side — how to CHOOSE a label. Nothing told the agents that later read those labels what to do with them, so a carefully-routed backlog was dispatched exactly as if it were unlabeled: the claim swarm fanned out N sub-agents and ran all of them at its own run's default, and `model:heavy` + `effort:max` bought the issue nothing. Adds the consumer half as two shared forms that split by audience: `DISPATCH_HINT_READING_GUIDANCE` (what the labels mean — safe for any agent handed labeled issues) and `DISPATCH_HINT_FANOUT_GUIDANCE` (that plus the one line only an orchestrator can act on). The fan-out form is the reading form plus a line, never a second copy of the vocabulary, and both render their tiers and levels from DISPATCH_MODEL_TIERS / DISPATCH_EFFORT_LEVELS so the reading prose cannot drift from the validators. Wired into the two places issues reach an agent: - The swarm block (resolveSwarmBlock) now carries labels out of Phase 1's listing through the partition step and tells the orchestrator to dispatch each fan-out agent at its own issue's tier and budget, then name what it used per issue in the run summary. - The preloaded `open-issues` task data input carries the reading form, outside the `<portos-task-data>` fence since it is PortOS instruction about how to read the block rather than forge data. Which inputs earn it is declared on the catalog entry (`carriesDispatchLabels`) instead of sniffed from the id, it is charged against MAX_TOTAL_CHARS, and it is skipped when the prompt already embeds it — a swarm run with open-issues selected would otherwise state the same contract twice. branch-reconcile is the second fan-out orchestrator and needs the same treatment; it takes a prompt-version bump plus a label fetch in formatInFlightForPrompt, so it is filed as #6373 rather than rolled in here.
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
model:/effort:and nothing consumed it. Every constant indispatchLabels.jswas producer-side — how to choose a label. The claim swarm fanned out N sub-agents and ran all of them at its own run's default, somodel:heavy+effort:maxbought the issue nothing.DISPATCH_HINT_READING_GUIDANCE(what the labels mean — safe for any agent handed labeled issues) andDISPATCH_HINT_FANOUT_GUIDANCE(that plus the one line only an orchestrator can act on). The fan-out form is the reading form plus a line, never a second copy of the vocabulary, and both render their tiers/levels fromDISPATCH_MODEL_TIERS/DISPATCH_EFFORT_LEVELS.open-issuesdata input carries the reading form, outside the<portos-task-data>fence since it is PortOS instruction about how to read the block rather than forge data. Which inputs earn it is declared on the catalog entry (carriesDispatchLabels) rather than sniffed from the id; it is charged againstMAX_TOTAL_CHARS; and it is skipped when the prompt already embeds it, so a swarm run withopen-issuesselected doesn't state the same contract twice.Not in scope
branch-reconcileis the repo's second fan-out orchestrator and needs the same treatment, but it also needs a label fetch informatInFlightForPromptplus aPROMPT_VERSIONSbump — filed as #6373.Test plan
cd server && npm test— 2008 files, 39,914 passing.