feat(orchestrator): harden zero-impact shadow rollout

Gate and bound Portal shadow observations while preserving Native execution. Add fail-closed service boundaries, terminal retention controls, Canary readiness telemetry, ops visibility, and isolated regression coverage.
This commit is contained in:
john
2026-07-25 07:28:37 +08:00
parent 08a48e4849
commit 6df82818c5
33 changed files with 1569 additions and 108 deletions
+33
View File
@@ -102,6 +102,39 @@ test('orchestrator HTTP API exposes health and authenticated run endpoints', asy
['executor_job_blocked'],
);
assert.equal(executorEventBody.nextCursor, 1);
const purgePreview = await fetch(
`${server.baseUrl}/v1/maintenance/purge-terminal-runs`,
{
method: 'POST',
headers: {
authorization: 'Bearer test-service-token',
'content-type': 'application/json',
},
body: JSON.stringify({ before: Date.now() + 1000 }),
},
);
assert.equal(purgePreview.status, 200);
const purgePreviewBody = await purgePreview.json();
assert.equal(purgePreviewBody.dryRun, true);
assert.equal(purgePreviewBody.candidates.length, 1);
const deleted = await fetch(`${server.baseUrl}/v1/runs/http-shadow-1`, {
method: 'DELETE',
headers: { authorization: 'Bearer test-service-token' },
});
assert.equal(deleted.status, 200);
assert.deepEqual(await deleted.json(), {
runId: 'http-shadow-1',
deleted: true,
executorJobDeleted: true,
});
assert.equal(
(await fetch(`${server.baseUrl}/v1/runs/http-shadow-1`, {
headers: { authorization: 'Bearer test-service-token' },
})).status,
404,
);
});
test('orchestrator HTTP API reports missing runs and observe-only violations', async (t) => {