Skip to content

fix(client): cache authEnvKeys results to reduce allocations#167

Merged
osolmaz merged 2 commits intoopenclaw:mainfrom
Yuan-ManX:client
Mar 29, 2026
Merged

fix(client): cache authEnvKeys results to reduce allocations#167
osolmaz merged 2 commits intoopenclaw:mainfrom
Yuan-ManX:client

Conversation

@Yuan-ManX
Copy link
Copy Markdown
Contributor

No description provided.

@dutifulbob
Copy link
Copy Markdown
Collaborator

Triage result

Human attention: ⚠️ Required
Recommendation: 🏁 escalate to a human
Human decision needed: ready for human landing decision

Quick read

This PR is a small client-side performance optimization that caches derived auth environment-variable keys. Scope is limited to src/client.ts, standard checks were the right validation path, review is clear, CI is green, and both conflict checks are clean.

Intent

Reduce overhead in the client auth path by caching the derived environment-variable key list for each auth method instead of rebuilding it on every lookup.

Why

Credential lookup was repeatedly recomputing the same normalized auth env key arrays for a given method ID, creating unnecessary Set and array allocations during auth selection.

Codex review

No blocking P0/P1 findings remain.
GitHub Codex review findings for this head: none.
Local Codex review was established and reported no actionable correctness issues in the changed auth-key caching path.

CI/CD

CI was initially approval-blocked on workflow run 23401050132.
Workflow approval was applied successfully.
The rerun completed successfully with all relevant jobs green.
Initial and final conflict checks against origin/main were both clean.

Recommendation

This change looks right-shaped and low risk, with no remaining blocking review or CI concerns. It is ready for human landing decision.

@osolmaz osolmaz self-assigned this Mar 29, 2026
@osolmaz osolmaz merged commit b6df72e into openclaw:main Mar 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants