NEW @W-22462050@ apexguru bug fixes - #497
Conversation
|
Git2Gus App is installed but the |
aruntyagiTutu
left a comment
There was a problem hiding this comment.
Reviewed against the PR review guide. Diff, CI status, and full file content verified.
What's good:
- The new
isInvalidSessionError/isScanTimeoutErrorclassifiers and theNO_ORG_CONNECTION/API_UNAVAILABLEmessage rewrites make skip messages self-describing (no more redundantApexGuru skipped: ${message}wrapper inskipWithError), and follow the "to continue, do X" structure from the doc guidance without resorting to "please". isScanTimeoutErrormatches the literal'Workspace scan timed out'whileisApiUnavailableError'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) fromisInvalidSessionError, 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
left a comment
There was a problem hiding this comment.
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.
…esolve-production-org-id
No description provided.