Skip to content

fix(hermes): send Discord clarify cards through the live adapter (RIG-12384) - #250

Open
rigel-mintaka wants to merge 1 commit into
harness/rig-12360-send-discord-approval-cards-through-thefrom
harness/rig-12384-send-discord-clarify-cards-through-the
Open

rigel-mintaka wants to merge 1 commit into
harness/rig-12360-send-discord-approval-cards-through-thefrom
harness/rig-12384-send-discord-clarify-cards-through-the

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this do

Discord clarify cards resolve the live adapter every time they are used: on send, typing pause and resume, retire, and the late text fallback. One helper, TurnRunner._live_delivery_adapter(), does the lookup at all five sites, including #247's approval render.

Why do we need it

A turn's starting adapter can be stale after a Discord reconnect. #247 fixed this for approval cards; clarify cards had the same bug. A late fallback after the 15 s ack window still went to the stale adapter.

Summary

  • run_turn_runner.py: the _live_delivery_adapter() helper; the text fallback looks the adapter up when it starts.
  • test_clarify_card_retire_on_timeout.py: stale-versus-live tests plus an adapter-swap test for the late fallback.

Verification

On macpro2013:

  • The swap test passes on head. On 2e760208 it fails: the fallback went to the stale adapter.
  • tests/gateway/*clarify*.py: 107 of 108 pass on head and 104 of 105 on base. The single failure is on both (aiohttp missing in that venv).
  • test_steer_releases_pending_clarify.py: 4 of 4 pass on head and on base.
  • Two review rounds: round 1 found 1M/2L, all fixed; round 2 found 0H/0M/1L (blank lines).

Stacked on #247 (cade8c61), because both edit the same lines.

Step-up signal: the implement runs spent most of 67 and 69 min on staging remote tests, not on the code. No step-up was needed.

Risks

This is the same lookup #247 uses. Rollback: revert this commit.

Spec impact

Spec-impact: none

Checks skipped: nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checks

Refs RIG-12384

Co-authored-by: Matt Wilkinson matt@rigel.build

…-12384)

Clarify send, typing pause and resume, and card retire now resolve the live adapter with _delivery_adapter_for(ctx.source), as nebula#247 does for approval cards. The turn's starting adapter can be stale after a Discord reconnect.

Refs: RIG-12384
Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

RIG-12384

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Review rounds

  • Round 1 (2e760208, on main): 0H/1M/2L.
  • Round 2 (abd7ea4c): 0H/0M/1L (extra blank lines). No test fails only on head.

Head 267d22cd is abd7ea4c rebased; the patch is identical (jj diff --git with index lines stripped).

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

All-clear at 267d22c
Base: harness/rig-12360-send-discord-approval-cards-through-the

This branch had an error being deployed

1 failed deployment
ci — 267d22cd Deployed Nov 23, 2026 by rigel-mintaka via CI (aarch64-linux) #1181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant