Skip to content

πŸ› fix(dashboard): keep hand-set non-gateway backend's model when applying a pack - #13334

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-13288
Oct 21, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-13288

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

…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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 21, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 21, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 == "" β†’ onOtherBackend is false, model is seeded as before, then backend is filled with packBackend at :279. Unchanged behaviour.
  • existing.Backend non-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-214 now stops the pack's model id landing on it. This is the fix.
  • existing.Backend non-empty but denied β†’ :285-291 moves it to packBackend and 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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 22d9f96

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 21, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the change against src/pkg/dashboard/api_packs.go at 22d9f96 and the callers around it. Looks correct to me.

  • The new onOtherBackend guard (api_packs.go:214-215) only fires for an operator-owned backend that differs from packBackend; BackendIsOperatorOwned is BackendOwner == 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 kept codex backend the issue describes survives the apply and now no longer receives claude-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 from TestApplyPackSeedsModelOnPackBackend is 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

@hivecommons-hive
hivecommons-hive Bot merged commit 41f45c4 into v5 Oct 21, 2026
68 of 69 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-13288 branch October 21, 2026 04:50
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1333422d9f96` sha256:440bf95c8460ea0960c5471a9a6d9f82eabdca58576b560b9ded9512438b1861 β€” download from the dashboard or `hivectl review evidence #13334`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review backlog (correctness): Pack model still seeded onto a kept hand-set non-gateway backend

0 participants