fix: preserve immutable monitor migration sources

This commit is contained in:
AgentRun Codex
2026-07-13 00:12:35 +00:00
parent 1a3e95e8d9
commit 9a32ead76f
9 changed files with 130 additions and 29 deletions
@@ -32,6 +32,14 @@ test("HTTP terminal ingest is unbound-safe, ignores caller hash, and maps confli
assert.equal((await fetch(new Request("http://local/health"))).status, 200);
});
test("health returns 503 when the central store is not ready", async () => {
const store = createInMemoryMonitorCentralStore();
const target = createMonitorCentralService({ store: { ...store, async ping() { throw new Error("postgres unavailable"); } }, pageSize: 50 });
const response = await target.fetch(new Request("http://local/health"));
assert.equal(response.status, 503);
assert.equal((await response.json() as { ok: boolean }).ok, false);
});
test("full terminal envelope controls hash and concurrent same identity converges", async () => {
const target = service();
const base = { ...input("run-envelope"), payloadHash: "sha256:caller-controlled" };