chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
The e2e world's index wait passes on the day runner minutes free up
harness/shots/world.mjs+10−4
| @@ -36,6 +36,9 @@ export const saved = join(root, 'target/shots/world.json') | ||
// the same any day. | ||
export const now = '2026-10-20T14:00:00Z' | ||
| ||
/// When some of each runner's minutes free up, as the pages show it. | ||
const freeing = '2026-11-02T00:00:00Z' | ||
| ||
// The views drawn signed in, and as whom: only from the recording, where | ||
// the stand-in for knotless-serve answers getViewer as that account | ||
// (fixtures.mjs). A world has no session to sign them in, so shots-live | ||
| @@ -618,7 +621,7 @@ export async function create() { | ||
for (const [who, minutes, frees] of [['alice', 1640, 310], ['bob', 2140, 400]]) { | ||
const record = { | ||
$type: 'dev.knotless.minutes', owner: account[who].did, minutes, allowance: 2000, | ||
freeing: [{ at: '2026-11-02T00:00:00Z', minutes: frees }], updatedAt: '2026-10-25T17:52:00Z', | ||
freeing: [{ at: freeing, minutes: frees }], updatedAt: '2026-10-25T17:52:00Z', | ||
} | ||
const session = await fetch(`${net.pds}/xrpc/com.atproto.server.createSession`, { | ||
method: 'POST', | ||
| @@ -770,12 +773,15 @@ export async function create() { | ||
'issue-closed': item('issue', typo), | ||
} | ||
// The index has caught up when no page shows today's date, every | ||
// record now being dated before it, and the merge shows. | ||
const today = new Date().toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }) | ||
// record now being dated before it, and the merge shows. The day | ||
// runner minutes free up on is a date the pages show too, and is left | ||
// out, as on that day it is today's. | ||
const day = (t) => new Date(t).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }) | ||
const today = day(Date.now()) | ||
await until('the index', async () => { | ||
const pages = await Promise.all(Object.values(views).map(page)) | ||
const all = pages.join('') | ||
return !all.includes(today) && all.includes('Merged as') && all.includes('Closed by') && all.includes('2 Closed') && all.includes('Forked from') && all.includes('1 Closed') && all.includes('2/2') && (all.includes('Some checks failed') || all.includes('Some checks were not successful')) && all.includes('prints_json') && all.includes('In a batch of 2 being checked') && /Ejected <time/.test(all) && all.includes('Landed') && all.includes('Runs only when asked') && all.includes('tally-server') && all.includes('Pre-release') | ||
return !all.replaceAll(day(freeing), '').includes(today) && all.includes('Merged as') && all.includes('Closed by') && all.includes('2 Closed') && all.includes('Forked from') && all.includes('1 Closed') && all.includes('2/2') && (all.includes('Some checks failed') || all.includes('Some checks were not successful')) && all.includes('prints_json') && all.includes('In a batch of 2 being checked') && /Ejected <time/.test(all) && all.includes('Landed') && all.includes('Runs only when asked') && all.includes('tally-server') && all.includes('Pre-release') | ||
&& (await page('/bob.test')).includes('textkit.test') && (await page(views['org-members'])).includes('bob.test') | ||
}) | ||
return { net, dir, views, cards, pds, server: children[1], stop } | ||