Skip to content

Give a frozen Bot one human line on share, join and invite (#3114) - #3189

Merged
Birfy merged 1 commit into
mainfrom
dev/3114-frozen-bot-one-line
Nov 18, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3114-frozen-bot-one-line

Conversation

@Birfy

@Birfy Birfy commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Fixes #3188
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T3

What changed

An emergency-stopped Bot (Bot Social's 403 bot_frozen) said the server's own sentence on all three doors. The share and join-invite mappers now hand that code to mapFaceError, whose FRIENDLY table carries the one sentence for it, so Share with a friend, a face-to-face join or invite preview, and Add friend all say: One of these Bots is emergency-stopped on Bot Social. Its owner can resume it in My Bots on that server, then try again. The error keeps code: bot_frozen and only its .message changes; alreadyLeftFace still answers false, so the room and its grants are kept.

  • plugins/social/src/face-rooms.js: FRIENDLY.bot_frozen after bot_revoked.
  • plugins/social/src/social.js: one line each in mapShareFriendError and mapJoinInviteError.
  • plugins/social/test/face-rooms.test.js, plugins/social/test/social.test.js: the two #3114 cases (share, invite, face-room; no raw sentence, no bare code, no tool name; room not ended).
  • docs/subsystems/social.md and changelog.d/3114-frozen-bot-one-line.fixed.md.

Checkpoint

{"pr":3189,"claim":"Dev","issue":3188,"summary":"An emergency-stopped Bot on Bot Social said the server's own sentence on the share, the face-to-face join/preview and the invite door. FRIENDLY now carries bot_frozen, and the share and join-invite mappers hand that code to mapFaceError, so all three doors say one sentence that names the owner and My Bots. The error keeps code bot_frozen and only its message changes, and alreadyLeftFace still answers false so the room and its grants are kept. Two #3114 tests pin the three doors, the absent raw sentence and the room staying open.","files":["changelog.d/3114-frozen-bot-one-line.fixed.md","docs/subsystems/social.md","plugins/social/src/face-rooms.js","plugins/social/src/social.js","plugins/social/test/face-rooms.test.js","plugins/social/test/social.test.js"],"checks":{"ran":"DSH_HARNESS=/opt/flybot npm --prefix plugins/social run test; TZ=UTC TMPDIR=/data/flybot-tmp npm run verify","result":"green","at":"34e02b5186d0c4051759974c3a76a50322869741"},"next":"none — ready for review"}

Verification at the tip

Ran:

  • DSH_HARNESS=/opt/flybot npm --prefix plugins/social run test → 717 / 717 / 0 / 0 at 34e02b5; before the source change the same two cases made it 717 / 715 / 2 (not ok 56, not ok 502).
  • TZ=UTC TMPDIR=/data/flybot-tmp npm run verify → exit 0: core 3337/3337, social 717/717, tree 149, timeline 172, workflow 524, project 151, plane 20, gate scripts 686, interop 37, live-e2e 34; core lint + arch-docs: OK (6 changed file(s)), plugin lint 0 errors, build-client --check, ds-bot-patches check (10 patches apply; core/ equals ds-bot/ + patches; generate no-op).
  • node .github/scripts/changelog.mjs check, testing-layers.mjs --check, check-mojibake.mjs --check → all pass.

Not run:

  • The Bot Social server half: it answers one bot_frozen code for either end of a relationship, so telling "your Bot" from "the friend's Bot" needs two codes or a field on that read-only upstream; not part of this slice, no issue filed there.
  • The registration door (mapRegisterError maps any 401/403 to unauthorized, and a bare bot_frozen otherwise lands in Could not register …): not fixed here, per the slice spec.
  • No browser click-through: this change is host-side error mapping; the UI already draws the host's error message.
  • Local arch-docs ran against a base rebuilt from the same tarball tree (this environment has no clone); CI runs it on the real base.

Written-by: Dev

An emergency-stopped Bot answered with the server's own sentence on all three doors. The
FRIENDLY table now carries `bot_frozen`, and the share and join-invite mappers hand that code to
`mapFaceError`, so sharing, a face-to-face join or invite preview, and accepting an invite say one
sentence and keep the `bot_frozen` code. A stop is a state the owner can end, so the room is not
treated as ended.

Fixes #3188
Part of #3114
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 18, 2026
@Birfy Birfy self-assigned this Nov 18, 2026
@Birfy

Birfy commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 34e02b5
Written-by: Reviewer
Attestation: 34e02b5 role=Reviewer

Ran at this tip:

$ DSH_HARNESS=/opt/flybot npm --prefix plugins/social run test
# tests 717  # pass 717  # fail 0
$ cp base-face-rooms.js plugins/social/src/face-rooms.js && cp base-social.js plugins/social/src/social.js && DSH_HARNESS=/opt/flybot npm --prefix plugins/social run test
# tests 717  # pass 715  # fail 2
$ node .github/scripts/testing-layers.mjs --check
$ node .github/scripts/check-mojibake.mjs --check
$ node scripts/ds-bot-patches.mjs check
$ node core/scripts/check-arch-docs.mjs

Red first, and it is real: with the two source files put back to their base blobs and the tests kept, the suite goes 717 / 715 / 2 — not ok 56 #3114: a frozen Bot is one human line, and its room has not ended with actual 'bot is frozen (emergency stop)', and not ok 502 #3114: a frozen Bot reads as one human line on the share and on the invite with actual 'Bot Social join_invite: bot is frozen (emergency stop)' — the two values the slice spec names. Restoring the tip blobs gives 717 / 717 / 0.

What I checked against the spec (#3114 comment 6993112477):

  • One sentence on all three doors: FRIENDLY.bot_frozen sits after bot_revoked in plugins/social/src/face-rooms.js:167, and both mapJoinInviteError (social.js:438) and mapShareFriendError (social.js:3343) hand a bot_frozen blob to mapFaceError, whose payload.code path returns the table line. The copy is the spec sentence, character for character.
  • The code survives: mapFaceError returns FaceRoomError(message, code || 'face_room_error'), so a frozen invite error still carries code: bot_frozen (checked directly: invite.code = bot_frozen, human message); A2/A5 can still read it.
  • alreadyLeftFace still false: face-rooms.js:158 tests /not one of yours on Bot Social|no longer in this room|has closed|not available|no longer valid/i; the new sentence has none of those, and alreadyLeftFace() answers false on both the face-room object and the invite object, so the room and its grants stay. ALREADY_LEFT / NOT_LEFT / serverDown are untouched in the diff.
  • Negative assertions are on .message only (doesNotMatch(frozen.message, …), result.error.message), never on the error object or JSON.stringify; the only non-message assertion is the positive code === 'bot_frozen' the spec asks for.
  • No scope creep: mapRegisterError, presence.js (its bot_frozen on the gone path) and face-rooms.js's gone handling are not in the diff; the added sentence is English only, so the un-i18n'd FRIENDLY table keeps its shape.
  • Scope: compare base...tip is one commit, six files exactly — the two sources, the two test files, docs/subsystems/social.md, changelog.d/3114-frozen-bot-one-line.fixed.md, +53/−0; nothing under patches/**, topics.json, core/**, .github/**, policy/**, scripts/**, package*.json, and 0 generated files (ds-bot-patches check: 10 patches apply, core/ equals ds-bot/ + patches).
  • Docs: docs/subsystems/social.md:23 carries both bot_frozen and the sentence, inside that file's owned_paths: plugins/social/; arch-docs is OK on the 6 changed files (run against a base commit built from the base tarball, since this box has no clone).
  • Gates: testing-layers --check 908 test files in 16 workflows, all classified; check-mojibake --check 0 occurrences of U+FFFD; keyword sweep over the 53 added lines — fence, sanitiz, displayName, display name, eval(, new Function(, untrusted-(message|file), .only(, .skip(, child_process, process.env.*(TOKEN|KEY|SECRET), DSH_HOME: 0 hits each.
  • Tip checks: 19 runs, all terminal; the only failure is enqueue-guard (no Verifier report names the tip 34e02b51), plus two superseded cancelled duplicates (judge, agent-audience) that were re-run green. tests-ok, plugins (social), plugins (tree|timeline|workflow), merge-gate, judge, agent-audience, risk tier, policy-sign: success. Enqueueing now.

@Birfy
Birfy added this pull request to the merge queue Nov 18, 2026
@github-actions github-actions Bot added the pass label Nov 18, 2026
Merged via the queue into main with commit 9dc8e9f Nov 18, 2026
17 of 19 checks passed
@Birfy
Birfy deleted the dev/3114-frozen-bot-one-line branch November 18, 2026 22:49
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#3114] 冻结的 Bot:分享、入房、接受邀请三门同一句人话

1 participant