Skip to content

fix: resolve recurring NUT failures (run-eval login-rate, publish, cross-platform context-vars) @W-24530265@ - #511

Merged
nico-pappagianis merged 3 commits into
mainfrom
fix/nut-suite-run-eval-and-cross-platform
Oct 30, 2026
Merged

nico-pappagianis merged 3 commits into
mainfrom
fix/nut-suite-run-eval-and-cross-platform

Conversation

@nico-pappagianis

@nico-pappagianis nico-pappagianis commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Work Item: @W-24530265@

What

Closes out the recurring plugin-agent NUT failures, all CI-proven green on both ubuntu and windows (validated on the diagnostic branch, run 40917524645). Four independent buckets, one real product fix and three test-side fixes:

Bucket Root cause Fix
agent test run-eval (dominant) SDK bug: callEvalApi used the raw refresh-token connection instead of the JWT connection, tripping the per-IP login rate exceeded cap during the long eval POST Bump @salesforce/agents to ^2.3.3 (SDK PR #382)
agent publish (z2) Test-isolation: retry pollution + inter-test _v2 dependency; verification not aligned to the AiAgentDefinition/Bot metadata publish now retrieves Fix verification + --force-overwrite on generate
agent preview context-vars (z3, Windows) Test portability: single-quoted --context-variables-json is stripped by bash but not cmd.exe, so JSON.parse failed on Windows Per-platform quoting helper
agent preview CV5 (z3) Stale test: asserted a server-side rejection of an Internal context var; visibility is purely server behavior and the server no longer rejects it Remove the test

Why

Only the run-eval failure was a real defect, and it lives in the SDK (fixed in @salesforce/agents@2.3.3); on the plugin side it's a dependency bump. The other three were test-side issues — none were plugin-agent product regressions.

Changes

  • fix(nuts): resolve run-eval login-rate failures — bump @salesforce/agents to ^2.3.3; fan the NUTs across per-group CI jobs (run-eval / test / generate / z / adl-mcp) so each group runs on its own runner IP; de-dup the expensive (~18 min) run-eval invocations into shared before() hooks.
  • test(nuts): fix z2 publish verification for AiAgentDefinition output
  • test(nuts): make context-variables-json cross-platform; drop stale CV5

Notes for reviewers

  • The run-eval invocation de-dup is a test-quality improvement bundled in here because it directly reduces the OAuth churn central to the login-rate failure. If you'd rather land it separately, it's isolated in the first commit and easy to drop.
  • The CI job-fanning (.github/workflows/test.yml + the test:nuts:* scripts) remains useful beyond run-eval: it keeps per-IP login pressure down for every NUT group. Drop it if you prefer a smaller CI diff.

Testing

All four buckets verified green on ubuntu + windows in CI (run 40917524645). The server-behavior change behind CV5 (Internal context vars no longer rejected on preview) was confirmed e2e against a live org and is owned by the server team — intentional, no action needed here.

- Bump @salesforce/agents to ^2.3.3 to pick up the run-eval JWT-connection fix (SDK PR #382): callEvalApi now routes its SFAP call through the JWT connection like every other SFAP path, instead of the raw refresh-token connection that tripped the per-IP 'login rate exceeded' cap during the long eval POST.
- Fan the NUTs across per-group CI jobs (run-eval / test / generate / z / adl-mcp) so each group runs on its own runner IP, keeping any one IP under the login-rate cap. run-eval is isolated for maximum headroom.
- De-dup the expensive (~18 min) run-eval invocations: run each spec once in a before() hook and share the parsed result, so a rate-limit failure surfaces once rather than per assertion.
Verify the published agent against the AiAgentDefinition/Bot metadata the publish path now retrieves, and fix the retry-pollution and inter-test _v2 dependency that made the suite fail on mocha retries. Adds --force-overwrite to the generate step so a retried run regenerates cleanly instead of throwing JsonAabExistsError.
- Quote the --context-variables-json payload per-platform (bash strips single quotes, cmd.exe does not), so CV1/CV2/CV3/CV6 pass on Windows as well as Unix.
- Remove CV5: it asserted a server-side rejection of an Internal context var, but visibility is purely server behavior (neither plugin flags.ts nor the SDK enforce it) and the server no longer rejects it, so the test pinned a contract the plugin doesn't own.
@nico-pappagianis
nico-pappagianis requested a review from a team as a code owner October 29, 2026 19:01
@nico-pappagianis nico-pappagianis changed the title fix: resolve recurring NUT failures (run-eval login-rate, publish, cross-platform context-vars) fix: resolve recurring NUT failures (run-eval login-rate, publish, cross-platform context-vars) @W-24530265@ Oct 29, 2026
@nico-pappagianis
nico-pappagianis merged commit 345fe7b into main Oct 30, 2026
28 of 30 checks passed
@nico-pappagianis
nico-pappagianis deleted the fix/nut-suite-run-eval-and-cross-platform branch October 30, 2026 17:07
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.

2 participants