Skip to content

feat(package-vulnerability-scanner): batch package reads with per-item resilience - #457

Draft
amylin1249 wants to merge 4 commits into
pvs-04-setup-screenfrom
pvs-05-packages-engine
Draft

feat(package-vulnerability-scanner): batch package reads with per-item resilience#457
amylin1249 wants to merge 4 commits into
pvs-04-setup-screenfrom
pvs-05-packages-engine

Conversation

@amylin1249

@amylin1249 amylin1249 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Split out of #428 into small, reviewable PRs (tracking issue #415). Stacked 5/10 — stacked on #456, merge bottom-up.

Replaces the single-item GET /api/packages/{guid} with a batched POST /api/packages that reads every requested item in one request, plus an administrator "all content" path that reads Connect's server-wide packages endpoint once instead of item by item. An unreadable item is reported on that item rather than failing the whole scan.

The server-wide read gets its own SERVER_WIDE_TIMEOUT_SECONDS (300s) rather than the 30s per-call budget: it paginates every package record on the server, so its runtime scales with the size of the deployment. Under the shared budget a large server would time out partway through, retry the whole pass twice more, and then fail the scan this batching exists to make possible.

The packages store also clears its previous failure before the empty-list early return, so a caller that ends up with nothing left to fetch still retires the last attempt's error (see #459, which depends on this).

@github-actions

Copy link
Copy Markdown
Contributor

Extension release summary

😴 Changed but won't release

The following extensions have code changes but the manifest version hasn't been incremented:

  • package-vulnerability-scanner: manifest version 3.0.6 ≤ released version 3.0.6

If you intended to release these changes, update the version field in each extension's manifest.json.

See the contributing guide for details.

@amylin1249
amylin1249 marked this pull request as draft July 31, 2026 15:43
@amylin1249
amylin1249 force-pushed the pvs-05-packages-engine branch from 23c9075 to db3b32b Compare August 1, 2026 01:26
@amylin1249
amylin1249 force-pushed the pvs-05-packages-engine branch 3 times, most recently from d000879 to 15810ab Compare August 1, 2026 04:58
@amylin1249
amylin1249 force-pushed the pvs-05-packages-engine branch from 15810ab to 6e13c22 Compare August 1, 2026 05:46
amylin1249 and others added 4 commits August 1, 2026 08:38
…m resilience

Replace the single-item GET /api/packages/{guid} with a batched
POST /api/packages that reads every requested item in one request instead of
one round trip per content item. An unreadable item is reported on that item
(with the human-readable Connect message, not a raw dump) rather than
failing the whole scan; a missing Visitor API Key integration still fails
the whole request so the setup screen shows.

Adds the administrator "all content" path, which reads the server-wide
packages endpoint once and groups by guid instead of one request per item,
since that's the only way thousands of items stay fast.

packages.ts keeps fetchPackagesForContent and clearAllPackages as thin
compatibility shims for ContentList.vue's not-yet-updated caller; both go
away when that file is rewritten in a later PR.
… its own timeout budget

The administrator "all content" read paginates every package record on the
server, so its runtime scales with the deployment, not with one request. Under
the shared 30s per-call budget a large server would time out partway through,
retry the whole pass twice more, and then fail the scan the batching was added
to make possible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… when there is nothing left to fetch

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@amylin1249
amylin1249 force-pushed the pvs-05-packages-engine branch from 6e13c22 to 64a14cc Compare August 1, 2026 15:45
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.

1 participant