docs(01-06): complete matrix gap-closure plan

Tasks completed: 2/2
- Remove reaction-era Matrix UX and strict !settings snapshot
- Harden room-vs-chat Matrix regressions

SUMMARY: .planning/phases/01-matrix-qa-polish/01-06-SUMMARY.md
This commit is contained in:
Mikhail Putilovskij 2026-04-03 12:37:11 +03:00
parent 9cdb6118e9
commit fe096c51b7
3 changed files with 114 additions and 9 deletions

View file

@ -16,7 +16,7 @@ Plans:
- [x] 01-03-PLAN.md — Reaction removal + !yes/!no confirmation + settings dashboard
- [x] 01-04-PLAN.md — Test suite (fix 4 broken + 12 new MAT-01..MAT-12)
- [x] 01-05-PLAN.md — Gap closure for Matrix `!yes` / `!no` pending-confirm scope
- [ ] 01-06-PLAN.md — Remaining Phase 01 gap closure work
- [x] 01-06-PLAN.md — Remaining Phase 01 gap closure work (completed 2026-04-03)
**Deliverables:**
- Space+rooms architecture for Matrix adapter

View file

@ -2,13 +2,13 @@
gsd_state_version: 1.0
milestone: v1.0
milestone_name: — Production-ready surfaces
status: Executing Phase 01
last_updated: "2026-04-03T09:28:47.448Z"
status: Phase 01 Complete
last_updated: "2026-04-03T09:35:39Z"
progress:
total_phases: 3
completed_phases: 0
completed_phases: 1
total_plans: 6
completed_plans: 5
completed_plans: 6
---
# State
@ -18,11 +18,13 @@ progress:
See: .planning/PROJECT.md (updated 2026-04-02)
**Core value:** Пользователь ведёт диалог с Lambda через любой мессенджер без изменения ядра
**Current focus:** Phase 01 — matrix-qa-polish
**Current focus:** Phase 02 — SDK Integration (blocked on Lambda platform SDK readiness)
## Current Phase
**Phase 1** of 3: Matrix QA & Polish
**Phase 2** of 3: SDK Integration
Phase 1 is complete. Phase 2 remains blocked until the Lambda platform SDK is available.
## Decisions
@ -37,6 +39,9 @@ See: .planning/PROJECT.md (updated 2026-04-02)
- [Phase 01]: Kept 01-04 scoped to test coverage without widening into production-code changes.
- [Phase 01]: Matrix command callbacks now include room_id in payload for !yes and !no so confirm handlers can resolve runtime state without changing core protocol types.
- [Phase 01]: Pending confirmations are stored under the D-08 composite key of matrix user id plus room id, with a narrow legacy fallback only for callers that omit room context.
- [Phase 01]: Removed Matrix reaction conversion entirely and kept command callbacks limited to !yes/!no.
- [Phase 01]: Kept !settings as a pure snapshot surface while preserving mutable subcommands outside the dashboard.
- [Phase 01]: Seeded invite and dispatcher tests with explicit next_chat_index and room ids instead of treating C1 as Matrix transport identity.
## Blockers
@ -51,8 +56,9 @@ See: .planning/PROJECT.md (updated 2026-04-02)
| 01 | 03 | 3 min | 2 | 5 | 2026-04-02T19:57:34Z |
| 01 | 04 | 3 min | 2 | 7 | 2026-04-02T20:03:38Z |
| 01 | 05 | 2 min | 2 | 7 | 2026-04-03T09:28:47Z |
| 01 | 06 | 4 min | 2 | 7 | 2026-04-03T09:35:39Z |
## Session
- Last session: 2026-04-03T09:28:47Z
- Stopped at: Completed 01-05-PLAN.md
- Last session: 2026-04-03T09:35:39Z
- Stopped at: Completed 01-06-PLAN.md

View file

