You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a52e90a
Browse filesBrowse the repository at this point in the historyBrowse files
ci(release): advisory Playwright web-UI sweep on tag builds (QA gate T2) (#1030)
* ci(release): advisory Playwright web-UI sweep on tag builds (QA gate T2)
Spec 081 T2. The release QA gate now runs the Playwright Web UI sweep on
every tag build (release.yml / prerelease.yml already call the reusable
gate), against the Web UI served by the candidate binary with a live
mcpfixture stdio upstream.
Advisory by design, enforced twice: `continue-on-error: true` on the job
(a failing job inside a reusable workflow would otherwise become the
workflow_call conclusion the publishers gate on), and a non-blocking
manifest entry `advisory/web-ui-sweep` (renamed from
`reserved/web-ui-sweep`) whose failures land in `advisory_failures` via a
new `release-gate run-suite --advisory` flag. Promotion to blocking is
Blocking:true + dropping continue-on-error.
The sweep itself is now committed (e2e/web-ui-sweep: servers list, server
detail + security tab, tools page + search, activity log, settings; fails
on uncaught page exceptions) and scripts/run-web-smoke.sh — previously
dead, it ran a spec file that lives only in a gitignored dir — is the
single launcher for both the manual run and the CI job.
* fix(ci): keep advisory sweep artifacts out of release assets; harden launcher
Cross-model review follow-ups on the T2 Playwright sweep.
The gate runs as a reusable workflow, so its artifacts land in the
publisher's own run — and release.yml/prerelease.yml build release
assets by globbing every *.tar.gz/*.zip from ALL run artifacts. A
Playwright HTML report keeps its traces as playwright-report/data/
<sha>.zip, retained on failure (and on a flaky-then-green retry), so a
red advisory sweep on a tag would have attached unnamed trace zips to
the public release. Both publishers now exclude the sweep artifact from
that glob, guarded by TestPublishersDoNotShipSweepArtifacts.
scripts/run-web-smoke.sh:
- generate a throwaway API key instead of honouring MCPPROXY_API_KEY,
which the sweep writes into every navigation URL and Playwright then
stores in the HTML report and failure traces; pin it into the server's
environment too, since the env var outranks the config file and an
ambient key otherwise left the server demanding one key while the
probe used another (46s of 401s, then a readiness timeout)
- fail fast when the candidate exits before becoming ready instead of
burning the full timeout, and give the readiness curl connect/max
timeouts so a port held by a non-responding process cannot block the
loop forever (occupied-port repro: 119s -> 5s)
- preserve the server log from the cleanup trap so an early failure is
diagnosable from the uploaded artifact, not just the CI console
- reject fixture paths containing a quote/backslash/newline rather than
silently emitting a malformed config heredoc
- npm ci against a committed package-lock.json instead of resolving the
mutable ^1.49.0 range during release qualification
* fix(ci): enforce the sweep lockfile against stale node_modules
Round-2 review follow-up. `npm ci` ran only when the playwright binary
was missing, so a tree installed by an older revision of this script
(unlocked `npm install`) kept serving an unreviewed version forever —
the lockfile was enforced on fresh CI runners but not in existing
worktrees.
Compare the installed @playwright/test version against the lockfile
instead of merely checking for presence: a mismatch reinstalls, a match
still skips. That closes the hole without making every hand-run pay a
registry round-trip, which running `npm ci` unconditionally would.
* fix(ci): stamp the sweep install with the lockfile hash
Round-3 review follow-up, closing two low-severity residuals in the
install guard.
Comparing only @playwright/test's version still missed a lockfile that
moved a transitive dependency (playwright-core) without touching the
top-level version. Hash the whole lockfile instead and stamp it into
node_modules after a successful npm ci; any drift reinstalls. Verified
against a transitive-only lockfile bump, which the version check would
have skipped. The stamp is written only on success, so a failed npm ci
leaves the previous, still-accurate stamp in place.
Also pass the path through process.argv rather than interpolating it
into the node -e source: a checkout under a path containing a quote
produced invalid JavaScript and a silently empty result.
* fix(ci): unguessable sweep key; make the tools-search check non-vacuous
Cross-model review (opencode/gpt-5.6-sol) findings on the advisory Web UI
sweep, both verified against the running sweep before fixing:
* The throwaway instance's API key was `web-sweep-<epoch>-<pid>`. It guards
the full REST admin API, which can register a stdio upstream — i.e. run an
arbitrary command as whoever launched the sweep — and 127.0.0.1 is reachable
by every local account, so a clock+PID key is brute-forceable for the minute
the instance is up. Now 24 bytes from crypto.randomBytes.
* The tools-search assertion (`count <= before` plus first-row-matches) passed
vacuously when the search box did nothing: the unfiltered set is trivially
<= itself and the fixture's first tool is already `echo`. It now requires
every surviving row to match, which is also race-free — a strict `<` would
have raced the background indexer, since `before` can be sampled mid-render.
Verified non-vacuous by mutation: with the query emptied the check fails,
where the old one passed.
A third finding (readiness loop could latch onto a foreign server already on
the port) was rejected as a false positive: the probe carries this run's unique
key, and a foreign mcpproxy answers 401 — measured — while a second instance on
a taken port exits 2 and is caught by the loop's liveness check.
---------
Co-authored-by: Algis Dumbris <gordon.greatests@gmail.com>
0 commit comments