Repository navigation
fix(bin): accept filed timestamps outside UTC - #7408
thelad-dev wants to merge 2 commits into
Conversation
valid_filed prueft die Zeitstempelform ueber einen Rueckformatierungs-Vergleich. Der Weg lief bisher ueber einen Epochenwert, und jq 1.6 rechnet dort die lokale Sommerzeit mit: "2026-08-14T09:30:00Z" kam als "2026-08-14T10:30:00Z" zurueck, der Vergleich scheiterte, und der ganze Bau brach mit "board data does not satisfy fm-bearings-board.v1" ab - auf jedem Rechner, der gerade Sommerzeit fuehrt. Auf UTC-Pruefläufern fiel das nie auf. Die Pruefung laeuft jetzt ohne Epochen-Umweg: strptime fuellt die zerlegten Felder wortgetreu, strftime formatiert direkt daraus zurueck. Das liefert unter UTC, Europe/Berlin, America/New_York und Asia/Kolkata dasselbe Ergebnis. strptime prueft nur die Feldgrenzen fuer sich, faengt also Monat 13, Tag 32 und Stunde 99, nicht aber 2026-02-29 oder 2026-04-31; die Monatslaenge steht deshalb ausdruecklich dabei, statt wie vorher aus der Normalisierung zu fallen. Die akzeptierten Formen bleiben unveraendert. Der neue Testfall nagelt die Zeitzone fest: eine Zeile mit Zeitstempel muss unter TZ=Europe/Berlin angenommen werden und ein Datum, das es nicht gibt, weiter abgelehnt. Ohne gesetzte Zone faellt derselbe Fehler nur ausserhalb UTC auf. tests/fm-bearings-board-render.test.sh laeuft damit auch mit lokaler Zeitzone ohne die bisher scheiternde Zusicherung durch.
|
About the red check here: |
|
Speaking as Kun's firstmate (OSS triage, not the captain). Thanks @thelad-dev — and you are right about the red check. Head Contract-class: restore. The VISION.md, rule by rule: One captain (aligns — the board builds again for captains outside UTC). Authority explicit (aligns — no new authority). Scripts own the mechanics (aligns — a deterministic validator). Restart a non-event (neutral). Delegation with a spine (aligns — regression coverage). Outlives any vendor (neutral). Scope (aligns). CI: Behavior portable serial 2 on run Outcome: waiting-ci under a strict green gate. This is not waiting on you, and there is nothing more you need to do right now. Whether to land it despite that ceiling is a Firstmate/captain call, so I have flagged it there. I will not squash-merge while the required check shows cancelled. |
|
Following up: I tried that shard three more times and it hits the 30-minute cap every run, so there's nothing new to show from my side - still a cancellation, no failing assertion, and the shard doesn't cover the board suites this touches. Restarting the job needs permissions I don't have here (403). From my side this one is done: 19 of 20 green, and the twentieth is the known timeout from #7255 rather than anything in this diff. Happy for you to treat that single check as the known flake and take it from here, or tell me what else you'd want to see. |
|
Speaking as Kun's firstmate: thank you, @thelad-dev, for trying again and for writing it up so clearly. Nothing more is needed from you on this one. Where it stands now:
Landing despite that known serial 2 ceiling is the captain's call, not something an automatic merge can decide, so this is now a captain-decision hold. It is not waiting on you. I've passed it up with that framing. Thanks for your patience. |
Intent
Das Entscheidungsboard verweigert ausserhalb UTC jeden Bau, sobald eine Zeile im Feld filed einen Zeitstempel traegt - obwohl der Skriptkopf genau diese Form erlaubt. Das wird an der fruehesten Grenze korrigiert.
Befund: valid_filed in bin/fm-bearings-board.sh prueft die Zeitstempelform ueber einen Rueckformatierungs-Vergleich mit fromdateiso8601. In jq 1.6 rechnet der Weg ueber den Epochenwert in LOKALER Zeit, und der Vergleich scheitert deshalb auf jeder Maschine, die nicht auf UTC steht. Der ganze Bau bricht dann mit "board data does not satisfy fm-bearings-board.v1" ab.
Nachgerechnet mit jq 1.6, Wert "2026-08-14T09:30:00Z":
Folge im Alltag: tests/fm-bearings-board-render.test.sh fuehrt in seiner eigenen Vorgabe charted-order einen Zeitstempel und scheitert deshalb auf jeder Maschine ausserhalb UTC - mit und ohne fremde Aenderungen. Auf UTC-Pruefläufern faellt es nie auf. Boards gehen hier bisher nur durch, weil beim Verfassen die Datumsform ohne Uhrzeit benutzt wird.
What Changed
valid_filedinbin/fm-bearings-board.shso filed date/timestamp checks usestrptime/strftimeplus explicit month-length and second bounds, instead of an epoch round-trip throughfromdateiso8601that fails under non-UTC local time on jq 1.6.TZ=UTCandTZ=Europe/Berlin, while impossible dates stay rejected.Risk Assessment
✅ Low: Narrow, well-bounded validation change that removes the TZ-dependent epoch round-trip, restores the documented filed forms outside UTC, and correctly fail-closes impossible seconds and month lengths without new behavior surface.
Testing
Ran the bearings-board unit and render suites (including the full render suite forced under Europe/Berlin), then manually built boards with a filed UTC timestamp under four machine timezones; each build exited 0, kept filed=2026-08-14T09:30:00Z in the HTML payload, rejected second 61, and the jq 1.6 demo still showed the old epoch path shifting to 10:30 under Berlin while the new path stays 09:30.
Evidence: E2E timezone board-build transcript
Source: E2E timezone board-build transcript
Evidence: fm-bearings-board.test.sh output
Source: fm-bearings-board.test.sh output
Evidence: render suite under default host TZ
Source: render suite under default host TZ
Evidence: render suite under Europe/Berlin
Source: render suite under Europe/Berlin
Evidence: Built board under Europe/Berlin with filed timestamp
Source: Built board under Europe/Berlin with filed timestamp
Evidence: jq 1.6 old path shifts under Berlin; new path and second-61 bound hold
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-bearings-board.sh:142- After dropping the epoch round-trip, valid_filed still trusts strptime's field bounds. jq 1.6 strptime rejects hour 25 and minute 61, but accepts second 60 and 61 and strftime echoes them back, so values such as "2026-08-14T12:00:61Z" and "2026-12-31T23:59:61Z" pass validation (true under UTC and Europe/Berlin). The old fromdateiso8601 round-trip rejected them because they normalized to a different minute. The comment already notes that month length had to be checked explicitly for the same reason; bound seconds the same way (e.g. $parts[5] <= 59, optionally also hour/minute) so impossible UTC stamps stay fail-closed.🔧 Fix: Bound filed seconds to 59 explicitly
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-bearings-board.test.shbash tests/fm-bearings-board-render.test.shTZ=Europe/Berlin bash tests/fm-bearings-board-render.test.shbash /home/<user>/.no-mistakes/evidence/01M52HT00QASX8YQ4391R75HJQ/run-e2e-filed-tz.sh— board build with filed=2026-08-14T09:30:00Z under TZ=UTC, Europe/Berlin, America/New_York, Asia/Kolkata; second 61 refusal; jq 1.6 old vs new path under Europe/Berlin✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.