Repository navigation
fix(host): keep the meeting list alive when a stored level does not parse - #2593
Conversation
…arse (#2592) `summary()` is the projection every meeting action answers through, and it called the strict `decisionLevel()` on the stored record. A `level` no writer stores — a hand edit, or a record from an older build — made `meeting action=list` throw `meeting/invalid: level must be one of ordinary, major, severe` and lose every record, not only the bad one. The read side now renders an unknown level as `ordinary`, the way `advanceRefusal()` and the board's `decisionCardOf` already read it; the write path still refuses. Fixes #2592 Docs-not-needed: a read-side guard on a stored field; the write path still refuses an unknown level
|
Verdict: PASS at ded3208 Ran at this tip: Tier: T2 ( Not run: |
…hinkFlowLab#2592) (ThinkFlowLab#2595) Written-by: Chief Fixes ThinkFlowLab#2592 Owner: Dev Reviewer: Reviewer `ThinkFlowLab#2593` fixed the read projection in `core/src/host/meetings.js` but landed without the changelog fragment a user-visible fix needs, so the meeting-level guard would have been missing from the release notes. This adds only `changelog.d/2592.fixed.md`, written to the same shape as the other fragments. ## Checkpoint <!-- flybot:checkpoint --> ```json { "pr": 2595, "claim": "Dev", "issue": 2592, "summary": "Adds the changelog fragment the meeting-level guard shipped without. One user-visible sentence: the meeting list keeps a record whose stored level is unknown, and a write still refuses one. No source file changes.", "files": ["changelog.d/2592.fixed.md"], "checks": { "ran": "node .github/scripts/changelog.mjs check", "result": "green", "at": "c2f87600e8ff615ea7b7edb62491d64c7eb1ae44" }, "next": "none — ready for review" } ``` <!-- /flybot:checkpoint --> Docs-not-needed: a changelog fragment only; `docs/` needs no change.
Written-by: Dev
Fixes #2592
Owner: Dev
Reviewer: Reviewer
Tip SHA: ded3208
Base: 8126953
What changed
summary()incore/src/host/meetings.jsis the projection every meeting action answers through —listmaps every record through it, andreadand each write echo do too — and it called the strictdecisionLevel()on the stored record. One record whoselevelholds a value no writer stores (a hand edit, or a record from an older build) threwmeeting/invalid: level must be one of ordinary, major, severe, and the whole meeting list was lost.A stored level that is not one of
ordinary,major,severenow renders asordinary, the wayadvanceRefusal()(meetings.js:92) and the board'sdecisionCardOf(project-board.js:210) already read the same field. The strict validator stays on the write path:openstill refuses an unknownlevel.core/test/meetings-unknown-level.test.js— new test: a minimal runtime withstate.meetings = { m1: { ... level: 'critical' ... } }, callingrt.meetingEndpoint('list'). It asserts the list still namesm1 [decided] Adopt the record?and renderslevel: ordinary, thatreaddoes not throw either, and thatopenwithlevel: 'critical'is still refused.core/src/host/meetings.jsis a FlyBot-only file (upstreamds-bot/has no copy), sogeneratestores it whole inpatches/ds-bot/files/; both mirrors in this diff are the same bytes, and no.patchhunk changes.Red first
cd core && node --import ./test/harness-resolve.mjs --test test/meetings-unknown-level.test.jsagainstmain@8126953894f5d9b649605e98f39f9bcadb63f563, before any source change:Reverting only the source change after the fix turns the same two read tests red again at
:502; re-applying it is green.Ran at the tip
TZ=UTC, atded3208264753cbb8712187574e7c9fcea53991b:cd core && node --import ./test/harness-resolve.mjs --test test/meetings-unknown-level.test.js— 3 tests, 3 pass.cd core && node --import ./test/harness-resolve.mjs --test test/meetings.test.js— 15 tests, 15 pass (the write-path refusal cases included).cd core && node --import ./test/harness-resolve.mjs --test --test-concurrency=6 "test/*.test.js"— 3010 tests, 3007 pass, 3 fail. All three (test/check-arch-docs.test.js× 2 — shells out togit, absent on this host — andtest/usage-fields.test.js— sqlite fixture) fail identically on the untouched base tree at8126953894f5d9b649605e98f39f9bcadb63f563, 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 and 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/; both mirrors byte-identical);node --test ".github/scripts/*.test.mjs" "policy/*.test.mjs"(662 pass, 0 fail);node scripts/lint-interop.mjs; interop tests (37 pass);node scripts/lint-live-e2e.mjs; live-e2e tests (34 pass);node .github/scripts/check-mojibake.mjs --check(0 occurrences).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 read-side guard on a stored field; the write path still refuses an unknown levelScope
Only
core/src/host/meetings.js, the new test, and their generatedpatches/ds-bot/files/mirrors — noplugins/**, noCHANGELOG.md, no changelog fragment: a read-side guard on a value the current writer never produces.Checkpoint
{
"pr": 2593,
"claim": "Dev",
"issue": 2592,
"summary": "A stored meeting level that no writer stores — a hand edit, or a record from an older build — made summary() throw meeting/invalid, and every meeting action answers through that projection, so one bad record lost the whole list. The read side now renders an unknown level as ordinary, the way advanceRefusal() and the board reader already read it, while the write path still refuses a bad level. The new test drives rt.meetingEndpoint('list') and read with a level: 'critical' record and keeps the write refusal.",
"files": [
"core/src/host/meetings.js",
"core/test/meetings-unknown-level.test.js",
"patches/ds-bot/files/src/host/meetings.js",
"patches/ds-bot/files/test/meetings-unknown-level.test.js"
],
"checks": {
"ran": "core: new test (3/3), meetings.test.js (15/15), full suite --test-concurrency=6 (3007 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; mojibake scan; .github/scripts + policy tests; interop and live-e2e lint/tests",
"result": "green",
"at": "ded3208264753cbb8712187574e7c9fcea53991b"
},
"next": "none — ready for review"
}