Repository navigation
fix(vcs): stop recording expected GitHub and scan outcomes as errors - #2710
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. Every new outcome is pinned by a test and each caller path checked out; the oversized-tree branch that writes its own failed row is the one path to watch.
no findings · tests covered · risk medium · 2/2 new units observable
Turns expected VCS and scan outcomes (blocked repos, oversized trees, missing source files, BOM/commented lockfiles) from failures into answers, with a test per behaviour. It addresses all five open VcsSource*NotFoundError issues: those tags now carry a 404 and are in the anticipated-identifier list, so code-tool guesses stop filing error issues.
DependencyScanner.scananswersRepositoryUnreachableandTreeTooLargeinstead of failing- The plan cache stores
nullfor a truncated tree,PLAN_VERSIONbumped to 2 getCommitmaps a blocked repository toVcsRepositoryBlockedErrorVcsSource*NotFoundErrormove to@maple/domain/httpas anticipated 404s
Production impact
Open errors in the changed files (3)
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/backend/vcs/VcsSourceFileNotFoundError (3 issues) | maple-chat | 1.2k | packages/backend/src/services/integrations/vcs/VcsSourceService.ts |
| @maple/backend/vcs/VcsSourceRepositoryNotFoundError | maple-chat | 132 | packages/backend/src/services/integrations/vcs/VcsSourceService.ts |
| @maple/backend/vcs/VcsSourceRefNotFoundError | maple-chat | 66 | packages/backend/src/services/integrations/vcs/VcsSourceService.ts |
After this merges, Maple checks whether they stop.
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
lib/lockfiles/src/parsers/bun.ts |
54 | lockfiles.parseBunLock 54/day, 0.3% err |
What was checked
toRepositoryListingErrorleaves 401/403/5xx asGithubAppError(GithubAppClient.ts:66), so transient faults still fail the scan- A cached
nullplan still setstruncated(DependencyScanner.ts:568), so no lockfile is read as deleted - 4xx attempt spans already end Ok in
vendor-http.ts:301; the new test pins that, not the description's 4xx claim
Observability coverage: 2 of 2 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| DependencyScanner scan (schedule/push/manual) | background work | yes | Existing span, now annotated with maple.depscan.outcome = repository_unreachable / tree_too_large (DependencyScanner.ts:460, :631) |
| GithubAppClient.getCommit | outbound call | yes | Existing Effect.fn("GithubAppClient.getCommit") span keeps peer.service; the blocked answer now lands as an anticipated domain error |
9de7a8b · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.