Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the bundled Salesforce skill from schema/SOQL inspection to production CRM workflows, adding read/search, Opportunity updates, and Task/Event activity logging via the gateway proxy while tightening OAuth token host binding.
Changes:
- Expanded
salesforce_query.pywithfind,update-opportunity,log-activity, plus deterministic NLplan/runand an offlineeval-scenariossuite. - Added a 30-scenario eval fixture and corresponding Vitest coverage for planning and write payload construction.
- Updated gateway OAuth capture to bind bearer-token secrets to the
instance_urlhost returned by Salesforce (instead of the login host).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/salesforce-skill.test.ts | Adds tests for new helper commands, NL planning, eval suite coverage, and write payload construction. |
| tests/gateway-http-server.test.ts | Verifies captured OAuth token binding follows Salesforce instance_url and blocks unrelated hosts. |
| src/gateway/gateway-http-proxy.ts | Binds captured OAuth bearer tokens to response instance_url host when present. |
| skills/salesforce/scripts/salesforce_query.py | Implements CRM search, Opportunity updates, activity logging, NL planner/runner, and eval harness. |
| skills/salesforce/references/metadata-and-queries.md | Updates usage docs for new read/write and NL commands. |
| skills/salesforce/evals/scenarios.json | Adds 30 offline NL planning scenarios across read/write/compound categories. |
| skills/salesforce/agents/openai.yaml | Updates agent description/prompt to reflect CRM reads and safe writes. |
| skills/salesforce/SKILL.md | Updates skill scope, workflow, security model, and eval documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@claude Do a thorough review of this PR in terms of: KISS, YAGNI, DRY, Fail Fast, Secure by Default and performance/speed |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
@claude Do a thorough review of this PR in terms of: KISS, YAGNI, DRY, Fail Fast, Secure by Default and performance/speed |
|
Claude finished @furukama's task in 3m 8s —— View job PR Review: KISS, YAGNI, DRY, Fail Fast, Secure by Default, PerformanceTasks:
Overall the implementation is solid — the gateway-proxied secret model is well-designed and the escaping fixes (separate DRYColumn extraction duplicated verbatim in
YAGNI
Eval scenarios'
KISS
Fail Fast
Secure by Default
if (rule.jsonPath.includes('token')) {
secrets[`${rule.secretName}${BOUND_DOMAIN_SUFFIX}`] = baseDomain;
}This is a substring heuristic. If a future OAuth flow uses a capture rule whose
Raw SOQL passthrough in Performance / Speed
Test embedding Python source as Summary
The domain-binding heuristic in |
Summary
instance_urlhost while remaining blocked from unrelated hostsAcceptance Criteria
<secret:...>placeholders,captureResponseFields, andbearerSecretName; tokens are not returned to the helper/modelfindStageNameandProbabilitywrites are available throughupdate-opportunityand NLrunTaskorEventrecords on the resolved CRM targetUsageTotalsmetadata in helper/eval payloadsCloses #580.
Validation
npm run formatpython3 skills/skill-creator/scripts/quick_validate.py skills/salesforcepython3 skills/salesforce/scripts/salesforce_query.py --format json eval-scenariospython3 -c "import pathlib; p=pathlib.Path('skills/salesforce/scripts/salesforce_query.py'); compile(p.read_text(), str(p), 'exec')"/Users/bkoehler/src/hybridclaw/node_modules/.bin/vitest tests/salesforce-skill.test.ts/Users/bkoehler/src/hybridclaw/node_modules/.bin/vitest tests/gateway-http-server.test.ts -t "binds captured OAuth bearer tokens to response instance_url host"./node_modules/.bin/tsc --noEmit --pretty falsegit diff --checkNote: the focused gateway test passes but logs an existing shared
better-sqlite3Node ABI warning during mocked runtime-config startup.