fix(matrix): skip pairing-store reads for room auth#67325
Conversation
There was a problem hiding this comment.
Pull request overview
This PR narrows the Matrix room message handling path by skipping DM pairing-store reads, since room control-command authorization no longer depends on pairing-store entries (per #67294).
Changes:
- Skip
readAllowFromStore()for room traffic by passing an emptystoreAllowFromlist whenisDirectMessageis false. - Strengthen the existing room control-command regression test to assert the pairing-store reader is not invoked.
- Add a changelog entry documenting the narrowed room auth data path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
extensions/matrix/src/matrix/monitor/handler.ts |
Avoids DM pairing-store reads on room traffic by gating the store read on isDirectMessage. |
extensions/matrix/src/matrix/monitor/handler.test.ts |
Adds an assertion that the pairing-store reader is not called in the room control-command regression scenario. |
CHANGELOG.md |
Documents the behavior change for Matrix room traffic. |
Greptile SummaryThis PR adds a single
Confidence Score: 5/5Safe to merge — change is minimal, correct, and well-guarded by the updated regression test. The only finding is a P2 changelog placement convention violation. The code change itself is clean, logically sound, preserves DM behavior, and is directly verified by the updated test. CHANGELOG.md — entry ordering should be fixed before merge if the project enforces strict changelog ordering. Prompt To Fix All With AIThis is a comment left during a code review.
Path: CHANGELOG.md
Line: 11
Comment:
**Changelog entry placed at top of section instead of end**
`CLAUDE.md` says: _"append new entries to the end of the target section (`### Changes` or `### Fixes`); do not insert new entries at the top of a section."_ This entry is inserted before the existing `#67298`, `#67294`, and other already-landed fixes rather than after them.
**Context Used:** CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "matrix: skip pairing-store reads for roo..." | Re-trigger Greptile |
b48ff88 to
5e80368
Compare
5e80368 to
121ff3b
Compare
|
Merged via squash.
Thanks @gumadeiras! |
Merged via squash. Prepared head SHA: 121ff3b Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 121ff3b Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
handler.tsstill readreadStoreAllowFrom()for Matrix room traffic even though room control-command authorization had already been hardened to ignore pairing-store entries.Regression Test Plan (if applicable)
extensions/matrix/src/matrix/monitor/handler.test.tsUser-visible / Behavior Changes
None. This narrows an internal room auth data path without changing room auth outcomes.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation: room traffic no longer reads DM-only pairing-store state, reducing cross-scope coupling while preserving the existing room auth result.Repro + Verification
Environment
commands.useAccessGroups=trueSteps
readAllowFromStore().Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
Compatibility / Migration
Risks and Mitigations
isDirectMessageguard and the targeted Matrix handler suite still passes, covering both room and DM pairing paths.