Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cloudflare-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
run: bun run typecheck && bun run test
- name: Install Chrome
run: bash .github/scripts/install-media-tools.sh chrome
- name: Install Chromium for native browser zoom
run: ./node_modules/.bin/playwright install --with-deps --no-shell chromium
- name: Exercise recording, account and Listening Guide browser paths
working-directory: cloudflare
run: ../node_modules/.bin/playwright test --config playwright.config.mjs
Expand Down
410 changes: 274 additions & 136 deletions TODO.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions cloudflare/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Cloudflare deployment

## Classroom candidate — October 6, 2026

The prospective course implementation and migration `0021` are described in
[the classroom access contract](../docs/classroom-access.md). This is source and
local/test evidence, not a deployment receipt. Historical work stays private;
production migration, Admission release, and live acceptance require their
separate release gates. `TODO.md` records the coordinated PR1–PR3 status.
The [local acceptance record](../docs/acceptance/classroom-2026-10-06.md) lists
test results, screenshots, migration rehearsal and dependency-audit limits.

## Current authority — September 29, 2026

The canonical app is https://stem-splitter.ailab-452.workers.dev/. Release from
Expand Down
18 changes: 9 additions & 9 deletions cloudflare/account.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ test('Verified sessions return to Splitter directly; unavailable verification of
available = true;
await page.getByRole('link', { name: 'Retry', exact: true }).click();
await expect(page).toHaveURL(url.href);
await expect(page.getByRole('heading', { name: 'STEM SPLITTER', exact: true })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Stem Splitter', exact: true })).toBeVisible();
await expect(page.getByRole('link', { name: 'My account', exact: true })).toBeVisible();
await page.goto(expiredLink);
await expect(page).toHaveURL(url.href);
await expect(page.getByRole('heading', { name: 'STEM SPLITTER', exact: true })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Stem Splitter', exact: true })).toBeVisible();
await expect(page.getByRole('heading', { name: /sign.in/i })).toHaveCount(0);
expect(identityChecks).toBe(3);
expect((await context.cookies(origin)).find(cookie => cookie.name === SESSION_COOKIE)?.value).toBe(token);
Expand Down Expand Up @@ -135,7 +135,7 @@ test('Sign out submits a trusted origin, clears cookies and returns to Splitter'
} else if (path === '/api/model-quota') {
await route.fulfill({ json: { quota: null } });
} else if (path === '/') {
await route.fulfill({ contentType: 'text/html', body: '<title>STEM Splitter</title><h1>STEM Splitter</h1><a href="/auth/login">CUNY Login</a>' });
await route.fulfill({ contentType: 'text/html', body: '<title>Stem Splitter</title><h1>Stem Splitter</h1><a href="/auth/login">CUNY Login</a>' });
} else {
const response = await server.fetch(path);
const headers = Object.fromEntries(response.headers);
Expand All @@ -152,7 +152,7 @@ test('Sign out submits a trusted origin, clears cookies and returns to Splitter'
await expect(page).toHaveURL(url.href);
expect(revoked).toBe(true);
expect((await context.cookies()).filter(cookie => [SESSION_COOKIE, LOGIN_COOKIE].includes(cookie.name))).toEqual([]);
await expect(page.getByRole('heading', { name: 'STEM SPLITTER', exact: true })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Stem Splitter', exact: true })).toBeVisible();
expect(errors).toEqual([]);
} finally { await server.close(); }
});
Expand Down Expand Up @@ -180,7 +180,7 @@ test('Account stays simple; administration is deliberate, responsive, and recove
await context.setExtraHTTPHeaders({ 'x-fixture-identity': identities.carol });
await page.setViewportSize({ width: 1280, height: 900 });
await page.goto(new URL('/account.html', url).href);
await expect(page).toHaveTitle('STEM Splitter · Account');
await expect(page).toHaveTitle('Stem Splitter · Account');
await expect(page.getByRole('heading', { name: 'My account', exact: true })).toBeVisible();
await expect(page.locator('#account-role')).toHaveText('Administrator access');
await expect(page.locator('#account-splits')).toContainText('10 of 10 runs left today. Resets');
Expand All @@ -206,22 +206,22 @@ test('Account stays simple; administration is deliberate, responsive, and recove
await expect(page.getByRole('button', { name: 'Save changes', exact: true })).toBeHidden();
await page.getByRole('combobox', { name: 'Account', exact: true }).selectOption(TEST_SUBJECTS.alice);
await expect(page.getByLabel('Instructor access ends', { exact: true })).toBeHidden();
await expect(page.getByLabel('Allow access to STEM Splitter', { exact: true })).toBeChecked();
await expect(page.getByLabel('Allow access to Stem Splitter', { exact: true })).toBeChecked();
await page.getByRole('combobox', { name: 'Access level', exact: true }).selectOption('instructor');
await expect(page.getByLabel('Instructor access ends', { exact: true })).toBeVisible();
await expect(page.getByLabel('Instructor access ends', { exact: true })).toHaveAttribute('required', '');
await expect(page.getByLabel('No end date', { exact: true })).not.toBeChecked();
await page.getByLabel('Instructor access ends', { exact: true }).fill('2026-12-01T12:00');
await page.getByRole('combobox', { name: 'Access level', exact: true }).selectOption('student');
await page.getByLabel('Allow access to STEM Splitter', { exact: true }).uncheck();
await page.getByLabel('Allow access to Stem Splitter', { exact: true }).uncheck();
const [update] = await Promise.all([
page.waitForRequest(request => request.method() === 'PUT'),
page.getByRole('button', { name: 'Save changes', exact: true }).click(),
]);
expect(update.postDataJSON()).toMatchObject({ role: 'student', disabled: true, expiresAt: null });
await expect(page.locator('#access-status')).toHaveText('Access updated.');
await expect(page.getByLabel('Allow access to STEM Splitter', { exact: true })).not.toBeChecked();
await page.getByLabel('Allow access to STEM Splitter', { exact: true }).check();
await expect(page.getByLabel('Allow access to Stem Splitter', { exact: true })).not.toBeChecked();
await page.getByLabel('Allow access to Stem Splitter', { exact: true }).check();
await page.getByRole('button', { name: 'Save changes', exact: true }).click();
await expect.poll(async () => (await page.request.get(new URL('/api/admin/users', url).href)).json().then(body => body.users.find(user => user.subject === TEST_SUBJECTS.alice).disabled)).toBe(0);

Expand Down
1 change: 1 addition & 0 deletions cloudflare/browser.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ test('CAIL student, instructor and admin surfaces; one Crate and attribution-bea
await expect(page.locator('#access-status')).toHaveText('Access updated.');
if (receipts) await page.screenshot({ path: `${receipts}/04-admin-access-fixture.png`, fullPage: true, animations: 'disabled' });
await context.setExtraHTTPHeaders({ 'x-fixture-identity': alice });
await context.setExtraHTTPHeaders({ 'x-fixture-identity': alice, 'x-fixture-course-role':'owner' });
await page.goto(new URL('/teacher.html', url).href);
await expect(page.locator('#console-panel')).toBeVisible();
await page.locator('#amendment').fill('Ask students to compare two layers.');
Expand Down
Loading
Loading