Skip to content

chore(docs): drop @lhci/cli and the test:budget Lighthouse gate - #265

Merged
laithalsaadoon merged 2 commits into
mainfrom
chore/drop-lhci-budget-gate
Oct 18, 2026
Merged

laithalsaadoon merged 2 commits into
mainfrom
chore/drop-lhci-budget-gate

Conversation

@laithalsaadoon

@laithalsaadoon laithalsaadoon commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Drops @lhci/cli from apps/docs and test:budget from mise run check. The accessibility gate (axe through Playwright) and the layout-stability probe keep the WCAG 2.2 AA and CLS checks. No Lighthouse score gates the build after this.

What leaves, and the proof for each

  • apps/docs/lighthouserc.json, and the three built-site.test.ts cases that read it. The URL-parity case is moot with one page list; the base-segment case and the browser-suite registration case stay under a renamed describe.
  • test:budget in apps/docs/package.json, the root package.json, turbo.json and mise.toml; the docs lint script no longer names lighthouserc.json.
  • The apparmor sysctl step in check.yml and release-please.yml. fix(ci): re-enable unprivileged user namespaces for the browser gates #2 added it for lhci's sandboxed Chrome. Playwright 1.64.0 adds --no-sandbox unless chromiumSandbox: true (playwright-core/lib/coreBundle.js:44764), and neither a11y.test.ts nor layout-stability.test.ts sets it, so the remaining gate never needed the namespace.
  • The tmp and uuid pnpm overrides, and the extract-zip OpenVEX statement with its two generated osv-scanner.toml entries. pnpm why -r tmp|uuid|extract-zip on main a1c6913 shows every path ends at @lhci/cli (tmp also through inquirer, itself under @lhci/cli). The refreshed lockfile has zero matches for lhci, lighthouse, puppeteer or extract-zip. The ledger keeps its document fields with statements: [] (version 2, last_updated set). Probed against a one-package lockfile holding [email protected]: grype 0.120.1, trivy 0.75.0 and osv-scanner 2.7.0 each accept the empty ledger and report the finding again, so an empty ledger suppresses nothing and parses everywhere. vex.test.ts now asserts statements is an array rather than non-empty.
  • .gitignore entries for .lighthouseci/ and .lhci-site/.
  • Comments in gates.ts, layout-stability.test.ts, mise.toml, CLAUDE.md and README.md that described two browser tiers or the budget gate.

Lockfile: refreshed with the pinned pnpm 11.21.0. 370 package entries removed, none added; the five keys git shows as + ([email protected], inherits, minimist, safe-buffer, wrappy) are unchanged entries re-anchored by the diff.

Why

The lhci tree has cost upkeep since the gate landed. lighthouse's trace_engine resolves two dependencies from latest, which moved the lockfile on 2026-09-24 and 2026-10-12 (maintenance PLAYBOOK), and the 2026-09-30 qs advisories needed an express refresh through @lhci/cli (#230). The gate's performance score has no replacement; the CLS reading it could not hold reliably already lives in layout-stability.test.ts.

Verification

mise run check on this head, with MEMHTML_TRACE_ROOT unset: 67/67 turbo tasks green in 4m13s (exit 0), including test:a11y with a11y.test.ts (22 tests) and layout-stability.test.ts (5 tests) over the built site, and tests-integration (208 tests) with the VEX drift gate against the empty ledger. Local probe of the sandbox claim: mise run browsers plus both browser suites ran with no sysctl change on this host.

verdict-bench item 57 (sod-0914:memhtml-lhci-drop-pr, instance sod): Laith ruled go at 15:12 CT 2026-10-12.

CI state at open (16:05 CT)

check (5m33s), package, analyze (CodeQL), scan and dependency-review are green. The Trivy code-scanning status is red on alert 137 (braces 3.0.3, CVE-2026-93687, high, no fixed version), which has been open on main since 2026-10-05 and reaches the repo through starlight-llms-txt, micromatch, braces, a path this PR does not touch: [email protected] sits in the lockfile at the same two entries before and after. GitHub's own check output notes that alerts not introduced by this PR may be reported when the code changes are too large. The 2,257-line lockfile shrink trips that fallback; the five smaller lockfile PRs since 10-05 (#255 to #264) got "no new alerts" from the same tool. The ruleset's code-scanning rule blocks the merge button on it. The alert itself is upstream of this change and stays whatever happens here.

