Skip to content

fix(verify): put the browser acceptance records back when the run is over - #230

Merged
modacker merged 1 commit into
webuifrom
fix/verify-restore-acceptance-records
Oct 22, 2026
Merged

modacker merged 1 commit into
webuifrom
fix/verify-restore-acceptance-records

Conversation

@modacker

Copy link
Copy Markdown
Collaborator

What broke

The CLI release build failed with:

Error: Packaging requires a clean committed working tree.

The packaging step runs in its own process after pnpm verify and refuses to run against a dirty tree. The tree was dirty because the browser acceptance records are tracked files that every run rewrites — each record carries the time and the machine it ran on.

Why the earlier fix did not cover it

#228 gave the suites that write a record a way to put back what they wrote: restoreAcceptanceRecords() in packages/webui/test/browser/acceptance-record.ts, called from four suites.

One suite was missing: the isolated-chromium suite in browser-use-real-input.test.ts. That suite only runs where the system Chrome sits on a Linux path (/usr/bin/google-chrome and friends), so it never ran on a macOS or Windows machine — the gap only ever showed up on the Linux CI job.

What this changes

  • browser-use-real-input.test.ts restores its own record, the way the other four do.
  • The verification run restores every tracked acceptance record from HEAD when it is over (scripts/lib/acceptance-records.mjs), so a suite that forgets cannot break the packaging gate again.

The run-level restore is git-based on purpose: it restores the committed content of every record file and does not depend on which process wrote it. Locally the records stay — they are what the run just produced, and the published matrix is written from them.

How it was checked

  • The gap, locally: the isolated-chromium suite run against a real Chrome leaves .plan/browser-use/complete/isolated-chromium.acceptance.json modified, and the packaging script then reports Packaging requires a clean committed working tree.
  • With the suite's own restore: the record is back to its committed content and the tree is clean.
  • With only the run-level restore (the suite's restore removed): the record is still put back, so the backstop holds on its own.
  • node --test test/source-sync.test.mjs: 59 tests, 0 failures — including a new test that pins the property against a throwaway checkout.
  • pnpm verify --profile docs: 4 gates pass, and the records are restored at the end of the run.
  • The full WebUI Vitest suite: 207 files passed, 5 skipped, 3241 tests passed — the same as the baseline.

Not addressed here

The isolated-chromium suite's own Chrome probe is still Linux-only, so it does not run on macOS or Windows. That is why the gap was invisible locally. Widening the probe changes what a local pnpm verify does on those platforms, so it is left for a separate change.

…over

A verification run rewrites the tracked acceptance records — every record
carries the time and the machine it ran on — so the working tree is dirty
once the suites are over. The release packaging runs in a separate process
afterwards and refuses to run with a dirty tree, so the CLI release build
failed with "Packaging requires a clean committed working tree".

The suites that write a record restore what they wrote, but one of them did
not: the isolated-chromium suite in browser-use-real-input.test.ts. It only
runs where the system Chrome sits on a Linux path, so the gap only ever
showed up on the Linux CI job.

Two things now hold the tree:

- the suite restores its own record, the way the other four do;
- the verification run restores every tracked record from HEAD when it is
  over, so a suite that forgets cannot break the packaging gate again.

The restore is git-based on purpose: it restores the committed content of
every record file, and it does not depend on which process wrote it. Locally
the records stay — they are what the run just produced, and the published
matrix is written from them.
@modacker
modacker force-pushed the fix/verify-restore-acceptance-records branch from d2efcc8 to 14845e2 Compare October 22, 2026 22:37
@modacker
modacker merged commit e07191f into webui Oct 22, 2026
18 checks passed
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