systemd/web-search: user-bus fallback + brave key canonical path#34531
systemd/web-search: user-bus fallback + brave key canonical path#34531webdevtodayjason wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR addresses two separate bug fixes: (1) it prevents Key changes:
The changes are well-tested, additive, and backward-compatible. The legacy alias is preserved at every layer (schema, runtime resolution, configure wizard, audit, docs), so existing installs won't break. Confidence Score: 4/5
Last reviewed commit: d5d5f4f |
Additional Comments (1)
This test was updated to assert that |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5d5f4f441
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| search && "apiKey" in search | ||
| ? normalizeResolvedSecretInputString({ | ||
| value: search.apiKey, | ||
| path: "tools.web.search.apiKey", |
There was a problem hiding this comment.
Skip legacy key resolution when canonical Brave key is present
resolveSearchApiKey eagerly normalizes search.apiKey even when search.brave.apiKey is already set, so a leftover legacy SecretRef can still throw assertSecretInputResolved and break Brave web search despite a valid canonical key. This can happen during migration when users keep an old tools.web.search.apiKey ref while setting tools.web.search.brave.apiKey; the canonical key should short-circuit the legacy alias instead of failing on it.
Useful? React with 👍 / 👎.
|
Thanks for the contribution here. The systemd user-bus/is-enabled fix path is now covered by merged #33634 and #34884, so this mixed-scope PR is superseded on the daemon side and I am closing it. If you still want to land the non-systemd portion, please open a focused follow-up PR and reference this thread. |
Summary
systemctl --user is-enableduser-bus-unavailable failures asnot enabledinstead of hard-failingtools.web.search.brave.apiKeywhile keeping legacytools.web.search.apiKeyas a fallback aliasTesting
pnpm test src/daemon/systemd.test.tspnpm test src/config/config.web-search-provider.test.ts src/secrets/runtime.test.ts src/secrets/target-registry.test.tspnpm format:checkCloses #34464
Closes #34507