Update 2026-10-16 (rebase and VEX)

Rebased onto main at 5ad0ab5 (14 commits ahead of the original base a1c6913); the only conflict was pnpm-lock.yaml, resolved by taking main's lockfile and regenerating it with pnpm install --lockfile-only under the pinned pnpm 11.21.0. The regenerated lockfile has zero lhci or lighthouse entries.

Second commit 44b0307 records braces 3.0.3 (CVE-2026-93687, GHSA-vfj7-8cjw-p6xm) as not_affected in security/memhtml.openvex.json with vulnerable_code_not_in_execute_path, and regenerates osv-scanner.toml from it. braces reaches the repo only through starlight-llms-txt -> micromatch in apps/docs; starlight-llms-txt calls only micromatch.isMatch, which routes to picomatch, and a call logger appended to braces/index.js during the docs build recorded zero calls (positive-controlled against micromatch.braces('x/{a,b}')). The patterns reaching isMatch are this repo's own globs from astro.config.ts. 3.0.3 is the highest braces ever published, so no override target exists. trivy fs --vex on this tree: 0 HIGH/CRITICAL findings (1 without the ledger).

mise run check on 44b0307: 67/67 green. CI on 44b0307: all eleven checks green, Trivy reports "No new alerts in code changed by this pull request"; mergeStateStatus is CLEAN.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

apps/docs no longer depends on @lhci/cli, and `mise run check` no longer
runs `test:budget`. The accessibility gate (axe through Playwright) and
the layout-stability probe keep the WCAG 2.2 AA and CLS checks; no
Lighthouse score gates the build.

Removed with it, each proven before removal:

- apps/docs/lighthouserc.json and the three built-site cases that read
  it. The URL-parity case is moot with one config; the base-segment case
  stays and the browser-suite registration case stays.
- test:budget in apps/docs/package.json, the root package.json,
  turbo.json and mise.toml; `lint` no longer names lighthouserc.json.
- The apparmor sysctl step in check.yml and release-please.yml. It
  existed for lhci's sandboxed Chrome (#2). Playwright 1.64.0 passes
  --no-sandbox unless chromiumSandbox is true (coreBundle.js:44764), and
  neither a11y.test.ts nor layout-stability.test.ts sets it, so the
  remaining gate never needed the namespace.
- The tmp and uuid pnpm overrides, and the extract-zip OpenVEX
  statement with its generated osv-scanner.toml entries. `pnpm why -r`
  on main shows all three reach the lockfile through @lhci/cli alone
  (tmp also via inquirer, itself under @lhci/cli), and the refreshed
  lockfile carries none of them. The ledger keeps its document fields
  with an empty statements list (version 2, last_updated set); grype
  0.120.1, trivy 0.75.0 and osv-scanner 2.7.0 each accept the empty
  ledger and report the finding again against a probe lockfile.
- .gitignore entries for .lighthouseci/ and .lhci-site/.

The lockfile loses 370 package entries and gains none; the five keys
that show as added are unchanged entries git re-anchored.

