This commit is contained in:
Abdul Wahab
2026-09-01 10:09:03 +05:00
parent f775f9e585
commit 82b03772e4
11 changed files with 469 additions and 47 deletions
+6
View File
@@ -262,6 +262,12 @@ async function handleRequest(request, response) {
where to reach it from this response; the agent learns from
runtime/session.json, which the sibling writes at boot. */
const doc = await spawnDocSession();
/* The tab fires its first asset requests the moment this response lands,
and an img that reaches a forked session still booting fails once and
never retries. The session writes its record only after listen succeeds,
so the record on disk is readiness itself; no HTTP probe, which would
also mark the session adopted before any tab has seen it. */
if (doc) await waitForSessionRecord(5000);
response.once('finish', () => {
console.log(`ANSWERS ${answersPath}`);
server.close(() => process.exit(0));