fix(talk): resolve config from runtime secrets#72792
Conversation
|
@codex review |
Greptile SummaryThis PR fixes a discovery regression where Confidence Score: 5/5Safe to merge — minimal one-line logic fix with correct test coverage and no security regressions. The change is a single-line priority swap with a well-structured test that exercises the failure scenario. No P0/P1 issues found; the only observation is a dead mock setup line in the new test. No files require special attention. Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/gateway/server-methods/talk.test.ts
Line: 130
Comment:
**Unused mock setup**
`mocks.getRuntimeConfig.mockReturnValue(runtimeConfig)` has no effect in this test. The `talk.config` handler reads runtime config via `context.getRuntimeConfig()`, which is provided inline as `{ getRuntimeConfig: () => runtimeConfig }` at line 162 — bypassing the hoisted mock entirely. Consider removing this line to avoid misleading future maintainers.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(talk): resolve config from runtime s..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f9dbc469e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the review notes in e78c17371c: removed the unused runtime-config mock setup and kept the resolved provider config paired with the selected provider when source/runtime snapshots diverge. Focused Talk tests pass locally:
@codex review latest head, please |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e78c17371c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the unresolved Codex P1 in 42c758e9cd: when source and runtime Talk providers diverge, talk.config now returns the redacted source payload without feeding unresolved source SecretRefs into resolveTalkConfig. Local checks pass: focused talk gateway test, format/lint on touched files, and check:changed. @codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
42c758e to
006dfb2
Compare
|
Rebased onto current upstream Local checks:
@codex review |
006dfb2 to
b24cd54
Compare
|
Rebased again onto current upstream Local checks:
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b24cd54 to
56d5ea8
Compare
|
Rebased #72792 onto current upstream Conflict resolution kept both sides of the recent changes:
Local verification:
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Pushed a QA-only follow-up for the parity failure. The Local verification:
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
5f2a1e8 to
c0def57
Compare
|
Pushed What changed:
Verification:
@codex review |
|
Codex review: needs real behavior proof before merge. Latest ClawSweeper review: 2026-05-20 23:08 UTC / May 20, 2026, 7:08 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. source-reproducible: current PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the provider-matched Talk handler and focused regression coverage after redacted real gateway/client proof is added or a maintainer explicitly overrides the proof gate. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current Is this the best way to solve the issue? Yes for the code direction: matching resolver input to the selected provider is the narrow maintainable fix. It is not merge-ready until redacted real behavior proof is supplied or explicitly overridden. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b58572e283bc. |
a11d501 to
1982696
Compare
|
Rebased on upstream Post-rebase verification:
Note: I also tried including @codex review Re-review progress:
|
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1982696 to
ede0808
Compare
b4e94bb to
09e7501
Compare
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Summary
talk.configcould pass rawtalk.providers.*.apiKeySecretRef wrappers into provider-specific config resolution.talk.configfor discovery, so a documented SecretRef-backed provider key could break discovery even though runtime Talk calls had the resolved secret.talk.confignow resolves provider details from the active runtime config before redacting the response, while still returning the source config redacted.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
talk.configread-scope response was using the source config provider block as the input toresolveTalkConfig, even when the active runtime config already contained resolved SecretRef values.talk.providers.*.apiKeyvalues in thetalk.configdiscovery path.talk.speakalready used the runtime snapshot, so only the discovery/redaction path regressed.Regression Test Plan (if applicable)
src/gateway/server-methods/talk.test.tstalk.configredacts a source SecretRef while provider resolution receives the runtime-resolved string value.src/gateway/server.talk-config.test.tscovers redactedtalk.configresponses but not provider SecretRef resolution.User-visible / Behavior Changes
talk.configsucceeds for documented SecretRef-backedtalk.providers.*.apiKeyconfig instead of failing discovery.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) YesYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: the handler uses the active runtime-resolved secret only as input to provider-specific config normalization, then returns the existing redacted response shape. The regression test asserts both the source SecretRef and resolved provider config are redacted.Repro + Verification
Environment
talk.providers.acme.apiKeyas a SecretRef object in source config and resolved string in runtime configSteps
talk.providers.<id>.apiKeyas a SecretRef object.talk.config.Expected
talk.configreturns the Talk provider snapshot with secret fields redacted.Actual
Evidence
Human Verification (required)
CI=true OPENCLAW_LOCAL_CHECK=0 npm exec pnpm@10.33.0 -- test src/gateway/server-methods/talk.test.ts src/gateway/server.talk-config.test.tstalk.configcoverage still passes.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
REDACTED_SENTINELfor both source and resolved config fields.