fix: address monitor fourth review blockers
This commit is contained in:
@@ -44,12 +44,12 @@ test("full terminal envelope controls hash and concurrent same identity converge
|
||||
assert.equal(detail.run.artifactLocators[0].reachable, false);
|
||||
});
|
||||
|
||||
test("stable JSON accepts optional fields and in-memory view matches the PG contract", async () => {
|
||||
test("stable JSON accepts optional fields and in-memory view preserves the #1878 contract", async () => {
|
||||
assert.equal(monitorCentralStableJson({ optional: undefined, value: "ok", list: [undefined] }), '{"list":[null],"value":"ok"}');
|
||||
const store = createInMemoryMonitorCentralStore();
|
||||
const normalized = normalizeMonitorCentralIngest({ ...input("top-level-view"), payload: { views: { summary: { state: "ready" } }, optional: undefined } });
|
||||
await store.ingest(normalized);
|
||||
assert.deepEqual(await store.view({ sentinelId: "sentinel-a", node: "NC01", lane: "v03" }, "top-level-view", "summary"), { run: { sentinelId: "sentinel-a", node: "NC01", lane: "v03", runId: "top-level-view", updatedAt: normalized.updatedAt, status: normalized.status, payloadHash: normalized.payloadHash }, view: "summary", value: { state: "ready" } });
|
||||
assert.deepEqual(await store.view({ sentinelId: "sentinel-a", node: "NC01", lane: "v03" }, "top-level-view", "summary"), { runId: "top-level-view", name: "summary", value: { state: "ready" } });
|
||||
});
|
||||
|
||||
test("global and scoped latest use updatedAt then runId descending", async () => {
|
||||
|
||||
Reference in New Issue
Block a user