Skip to content

Clear ordinary shared-group replies without pair Auto-send - #1122

Merged
Birfy merged 2 commits into
mainfrom
cursor/fix-1118-room-reply-approval-aef9
Oct 25, 2026
Merged

Birfy merged 2 commits into
mainfrom
cursor/fix-1118-room-reply-approval-aef9

Conversation

@Birfy

@Birfy Birfy commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Owner: Dev
Reviewer: Reviewer

Fixes #1118

What changed

An ordinary @ or reply in a shared local group no longer stalls on "Waiting for the owner's approval" when the other home has Auto-send off.

Bot Social holds those FLYBOT-ROOM-SHARE lines as policy when the text merely looks like injection. #1117 cleared that hold only when pair Auto-send was on. The invited home in the repro has Auto-send off, so the reply stayed pending. The caller, who has no card for that hold (canDecide false), saw Waiting for the owner's approval and the friend's Bot never answered.

Seating both Bots in the room is the consent for ordinary room text. autoSendRoomEnvelope and the lagged poll clear a room policy hold that roomPolicyClears accepts, whether or not Auto-send is on. A file, a DLP reason, a risk flag, an instruction-override, and the same policy hold on a direct message still wait.

The lagged poll only finishes an outbound_message whose text is a real room-share envelope. A face-room line is kind: face_room_message and the wire text is the Bot's own words, which can start with that marker. Face Auto-send still refuses hold_reason: policy, and the status poll does too.

docs/subsystems/social.md (invariant 9, Auto-send, inbound shared groups). changelog.d/1118.fixed.md.

Verification at the tip

Tip SHA: f7fd3434feb980d84029cd7cc98ca297234e5f33

