Repository navigation
perf(agent-core-v2): limit config env reads by domain - #4259
Open
huangzheng2016 wants to merge 1 commit into
Open
huangzheng2016 wants to merge 1 commit into
huangzheng2016 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: bd6613d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirement or Bug
Agent turn 中频繁读取单个配置域时,重复计算无关域的环境变量覆盖导致 CPU 开销过高。
Bug Reproduction Steps
getEnv与applySectionEnvBindings分别占活跃采样约 16.6% 和 4.2%。Root Cause
ConfigService.get(domain)为读取一个域调用freshEffective(),每次都会检查所有配置域的环境变量绑定。仅两个内置覆盖需要跨域数据;其余域的读取不需要完整计算。这是针对该重复计算的直接修复。Code Changes
两个内置覆盖声明各自影响的域;未声明影响域的覆盖继续走原来的完整计算路径。
Behavior Changes and Affected Users
受影响模块:agent-core-v2 配置读取;配置解析、覆盖的返回值和配置文件格式不变。配置测试 130/130 通过,typecheck 和定向 oxlint 通过。六轮共同严格匹配的 81 个 agent、82 个 turn 中,三组候选 turn CPU 总量分别下降 22.6%、18.8%、23.8%;p95 内存增量没有稳定下降。全包测试额外有 15 个与本次配置改动无关的失败,其中 11 个因环境缺少
zip,4 个是 MCP 输出断言。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.