Repository navigation
slack: forward message edits and deletions to the thread (BB-146) - #183
trotterdylan merged 3 commits into
Conversation
|
Independent review running in bb thread @thread:thr_e37xchuq7p. — from bb thread thr_4kpcrwi3ha |
Review round 1 (glm-5p3, at eee53cb)Owner review required: yes — cross-repo wake-contract/schema change: this is the plugin half of the contract change the ticket itself marks "Cross-repo contract change, owner-reviewed", and the diff widens the wake schema ( Blockers
Suggestions
Checked
— from bb thread thr_e37xchuq7p |
…rrors, held delete)
|
Round 1 addressed in 4e79cc6:
— from bb thread thr_4kpcrwi3ha |
Review round 2 (glm-5p3, at 4e79cc6)Blockers
Resolved since round 1
Checked
— from bb thread thr_e37xchuq7p |
|
Round 2 addressed in fd146ac:
— from bb thread thr_4kpcrwi3ha |
Review round 3 (glm-5p3, at fd146ac)Owner review required: yes — cross-repo wake-contract/schema change (the plugin half of the owner-reviewed contract change the ticket names; the diff widens the wake schema bb-gate-hooks sends against). No No blockers remain. Resolved since round 2
Suggestions
Checked
— from bb thread thr_e37xchuq7p |
|
Approved fd146ac from the Stewards page |
Implements BB-146. The bb-gate half (bitcomplete/bb-gate#67) already routes a DM edit or deletion as
action: "edited"/"deleted"with the original message'sts; this half applies the correction in the plugin.Classification
owner-reviewed: this is the plugin half of the bb-gate Slack wake contract — it widens the wake schema (
sessionEventSchema'sactionenum and the newtsfield) that bb-gate-hooks sends against. NobigDecisionsentry's paths match the changed files, so the decision is the owner's (@trotterdylan), not the project steward's. (Review round 1 corrected this line fromno-review.)What changes
hooks-client.ts:actionacceptsedited/deleted; the wake carriests.sessions.ts: a bounded per-sessionwakesmap (last 8), keyed byts, recording how each wake was delivered (held,queuedwith the queued row's id/version, orstarted).server.ts:handleCorrectionkeys onactionfirst and matches the wake byts:queuedMessages.updatewithexpectedUpdatedAt); a row that moved on (404/409) falls back to a steer, a transient failure is left alone so the stale row cannot arrive after the correction;ts→ dropped;message.dispatchedflips a queued wake to started;message.cancelleddrops it.README.md: documents the correction rule.API note: the ticket names
threads.editMessagefor the queued branch. That endpoint rewrites a message that has already been dispatched and refuses while a queued row is claimed (bb corethread-edit-message.ts,hasClaimedQueuedThreadMessages), so it cannot rewrite a queued row. The queued branches therefore usethreads.queuedMessages.update/delete— the in-place rewrite and removal the ticket describes — withexpectedUpdatedAtas the queued-row optimistic check in place ofexpectedRequestSequence. The steer branches use the existing BB-145 path. Verified against bb core atdesktop-v0.48.1in review round 1.Testing
npm run typecheckandnpm testinplugins/slack: pass (159 tests; 12 new; not in the CI matrix).message.dispatchedsteers, queued edit whose row moved on steers, a transient queued-update failure does not steer, queued delete removes, post-start delete steers, a deletion sets no thinking status, unknown-tsedit ignored, non-owner edit held, non-owner deletion of a held message withdraws it.— from bb thread thr_4kpcrwi3ha