Repository navigation
Pin the three settings silences #1964 introduced (unnamed title, cleared task lead, mode write-back) - #1972
Conversation
…1965) Three settings behaviours ThinkFlowLab#1964 made correct have no test: an unnamed room's title follows its members (_patch.name_ absent, so no settings line), a seat change that empties the task lead says nothing on top of the left line, and a save writing back the mode the room already holds is a no-op. Removing any of those guards leaves the whole core suite green, so a refactor could turn each of them into a line in every room and nothing would go red. Each case drives the public updateRoom with the fixtures of the settings case beside it, and each was checked against its guard removed: only that case fails (95 of 96 still pass). Docs-not-needed: test-only pin of behaviour docs/subsystems/core-host.md already describes; no source file changes (ThinkFlowLab#1965).
|
@Birfy Review PR #1972 at 60fca61 — FlyBot Lead (tier T1, test-only, 2 files +128/−0, base |
Rebased onto main 90b880e (ThinkFlowLab#1972/ThinkFlowLab#1974) — this commit only re-plays ThinkFlowLab#1975 there: the one conflict was both sides inserting tests at the same spot in core/test/remote-room.test.js, so main's ThinkFlowLab#1965 tests and this PR's ThinkFlowLab#1967 test are both kept.
Fixes #1965
Owner: Dev-2
Reviewer: Birfy
Written-by: Dev-2
Claim-Id: 3f5368ad4cc745d39e5a600f9c876d6f
Branch: dev/2-settings-silent-tests
Base: 2dfc1c3
Tip SHA: 60fca61
Tree: 89faf38b9f496a647d7ee90ba424b9db70275d8d
Verified commit
b1785df34f29b871b66690d73a6e2a1b0ac4e2b2(tree89faf38b…); the pushed head60fca610…was rebuilt from that same tree by the fork push, so the checks describe that tree, not that commit sha.Docs-not-needed: test-only pin of behaviour docs/subsystems/core-host.md already describes; no source file changes (#1965).
What was silent, and is now pinned
#1964 gave a room one quiet
face-noticeline per settings save, and its guards decide when that line says nothing at all. Three of those silences had no test: mutating the guard left the whole core suite green, so a later refactor could have started posting a second line — a rename the members asked for, a task lead cleared by a leave, a mode written back at its own value — with nothing to notice. This tree changes no product code. It adds the three missing assertions, one per silence, at the end ofcore/test/remote-room.test.js.core/src/host/roster.js):487if (patch.name !== undefined)an added member retitles an unnamed room without a settings line(:2509):447if (patch.taskLead !== undefined)a member leaving with the task lead clears it without a settings line(:2530):449patch.mode !== room.modewriting back the reply mode the room already holds says nothing(:2551)Base
2dfc1c3aand this tree carry those guards on the same lines: it already contains #1970, which movedupdateRoom's settings block down four lines (before it, the same three read:483,:443,:445).Tests
Every case is red first on this same tree with only its guard mutated, and only that case fails — the file runs
96 tests / 95 pass / 1 faileach time::487→if (nameChanged):not ok - an added member retitles an unnamed room without a settings line,a title that follows the members is not a settings line,text: 'Alice renamed the room to “Alice, Chief A, Chief B, Writer A”'against[].:447→ drop thepatch.taskLead !== undefinedguard:not ok - a member leaving with the task lead clears it without a settings line,the left line already says it; the cleared lead is not a second line,text: 'Alice let the admin lead the board again'.:449→ droppatch.mode !== room.mode:not ok - writing back the reply mode the room already holds says nothing,a save that writes the same mode back says nothing,text: 'Alice switched plain messages to the admin first'.Each case asserts the state it was guarding, not just the absence of a line: the unnamed group's title really became
Alice, Chief A, Chief B, Writer A,room.taskLeadreally becameundefined, androom.modereally stayedadmin.Ran
On the committed tree with a clean
git status, once:TZ=UTC ARCH_DOCS_BASE=2dfc1c3a90f25de8b58a6f8e968aacded101a782 npm run verify— exit 0.2374pass /0fail (base2dfc1c3aruns2371; these three cases are the difference)541(540pass,1skip) · tree127(126,1) · timeline135(134,1) · workflow336·.github/scripts563· interop37· live-e2e24, all0failOK (2 changed file(s)); lint73core +36social +9timeline +2tree +16workflow warnings,0errors; interop lint1warning (dev/interop/isolation/probe.mjs:130no-unsafe-finally), live-e2e lint0warnings,0errorsnpm --prefix core run build→ no diff;node scripts/ds-bot-patches.mjs generate→ no diff;check→ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70,10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/;canonical→generate is a no-opnode .github/scripts/changelog.mjs check→8 fragment(s) in changelog.d/ are well formed(this test-only change adds none, see theDocs-not-needed:line above)cmp core/test/remote-room.test.js patches/ds-bot/files/test/remote-room.test.js→ byte-identicalNot run: the smoke test (this checkout has no running FlyBot instance to drive), the CI
packagejob, typecheck and actionlint. No manual browser check was made; every case drives the realupdateRoomroute throughrt.postToRoom.Not in scope
Only assertions are added. No product file, doc or patch source changes;
patches/ds-bot/files/test/remote-room.test.jsis the mirrorgeneratewrites fromcore/test/remote-room.test.js.Checkpoint
{
"pr": 1972,
"claim": "Dev-2",
"issue": 1965,
"summary": "Test-only: three cases in core/test/remote-room.test.js pin the settings silences #1964 introduced — an unnamed group retitled by a seat change draws no settings line, a leave that clears the task lead draws none, and a reply mode written back at its own value draws none. Each case was red first with only its guard mutated (roster.js:487, :447, :449) and only that case failing. No product code changes.",
"files": [
"core/test/remote-room.test.js",
"patches/ds-bot/files/test/remote-room.test.js"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=2dfc1c3a90f25de8b58a6f8e968aacded101a782 npm run verify; node scripts/ds-bot-patches.mjs check; node .github/scripts/changelog.mjs check",
"result": "green",
"at": "60fca6101d542a6f557d51d44d2cee016900177b"
},
"next": "none — ready for review"
}