Repository navigation
feat(core): door-set targets with exclusions for model routes (#637) - #810
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
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. Comment |
|
The following comment was made by an LLM, it may be inaccurate: |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Regenerated the client on the laptop worktree ( |
|
Lane A CI classification (task 2909 resume), run 40810897814:
Parking task 2909 for the rerun; resume = merge on green (modulo known flakes), confirm #637 closes, complete the task. agent-note:v1 agent=repo-queue-worker-shift-opencode-a task=2909 issue=637 pr=810 stage=parked-ci-rerun |
|
Addendum (lane A): PR #818 (task 2997, for #813) also regenerates services/www/openapi.json from its own base. If #818 merges first, this PR's www regen commit 5805ac8 may conflict on openapi.json at merge time — resolution: take main's openapi.json, re-run agent-note:v1 agent=repo-queue-worker-shift-opencode-a task=2909 issue=637 pr=810 stage=note-regen-overlap |
|
Lane A resumed task 2909 and worked the CI state from run 40819928224 (head
agent-note:v1 agent=repo-queue-worker-shift-opencode-a task=2909 issue=637 pr=810 stage=parked-ci-rerun-2 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c119545dbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ModelRouteExpansion.matchingModels(selection.model, doorModels).flatMap(([id, model]) => | ||
| leaf(providerID, id, model), |
There was a problem hiding this comment.
Judge pinned door-set variants after applying target remaps
For a door-set target such as { model: "*/a#low", variants: { low: "high" } }, this call judges the pinned low variant, while runtime expansion applies the remap and runs high. If a matching provider offers only high, leaf() drops it from governance entirely; if it offers both variants, governance checks the wrong variant. Consequently, a parent policy excluding test/a#high can admit a subagent whose route actually runs that excluded model variant. Resolve pinned variants through the same remapping and pruning rules used by expand() before checking the resulting concrete references.
Useful? React with 👍 / 👎.
…ion-expressions # Conflicts: # packages/client/src/promise/generated/types.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b6f156f46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const doors: ReadonlyArray<readonly [Provider.ID, ReadonlyMap<string, Model.Info> | undefined]> = | ||
| ref.providerID === "*" | ||
| ? ModelRouteExpansion.matchingProviders( | ||
| definitions, |
There was a problem hiding this comment.
Retarget door sets against each concrete provider's current models
When a door-set route includes transform-created models, such as Azure deployment names, its runtime pool omits those models even though an equivalent explicitly enumerated provider target includes them. retargetDefinition() collects target provider IDs literally, so a */* target causes it to call editor.ids("*") instead of merging current models for each matching concrete provider. This leaves expansion using only the pre-transform provider definitions: for example, azure/* gains a discovered prod-mini deployment, while */* never does unless another target explicitly names Azure. Expand door-set provider IDs when building the retargeting set so the new target form preserves post-transform model discovery.
Useful? React with 👍 / 👎.
Implements #637: exclusion expressions for plan pool / route target definitions.
Syntax choice (noted on #637 as the issue requests)
The door-set form: a target whose provider is
*runs its model on every door (provider) whose catalog lists it, minus the doors in the target's newexcludelist:{ "model": "*/deepseek-v4-flash", "exclude": ["cline-pass"] }This shape was picked over negative targets because it reuses the existing target object wholesale — selection mode, route weights (keyed by the concrete
provider/modelleaf), per-target variant pins/remaps,until, window gates, budgets and cache formats all apply per leaf exactly as they do for enumerated targets, and an enumerated target reached again by a door set still dedupes to one leaf (first reach wins).Semantics
expand()(the plugin): a door contributes a leaf iff its catalog lists the model (exact or glob pattern) and the model is enabled. Providers removed bydisabled_providersnever reach the catalog, so they can never contribute.ModelRouteExpansion.matchingProvidershelper (alongsidematchingModels), so the judged set and the run set cannot disagree (fix(core): route governance judges a wildcard target's literal pattern — expanded models escape the check, and expired/disabled targets are still judged (PR #512) #530 discipline). Without a catalog, a door-set target is judged literally, exactly as pattern targets are.expand()output is pinned by tests.Tests (laptop worktree; CI is the remaining check)
model-routes-expand.test.ts: 7 new door-set tests — catalog-order expansion across doors, routes provider never a door, exclusions win, doors not listing the model skipped, glob over the door set, disabled model skipped, dedupe with an enumerated target, variant-remap composition (leaf pruned when it cannot produce the remapped variant).session/model-governance.test.ts: 3 new tests — door-set expansion to an excluded model denies, exclusions win in governance, expansion to only-allowed models passes.tsgotypecheck clean forpackages/schemaandpackages/core.Queue: task 2909 (
repo-health-opencode-pilot), lane B worker shift.Need help on this PR? Tag
@codesmith-botwith what you need.