commit 32cd94ee80103a45391893ba9e2f1ec6ad338079
parent da441710b0b98ad3b1ea134746dbd5305421ee0a
Author: anon <anon@example.com>
Date: Sat, 24 Oct 2026 11:45:01 +0000
Repair profile worker URL test environment
Diffstat:
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -1114,9 +1114,9 @@ and server restarts. Turn every reproduced bug into a focused regression test.
## Checks that apply to each milestone
-- [ ] Repair the browser-profile worker test fixture. Its VM context lacks
- `URL`/`location` required by the current worker, so
- `node client/tests/browser_profile.mjs` fails before exercising its assertions.
+- [x] Repair the browser-profile worker test fixture. Its VM context supplies
+ `URL`/`location` and checks build/upload URLs relative to the worker location.
+ `node client/tests/browser_profile.mjs` now exercises all existing assertions.
- [ ] Align the declared Go test/toolchain requirement with `WaitGroup.Go`
usage. The module declares Go1.24 while existing concurrency tests use the
Go1.25 API; full `go vet` reports `stdversion` errors. The other analyzers
diff --git a/client/tests/browser_profile.mjs b/client/tests/browser_profile.mjs
@@ -10,9 +10,14 @@ function fixture(detailed, status = 204) {
const context = vm.createContext({
Uint32Array, Atomics, performance: {timeOrigin: 1000, now: () => 100},
setInterval: (callback, delay) => timers.push({callback, delay}),
- postMessage: message => messages.push(message), AbortSignal,
+ postMessage: message => messages.push(message), AbortSignal, URL,
+ location: {href: 'https://example.test/wasm/profile-worker.js'},
fetch: async (url, options) => {
- if (!options) return {ok: true, json: async () => ({source_commit: 'build-test'})};
+ if (!options) {
+ assert.equal(url.href, 'https://example.test/wasm/build.json');
+ return {ok: true, json: async () => ({source_commit: 'build-test'})};
+ }
+ assert.equal(url.href, 'https://example.test/browser-profile/test');
uploads.push(JSON.parse(options.body));
if (rejectUpload) throw new Error('offline');
if (pendingUpload) await pendingUpload;
diff --git a/docs/ignore.md b/docs/ignore.md
@@ -93,8 +93,8 @@ overhead IGNORED badge after removal remains an explicit native refresh TODO.
The full Go suite passed in 357 seconds; the changed Go cases passed twice under
the race detector in 99 seconds. The other vet analyzers passed with the existing
Go toolchain `stdversion` mismatch disabled. Browser storage passed nine stages,
-browser controls passed all 73 tests, and publisher tests passed. The separate
-profile-worker VM fixture currently fails because its context lacks `URL`;
-that pre-existing fixture repair remains in TODO.
+browser controls passed all 73 tests, and publisher tests passed. Profile-worker
+VM tests supply `URL`/`location` and verify worker-relative build and upload URLs;
+all existing summary, sampling, bounded-upload and pacing assertions pass.
Owned characters 55/56, their 56 history copies and two buddy rows were cleaned;
all other database rows stayed unchanged, with integrity and foreign keys valid.