Skip to content

feat(dispatch): resolve the default route before the placement guard (#16612) - #17020

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16612-default-route-guard
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16612-default-route-guard

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

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.
  • enforcePlacementGuard resolves request.model ?? defaultModel before evaluating, logs the resolution (placement-guard: default route resolved to …), and returns the placement so launchSession seats 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.
  • Unconfigured behavior is byte-identical: no default set → the same countable skipped line; an unmapped default provider stays skipped with its provider line; an explicit request model always wins.

Tests — three new guard oracles (default resolved + recorded, oracle = helper --pool argv + 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-bot with what you need.

…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).
@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: 75d6ae1f-e2af-40df-ada9-0be9693ab3fa

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

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

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, tsc --noEmit clean in the same && chain, marker FC-GATE-DONE-16612 present. The four new tests pass by name in the log (three placement-guard default-route oracles + the config parsing oracle). Ready for Felix's merge; full record on #16612.

@developing-today-fleet
developing-today-fleet Bot merged commit ad8542a into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/16612-default-route-guard branch November 29, 2026 23:44
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.

0 participants