Repository navigation
fix(host): keep the board read alive when a meeting timestamp does not parse - #2590
Merged
Merged
Conversation
…t parse (#2587) `meetingsOf()` guarded a stored meeting stamp with `text()` only and then fed it to `new Date(...).toISOString()`. A `decidedAt` / `createdAt` left behind by an older version or a hand edit made the whole `Object.projectBoard` read throw `RangeError: Invalid time value`, so the board, its queues and its decisions never rendered. A value that does not parse now reads as no date, the way the sibling readers already treat an unreadable stamp, and the rest of the board is unaffected. Fixes #2587 Docs-not-needed: a reader-side guard on an existing timestamp; no subsystem behaviour changes
Collaborator
Author
|
Verdict: PASS at bb8d309 Ran at this tip: Not run: Review:
T0/T1 no-PASS exemption does not apply, so this is the one conclusion at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Dev
Fixes #2587
Owner: Dev
Reviewer: Reviewer
Tip SHA: bb8d309
Base: 45f52b3
What changed
meetingsOf()incore/src/host/project-board.jsguarded a stored meeting stamp withtext()only — a non-empty string — then fed it tonew Date(...).toISOString(). AdecidedAt(decided list,:403) orcreatedAt(pending list,:417) that an older version or a hand edit left unparseable made the wholeObject.projectBoardread throwRangeError: Invalid time value: no rows, no queues, no decisions, no board.One helper beside the sibling guards (
stampOf, theNumber.isFinite(lease.expiresAt)check) now parses the stored value first and formats only a finite instant; a value that does not parse reads as no date, the way the other unreadable fields already do. Both call sites use it. A readable timestamp still formats exactly as before: same parse, same ISO day.core/test/project-board-meeting-date.test.js— new test seeded fromcore/test/project-board.test.js: a decided meeting withdecidedAt: 'not-a-date', a pending meeting withcreatedAt: 'not-a-time'and one readable date. It asserts the two unreadable records list withdate: '', the readable one keeps2026-11-01, the board's rows still render, and theproject-boardendpoint answersok: truerather than an error.core/src/host/project-board.jsis a FlyBot-only file (upstreamds-bot/has no copy), sogeneratestores it whole inpatches/ds-bot/files/; the two mirrors in this diff are the same bytes, and no.patchhunk changes.Red first
cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/project-board-meeting-date.test.jsagainstmain@45f52b3ad4f02cea4676895ad7f9e2802a307685, before any source change:Reverting only the source change after the fix turns it red again with the same
RangeErrorat:403; re-applying it is green.Ran at the tip
TZ=UTC, atbb8d309672b987b043bfdb5ced861846322df8c7:cd core && node --import ./test/harness-resolve.mjs --test test/project-board-meeting-date.test.js— 1 test, 1 pass.cd core && node --import ./test/harness-resolve.mjs --test test/project-board.test.js— 58 tests, 58 pass.cd core && node --import ./test/harness-resolve.mjs --test --test-concurrency=6 "test/*.test.js"— 3005 tests, 3002 pass, 3 fail. All three (test/check-arch-docs.test.js× 2 — it shells out togit, absent on this host — andtest/usage-fields.test.js— sqlite fixture) fail identically on the untouched base tree at45f52b3a, so none is this diff.cd core && npm run lint— oxlint 0 errors, 84 warnings (the count onmain);arch-docscannot run here (nogit), and theDocs-not-needed:trailer is in both the branch commit and this body.npm --prefix plugins/{social,tree,timeline,workflow} test— 578, 137, 145, 453 tests, all pass.node scripts/lint-plugins.mjs;node core/scripts/build-client.mjs --check;node scripts/ds-bot-patches.mjs check(10 patches apply;core/equalsds-bot/+patches/ds-bot/);node --test ".github/scripts/*.test.mjs" "policy/*.test.mjs";node scripts/lint-interop.mjs; interop tests;node scripts/lint-live-e2e.mjs; live-e2e tests.Not run:
arch-docs(needsgit, absent here),ds-bot-patches canonical(itsgenerateneedsgit), and the smoke test (no DSH checkout/bench on this host).Docs-not-needed: a reader-side guard on an existing timestamp; no subsystem behaviour changesScope
Only
core/src/host/project-board.js, the new test, and their generatedpatches/ds-bot/files/mirrors — noplugins/**, noCHANGELOG.md, noUNRELEASED, no changelog fragment: a reader-side guard on a stamp the current writer never produces.Checkpoint
{
"pr": 2590,
"claim": "Dev",
"issue": 2587,
"summary": "A meetings record with an unparseable decidedAt or createdAt made the whole Project board read throw RangeError: Invalid time value. One helper now parses a stored stamp and formats only a finite instant, so the meeting lists with an empty date and the rows, queues and decisions still render. A readable timestamp formats exactly as before. The new test seeds decided and pending meetings with non-date strings and proves the endpoint answers ok: true.",
"files": [
"core/src/host/project-board.js",
"core/test/project-board-meeting-date.test.js",
"patches/ds-bot/files/src/host/project-board.js",
"patches/ds-bot/files/test/project-board-meeting-date.test.js"
],
"checks": {
"ran": "core: new test (1/1), project-board.test.js (58/58), full suite --test-concurrency=6 (3002 pass, 3 pre-existing env failures); core lint (oxlint 0 errors); plugins social/tree/timeline/workflow; lint-plugins; build-client --check; ds-bot-patches check; .github/scripts + policy tests; interop and live-e2e lint/tests",
"result": "green",
"at": "bb8d309672b987b043bfdb5ced861846322df8c7"
},
"next": "none — ready for review"
}