Repository navigation
fix(qa): reset Matrix scenario config state - #120017
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 10:45 AM ET / 14:45 UTC. ClawSweeper reviewWhat this changesThe PR rebuilds Matrix QA scenario configuration from a baseline and fresh Gateway state so ordered scenarios do not retain prior overrides. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The exact head addresses the prior audio fallback blocker and implements the reset at the Matrix QA owner boundary, but its required exact-head CI has failures and this maintainer-labeled PR needs explicit maintainer handling. Priority: P2 Review scores
Verification
How this fits togetherMatrix QA runs ordered scenarios through a shared Gateway worker. Each scenario reads current configuration, constructs a QA-owned target, computes a merge patch, and applies it before the next Matrix scenario. flowchart LR
Scenario[Ordered Matrix QA scenario] --> Current[Read Gateway config]
Baseline[Captured QA baseline] --> Target[Build QA-owned target]
Current --> Target
Target --> Patch[Create merge patch]
Patch --> Gateway[Shared Gateway worker]
Gateway --> Next[Isolated next scenario]
Decision needed
Why: The source repair is coherent, but the protected maintainer label and unresolved required-check failures need a maintainer’s merge decision. Before merge
Agent review detailsSecurityNone. PR surfaceSource +90, Tests +623. Total +713 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one QA-local baseline-plus-current-state reset flow, resolve the exact-head CI failures, and merge only after the required checks confirm the tested isolation boundary. Do we have a high-confidence way to reproduce the issue? Yes, from source: applying an override-heavy Matrix QA scenario and then a default scenario through the shared Gateway leaves omitted fields under recursive merge semantics; the exact regression test models that order. Is this the best way to solve the issue? Yes. Building a QA-owned target from immutable baseline plus fresh current state and emitting one minimal patch is preferable to broad parent replacement paths or changing core Gateway merge semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fc9905edb2b8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
9bf8ebe to
77e5999
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
77e5999 to
b1ccd21
Compare
Punchcard-Session: amber-workshop-workshop-36
b1ccd21 to
26da02a
Compare
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Punchcard-Session: amber-workshop-workshop-36
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Punchcard-Session: amber-workshop-workshop-36
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Punchcard-Session: amber-workshop-workshop-36
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(qa): reset Matrix scenario config state Punchcard-Session: amber-workshop-workshop-36 * fix(qa): preserve Matrix tombstone array intent Punchcard-Session: amber-workshop-workshop-36 * fix(qa): restore Matrix audio scope default Punchcard-Session: amber-workshop-workshop-36 * fix(qa): type Matrix account reset state Punchcard-Session: amber-workshop-workshop-36
Related: #120123
What Problem This Solves
Matrix QA scenarios reuse one Gateway worker and apply configuration through recursive RFC 7396
config.patchsemantics. The previous Matrix QA builder emitted sparse scenario overrides, so fields omitted by a later scenario retained values written by an earlier scenario. That leaked account, room, approval, messaging, media, streaming, lifecycle, and temporary-account state across ordered scenarios.The Matrix QA configuration owner now restores only QA-owned state while preserving unrelated current configuration. Product Matrix delivery behavior is unchanged.
Root Cause And Owner
extensions/qa-lab/src/live-transports/matrix/substrate/config.tsowns the complete Matrix QA target configuration.extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-environment.tsowns scenario lifecycle, current-state reads, patch construction, and the single Gateway write.restoreOwnedFields()restores only explicitly listed leaves. Audio scope listedrulesbut notdefault, so an earlier scenario's fallback policy survived when the next scenario omitted it.The best fix is owner-local: capture the immutable baseline once before the first scenario, read fresh current configuration for every scenario, build a complete target from baseline restoration plus current-state preservation plus declarative overrides, then compute the current-to-target RFC 7396 patch.
What Changed
dm,execApprovals,streaming, orthreadBindingsparents.defaultandrules, from the immutable baseline.textChunkLimit = overrides.textChunkLimit ?? 4000.nulltombstones for missing owned keys.config.patchper scenario.Array replacement is limited to destructive owned paths:
groups.<roomId>.tools.allowandgroups.<roomId>.tools.denymessages.groupChat.mentionPatternstools.media.modelstools.media.audio.scope.rulesThere are no broad replacement paths for
channels.matrix,messages,tools, oragents.defaults.Preservation And Cleanup Invariants
allowBots,enabled,requireMention, andtools.allow/tools.deny.qa-driver-bot-sourceandqa-observer-bot-source.deviceId; otherwise preserves current lifecycle and device fields.mode,chunkMode,block.enabled, andpreview.toolProgress) while preserving adjacent streaming fields.plugins.entries.matrixfields such ashooks,llm,subagent, andconfigwhile forcing onlyenabled: true.nulltombstone for an omittedtools.media.audio.scope.default;replacePathsremains limited to the destructiverulesarray.Scope
This is a QA Lab-only Matrix state-isolation repair. It does not change core config/protocol behavior, production Matrix transport behavior, documentation, release state, versions, tags, packages, publication, or deployment.
Exact Head
8630a84d3d62dbeea3ba8765fcac1b8b31ae6158eea5655f72cc736bbb6aae9f219ccea7268e7878mainverified August 9, 2026:52a76313e8c272599ad0a40f200e902c046962d4mainverified August 9, 2026:41423753e00d98e287e1e73fd68aae776b94b250main: clean (ce0f60c61b47ff36389e419732036f0de487e92c), with no overlapping pathsb19faefd80c99c9614f4aa369092f35dec64e00ePunchcard-Session: amber-workshop-workshop-36Change Size
+363/-273, net+90+638/-15, net+623+1001/-288, net+713+6/-5, net+1; tests+37/-4Positive production growth implements the Matrix QA state-reset ownership boundary plus explicit destructive-array intent; tests remain counted separately.
Verification
oxfmt --checkon the three amendment files: passed.git diff --check: passed.31318040341found the branch-owned opaque-channel-type lint failure; the local owner type repair is included in this head.31318372384attempt 2 completed successfully. Rerun job93261954550and consequential gate93262836013passed; the original failure was an unrelated fix: sync Cloud Worker workspaces from macOS gateways #121027 test-observer race, while exact current-main CI passed the same shard and focused current-main proof passed.tools.media.audio.scope.default: nullwhilereplacePathsremains rules-only.8630a84d3d62dbeea3ba8765fcac1b8b31ae6158and reports no source findings. Its only Rank-up move, diagnose the failed checks and obtain a green rerun, is satisfied by CI attempt 2.OPENCLAW_TESTBOX=1 scripts/pr prepare-run 120017completed successfully with hosted exact-head/recent-parent gates and verified the remote PR head tree.ghx, source, and git history were used instead.Landing Readiness
All pre-merge gates are clean on the exact head:
No release, tag, version, package publication, or deployment boundary is part of this PR.
Punchcard
Punchcard-Session: amber-workshop-workshop-36
Punchcard-Commit-Attestation: att_01KZKH299KSFWVHA6MW3EYCFQB
Punchcard-PR-Attestation: att_01KZKH2CEZ1MGXPPAXMSA1PKY6
Punchcard-Receipt: pc1.cHVuY2hjYXJkLXNlcnZlci1yZWNlaXB0LXYxAGF0dF8wMUtaS0gyQ0VaMU1HWFBQQVhNU0ExUEtZNgB0bnRfMDFKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAdXNyXzAxSjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxAGRldl9FMDNCQTNBOENDNzdGOUQ5QjFCRTI3RTE5MgB3cmtfMDFLWkFCN1pDVzBHRktKTVI5QTdKRjA2MlQAc2VzXzAxS1pGWE42TVBWRDRBMzM2VlZDWVdHUDQ1AGFtYmVyLXdvcmtzaG9wLXdvcmtzaG9wLTM2AG9wZW5jbGF3L29wZW5jbGF3AAAxMjAwMTcAODUzNTM2YTNmMzI4YjE2YWVkYzNiZTI2NWU1ZmYzZDNhOWJmYTJiMzg3NDA2OGM0NzQ5MjAyYTc0M2U4ZWFiZgBzaWduaW5nLXYxAHFVaWctM3NrMVh0dnV3eXVQc1hES0FaNWdNbjQ0UHliRWhsWjBJMElNbkJiUFhOY2MxRmpPSEdLSWNVQ0dOZGRmb2VwTnQ4Y1ViVDh6TlBIdTNfWENBADIwMjYtMDgtMDlUMTU6MDg6MTEuNjE1WgA.Eky6J3UWoySPSC398hCs8Ax1KETOYObq8KQYEgsteOCgOMyNkt_feGbMbFeCToIOioOHc5eh0R6DwLaZLqo3Dg