Skip to content

NEW @W-22462050@ apexguru bug fixes - #497

Merged
nikhil-mittal-165 merged 5 commits into
devfrom
feature/apexguru-org-resolve-production-org-id
Aug 11, 2026
Merged

NEW @W-22462050@ apexguru bug fixes#497
nikhil-mittal-165 merged 5 commits into
devfrom
feature/apexguru-org-resolve-production-org-id

Conversation

@nikhil-mittal-165

Copy link
Copy Markdown
Contributor

No description provided.

@git2gus

git2gus Bot commented Aug 10, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@aruntyagiTutu aruntyagiTutu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the PR review guide. Diff, CI status, and full file content verified.

What's good:

  • The new isInvalidSessionError/isScanTimeoutError classifiers and the NO_ORG_CONNECTION/API_UNAVAILABLE message rewrites make skip messages self-describing (no more redundant ApexGuru skipped: ${message} wrapper in skipWithError), and follow the "to continue, do X" structure from the doc guidance without resorting to "please".
  • isScanTimeoutError matches the literal 'Workspace scan timed out' while isApiUnavailableError's network-indicator list matches generic 'timeout' — these don't collide as substrings ("timed out" vs "timeout"), and the two checks live in separate catch blocks (initialize() vs the scan/poll path) from isInvalidSessionError, so there's no ordering ambiguity in practice.
  • resolveProductionOrgId() is well-tested: new tests cover the happy path (call #1, before submit/poll), the org-resolve failure path, and the multipart form-field wiring (toContain('name="productionOrgId"')).
  • CI green across macOS/Ubuntu/Windows, SAST, credential scanning, CLA.

One doc nit (non-blocking): the new ApexGuruOrgResolveResponse type's doc comment in src/types/index.ts says productionOrgId "must be forwarded as the production-org-id header on the SFAP scan submit call," but the actual implementation (and the test assertion) forwards it as a multipart form field (form.append('productionOrgId', productionOrgId)), matching the correct doc comment on resolveProductionOrgId() itself. Worth fixing the stale comment on the type so it doesn't mislead a future reader about the wire format.

No functional or security concerns. Approving via comment since the only finding is a doc-comment fix.

@aruntyagiTutu aruntyagiTutu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New commit ("default engine") reviewed. This graduates all 23 ApexGuru rules out of dev-preview: removes the DevPreviewApexGuru tag and replaces it with the standard COMMON_TAGS.RECOMMENDED + COMMON_TAGS.CATEGORIES.PERFORMANCE tags, matching the convention already used by the pmd/eslint/retirejs/sfge engines (COMMON_TAGS from @salesforce/code-analyzer-engine-api).

Tests are updated consistently: apexguru-rules.test.ts now asserts every rule carries exactly [RECOMMENDED, PERFORMANCE] and none carry the removed dev-preview tag; ApexGuruEngine.test.ts adds coverage for rule selection via both the Recommended and Performance tags. No leftover references to the old DEV_PREVIEW_TAG_APEXGURU constant.

CI green (macOS/Ubuntu/Windows, SAST, credential scanning, CLA, package/PR-title validation). No concerns — approving.

@nikhil-mittal-165
nikhil-mittal-165 merged commit fa1eabe into dev Aug 11, 2026
15 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