From ea045b9a9f99b4a41ff0e3d6e03dca5c4d93d372 Mon Sep 17 00:00:00 2001 From: mikecarper Date: Mon, 21 Sep 2026 16:09:47 -0700 Subject: [PATCH] docs: keep node clock correction page-local --- docs/preset_test.md | 5 +++-- test/test_preset_test.js | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/preset_test.md b/docs/preset_test.md index bd6cfa0c..5f309c83 100644 --- a/docs/preset_test.md +++ b/docs/preset_test.md @@ -108,8 +108,9 @@ Open a generated URL to see that test's status, instructions, and commands.

This changes only the absolute tempradioat and tempradioat2 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.

diff --git a/test/test_preset_test.js b/test/test_preset_test.js index 5728adb9..4385e91b 100644 --- a/test/test_preset_test.js +++ b/test/test_preset_test.js @@ -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/