Add lighthouse kit - #244
Open
kristiyan-velkov wants to merge 1 commit into
Open
Conversation
Give sandbox agents a pinned Lighthouse audit toolchain without relying on Ubuntu's snap Chromium stub. Signed-off-by: kristiyan.velkov <christiyanweb@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
lighthousemixin that installs Google Lighthouse CLI v12.6.1 (pinned; last 12.x that runs on Node ≥ 18.20, which standard agent templates guarantee) and a container-safe wrapper.playwrightkit (/opt/ms-playwright+CHROME_PATH=/usr/local/bin/chromium) so Ubuntu's snap Chromium stub is avoided and composing both kits shares one browser tree.Spec choices worth flagging for review
npx playwright@1.61.1 install --with-deps chromium, not apt. Same hosts and path asplaywright/. The second hook skips the download if Chromium is already present./usr/local/bin/lighthousealways passes--no-enable-error-reporting(Sentry is not allowlisted) and default Chrome flags (--no-sandbox --disable-dev-shm-usage --disable-gpu) unless the caller set--chrome-flags.registry.npmjs.org. Runtime audits of external sites are intentionally not allowlisted — localhost works; anything else needs a per-sandbox rule.Origin
New frontend-tool mixin, patterned on
playwright/(npm pin + Chromium) andvale/(one-concern CLI).Test plan
CI runs
kit validateand the TCK on every PR.sbx kit validate ./lighthouse/passes (needs sbx that understands schemaVersion 2)./scripts/test-kit.sh lighthousepasses (the TCK)./scripts/test-kit-e2e.sh lighthousepasses under deny-all on a scoped daemonsbx run --kit ./lighthouse/ claudethenlighthouse --versionandchromium --versionMade with Cursor