fix(agents): include browser in coding profile#58647
Conversation
Greptile SummaryThis PR fixes a bug where the Changes:
Minor style note: The new integration test uses Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/agents/openclaw-tools.browser-plugin.integration.test.ts
Line: 63-80
Comment:
**New test belongs in a different describe block**
The new test case calls `createOpenClawCodingTools` (from `pi-tools.ts`), while the enclosing `describe` block is named `"createOpenClawTools browser plugin integration"` and all other tests invoke `createOpenClawTools` (from `openclaw-tools.ts`). These are distinct functions from different modules, so the new test is semantically out of place here.
Moving it to a dedicated `describe` block (or to an existing `pi-tools` test file, e.g. `pi-tools.create-openclaw-coding-tools.*.test.ts`) would keep test organisation consistent and make the coverage easier to find during future triage.
This doesn't affect correctness — the test is otherwise well-structured — but it may confuse reviewers or tooling that expects a 1:1 between the describe name and the module under test.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Agents: include browser in coding profil..." | Re-trigger Greptile |
|
Addressed the review feedback and pushed follow-up commit What changed:
Why:
Verification rerun after the move:
I also resolved the addressed review thread. |
Summary
tools.profile: "coding"could still miss thebrowsertool even when browser support was configured and auto-enabled.browserto the coding profile allowlist and added focused regression coverage for the coding-profile + browser-configured path.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
codingtool profile still omittedbrowser, so profile filtering removed it from the effective tool list.tools.profile: "coding".git blame, prior PR, issue, or refactor if known): issue [Bug]: Browser enabled and running, but browser tool is missing from agent tool list #58628 reported the mismatch between healthy browser runtime status and the missing runtime tool.Regression Test Plan (if applicable)
src/agents/openclaw-tools.browser-plugin.integration.test.tsbrowser.src/agents/tool-catalog.test.tsnow also asserts the coding profile includesbrowser.User-visible / Behavior Changes
codingprofile now keep thebrowsertool available.Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): YesYes/No): NoYes, explain risk + mitigation: this restores the intended browser tool exposure only for browser-configured coding sessions; explicitplugins.entries.browser.enabled = false,plugins.deny, and tool deny policies still block it.Repro + Verification
Environment
pnpmbrowser.enabled: true,browser.defaultProfile: "openclaw",tools.profile: "coding"Steps
tools.profiletocoding.browseris present.Expected
browseris present in the effective coding tool list.Actual
browserwas filtered out even though browser support was configured.Evidence
Attach at least one:
Human Verification (required)
browsertool with a coding-profile config before the fix.src/agents/tool-catalog.test.tsandsrc/agents/openclaw-tools.browser-plugin.integration.test.tspass after the fix.pnpm buildpasses after the change.pnpm check/pnpm testgreen state, because unrelated existing failures outside this change still block them.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
browserwhere maintainers did not intend it.Additional Notes
extensions/diffs/src/language-hints.test.tsduringpnpm checkandsrc/config/schema.base.generated.test.tsduringpnpm test.pnpm build,pnpm test -- src/agents/tool-catalog.test.ts src/agents/openclaw-tools.browser-plugin.integration.test.ts, plus direct local repro of the missing-tool behavior before the fix.Made with Cursor