fix(discord): refresh model picker after default changes#104635
Conversation
70ff378 to
4e2cf56
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 4:43 PM ET / 20:43 UTC. Summary PR surface: Source +106, Tests +184. Total +290 across 6 files. Reproducibility: yes. at source level. The linked issue provides a concrete live pre-fix scenario, and current main clearly keeps provider-start configuration in the long-lived component context while runtime configuration can be replaced by hot reload. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Retain this bounded plugin-local implementation and land it after attaching redacted live Discord evidence showing a default or catalog hot reload followed by both an old picker interaction that refreshes or expires safely and a current tokenized selection that applies the model displayed. Do we have a high-confidence way to reproduce the issue? Yes at source level. The linked issue provides a concrete live pre-fix scenario, and current main clearly keeps provider-start configuration in the long-lived component context while runtime configuration can be replaced by hot reload. Is this the best way to solve the issue? Yes. One active configuration per interaction plus compact, ambiguity-safe model identities is the narrowest maintainable fix and reuses the canonical runtime snapshot and model-command paths; only real after-fix integration proof remains missing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c48ed955338c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +106, Tests +184. Total +290 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (6 earlier review cycles)
|
4e2cf56 to
a63ecaa
Compare
a63ecaa to
f44a13b
Compare
f44a13b to
102dec6
Compare
|
Land-ready maintainer proof:
The refactor reads the hot-reloaded config at interaction time and carries compact stable model identity through Discord components. Legacy positional state remains usable until config changes; malformed, expired, missing, or ambiguous tokens fail closed with a reselect notice. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(discord): refresh model picker after default changes This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
4c82748 to
7fc241d
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes #104614.
Discord model-picker components captured the channel startup config. After a hot reload changed the default or model catalog, old component clicks could reset or apply against stale data while
/statusand direct/modelcommands already used the active runtime config.Why This Change Was Made
The component handler now captures the active runtime config once per interaction and uses it consistently for routing, picker data, display, dispatch, and post-apply verification.
Model-bearing component state now carries a compact stable provider/model token instead of relying on catalog or recent-list positions. This prevents a hot reload from silently retargeting an old visible selection when models are inserted, removed, or reordered. Legacy positional components expire safely once the runtime config changes.
User Impact
Users can change the default model or catalog without restarting Discord or the gateway. Existing current-format picker buttons keep selecting the model they display; stale legacy buttons ask the user to choose again instead of applying a different model.
Evidence
run_c7c34dfb462eon exact reviewed head102dec62f9416c2374422be2e31d5e66ea6117ab: 72/72 focused Discord picker tests passed.7fc241d1a14340a6ba77b930f10ed711607ecaf3. Stable patch idf94c16dc97d295825b17b9a98900e17a3db2662dmatches the exact tested revision; the PR is again the intended six files.run_62769f71ce42: 72/72 focused tests passed.oxfmtandgit diff --checkpassed.