Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

test(relay): use real time for status child observations [H5,H17]

Corey Olsona56077ed659b
diff --git a/docs/formats.md b/docs/formats.md
index c8801baa..c50affdf 100644
--- a/docs/formats.md
+++ b/docs/formats.md
@@ -734,7 +734,7 @@ The client-local file `<git common dir>/pullboard/relay-health.sqlite` is separa
| Table | Rows | Meaning |
| --- | --- | --- |
-| `relay_health` | One row with `id = 1` and a JSON `value` | Version-one local history: monitoring start; bounded timestamped probe samples (`ok`, failed step, safe code, elapsed milliseconds and relay version); failure count; degraded/alert timestamps; p95; and durable pending alert or recovery notices. |
+| `relay_health` | One row with `id = 1` and a JSON `value` | Version-one local history: monitoring start; bounded timestamped probe samples (`ok`, failed step, safe code, elapsed milliseconds and relay version); failure count; degraded/alert timestamps; p95; and durable pending alert or recovery notices. A separate `client` record holds the latest ordinary request sample and its degraded timestamp; ordinary requests never populate monitor samples or clear its active episode. |
| `canary_schedule` | One row with `id = 1` and numeric `next_due` | The next eligible minute, claimed atomically so multiple local views of the same repository do not start duplicate probes. |
The containing directory is created with mode 0700 and the SQLite file is created with mode 0600. A status read does not create it or contact the relay. Pending notices are removed only after the ordinary native notification path completes; a failed or interrupted notification leaves the notice available for retry. These records are machine-local display and scheduling state. They add no board table, event, engine field, relay journal record or sealed presentation field.
diff --git a/test/relay-canary.test.js b/test/relay-canary.test.js
index f4b55072..49c5414c 100644
--- a/test/relay-canary.test.js
+++ b/test/relay-canary.test.js
@@ -176,12 +176,10 @@ test('the client shows queued moves while the relay is degraded [H16,H17,C7]', {
const queued = await box.cli('shout', 'all', text);
assert.equal(queued.code, 0, queued.failure);
}
- let now = Date.now();
for (let index = 0; index < 2; index += 1) {
- const failure = await withFixtureEnvironment(box.env, () => probeRelayCanary(root, { agentId: joined.document.agent, io: {}, clock: () => now }));
+ const failure = await withFixtureEnvironment(box.env, () => probeRelayCanary(root, { agentId: joined.document.agent, io: {} }));
assert.equal(failure.ok, false, 'the real canary observes the stopped relay');
- observeRelayHealth(box.root, failure, { now });
- now += 1_000;
+ observeRelayHealth(box.root, failure);
}
const status = await box.cli('status');
assert.equal(status.code, 0, status.failure);