fix(linear-slack): stop the receipt-wait from eating replies; add a fast πŸ‘€ ack

Merged
KH
5mo ago
+70-30

What the live trace showed

After #53/#54 deployed, a real run still posted nothing β€” but the issue was created (AR-87 in Launch SDK). The harness side is perfect now (resolved team/project ids, emitted a clean linear-actions block). The failure was entirely in the handler's writeback handling:

  1. Receipt timeout is 3s by default β€” too short for the cloud worker's round-trip. slack.post() returned ts:'' and createIssue() returned the draft-path fallback even though both writes landed (AR-87 materialized ~4 min later via the 30s mirror sync).
  2. #53's "throw on empty ts" backfired. With the /slack/channels scope mounted, the draft flushes at box cleanup β€” so an empty ts is a slow receipt, not a drop. But the throw crashed the turn and tore the box down before the reply flushed. Issue created, channel silent.

Fixes

  • Longer receipt window β€” build the slack + linear clients with writebackTimeoutMs: 12s, so receipts have time to arrive (and the box stays alive to flush) and we get real confirmation (a linear.app url / a real ts).
  • postReply no longer throws on a missing receipt β€” it logs linear-slack.reply.no-receipt and lets the draft flush. The genuine "nothing mounts /slack" failure is caught at build time by tests/persona-integration-scopes, so it doesn't need a turn-crashing runtime throw.
  • Honest, non-scary pending message β€” an unconfirmed create/comment now says "submitting now β€” it'll appear on the board shortly" (creates land via the mirror within ~minutes) instead of "never confirmed, double-check." Still logged.
  • Fast πŸ‘€ ack β€” react on the teammate's message the instant the handler picks up the turn (fire-and-forget; doesn't block the harness), so the channel gets acknowledgement within seconds of box-boot instead of ~3 min of silence.

Test

npm test 60/60, typecheck clean. Updated the unconfirmed-create test for the new message.

Follow-up to #53/#54. Framework-level receipt reliability tracked in AgentWorkforce/cloud#2029.

πŸ€– Generated with Claude Code


Summary by cubic

Stops linear-slack from dropping replies by waiting longer for writeback receipts and not throwing on slow receipts. Adds a fast πŸ‘€ reaction so users see an immediate ack.

  • Bug Fixes

    • Build Slack and Linear clients with writebackTimeoutMs: 12_000 to allow receipts to arrive.
    • postReply no longer throws on empty ts; logs linear-slack.reply.no-receipt and lets the draft flush.
    • Unconfirmed creates/comments are shown as β€œsubmitting now β€” appears shortly,” logged as linear-slack.action.unconfirmed.
  • New Features

    • Instant πŸ‘€ reaction on the user’s message when handling starts (fire-and-forget) to acknowledge the request.