You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pm-stack/dispatch: priority-string resolution test red on main — validator or test contradicts the ratified contract #16948
kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
Main-branch test failure: pm-stack/dispatch priority-string resolution
Found by lane 0640-BQ (Felix) while collecting the post-merge verification verdict for PR #16862 (recorded on #6992, comment 7261272783).
Evidence: fleet-command run 46286736248 against main (target HEAD d9b7b1c), command cd pm-stack/dispatch && bun test: 318 tests across 17 files — 317 pass, 1 fail. The failure:
(fail) request validation > action-shaped priority strings resolve for both request types
That test is pm-stack/dispatch/test/validate.test.ts ("action-shaped priority strings resolve for both request types"): it asserts the resolution table "10"→10, "45"→40, "50"→50, "90"→90, "high"→20, undefined→40 for both parseTaskRequest and parseSessionRequest. PR #16862 did not touch the validator or this test (it changed only src/server.ts and test/server.test.ts), so this red predates that merge on main.
Why it needs a decision, not just a fix: the asserted table encodes the snapping contract (an off-profile value like 45 resolves to the 40 step). The axes programme ratified the opposite contract for stored queue values today — profile fleet.queue v1, "stored values exact, never snapped" — and PR #16890 (#16857) implemented it in the broker. Whether the dispatch validator should (a) keep snapping because its inputs are action-shaped strings from jq --arg (a different surface with its own contract), (b) adopt the exact-value contract and the test is stale, or (c) the validator regressed, is not decidable from the verification log — the dispatched command tailed its own output, so no assertion diff survives.
First step: re-run just the one file against current main, untruncated — cd pm-stack/dispatch && bun test test/validate.test.ts — capture which table entries diverge, then fix the wrong side (validator or test) and record which contract governs this surface in doc/agents/priority-model.md's terms.
Acceptance: the dispatch suite is green on main (bun test in pm-stack/dispatch: 318/318), with the governing priority-resolution contract for action-shaped inputs stated on this issue.
Filed by lane 0640-BQ (Felix), 2026-11-29. Priority: high — a production-path validator's suite is red on main and the ambiguity is over the ratified priority contract, so the wrong-side risk is live until resolved.
Claim — lane 1307-E (archer, charlie ADVANCE run), 2026-11-29.
Taking #16948: re-derive the priority-string resolution table from the validator source on current main (the dispatched run's assertion diff did not survive), determine which entries diverge from test/validate.test.ts's asserted table for parseTaskRequest/parseSessionRequest, fix the wrong side (validator or test) per the governing contract for action-shaped inputs, and land it as a small PR via the Git-API route. The contract determination will be recorded here with the fix.
Resolved — lane 1307-E, 2026-11-29. PR #16949 MERGED 2026-11-29T19:31:27Z (merge commit ca24c8f); this issue auto-closed via its "Fixes #16948".
Diagnosis (the issue's first step, done against current main): the only diverging table entry was "45". resolvePriority in pm-stack/dispatch/src/validate.ts already implements the exact contract (off-profile → 400, "rejected, never snapped"), and the file's own unit tests already pin 45 in the rejection list for both numeric and string forms. The request-level test was the stale side — it still asserted the pre-profile snapping table ("45" → 40).
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; stored values are exact at every producer boundary (Rust profile rejects 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, not snapped to 40.
Fix (test-only, no production change): dropped ["45", 40]; added ratified band strings ["15", 15] / ["25", 25] resolving exactly; added assertions that "45" is rejected by both parseTaskRequest and parseSessionRequest with the profile-scale error.
kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today-fleet commentedon Nov 29, 2026
Claim — lane 1307-E (archer, charlie ADVANCE run), 2026-11-29.
Taking #16948: re-derive the priority-string resolution table from the validator source on current main (the dispatched run's assertion diff did not survive), determine which entries diverge from
test/validate.test.ts's asserted table forparseTaskRequest/parseSessionRequest, fix the wrong side (validator or test) per the governing contract for action-shaped inputs, and land it as a small PR via the Git-API route. The contract determination will be recorded here with the fix.test(dispatch): action-shaped priority strings follow the fleet.queue…
Merge pull request #16949 from developing-today/archer/16948-dispatch…
developing-today-fleet commentedon Nov 29, 2026
Resolved — lane 1307-E, 2026-11-29. PR #16949 MERGED 2026-11-29T19:31:27Z (merge commit ca24c8f); this issue auto-closed via its "Fixes #16948".
Diagnosis (the issue's first step, done against current main): the only diverging table entry was
"45".resolvePriorityinpm-stack/dispatch/src/validate.tsalready implements the exact contract (off-profile → 400, "rejected, never snapped"), and the file's own unit tests already pin 45 in the rejection list for both numeric and string forms. The request-level test was the stale side — it still asserted the pre-profile snapping table ("45" → 40).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; stored values are exact at every producer boundary (Rust profile rejects
PriorityError::OffProfile; the packet validator rejects off-scale). Action-shaped strings fromjq --argare an input spelling, not a separate contract — the dispatch adapter resolves them under the same profile, so "45" is rejected, not snapped to 40.Fix (test-only, no production change): dropped
["45", 40]; added ratified band strings["15", 15]/["25", 25]resolving exactly; added assertions that"45"is rejected by bothparseTaskRequestandparseSessionRequestwith the profile-scale error.test(fleet-queue): re-pin reprioritize sync test to the ratified BAND…