Skip to content

fix(routes): door-set governance variant remaps + retarget across concrete doors (PR #810 follow-up) #869

Closed

Description

@dezren39

Follow-up from PR #810 (door-set targets with exclusions for model routes, #637), merged 2026-10-29 in 2bb9cc94. Two Codex review findings on that PR remain unaddressed; both are advisory (checks were green) and neither is fixed by the merged diff.

P1 — governance judges a pinned door-set variant before target remaps

packages/core/src/session/model-governance.ts (leaf() inside routeTargets): for a target such as { "model": "*/a#low", "variants": { "low": "high" } }, governance takes the selectionVariant !== undefined branch and checks offers("low"), while the plugin (packages/core/src/config/plugin/model-routes.ts expand()) applies spec.variants[requested] first and runs high. So:

  • a door offering only high is dropped from governance entirely (empty judged set = no restriction), and
  • a door offering both variants is judged on the wrong variant, so a parent policy excluding test/a#high can admit a subagent that actually runs test/a#high.

Fix direction: resolve pinned variants through the same remap-then-prune rules as expand() before judging the concrete ref. Note the same divergence exists for the collective requested branch, which returns the leaf with no variant where the plugin prunes it (if (requested && !variant) continue).

P2 — retargetDefinition() does not expand door sets

packages/core/src/config/plugin/model-routes.ts (~line 389): target provider IDs are collected literally, so a */* door set calls editor.ids("*") instead of merging the current models of each matching concrete provider. Transform-created models (e.g. Azure deployment names discovered post-transform) therefore appear under azure/* but are missing from the equivalent */* pool. Fix direction: expand door-set provider IDs when building the retargeting set so post-transform discovery is preserved.

Acceptance

  • Governance and runtime expansion agree on the variant a leaf runs, for both pinned (#v) and requested variants, including remap + prune; a policy excluding the remapped variant denies.
  • A */* door-set route sees transform-created models exactly as explicitly enumerated providers do.
  • Tests: governance variant-remap composition, retarget across a door set with a discovered model; existing expansion/governance suites unchanged.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    Fix implemented on PR #871 (branch queue/3411-869-door-governance, head fd14a60): governance leaf resolution in model-governance.ts now resolves pinned/requested variants through the target's remap table with prune-on-unproducible, matching expand(); retargetDefinition in model-routes.ts expands a * door-set target to every concrete door when merging editor models. Three new tests fail pre-fix and pass post-fix; 213 route/governance/resolver tests pass locally, core typecheck and pre-push check pass. Parked awaiting CI on PR #871 (fleet runner congestion); merge when green.

  4. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    Review of PR #871 at fd14a60f95 found a valid Codex P1 on the requested-variant prune: retargetDefinition() rewrites settings.targets but not the route's advertised variants, so ModelResolver.resolveSelected() can run a retargeted, variant-less target bare while governance now prunes that leaf — an exclusion naming it stops binding. Details and the two candidate fixes are in the PR comment (#871 (comment)). Not merging as-is; parked with that resume brief.

  6. 10 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Oct 29, 2026
  8. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    agent-note:v1 — picked up and re-parked by lane openchamber-scheduled-lane (task 3411, worker repo-worker-opencode).

    State on pick-up: PR #871 open, head 203b8f7, all checks green, parked blocked-on-followup-889.

    What this shift did

    Parked on CI for d77f8128a4 (checks queued at park time). Resume: read checks fresh; if green, merge #871 under the standing criteria and complete this task as fixed_merged; if red, fix the failing check. Worktree ~/git/fleet/3411-869-door-governance, branch queue/3411-869-door-governance.

  9. added
    queue/claimedA queue worker has claimed the task for this item
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 29, 2026
  10. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    Picked up (task 3411, attempt 1 of 2) by the openchamber scheduled lane.

    Resume state: branch queue/3411-869-door-governance at d77f8128a4, PR #871 open and CLEAN/MERGEABLE. All CI checks green on d77f8128a4 (basic unit linux+windows, typecheck, affected packages, e2e linux+windows, check-standards, check-compliance). Codex review summary for d77f8128a4 reports has_unresolved_findings: false; all three earlier findings (P1 governance bare-leaf, P2 targetVariants refresh, P2 targetLimits rebuild) carry replies showing the fixes landed in 203b8f7d1d/d77f8128a4, and follow-up #889 is closed.

    Next: merge PR #871 (merge commit), confirm this issue closes, strip queue/* + work/* + status/* labels.

    — agent-note:v1 lane openchamber-scheduled-lane, task 3411

  11. removed
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Oct 29, 2026
  12. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    Done — merged.

    PR #871 merged into main as merge commit e9396f804c14d432bf26fbaa14c33822325181e0 (2026-10-29T16:05:23Z); this issue auto-closed. All PR checks green on head d77f8128a4 (basic unit linux+windows, typecheck, affected packages, e2e linux+windows, check-standards, check-compliance); Codex summary on d77f8128a4 reported no unresolved findings; the three earlier findings all carry replies with their fixing commits (203b8f7d1d, d77f8128a4). Follow-up #889 (P1 governance bare-leaf concern) is closed with evidence that the variant refresh closes it.

    Labels stripped (queue/claimed, status/in-progress, work/assigned). Post-merge main CI is queued.

    — agent-note:v1 lane openchamber-scheduled-lane, task 3411

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions