12 lines
1.1 KiB
JavaScript
12 lines
1.1 KiB
JavaScript
import fs from 'node:fs';
|
|
import assert from 'node:assert/strict';
|
|
const url = 'http://127.0.0.1:4318';
|
|
const health = await (await fetch(url + '/api/health')).json(), bootstrap = await (await fetch(url + '/api/bootstrap')).json();
|
|
assert.equal(health.pid, 36552); assert.equal(health.version, '1.20.0');
|
|
const active = bootstrap.sessions.filter(value => ['running', 'awaiting_approval', 'stopping'].includes(value.status)).map(value => ({ id: value.id, status: value.status }));
|
|
const result = { observedAt: new Date().toISOString(), success: true, pid: health.pid, version: health.version, runtimeRoot: bootstrap.runtimeRoot,
|
|
hasKey: !!bootstrap.config.hasKey, projects: bootstrap.projects.length, visibleSessions: bootstrap.sessions.length, active,
|
|
scope: 'Read-only pre-deployment service observation; only credential-present bit, no Key access. Full fresh database/export/artifact baseline is required separately immediately before actual deployment.' };
|
|
fs.writeFileSync('.qa/task-control-i-formal-preflight.json', JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
|
console.log(JSON.stringify(result));
|