Skip to content

Pin the three settings silences #1964 introduced (unnamed title, cleared task lead, mode write-back) - #1972

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-settings-silent-tests
Nov 1, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/2-settings-silent-tests

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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 (tree 89faf38b…); the pushed head 60fca610… 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-notice line 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 of core/test/remote-room.test.js.

silence guard (core/src/host/roster.js) case
a seat change that retitles an unnamed group says nothing :487 if (patch.name !== undefined) an added member retitles an unnamed room without a settings line (:2509)
a leave that clears the task lead says nothing beyond its left line :447 if (patch.taskLead !== undefined) a member leaving with the task lead clears it without a settings line (:2530)
a reply mode written back at the value the room holds says nothing :449 patch.mode !== room.mode writing back the reply mode the room already holds says nothing (:2551)

Base 2dfc1c3a and this tree carry those guards on the same lines: it already contains #1970, which moved updateRoom'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 fail each 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 the patch.taskLead !== undefined guard: 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 → drop patch.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.taskLead really became undefined, and room.mode really stayed admin.

Ran

On the committed tree with a clean git status, once: TZ=UTC ARCH_DOCS_BASE=2dfc1c3a90f25de8b58a6f8e968aacded101a782 npm run verify — exit 0.

  • core 2374 pass / 0 fail (base 2dfc1c3a runs 2371; these three cases are the difference)
  • social 541 (540 pass, 1 skip) · tree 127 (126, 1) · timeline 135 (134, 1) · workflow 336 · .github/scripts 563 · interop 37 · live-e2e 24, all 0 fail
  • arch-docs OK (2 changed file(s)); lint 73 core + 36 social + 9 timeline + 2 tree + 16 workflow warnings, 0 errors; interop lint 1 warning (dev/interop/isolation/probe.mjs:130 no-unsafe-finally), live-e2e lint 0 warnings, 0 errors
  • npm --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-op
  • node .github/scripts/changelog.mjs check → 8 fragment(s) in changelog.d/ are well formed (this test-only change adds none, see the Docs-not-needed: line above)
  • cmp core/test/remote-room.test.js patches/ds-bot/files/test/remote-room.test.js → byte-identical

Not run: the smoke test (this checkout has no running FlyBot instance to drive), the CI package job, typecheck and actionlint. No manual browser check was made; every case drives the real updateRoom route through rt.postToRoom.

Not in scope

Only assertions are added. No product file, doc or patch source changes; patches/ds-bot/files/test/remote-room.test.js is the mirror generate writes from core/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"
}

…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).
@HugoXK

HugoXK commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy Review PR #1972 at 60fca61 — FlyBot Lead (tier T1, test-only, 2 files +128/−0, base 2dfc1c3a). It fixes #1965: three settings silences that #1964 introduced had no test, so mutating any of their guards left the whole core suite green. Three cases in core/test/remote-room.test.js pin them — an unnamed group retitled by a seat change draws no settings line (roster.js:487), a leave that clears the task lead draws none (:447), and a reply mode written back at its own value draws none (:449). Red first with only that guard mutated and only that case failing (96 tests / 1 fail each), 97/97 green here; verify exit 0 at tree 89faf38b (the pushed head is that same tree rebuilt by the fork push), core 2374 against 2371 on the base. No product code changes.

@Birfy
Birfy added this pull request to the merge queue Nov 1, 2026
Merged via the queue into ThinkFlowLab:main with commit 804acdd Nov 1, 2026
13 checks passed
@Birfy
Birfy deleted the dev/2-settings-silent-tests branch November 1, 2026 03:38
Birfy added a commit to HugoXK/FlyBot that referenced this pull request Nov 1, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: pin the three settings silences #1964 introduced (unnamed title, cleared task lead, mode write-back)

2 participants