Prototype paused admin participant AI support
Enable an existing AI difficulty for a human seat through admin controls without granting private access or advancing paused play. Preserve custody, credentials, takeback and separate paced resume. Bind atomic writes and outgoing-grant revocation to live authority, room/pause versions and active seat access with durable exact receipts. Validation: types/lint, 5408 offline tests, build and 52 HTTP tests passed on source fingerprint 2157de0f4bb0b74d9760d52102601c52344cf674dee8ccd1d559f0a246a1d4ff; 22 authenticated admin HTTP groups, independent SQL/privacy/UI review, desktop/mobile and refresh checks. All 2098 baseline rooms and 4455 seats preserved. Migration 0015 is additive. Positive production admin QA awaits authorized access; full admin/rules scope remains unfinished.
This commit is contained in:
1 parent
137f9223f1
commit
2cddf03932
23 files changed
+3187
-10
No files matched your search
@@ -8,6 +8,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { verifyRoomLifecycle } from './admin-lifecycle-verification.mjs';
|
||||
import { verifyRoomCreation } from './admin-creation-verification.mjs';
|
||||
import { verifyLobbyConfiguration } from './admin-lobby-verification.mjs';
|
||||
import { verifyParticipantAi } from './admin-seat-ai-verification.mjs';
|
||||
import { verifyRoomArchive } from './admin-archive-verification.mjs';
|
||||
import { verifyRoomClosure } from './admin-closure-verification.mjs';
|
||||
import { verifyRoomRemoval } from './admin-removal-verification.mjs';
|
||||
@@ -35,7 +36,7 @@ async function request(path, body, cookie, origin = base, expectedAdminId = admi
|
||||
const response = await fetch(base + path, {
|
||||
method: body === undefined ? 'GET' : 'POST',
|
||||
headers: { ...(body === undefined ? {} : { 'content-type': 'application/json', origin }), ...(cookie ? { cookie } : {}),
|
||||
...(expectedAdminId && (path === '/api/admin/rooms' && body !== undefined || /^\/api\/admin\/rooms\/[^/]+\/(control|lobby|removal|closure|archive)$/.test(path)) ? { 'X-Dune-Admin-Id': expectedAdminId } : {}) },
|
||||
...(expectedAdminId && (path === '/api/admin/rooms' && body !== undefined || /^\/api\/admin\/rooms\/[^/]+\/(control|lobby|removal|closure|archive|seat-ai)$/.test(path)) ? { 'X-Dune-Admin-Id': expectedAdminId } : {}) },
|
||||
...(body === undefined ? {} : { body: JSON.stringify(body) }), signal: AbortSignal.timeout(15000),
|
||||
});
|
||||
report.lastRequest = { path, status: response.status };
|
||||
@@ -93,6 +94,7 @@ try {
|
||||
await verifyRoomRemoval(request, session1, report);
|
||||
await verifyRoomClosure(request, session1, report);
|
||||
await verifyRoomArchive(request, session1, report);
|
||||
await verifyParticipantAi(request, session1, report);
|
||||
}
|
||||
report.passed = true;
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user