feat(cli): auto-detect embedded private packages [RED-862] - #1438
Open
sorccu wants to merge 1 commit into
Open
Conversation
sorccu
force-pushed
the
simo/red-855-embed-private-dep-tarballs
branch
from
August 14, 2026 05:22
79eeeb3 to
20c3a23
Compare
sorccu
force-pushed
the
simo/red-862-detect-embedded-packages
branch
from
August 14, 2026 05:22
9dac2ed to
3118b06
Compare
Automatically detect lockfile packages that Checkly runners cannot fetch from the public npm registry and embed their tarballs into Playwright code bundles, alongside the explicit checks.embeddedPackages list. Enabled by default (checks.detectEmbeddedPackages, per-run --no-detect-embedded-packages). Private package names never leave the machine unless explicitly opted in: detection uses zero-network public proofs, @scope:registry mappings, and the project's own Sonatype Nexus REST API, with an opt-in public-registry integrity diff (checks.detectEmbeddedPackagesFallback) for anything left undecided. Results are cached (summary keyed by lockfile + registry config + credentials + explicit specs, plus immutable per-entry integrity-proof verdicts); degraded runs are never summary-cached. All detection failures fail soft with warnings naming the actual cause; explicit entries remain strictly fatal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sorccu
force-pushed
the
simo/red-862-detect-embedded-packages
branch
from
August 14, 2026 06:55
3118b06 to
70f9592
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: RED-862
Stacked on #1435 — targets
simo/red-855-embed-private-dep-tarballsand should be rebased/retargeted ontomainonce that PR merges. Note thetestworkflow only triggers on PRs targetingmain/next/*, so CI checks will not run here until the retarget; the full unit suite (2013 tests) passes locally on this commit.Adds automatic detection of private packages to embed in Playwright code bundles, complementing the explicit
checks.embeddedPackageslist from RED-855. Detection runs duringdeploy/test/pw-test, is enabled by default (checks.detectEmbeddedPackages, per-run--no-detect-embedded-packages, envCHECKLY_DETECT_EMBEDDED_PACKAGES), and fails soft: any detection problem degrades to a warning, never a failed run, while explicitembeddedPackagesentries keep their strict, fatal guarantees.Privacy model
Private package names never leave the machine unless explicitly opted in:
@scope:registrypointing at a non-public registry ⇒ embed, no lookup (over-embedding is safe by the bundle contract)..npmrccredentials: hosted ⇒ embed. A per-group source-repo visibility guard and a zero-hosted-repos guard prevent permission-filtered listings from minting unsound "public" verdicts; same-origin recorded sources that aren't Nexus-shaped are decided conservatively (hosted ⇒ embed, silence ⇒ still undecided).checks.detectEmbeddedPackagesFallback: "public-registry"allows an integrity diff against public npm for whatever remains undecided. This transmits those names, so it is off by default (skip + warning). Transmitted names yield durable cached verdicts, so a name never needs transmitting twice — including when a lookup fails mid-run (partial results are persisted).Caching
Two levels in the CLI cache (
node_modules/.cache/checkly, per-user dir as fallback): a detection summary keyed by lockfile bytes + registry config + credentials + explicit specs, and per-entry immutable integrity-proof verdicts. Degraded runs (skipped packages or a broken.npmrc, e.g. an unset${VAR}) are never summary-cached, so problems keep warning until fixed. Warm runs make zero network requests.Validated end-to-end against a real dockerized Nexus Repository CE instance: REST-based verdicts correct with zero public-registry traffic, scope tier fully offline, warm runs request-free.
Known follow-ups (minor, from review)
restAccessRemediabletags or the combined two-tier failure message.classifyEntriescatch mirroring the tier decision below it).🤖 Generated with Claude Code