Rebased onto origin/main 55d0e6e821485dba48456e433dadcd824dc9ef48 (#1121). git diff origin/main...HEAD --stat lists only changelog.d/1118.fixed.md, docs/subsystems/social.md, plugins/social/src/social.js, plugins/social/test/social.test.js.

Fail-without-change for the face regression, tip 11d4ae5ba6ea5c76dbcf812750c43d1282832abd, social.js unchanged, the new test only:
TZ=UTC node --import ./test/resolve.mjs --test --test-name-pattern '#1118: a lagged poll does not clear a face-room policy hold' test/social.test.js in plugins/social — 1 test, 0 pass. The review probe (kind: face_room_message, hold_reason: policy, blanket reason only, payload text FLYBOT-ROOM-SHARE\nthe deploy token rotated, no to.handle, Auto-send off) called decide_approval (true !== false).

Fail-without-change for the shared-group clear, base a188fa2b3b3f54d8d845596f27043f2dc609f8ca, social.js unchanged:
TZ=UTC node --import ./test/resolve.mjs --test --test-name-pattern '#1118' test/social.test.js in plugins/social — 3 tests, 1 pass, 2 fail. The ordinary room line timed out in waitUntil (the queue never emptied). The lagged-list poll left server.queue.length at 1. The instruction-override, DLP, risk, attachment, and direct-message cases passed.

Ran at this tip:

  • TZ=UTC npm run verify (exit 0, ~40s) on the tree that became f7fd343 (the same four files). core 1469 pass, plugins/social 489, plugins/tree 125, plugins/timeline 125, .github/scripts 417, interop 37, live-e2e 16. Core lint and plugin lint exited 0. build-client.mjs --check and ds-bot-patches.mjs check exited 0.
  • TZ=UTC node --import ./test/resolve.mjs --test --test-name-pattern '#1118|#1113|#882:|#457: a Bot whose face' test/social.test.js in plugins/social — 11 tests, 11 pass, including the face-room poll and the ordinary room clear with Auto-send off.
  • TZ=UTC node core/scripts/check-arch-docs.mjs at f7fd343: arch-docs: OK (4 changed file(s)).
  • TZ=UTC node .github/scripts/changelog.mjs check at f7fd343: 32 fragments well formed.

Not run: smoke (core/index.js and core/src/host/ untouched). Not enqueued.

Open in Web Open in Cursor 

@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 25, 2026
Seating both Bots in a shared group is the consent for ordinary room text.
A home with Auto-send off was leaving FLYBOT-ROOM-SHARE policy holds pending,
so the other side saw "Waiting for the owner's approval" and the reply never
arrived. A file, a DLP reason, a risk flag, or an instruction-override still waits.

Fixes #1118

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@cursor
cursor Bot force-pushed the cursor/fix-1118-room-reply-approval-aef9 branch from 79f01aa to 11d4ae5 Compare October 25, 2026 07:02
@cursor

cursor Bot commented Oct 25, 2026

Copy link
Copy Markdown

Verdict: FAIL at 11d4ae5
Written-by: Reviewer

Ran:

  • git fetch origin main cursor/fix-1118-room-reply-approval-aef9 && git merge-base --is-ancestor origin/main origin/cursor/fix-1118-room-reply-approval-aef9 && git rev-parse origin/cursor/fix-1118-room-reply-approval-aef9 && git diff --stat origin/main...11d4ae5ba6ea5c76dbcf812750c43d1282832abd → pass (tip contains origin/main 55d0e6e821485dba48456e433dadcd824dc9ef48; diff is the four stated files)
  • TZ=UTC node core/scripts/check-arch-docs.mjs → pass (arch-docs: OK (4 changed file(s)))
  • TZ=UTC node .github/scripts/changelog.mjs check → pass
  • TZ=UTC node scripts/lint-plugins.mjs social → pass (exit 0; existing warnings only)
  • TZ=UTC node --import ./test/resolve.mjs --test --test-name-pattern '#1118|#1113|#882:|#457: a Bot whose face' test/social.test.js in plugins/social → pass (10 tests)
  • throwaway pendingApprovals({ fresh: true }) at this tip on one kind: face_room_message row (hold_reason: policy, reasons only mvp.all_outbound_requires_approval, payload text FLYBOT-ROOM-SHARE\n + the deploy token rotated, Auto-send off, no message.to.handle) → fail (the poll called decide_approval approved and the queue went to 0)
  • same probe, room line, hold_reason: policy plus risk_flags: [{ category: money }] → pass (hold stayed)

Not run:

  • npm run verify (full suite)
  • full plugins/social suite outside the name pattern above
  • smoke (core/index.js and core/src/host/ are untouched)

Findings:

clearLaggedRoomHolds in plugins/social/src/social.js now approves every pending row whose text starts with FLYBOT-ROOM-SHARE\n and which roomPolicyClears accepts. It no longer requires a local bot, message.to.handle, or pair Auto-send, and it does not look at kind. social/status calls pendingApprovals(), so the next status poll runs that clearer.

A face-room bot line is kind: face_room_message and the wire text is the bot's own text (faceOutbound only neutralizes FLYBOT-FACE-HUMAN). Face Auto-send still refuses hold_reason: policy. This poll does not. Reproduced at the tip: a face row held as ordinary suspected injection (policy, blanket reason only, the word "token", no DLP, no risk flag, no instruction-override) was approved with Auto-send off. Before this commit the same row was skipped because it has no to.handle. docs/subsystems/social.md still says a face-room policy hold waits for the owner.

The shared-group change itself matches #1118. At this tip, an ordinary room policy hold clears with Auto-send off, including the lagged poll; an instruction-override, a DLP reason, risk, attachment, a file on the envelope, and the same policy hold on a direct message stay. A room policy hold that also carries a risk flag stayed.

This comment is not merge authority. Do not enqueue.

@Birfy

Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: FAIL at 11d4ae5
Written-by: Reviewer
Posted-by: bot-im (re-posted; cursor[bot] conclusions are ignored by the gate)

Ran:

  • Reviewer CloudAgent (bc-0282f8b5) re-ran arch-docs, changelog, lint-plugins social, and #1118|#1113|#882:|#457: a Bot whose face social tests at tip → pass
  • throwaway pendingApprovals({ fresh: true }) on kind: face_room_message with hold_reason: policy (blanket only, text with "token", Auto-send off) → fail (poll approved; queue 0)
  • same probe with risk_flags: [{ category: money }] → pass (hold stayed)

Findings:
clearLaggedRoomHolds clears every FLYBOT-ROOM-SHARE row that roomPolicyClears accepts, without checking kind. Face-room bot lines (face_room_message) use the bot's own text as wire text and must still wait on policy when Face Auto-send is off (docs/subsystems/social.md). Before this tip those rows were skipped (no to.handle). Shared-group ordinary room clear for #1118 is otherwise correct.

Do not enqueue.

clearLaggedRoomHolds treated any FLYBOT-ROOM-SHARE prefix as a shared-group
line. A face-room row is face_room_message and the wire text is the Bot's
own words, so a policy hold with that prefix was approved on the next
status poll even with Face Auto-send off. The poll now clears only an
outbound_message whose text is a real room-share envelope.

Fixes #1118

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@Birfy

Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at f7fd343
Written-by: Reviewer

Ran:

  • git fetch origin main cursor/fix-1118-room-reply-approval-aef9 && git merge-base --is-ancestor origin/main origin/cursor/fix-1118-room-reply-approval-aef9 && git rev-parse origin/cursor/fix-1118-room-reply-approval-aef9 && git diff-tree --stat 11d4ae5ba6ea5c76dbcf812750c43d1282832abd f7fd3434feb980d84029cd7cc98ca297234e5f33 → pass (tip contains origin/main 55d0e6e821485dba48456e433dadcd824dc9ef48; the new commit is the face-hold guard)
  • TZ=UTC node core/scripts/check-arch-docs.mjs → pass (arch-docs: OK (4 changed file(s)))
  • TZ=UTC node .github/scripts/changelog.mjs check → pass
  • TZ=UTC node scripts/lint-plugins.mjs social → pass (exit 0; existing warnings only)
  • TZ=UTC node --import ./test/resolve.mjs --test "test/*.test.js" in plugins/social → pass (489 tests, 0 fail)
  • throwaway pendingApprovals({ fresh: true }) at this tip on the 11d4ae5 face row (kind: face_room_message, hold_reason: policy, reasons only mvp.all_outbound_requires_approval, payload a real FLYBOT-ROOM-SHARE line whose text is "the deploy token rotated", Auto-send off, no message.to.handle) → pass (no decide_approval, queue stayed at 1)
  • same probe, that envelope as kind: outbound_message → pass (the poll approved it and the queue went to 0)

Not run:

  • npm run verify (core, tree, timeline, .github/scripts, interop, live-e2e)
  • smoke (core/index.js and core/src/host/ are untouched)

Findings:

no actionable findings

clearLaggedRoomHolds now continues unless kind is outbound_message and roomShareEnvelope accepts the payload. The face row that was approved at 11d4ae5 stays, including when the bot text is a real room-share envelope. An ordinary shared-group room line still clears with Auto-send off, on the send path and on the lagged poll. An instruction-override, a DLP reason, risk, attachment, a file on the envelope, and the same policy hold on a direct message stay. docs/subsystems/social.md and changelog.d/1118.fixed.md say a face-room policy hold still waits.

This comment is not merge authority. Do not enqueue.

@github-actions github-actions Bot added the pass label Oct 25, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit d797cbe Oct 25, 2026
12 of 13 checks passed
@Birfy
Birfy deleted the cursor/fix-1118-room-reply-approval-aef9 branch October 25, 2026 07:28
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 25, 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.

@ in a shared group stalls on Waiting for the owner's approval

2 participants