@ -0,0 +1,99 @@
---
phase: 01-matrix-qa-polish
plan: 06
subsystem: testing
tags: [matrix, pytest, settings, reactions, room-routing]
requires:
- phase: 01-matrix-qa-polish
provides: 01-05 room-scoped confirmation flow and Matrix callback payload updates
provides:
- Matrix adapter helpers and converter paths no longer advertise or parse reaction-era UX
- Matrix `!settings` renders a strict read-only dashboard snapshot
- Matrix regressions distinguish room ids from logical chat ids and dynamic chat allocation
affects: [adapter/matrix, matrix verification, future Matrix QA]
tech-stack:
added: []
patterns: [command-only Matrix helper text, explicit room-id-vs-chat-id assertions]
key-files:
created: []
modified:
- adapter/matrix/reactions.py
- adapter/matrix/converter.py
- adapter/matrix/handlers/settings.py
- tests/adapter/matrix/test_converter.py
- tests/adapter/matrix/test_reactions.py
- tests/adapter/matrix/test_dispatcher.py
- tests/adapter/matrix/test_invite_space.py
key-decisions:
- "Removed Matrix reaction conversion entirely and kept command callbacks limited to !yes/!no."
- "Kept !settings as a pure snapshot surface while preserving mutable subcommands outside the dashboard."
- "Seeded invite and dispatcher tests with explicit next_chat_index and room ids instead of treating C1 as Matrix transport identity."
patterns-established:
- "Matrix adapter tests should assert room_id separately from logical chat_id whenever Matrix rooms are involved."
- "Matrix user-facing helper text should describe only supported command flows, never deprecated reaction UX."
requirements-completed: []
duration: 4 min
completed: 2026-04-03
---
# Phase 1 Plan 06: Matrix reaction cleanup and room-aware regressions Summary
**Matrix helper text and conversion are command-only, `!settings` is snapshot-only, and Matrix regressions now enforce room-aware chat allocation instead of legacy `C1` shortcuts.**
## Performance
- **Duration:** 4 min
- **Started:** 2026-04-03T09:32:21Z
- **Completed:** 2026-04-03T09:35:39Z
- **Tasks:** 2
- **Files modified:** 7
## Accomplishments
- Removed remaining reaction-era Matrix UX from adapter helper text and conversion paths.
- Tightened the `!settings` dashboard so it reports state without mutation prompts.
- Rewrote Matrix regressions to assert dynamic chat allocation and room-id separation explicitly.
## Task Commits
Each task was committed atomically:
1. **Task 1: Remove reaction-era Matrix UX and update the immediately affected regressions** - `974935c` (test), `3e06a67` (feat)
2. **Task 2: Remove the remaining brittle `C1` assumptions from room-based Matrix regressions** - `9cdb611` (test)
## Files Created/Modified
- `adapter/matrix/reactions.py` - Reduced the module to command-only text builders.
- `adapter/matrix/converter.py` - Removed exported reaction callback conversion support.
- `adapter/matrix/handlers/settings.py` - Removed mutation prompts from the Matrix settings dashboard.
- `tests/adapter/matrix/test_reactions.py` - Locked helper text expectations to command-only output.
- `tests/adapter/matrix/test_converter.py` - Replaced reaction callback coverage with a regression asserting the converter no longer exports that path.
- `tests/adapter/matrix/test_dispatcher.py` - Separated current chat context from allocated logical chat ids in Matrix-facing assertions.
- `tests/adapter/matrix/test_invite_space.py` - Seeded invite metadata to verify dynamic `next_chat_index` progression.
## Decisions Made
- Removed `from_reaction` instead of leaving a deprecated no-op path, so supported Matrix interactions are unambiguous.
- Left mutable Matrix settings subcommands outside `!settings`; only the dashboard copy was tightened in this plan.
- Treated the pre-existing missing singular `!skill` command wiring as out of scope for this plan because the acceptance criteria only required preserving `!skills`, `!soul`, and `!safety` subcommands and the reaction/settings cleanup.
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
- Task 2's red phase did not fail after tightening the assertions because the runtime already honored dynamic chat allocation; the work reduced to test cleanup and suite verification.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- Matrix Phase 01 gap-closure work is verified against both the Matrix suite and the full repository suite.
- Remaining manual verification is still limited to real Matrix client UX in Element and similar clients.
## Self-Check: PASSED
- FOUND: `.planning/phases/01-matrix-qa-polish/01-06-SUMMARY.md`
- FOUND: `974935c`
- FOUND: `3e06a67`
- FOUND: `9cdb611`