docs: keep node clock correction page-local

This commit is contained in:
mikecarper
2026-09-21 16:09:47 -07:00
parent e71ccb2710
commit ea045b9a9f
2 changed files with 13 additions and 2 deletions
+3 -2
View File
@@ -108,8 +108,9 @@ Open a generated URL to see that test's status, instructions, and commands.
<p class="preset-test-note">
This changes only the absolute <code>tempradioat</code> and
<code>tempradioat2</code> epochs shown on this page; it does not issue a
clock-setting command. The correction is for this node only. If the node
clock later syncs or jumps, delete and queue the schedule again.
clock-setting command. The correction is for this node and this open page
only: it is never added to generated URLs, and is cleared on reload. If
the node clock later syncs or jumps, delete and queue the schedule again.
</p>
<div class="preset-test-grid preset-test-grid--clock">
+10
View File
@@ -35,6 +35,10 @@ const defaults = tool.configFromSearch("", "America/Los_Angeles");
assert.strictEqual(tool.hasPresetParameters(""), false);
assert.strictEqual(tool.hasPresetParameters("?"), false);
assert.strictEqual(tool.hasPresetParameters("?utm_source=example"), false);
assert.strictEqual(
tool.hasPresetParameters("?node_clock=1790044920&node_clock_at=1790034120"),
false
);
assert.strictEqual(tool.hasPresetParameters("?freq=911.3"), true);
assert.strictEqual(tool.hasPresetParameters("?tz=UTC"), true);
assert.strictEqual(tool.hasPresetParameters("?start=bad"), true);
@@ -128,6 +132,12 @@ assert.strictEqual(
adjustedCommands.stockNow,
tool.commandsFor(clockAdjustedLink, clockAdjustedLink.startMs).stockNow
);
const pageOnlyClockUrl = new URL(tool.configuredUrl(
clockAdjustedLink,
"https://example.test/preset-test/"
));
assert.strictEqual(pageOnlyClockUrl.searchParams.has("node_clock"), false);
assert.strictEqual(pageOnlyClockUrl.searchParams.has("node_clock_at"), false);
assert.throws(
() => tool.schedulerEpochs(clockAdjustedLink, tool.SCHEDULER_EPOCH_MAX),
/outside the firmware range/