fix(gateway): align multiplex pairing stores - #70932
Closed
wgu9 wants to merge 1 commit into
Closed
Conversation
Co-authored-by: x7peeps <x7peeps@users.noreply.github.com>
Collaborator
|
Your resolver is the right fix and it's cherry-picked into #74446 with authorship preserved — consolidated there with #60564 and #37758, plus the endpoint/GUI half so an approval actually lands in the store the profile's gateway reads. Nice catch on Two adjustments on top: |
This was referenced Jul 29, 2026
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.
What does this PR do?
Fixes multiplex pairing so an unauthorized DM creates and rate-limits its
pairing code in the same profile-scoped store that authorization checks and
hermes -p <profile> pairing approveuse.The immediate bug was that authorization called
_pairing_store_for(source),but code generation and rate limiting still hard-coded
self.pairing_store.There was a second path invariant behind the same flow: the gateway's explicit
profile store used
profiles/<name>/pairing, while the profile CLI resolvesprofiles/<name>/platforms/pairingon a fresh install. Routing alone wouldtherefore generate a code that the documented profile CLI could not approve.
This change routes the whole pairing response through one selected store,
resolves explicit stores from the profile's real Hermes home, merges split
legacy/consolidated pairing layouts, and prints the profile-aware approval
command. The active multiplex profile reuses the runner's existing store so
one directory is not managed by two independent lock objects.
Related Issue
Fixes #70858
Related to #69398. This builds on the profile-path migration diagnosis by
@x7peeps in #69402; contributor credit is preserved in the commit trailer.
Type of Change
Changes Made
through the source profile's
PairingStore.hermes -p <profile>process, including the default profile.layouts.
-p <profile>in pairing approval instructions for routed profiles.isolation, and active-store reuse.
How to Test
scripts/run_tests.sh tests/gateway/test_unauthorized_dm_behavior.py tests/gateway/test_pairing.py tests/gateway/test_multiplex_pairing_stores.py -q.user; the returned command should be
hermes -p <profile> pairing approve <platform> <code>.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passThe focused regression suite passes 96/96. The complete
tests/gateway/domain run passes 10,982 tests and reports five unrelated failures. All five
fail identically in a detached, unmodified
upstream/mainworktree on thismacOS host (macOS
/tmpcanonicalization, Linux abstract sockets, localreadiness state, and shutdown-forensics environment). The wider repository
suite is also baseline-red in credential-routing tests on the same clean
upstream revision.
Ruff,
git diff --check, and the Windows footgun scanner pass for the changedproduction files.
Documentation & Housekeeping
docs/, docstrings) — docstrings updated; user docs N/Acli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A