[codex] Fix Discord SecretRef configured state#76429
[codex] Fix Discord SecretRef configured state#76429rendrag-git wants to merge 1 commit intoopenclaw:mainfrom
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. from source inspection: current main strictly normalizes Discord SecretRef token objects and then bases configured state on a resolved token string, so an unresolved configured ref cannot reach configured_unavailable status. I did not run tests because this review was required to stay read-only. Next step before merge Security Review detailsBest possible solution: Land this PR after it is marked ready and exact-head Discord/channel changed gates pass, keeping the fix inside the Discord plugin and existing credential-status contract. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main strictly normalizes Discord SecretRef token objects and then bases configured state on a resolved token string, so an unresolved configured ref cannot reach configured_unavailable status. I did not run tests because this review was required to stay read-only. Is this the best way to solve the issue? Yes. Inspect-mode SecretRef resolution plus tokenStatus propagation is the narrowest maintainable fix, and the force-pushed changelog entry addresses the prior process gap; the remaining blocker is draft/validation readiness, not patch design. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6a3f5d0b1f35. |
761a61f to
f98e14b
Compare
|
Thanks @rendrag-git for the patch. The merged fix in #76449 covers the Discord SecretRef configured/startup state through the generic external channel secret-contract path and keeps unresolved configured SecretRefs reported as configured but unavailable. Closing this PR as superseded by the merged fix. |
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
normalizeResolvedSecretInputStringfor unresolved SecretRef config values, which throws before read-only status/config paths can preserve configured credential metadata.Regression Test Plan (if applicable)
configured_unavailablein status snapshots while runtime startup remains gated on available tokens.User-visible / Behavior Changes
Discord status/config-only surfaces can now show a Discord bot token SecretRef as configured but unavailable instead of throwing during read-only token inspection. Runtime startup still requires a resolved token.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) YesYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: SecretRef inspection now preserves configured_unavailable metadata without resolving or exposing secret values; runtime startup remains gated on an available token.Repro + Verification
Environment
Steps
channels.discord.tokenorchannels.discord.accounts.<id>.tokenas an unresolved SecretRef.Expected
tokenStatus: "configured_unavailable".Actual
configured_unavailablewhile startup remains unavailable until the token resolves.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm build && pnpm check && pnpm test; live Discord network behavior for this exact branch.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
tokenStatus: configured_unavailable, and runtime startup still requirestokenStatus: available.AI-assisted: yes, prepared with Codex and locally reviewed.