aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-17 08:47:16 +0200
committerDanilo M. <danix@danix.xyz>2026-09-17 08:47:16 +0200
commitcc30f929b5f8edaed8a9f8a52cc44de71d9ebfe2 (patch)
tree4864a31d7775342ca3a8572e37d6a374e2810620
parent0f5bd9dbded3c6b51731581cb466bad0cbd4c5d1 (diff)
downloadconky-theme-udt-cc30f929b5f8edaed8a9f8a52cc44de71d9ebfe2.tar.gz
conky-theme-udt-cc30f929b5f8edaed8a9f8a52cc44de71d9ebfe2.zip
fix: correct the day/night constants in Task 1's test
DAY was 1000 against a sunrise of 1500, so every timestamp in the test evaluated as night and the first day assertion could never pass. The implementation was right; the test constants were not. DAY is now 1700, inside the 1500..1900 window, with a comment saying why the value has to be checked against the window rather than just named. Caught by the Task 1 implementer, which stopped rather than quietly inverting the day/night comparison to make the assertions pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-rw-r--r--docs/superpowers/plans/2026-09-17-weather-widget.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/superpowers/plans/2026-09-17-weather-widget.md b/docs/superpowers/plans/2026-09-17-weather-widget.md
index 14c7044..853e08c 100644
--- a/docs/superpowers/plans/2026-09-17-weather-widget.md
+++ b/docs/superpowers/plans/2026-09-17-weather-widget.md
@@ -68,7 +68,10 @@ local weather = require 'lib.weather'
-- ranges come from the polybar script that ran against this API for years.
-- Each assertion pairs the last id in a range with the first id of the next,
-- which is where an off-by-one would hide.
-local DAY, NIGHT = 1000, 2000 -- timestamps either side of the sun, set below
+-- Sunrise 1500, sunset 1900, so DAY must sit INSIDE that window and NIGHT
+-- outside it. Naming them without checking them against the window is how the
+-- first draft of this test made every timestamp evaluate as night.
+local DAY, NIGHT = 1700, 2000
local function icon(id, now)
return weather.icon(id, now, 1500, 1900) -- sunrise 1500, sunset 1900