Skip to content

fix: approve listed pairing requests - #46584

Closed
itsflownium wants to merge 2 commits into
NousResearch:mainfrom
itsflownium:fix/pairing-list-46580
Closed

fix: approve listed pairing requests#46584
itsflownium wants to merge 2 commits into
NousResearch:mainfrom
itsflownium:fix/pairing-list-46580

Conversation

@itsflownium

Copy link
Copy Markdown
Contributor

Summary

  • Return a stable request id for pending pairing requests instead of presenting a hash prefix as the approval code.
  • Let CLI and dashboard approval approve the listed request id while keeping bot-delivered code approval working.
  • Update dashboard pending-request cards and add focused backend/API regression coverage.

Validation

  • $HOME/.hermes/hermes-agent/venv/bin/python -m pytest -q tests/gateway/test_pairing.py tests/hermes_cli/test_dashboard_admin_endpoints.py::TestPairingEndpoints
  • $HOME/.hermes/hermes-agent/venv/bin/python -m ruff check gateway/pairing.py hermes_cli/pairing.py hermes_cli/web_server.py tests/gateway/test_pairing.py tests/hermes_cli/test_dashboard_admin_endpoints.py
  • npm run typecheck --workspace web

Refs #46580

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard platform/telegram Telegram bot adapter P2 Medium — degraded but workaround exists labels Jun 15, 2026
@PavelPancocha

Copy link
Copy Markdown

Non-blocking coverage suggestion: I would still prefer one focused CLI regression test that exercises the actual CLI path: generate a pending request, assert that hermes pairing list prints the request id, then approve using that printed value. Current tests cover PairingStore.approve_request() and the dashboard API, which is enough for confidence, but the CLI dispatch itself is not directly covered.

@alt-glitch alt-glitch added the comp/dashboard Web dashboard / control panel UI (dashboard/, landing) label Jun 26, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the listed-request approval path. The premise is confirmed on current main: gateway/pairing.py:453 creates a separate pending entry id, while gateway/pairing.py:562-565 exposes only a hash prefix that hermes_cli/pairing.py:69 and hermes_cli/web_server.py:11213 submit to full-code verification.

Problems

  • The new CLI routing is not directly regression-tested. A current-tree search found no test for pairing_command, _cmd_list, or _cmd_approve; this matches the non-blocking suggestion in the existing review comment.

Suggested changes

  • Add a CLI list → approve test that uses the displayed request id, and keep an assertion that bot-delivered code approval still works.

Automated hermes-sweeper review.

Comment thread hermes_cli/pairing.py
platform = platform.lower().strip()
code = code.upper().strip()
code = code.strip()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a focused CLI-path regression test for this dispatch: generate a pending request, capture the request id printed by _cmd_list, then pass it to _cmd_approve and assert approval. The existing store/API tests do not exercise this branch.

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
@itsflownium
itsflownium force-pushed the fix/pairing-list-46580 branch 2 times, most recently from 5cdb2c9 to f25d101 Compare July 15, 2026 01:00
@itsflownium
itsflownium force-pushed the fix/pairing-list-46580 branch from f25d101 to 6711b46 Compare July 15, 2026 01:07
@PavelPancocha

Copy link
Copy Markdown

Reviewed the latest update: the new CLI regression test covers the requested list-to-approve dispatch and keeps bot-delivered code approval covered; required CI is green. I cannot submit an approval review because this account does not have explicit repository review access, so leaving this confirmation here for the author/maintainer to resolve the thread.

@OutThisLife

Copy link
Copy Markdown
Collaborator

Your request-id direction is the right fix and it's cherry-picked as the base of #74427 — authorship preserved in git history. Consolidated there with #62145 and #66761, which hit the same defect from other angles. Thanks for catching this one — the hash prefix going out under a code key had been unapprovable since the dashboard page shipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants