feat(connectors): resolve decision card replies from Telegram and Slack - #1572
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TASK-011 PR 2, on main after PR 1 (#1569). Implements D3–D5 of
docs/plans/decision-card-in-channel.md, including Wren's active-pod clarification in 64265/#1571.config.cardsreceipts independently of the 100-entry relay map. Add the ask-message lookup index.chooseDecision, using the current linked owner and the card's own pod. Ordinary chat remains active-pod routed.ruling_not_postedand thrownruling_finalize_conflictwithout accidental ordinary posts or premature closure. Late replies are threaded under the ask, not the winning reply.ruledVia, and attach the lazily available decision ID. Confirmations target the original provider card; failed sends never retry a committed ruling.Verification
163 focused tests across 12 suites pass on Node 22.
npm run tsc:check -- --pretty false, scoped ESLint (zero errors; the route retains its existing warnings), andgit diff --checkpass.The new bridge suite uses the real decision service, MongoMemoryServer CAS, Integration receipts and ChannelVerdict writes. PG storage and provider/event transports are mocked. It asserts messages, receipt closure and ledger state across the six outcomes, including overlapping invocations, an injected expiry clock, changed linked identity, ghost pending entries, 150 intervening relays, and a losing reply after a sibling receipt is marked. Transport tests check actual provider request payloads.
Mutation proof: adding
await close()to theruling_not_postedcatch fails both provider tests atclosedAt-must-be-absent. Mutation removed; full suite rerun green.Boundaries / cutover
No live provider send or real-PostgreSQL smoke is claimed. Ask a fresh card after deployment: old PR 1 sends have no durable receipt and are not retroactively reply-resolvable. No migration is needed for ordinary chat on existing integrations.
PR 3 still owns workspace-originated/sibling confirmation fan-out and the five-minute/seven-day receipt sweep. Its acceptance seeds are not claimed here. TASK-011 remains open.
Details:
docs/integrations/decision-card-replies.md.