Repository navigation
π fix(dashboard): keep hand-set non-gateway backend's model when applying a pack - #13334
Conversation
β¦ying a pack The pack model block only cleared the pack model for a replaced backend or a foreign gateway, so a kept hand-set CLI backend (e.g. codex) still received the pack's copilot model id. Skip seeding when the agent's backend differs from the pack's. Closes #13288 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Looks correct to me. Traced the interaction with the backend block that runs after this (src/pkg/dashboard/api_packs.go:278-292):
existing.Backend == ""βonOtherBackendis false, model is seeded as before, then backend is filled withpackBackendat:279. Unchanged behaviour.existing.Backendnon-empty, allowed, β pack backend (the #13288 case, e.g.codex) β backend is kept at:285(fill-if-empty only), and the new guard at:212-214now stops the pack's model id landing on it. This is the fix.existing.Backendnon-empty but denied β:285-291moves it topackBackendand clears a pack-owned model anyway; previously the model was seeded then cleared, now it is never seeded β same end state ("").
So the only observable change is the intended one. strings.EqualFold matches how agentOnForeignGatewayBackend (:1084) already compares backends. Test table covers kept-with-model, kept-without-model and pack-backend cases.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Pack-owned backends that differ from the pack's still take the pack model, which TestApplyPackStillReconcilesPackOwnedModel and TestApplyPackReconcilesStalePackFields rely on. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
hive/awaiting-ci: pushed 22d9f96 narrowing the #13288 guard to operator-owned backends (the two pre-existing pack-reconcile tests seed a pack-owned differing backend and expect the pack model). CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the change against src/pkg/dashboard/api_packs.go at 22d9f96 and the callers around it. Looks correct to me.
- The new
onOtherBackendguard (api_packs.go:214-215) only fires for an operator-owned backend that differs frompackBackend;BackendIsOperatorOwnedisBackendOwner == FieldOwnerOperator(src/pkg/config/config.go:2219), so a pack-owned backend that merely differs still takes the pack model, as the comment says. - The backend reconciliation block further down (
api_packs.go:~281-291) only fills empty or moves pack-owned denied backends, so the keptcodexbackend the issue describes survives the apply and now no longer receivesclaude-sonnet-4-6. - Of the three table rows in
TestApplyPackModelOnKeptOrReplacedBackend, "kept codex without model is not seeded" would have failed before this change (model would be seeded by the block at line 219), so the test is a real regression guard; the "pack backend is seeded" row confirms the existing behaviour fromTestApplyPackSeedsModelOnPackBackendis unchanged.
Matches the scope of #13288 (Closes #13288); changelog fragment name follows fixed-<slug>.md.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Stops pack apply from seeding the pack model onto a kept hand-set backend that differs from the pack backend (e.g. codex). Adds table-driven test and changelog fragment.
Closes #13288
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88