Skip to content

fix(pairing): add user_id-based approve for undelivered pairing codes (#70651) - #71256

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-70651
Closed

fix(pairing): add user_id-based approve for undelivered pairing codes (#70651)#71256
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-70651

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Summary

Adds PairingStore.approve_by_user_id() and a --user-id / -u flag to hermes pairing approve so operators can approve pending requests by user_id when the pairing code was never delivered (e.g. dropped DM, rate-limited reply on Weixin/WeChat bridges).

Changes

  • gateway/pairing.py: Added approve_by_user_id() — looks up pending entries by user_id and approves without needing the hashed pairing code
  • hermes_cli/pairing.py: _cmd_approve now accepts user_id_mode parameter; delegates to approve_by_user_id when --user-id is passed
  • hermes_cli/subcommands/pairing.py: Added --user-id / -u flag to the approve subcommand

Test Plan

  • ✅ All 52 existing pairing tests pass
  • ✅ All 126 gateway status tests pass
  • ✅ Syntax checks pass on all modified files

Closes #70651

…NousResearch#70651)

Add PairingStore.approve_by_user_id() and a --user-id / -u flag to
'hermes pairing approve' so operators can approve pending requests
by user_id when the pairing code was never delivered (e.g. dropped
DM, rate-limited reply on Weixin/WeChat bridges).

Closes NousResearch#70651
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter area/auth Authentication, OAuth, credential pools sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages needs-decision Awaiting maintainer decision before any implementation labels Jul 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: this is the active resubmission of closed #70765 for #70651. It uses platform user ID as the recovery identifier, whereas #46584 uses a stable request ID and dashboard/CLI flow; please choose the intended approval contract.

@kyssta-exe

Copy link
Copy Markdown
Contributor Author

Closing due to merge conflicts that need to be resolved before this can be merged. The PR has been marked as CONFLICTING by GitHub — please rebase on the latest main and resolve the conflicts, then reopen. (Per close-stale-duplicate-prs policy: PRs with unresolved merge conflicts are automatically closed.)

@kyssta-exe kyssta-exe closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery needs-decision Awaiting maintainer decision before any implementation P2 Medium — degraded but workaround exists platform/wecom WeCom / WeChat Work adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes pairing approve 在配对码未送达时不可用 —— 微信(Weixin)场景下死锁

2 participants