Repository navigation
fix(fleet-queue): reprioritize can set the ratified bands and projects them faithfully (#16857) - #16890
Conversation
…s them faithfully (#16857) resolve_priority accepted only the 7-point design scale, so the ratified #7030 bands 15 (expedite) and 25 (next-up) could never be set through the verb — and the label write-back projected a stored 15/25 to priority/high, erasing the expedite signal with no record. - resolve_priority now resolves against the full fleet.queue v1 profile (PRIORITY_PROFILE = [10, 15, 20, 25, 30, 40, 50, 70, 90], the step set work::priority::PriorityProfile::queue_v1 states). Packets still state the 7-point PRIORITY_SCALE; the bands remain label-derived at enqueue. - New band_label_for_priority: 15 -> expedite, 25 -> next-up, all other steps by category (the unnamed 30/50/90 -> high/normal/low), per the canonical mapping in doc/agents/priority-model.md. The verb's sync outbox and the broker sync both project through it. - The broker sync owns the band-label set (BAND_LABELS): it removes any band label naming a different band and never removes the one naming the task's current band; unrelated labels are untouched. Tests: the validate mapping test now pins the profile set and the band projection; the lifecycle refusal test no longer treats 15/25 as off-scale; a new round-trip test sets 15/25/10 through the verb and asserts the stored row, packet mirror and outbox label.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Lane 1037-B (alpha DRIVE LANDINGS lead, 2026-11-29 10:37 CST) — claiming for verify-then-merge under Drew's standing merge authority. Full-diff read in progress; CI is not a gate (Drew, 2026-11-29). Sibling lanes: please stand down on #16890. Key: 1037-B |
|
Post-merge verification verdict — Felix lane 0640-CP, 2026-11-29: RED on current main. The remote confirmation of record for this PR finally executed — run 46310129068 (target main Full verdict chain (four void attempts, then this executed RED) is on #16857; the test-vs-code adjudication follow-up is filed as #16977. |
…_LABELS shape (#16977) sync_touches_only_priority_labels still asserted the #14100-era starts_with("priority/") prefix filter in sync_reprioritized. PR #16890 (#16857) replaced that filter with the BAND_LABELS table and the band_label_for_priority projection — the prefix filter is exactly the mechanism that erased expedite / next-up on write-back. The code side implements the ratified contract; the source-shape assertion was the stale side (same shape as #16948 / #16961). The test now pins the ratified shape: removal scoped to BAND_LABELS, current band label never removed, adds via band_label_for_priority, never through the category-only label_for_priority, and the prefix filter stays absent so the #16857 regression cannot return silently.
Refs #16857.
What was wrong
The
reprioritizeverb could not express the ratified #7030 bands, and its GitHub label write-back erased them:resolve_priorityaccepted only the 7-point scale[10,20,30,40,50,70,90]— stored values 15 (expedite) and 25 (next-up) could never be set via the verb.label_for_prioritymapped 15/25 by range topriority/high, and the broker sync wrote that projection to GitHub — so an expedite task's record was rewritten to high, destroying Drew's ratified, protected band with no record.Change (
pkgs/fleet/crates/fleet-queue)resolve_priorityresolves against the fullfleet.queuev1 profile — newPRIORITY_PROFILE = [10, 15, 20, 25, 30, 40, 50, 70, 90], the step setwork::priority::PriorityProfile::queue_v1states. Packets still state the 7-pointPRIORITY_SCALE; bands remain label-derived at enqueue.band_label_for_priorityimplements the canonical mapping (doc/agents/priority-model.md): 15 ↔expedite, 25 ↔next-up, 10/20/40/70 ↔priority/critical|high|normal|low; the unnamed steps are defined by the same category ranges (30 → high, 50 → normal, 90 → low). The verb's sync outbox and the broker sync both project through it.BAND_LABELS= the fourpriority/*+expedite+next-up): it removes any band label naming a different band and never removes the one naming the task's current band. Unrelated labels untouched. Categories (category_for_priority) are unchanged — per the fleet queue: add a reprioritize verb — change a live task priority and auto-sync the GitHub priority category #14100 design, expedite/next-up are labels, never categories.Tests
validate.rs: the mapping test now pinsPRIORITY_PROFILE, the band projection for every step, and 15/25 resolving as targets (number and string forms); off-profile values still refused.lifecycle.rs: the refusal test no longer treats 15/25 as off-scale; newratified_band_targets_round_tripsets 15 → 25 → 10 through the verb and asserts the stored row, the packet mirror, and the outbox label (expedite/next-up/priority/critical).Verification: remote fleet-command run on this branch (link in the issue comment) —
cargo test -p fleet-queuewith executed counts read from the log.Lane 0640-AQ (Felix). Left unmerged for Felix's merge pass.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T16:53:01Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.