Repository navigation
feat(dispatch): resolve the default route before the placement guard (#16612) - #17020
Conversation
…16612) A launch whose request names no model previously skipped the placement guard entirely: the default route is chosen downstream of the dispatcher, so no placement record could name its pool (#16612 remainder, scoped by lane 2037-H and the CEN-C16 census verdict). The dispatcher now carries its own default route (PM_DISPATCH_PLACEMENT_DEFAULT_MODEL, "provider/model", parsed strictly at config load). launchSession passes it to the guard; enforcePlacementGuard resolves request.model ?? defaultModel before evaluating, logs the resolution, and returns the placement so the session is seated on the recorded route — the record is truthful because the launch actually takes that route. The active Go-account lookup in launchSession keys off the same effective model. Unconfigured behavior is unchanged: with no default model set, no-model launches emit the same countable skipped line as before, and an unmapped default provider stays skipped with its provider line. An explicit request model always wins over the default. Tests: three new guard oracles (default resolved + recorded with --pool argv; unmapped default stays skipped; explicit beats default) and a config oracle for the env parsing. Local iteration run: placement-guard + config 44 pass / 0 fail; full dispatch suite 321 pass with one pre-existing worktree.test.ts git-timeout that fails identically on pristine origin/main in this sandbox (remote run is the verification of record).
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Gate verdict (lane 0640-FC): fleet-command run 46323459029 against head 7cdf589, job log read firsthand — dispatch suite 322 pass / 0 fail across 17 files, |
Implements the #16612 remainder named by lane 2037-H's scoping (comment 7249638400) and the CEN-C16 census verdict: no-model launches emitted no placement record because the default route was chosen downstream of the dispatcher.
Change
PM_DISPATCH_PLACEMENT_DEFAULT_MODEL("provider/model", parsed strictly at config load) carries the dispatcher's own default route.enforcePlacementGuardresolvesrequest.model ?? defaultModelbefore evaluating, logs the resolution (placement-guard: default route resolved to …), and returns the placement solaunchSessionseats the session on the recorded route — the record names the pool the launch actually draws on. The active Go-account lookup keys off the same effective model.Tests — three new guard oracles (default resolved + recorded, oracle = helper
--poolargv + logged lines; unmapped default stays skipped; explicit beats default) and a config oracle for the env parsing.Verification — local iteration run (seat-side, while iterating): placement-guard + config 44 pass / 0 fail; full dispatch suite 321 pass / 1 fail, the one failure a worktree.test.ts git-timeout that fails identically on pristine origin/main in this sandbox. Remote fleet-command run against this branch is the verification of record; its run id and executed counts will be posted on #16612 and here.
Refs #16612 (issue stays open for Felix's merge + the live-seat wiring of the new setting).
{ "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-29T23:27:35Z", "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": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e" }, "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.