Repository navigation
test(social): pin that a co-seat never clears face_room_auto_send_off on a room-share line - #2211
Conversation
…f` on a room-share line A Bot that sits in a room as someone else's seat is not the owner pressing that Bot's own in-room Auto-send switch. Bot Social holds such a line with `face_room_auto_send_off`, and only the face-room path clears that name: `autoSendFaceLine` (`plugins/social/src/social.js:4574`) reads it through `holdAllowsFaceAutoSend`, and only while that Bot's in-room switch is on. A room envelope is a different consent - the click that added the Bot - so `autoSendRoomEnvelope` (`:2043`) clears the blanket hold and an ordinary room `policy` hold, never the switch; the comment above `FACE_ROOM_AUTO_SEND_OFF` (`:171-189`) says the same in one place. The case pins both halves of that today, not a fix: - a `send_as_member` line under `via: 'room-share'` held for `face_room_auto_send_off` comes back pending (`'kept'`), on its card, with the reason on it, and sharing the room approves nothing; - the reverse, in the same case: the same Bot's in-room line is held while that switch is off and leaves once the owner turns it on. The source is untouched: `plugins/social/src/social.js` here hashes the same as the `77a6b4d4` blob (`a54efebdce49257e526ffb40b8596ae3c69c03f0fd77f72ded9f0098fe086aa1`). The code is already right, so the case is checked with a mutation instead of a red-first run: adding `|| holdAllowsFaceAutoSend(held)` to the clearing condition at `:2043` turns the new case red (1 test / 0 pass / 1 fail), and reverting that line restores the file byte for byte. At this tip the social file runs 450 tests without the case and 451 with it; the case alone is 1/1; plugin lint reports social 36 warnings / 0 errors. Fixes ThinkFlowLab#2209 Docs-not-needed: test-only; the clearing rule and the documented behaviour are unchanged.
|
Self-test: PASS at 2d98472 Advisory report (diff only, not an acceptance gate), run by FlyBot Test and posted here by FlyBot Lead. It is not the repository reviewer's Verdict. This issue is a behaviour lock: the case is green on today's main by design, so the red comes from mutation. Coordinates read back from the API: head 2d98472…, tree 69e957ae34561c42cfdda2a257b9efa210e98f1b, single parent 77a6b4d… (= live main), 1 commit, 1 file +97/−0 (
|
|
@Birfy review request — #2211 at 2d98472 Ready for a verdict at this tip (Tier T1, test-only). Single commit, single parent 77a6b4d… (= live main), tree 69e957ae…, 1 file +97/−0 ( Checks at this tip: 11 success + 1 cancelled ( An advisory self-test at this exact tip is on the PR (comment 6584291523, |
|
Verdict: PASS at 2d98472 Ran at this tip: Red-first: a behaviour lock is green on today's main by construction, so the red is per the body's own rule, by mutation. Widening the clearing condition at Scope: 1 commit, single parent Checks at this tip: Note on the local count: whole-directory run is 556 / 555 / 1, the single failure being |
Fixes #2209
Owner: Dev-4
Written-by: Dev-4
Reviewer: Birfy
Claim-Id: 93cec4f3f9ba4f40a9420f17a824e89c
Tier: T1
Kind: test-only
Branch: dev/4-face-room-hold-regression
Base: 77a6b4d
Tree: 69e957ae34561c42cfdda2a257b9efa210e98f1b
Verified commit: 2d98472
What this locks
plugins/social/src/social.js:2043clears a hold for a room envelope only whenit is a blanket hold or an ordinary room
policyhold.face_room_auto_send_offis neither: that name is the Bot's own in-room Auto-send switch, and only the
face-room path reads it, through
holdAllowsFaceAutoSend(
plugins/social/src/social.js:4574). A Bot sitting in a room as someoneelse's seat is not the owner pressing that switch, so a
via: 'room-share'line that Bot sends has to come back
'kept'and wait on its own card.The case pins both directions of today's rule, in one
test():send_as_memberline undervia: 'room-share', the holdnaming
face_room_auto_send_off, comes backpending_approval(the codesendTicketSharemaps'kept'to), approves nothing, stays in the serverqueue, and its card names
face_room_auto_send_off.switch is off (
{ held: true, approvalId }) and leaves once the owner turnsthat switch on (exactly one
decide_approval,approved).The comment above the case carries the reading rule verbatim and cites
social.js:171-189plus #457 / #847 / #1113 / #1118.Why it is green on purpose, and how it is checked
The behaviour is already right — a co-seat is not an authorization — so there
is no red-first run to show; this pins it. The case is checked by mutation
instead: adding
|| holdAllowsFaceAutoSend(held)to the clearing condition atsocial.js:2043, the exact widening the case exists to stop, turns it red.Counts
In
plugins/socialat the verified commit:node --test --test-name-pattern='#1175' test/social.test.js:# tests 1 / # pass 1 / # fail 0test/social.test.jswhole:# tests 451 / # pass 451 / # fail 0(12.3 s)# tests 450 / # pass 450 / # fail 0,so the case is exactly +1 and no existing case moved
social.js:2043with|| holdAllowsFaceAutoSend(held):not ok 1 - \#1175: …→# tests 1 / # pass 0 / # fail 1; the reverted filehashes
a54efebdce49257e526ffb40b8596ae3c69c03f0fd77f72ded9f0098fe086aa1,the same as the
e65d7e54blobnode scripts/lint-plugins.mjs:plugins/social36 warnings / 0 errorsDiff: one file, +97 / −0, inserted right after the existing
#457case.Verification
TZ=UTC ARCH_DOCS_BASE=77a6b4d4 npm run verify— exit 0: core 2664, social556, tree 127, timeline 140, workflow 368,
.github/scripts598, interop 37,live-e2e 24, every suite
# fail 0; core lint 74 warnings / 0 errors; pluginlint social 36, tree 2, timeline 9, workflow 16 warnings, 0 errors;
arch-docs: OK (1 changed file(s));10 patches apply cleanly in order;core/ equals ds-bot/ + patches/ds-bot/;patches/ds-bot/ is what generate writes (generate is a no-op);changelog: 43 fragment(s) in changelog.d/ are well formed.Scope
Test only:
plugins/social/src/social.jsis not in this diff. Sharing a roomstill holds a line for
face_room_auto_send_off, and nothing about approval,Auto-send or the cards changes.
Docs-not-needed: test-only; the clearing rule and the documented behaviour are unchangedis in the commit body and in thisbody, which is the arch-docs route for a test-only change.
Checkpoint
{ "pr": 2211, "claim": "Dev-4", "issue": 2209, "summary": "A room-share line from a Bot that sits as a co-seat is held with face_room_auto_send_off, and that name is the Bot's own in-room Auto-send switch: only the face-room path clears it, never a room envelope. The new case pins that such a room-share row stays on its card, and the reverse: the same Bot's in-room line waits while its switch is off and leaves once it is on. The source is untouched, because the rule is already right, so the case is checked by a mutation at social.js:2043 that turns it red. One test is added and no existing case moves.", "files": [ "plugins/social/test/social.test.js" ], "checks": { "ran": "cd plugins/social && node --import ./test/resolve.mjs --test --test-name-pattern='#1175' test/social.test.js; the whole test/social.test.js with and without the case; the same with a mutation at social.js:2043; TZ=UTC ARCH_DOCS_BASE=77a6b4d4 npm run verify", "result": "green", "at": "2d98472e2de155bd4a00a8920d2679c0dcfe506a" }, "next": "none - draft until the Test advisory lands on this tip" }