Why: the lhci tree has cost upkeep since the gate landed. lighthouse's
trace_engine resolves two dependencies from `latest`, which moved the
lockfile on 2026-09-24 and 2026-10-12, and the 2026-09-30 qs advisories
needed an express refresh through @lhci/cli (#230).

verdict-bench item 57 (sod-0914:memhtml-lhci-drop-pr): Laith ruled go
at 15:12 CT 2026-10-12.
@laithalsaadoon
laithalsaadoon force-pushed the chore/drop-lhci-budget-gate branch from 8d5bb2e to 738839e Compare October 16, 2026 14:45
braces reaches the repository through one path, micromatch 4.0.8 under
starlight-llms-txt 0.12.0 in apps/docs, and that path never calls it.
micromatch calls braces only from parse, braces and braceExpand;
starlight-llms-txt calls only isMatch, which routes to picomatch 2.3.2.
A call logger appended to braces/index.js and micromatch/index.js during
`pnpm run build` in apps/docs recorded one process loading both modules
and zero calls into braces, after the logger was positive-controlled
against micromatch.braces('x/{a,b}'). The patterns that reach isMatch
are the plugin's include, exclude, promote and demote globs from
astro.config.ts, so no attacker-supplied pattern reaches the matcher.
The published memhtml package is assembled from packages/* and excludes
apps/docs. 3.0.3 is the highest braces ever published, so no override
target exists.

The ledger moves to version 3; osv-scanner.toml is regenerated from it
by scripts/vex-to-osv-config.mjs. trivy fs with --vex reports zero
HIGH/CRITICAL findings on this tree and one without it.
@laithalsaadoon
laithalsaadoon merged commit 3f6f813 into main Oct 18, 2026
11 checks passed
laithalsaadoon added a commit that referenced this pull request Oct 20, 2026
Moves the Effect catalog set (`effect`, `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/vitest`) from 4.0.3 to 4.0.5 with no source or test change. One 4.0.4 entry changes what `packages/telemetry` does when tracing is on, so this move was held for a maintainer's decision and merged on it.

What moves:
- `pnpm-workspace.yaml:61-64`: the four catalog lines.
- `pnpm-lock.yaml`: only the four Effect entries and their peer suffixes (10 lines in the peer-stripped table).
- Docs: the 17 mentions of the pin on 15 lines in `docs/architecture/system-overview.md`, `docs/diagrams/structural/dependency-graph.md`, `docs/insights/debugging-guide.md`, `docs/insights/tech-debt.md` and `docs/reference/rpc-tools.md`. Each claim those lines make was re-checked at 4.0.5 (five MCP protocol adapters, `layerStdio`'s `instructions` option, the `@stability unstable` tags, `Schema.Struct({})` and `Tool.EmptyParams` JSON Schemas, `Config.String`). The same lines' citations into `pnpm-workspace.yaml`, `apps/cli/src/head-server.ts` and `CLAUDE.md`, stale since #265 and #287 moved those files, now name the lines they mean. Every edit keeps its cell width.

Behavior that reaches memhtml:
- Effect-TS/effect#9053 (4.0.4), telemetry on only: the OTLP exporter waits for a collector's `Retry-After` between its three retries after a 408 or 5xx, never less than the 1 s it waited before. Measured on this tree against a local collector: arrivals at 0, 2, 4 and 6 s instead of 0, 1, 2 and 3 s for a 503 with `Retry-After: 2`; unchanged without the header.
- Effect-TS/effect#9014 (4.0.4): Node HTTP text decoding drops a leading UTF-8 BOM, so a BOM-prefixed JSON body to the head server's `/v1/search`, `/v1/read`, `/v1/neighbors`, `/v1/commit` or `/v1/rebase` now decodes instead of answering 400. `/v1/exec` parses its body itself and still refuses one. memhtml's own head client never sends a BOM, so its traffic is unchanged.
- Effect-TS/effect#9136 (4.0.5): the values of `sig`, `Signature`, `AWSAccessKeyId` and `X-Goog-Signature` query parameters are redacted in the request line a head-server 400 echoes and, with telemetry on, in server span `url.full` and `url.query`. memhtml's client sends no query string.
- Measured identical on this tree: interrupt merging (#9113), JSON Schema bounds on the two new decode-only schemas (#9081), the MCP server's shared codecs (#9031, 15 tools, identical transcripts), `Duration` conversion (#9109, #9161), and server span timing (#9066).

Verified:
- `mise run check`: 75/75 tasks on this branch.
- A reader compiled all 16 TypeScript packages plus `tests-integration` against the 4.0.5 tarballs with the repo's compiler options (0 errors), with a two-way self-check: a probe using APIs that exist only in 4.0.5 (`UrlParams.redactUrl`, `NodeHttpClient.layerNodeHttpOptions`) fails on 4.0.3 and passes on 4.0.5, and a probe that #9112 breaks passes on 4.0.3 and fails on 4.0.5.
- The unit suites of `packages/session`, `head`, `curator`, `snapshot`, `telemetry`, `store`, `eval`, `apps/cli` and `apps/mcp` pass 1443/1443 on both versions.

Effect 4.0.6 is not published; its "Version Packages" PR (Effect-TS/effect#9197) queues entries on the head server's Node HTTP paths, MCP stdio streams and OTLP serialization, so the next move gets its own read.

Supersedes the Effect members of Dependabot's minor-and-patch group.
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.

2 participants