Skip to content

fix(vcs): stop recording expected GitHub and scan outcomes as errors - #2710

Merged
Makisuo merged 2 commits into
mainfrom
triage/vcs-errors
Nov 16, 2026
Merged

Makisuo merged 2 commits into
mainfrom
triage/vcs-errors

Merge origin/main into triage/vcs-errors

9de7a8b
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 16, 2026 in 2m 42s

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.scan answers RepositoryUnreachable and TreeTooLarge instead of failing
  • The plan cache stores null for a truncated tree, PLAN_VERSION bumped to 2
  • getCommit maps a blocked repository to VcsRepositoryBlockedError
  • VcsSource*NotFoundError move to @maple/domain/http as 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
  • toRepositoryListingError leaves 401/403/5xx as GithubAppError (GithubAppClient.ts:66), so transient faults still fail the scan
  • A cached null plan still sets truncated (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.