Skip to content

test(dispatch): action-shaped priority strings follow the fleet.queue v1 exact contract (#16948) - #16949

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/16948-dispatch-priority-contract
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/16948-dispatch-priority-contract

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16948.

Diagnosis (first step from the issue, done against current main)

Re-derived the resolution table from src/validate.ts on main: resolvePriority implements the shared fleet.queue v1 profile contract — scale values and the ratified bands (15, 25) pass through exactly; any other off-profile integer in 10–90 is rejected with a 400 ("off-profile values are rejected, never snapped"). The resolvePriority unit tests in the same file already pin exactly that, including 45 in the rejection list for both numeric and string forms.

The one stale side was this request-level test: its table still asserted the pre-profile snapping contract, ["45", 40]. Every other entry already agreed with the validator ("10"→10, "50"→50, "90"→90, "high"→20, undefined→40). That single entry is the 317/318 failure from run 46286736248.

Governing contract for this surface

In doc/agents/priority-model.md's terms: the queue stores intrinsic urgency under the versioned fleet.queue v1 profile, and stored values are exact — the profile is one contract at every producer boundary (the Rust profile rejects with PriorityError::OffProfile; the packet validator rejects off-scale). Action-shaped strings from jq --arg are an input spelling, not a separate contract: the dispatch adapter resolves them under the same profile, so "45" is rejected here too rather than snapped to 40.

Change (test only)

  • Table: drop ["45", 40]; add the ratified band strings ["15", 15] and ["25", 25] resolving exactly.
  • New assertions: "45" is rejected by both parseTaskRequest and parseSessionRequest with the profile-scale error.

No production code changes; no validator behavior is altered.

Lane 1307-E (archer, charlie ADVANCE). Verification: full diff read against the validator source and the issue's evidence run; the suite verdict on main after merge is the post-merge record.

{
  "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-29T19:30:36Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… v1 exact contract (#16948)

The request-level table still asserted the pre-profile snapping
contract ("45" -> 40). The validator, its unit tests, and every
other producer boundary reject off-profile values under the shared
fleet.queue v1 profile (stored values exact, never snapped), so the
test was the stale side: drop the "45" row, add the ratified band
strings "15"/"25" resolving exactly, and assert "45" is rejected
by both parseTaskRequest and parseSessionRequest.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53c14d2c-72b0-44d6-b389-32ff40f66565

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pm-stack/dispatch: priority-string resolution test red on main — validator or test contradicts the ratified contract

0 participants