Repository navigation
[Fix] Cache selected channel registry lookups - #80333
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection of current main shows the selected registry can fall back from an empty pinned registry to the active registry while the version helper still uses the pinned version; the PR body also includes before/after live probe output for the Discord-to-Slack swap path. Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge this focused selected-registry snapshot fix after normal CI and mergeability handling, keeping the regression tests and avoiding broader channel loading or config-policy changes. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection of current main shows the selected registry can fall back from an empty pinned registry to the active registry while the version helper still uses the pinned version; the PR body also includes before/after live probe output for the Discord-to-Slack swap path. Is this the best way to solve the issue? Yes. Centralizing selected-registry snapshot semantics and reusing that snapshot for lookup caches is the narrowest maintainable fix for this stale-cache path. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against da7cc2b11c76. |
af6e116 to
d522510
Compare
d522510 to
3fce95b
Compare
3fce95b to
bd8f670
Compare
bd8f670 to
77a4626
Compare
77a4626 to
fd05c4c
Compare
1e95a86 to
95c8567
Compare
|
Landed via rebase onto Proof:
|
Summary
Describe the problem and fix in 2-5 bullets:
If this PR fixes a plugin beta-release blocker, title it
fix(<plugin-id>): beta blocker - <summary>and link the matchingBeta blocker: <plugin-name> - <summary>issue labeledbeta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only. Screenshots are encouraged even for CLI, console, text, or log changes; terminal screenshots and copied live output count. Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.
node --import tsx --eval '<pinned-empty native command surface probe>'.{"phase":"slack","discord":true,"slack":false}after switching to Slack.Root Cause (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write
N/A.src/channels/registry.helpers.test.ts,src/plugins/runtime.channel-pin.test.ts,src/auto-reply/commands-registry.test.ts.User-visible / Behavior Changes
Channel alias and native command routing now refresh correctly when a pinned empty channel registry falls back to a changed active registry. No config, CLI, docs, or defaults changed.
Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
No bot review conversations exist yet for this PR.
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations