- Named short tests must pass; a skip, miss or red required test fails. - No admin or layers stage; postgres is Docker-host only. Co-authored-by: Cursor <cursoragent@cursor.com>
6.0 KiB
6.0 KiB
phase, slug, status, nyquist_compliant, wave_0_complete, created
| phase | slug | status | nyquist_compliant | wave_0_complete | created |
|---|---|---|---|---|---|
| 19 | chat-and-chatchannels | draft | false | false | 2026-10-16 |
Phase 19 — Validation Strategy
Per-phase validation contract for feedback sampling during execution. Source:
19-RESEARCH.md§ Validation Architecture.
Test Infrastructure
| Property | Value |
|---|---|
| Framework | Go testing + testcontainers-go v0.44.0 (Postgres); Docker tests skip under -short |
| Config file | none at repo root — each plugin is its own module (go test ./...); analog testmain_test.go (flag.Parse() + testing.Short()) |
| Quick run command | go vet ./... && go test -short ./... inside each touched plugin repo |
| Full suite command | go test ./... (testcontainers Postgres + lighthouse memory + beachcomber null/fake) |
| Phase gate | scripts/check-phase19.sh (create in last plan) requiring named tests across chat, chatchannels and sm-user-plugin |
| Estimated runtime | quick ~30 s per repo; full Docker suite ~5–10 min |
Sampling Rate
- After every task commit:
go vet ./...andgo test -short ./...in the touched plugin module - After every plan wave:
go test ./...in that plugin (Docker) - Before
/msd-verify-work:scripts/check-phase19.shgreen - Max feedback latency: 60 seconds for the quick run
Per-Task Verification Map
Task IDs are the real plan numbers (19-01..19-05). File Exists is marked for tests landed through plan 19-05.
| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---|---|---|---|---|---|---|---|---|---|
| 19-01 | 01 | 1 | SC-19-2 | T-19-05 | chat authorizer participants + prs | unit | go test -short ./... -run TestChatAuthorizer |
✅ sm-chat-plugin/tracer_test.go | ⬜ pending |
| 19-02 | 02 | 1 | D-18 | T-19-03 | banned svg/html/xml; max 5; 100MB | unit | go test -short ./... -run TestAttachmentPolicy |
✅ sm-chat-plugin/http_tracer_test.go | ⬜ pending |
| 19-02 | 02 | 1 | D-09 | T-19-02 | chat-dm 10/min; generic 422 CANNOT_CREATE_DM | integration | go test ./... -run TestDMThrottle |
✅ sm-chat-plugin/http_tracer_test.go | ⬜ pending |
| 19-02 | 02 | 1 | D-18 | T-19-01 | attachment download 404 for missing and unauthorized | integration | go test ./... -run TestAttachmentDownload |
✅ sm-chat-plugin/http_tracer_test.go | ⬜ pending |
| 19-03 | 03 | 2 | SC-19-1 | — | ChannelService.createChannel / adoptConversation | integration | go test ./... -run TestCreateChannel |
✅ sm-chatchannels-plugin/tracer_test.go | ⬜ pending |
| 19-03 | 03 | 2 | D-20 | T-19-08 | SearchableAs messages; fail-open indexer |
unit | go test -short ./... -run TestSearchIndexer |
✅ sm-chatchannels-plugin/tracer_test.go | ⬜ pending |
| 19-04 | 04 | 2 | D-15 | — | handle unique + generator charset | unit | go test -short ./classes -run TestHandle in sm-user-plugin |
✅ plugins/golem15/user/classes/handle_generator_test.go | ⬜ pending |
| 19-05 | 05 | 4 | SC-19-1 | — | Baseline creates chat v1.3.0 tables minus family_id | unit | go test -short ./updates -run TestBaseline |
✅ sm-chat-plugin/updates/baseline_test.go | ⬜ pending |
| 19-05 | 05 | 4 | SC-19-2 | T-19-13 | MemoryDriver created.chat.message has no content key | unit | go test -short ./... -run TestBroadcastCreated |
✅ sm-chat-plugin/golden_test.go | ⬜ pending |
| 19-05 | 05 | 4 | SC-19-3 | T-19-13 | toApiArray golden (attachments kind/width/height) | unit | go test -short ./... -run TestToAPIArray |
✅ sm-chat-plugin/golden_test.go | ⬜ pending |
| 19-05 | 05 | 4 | SC-19-3 | T-19-13 | Event name/channel/payload goldens | unit | go test -short ./... -run TestGoldenEvents / TestChannelGoldenEvents |
✅ sm-chat-plugin/golden_test.go, sm-chatchannels-plugin/golden_test.go | ⬜ pending |
| 19-05 | 05 | 4 | D-21 | — | PHP method map 59 + 106 | unit (last plan) | go test -short ./... -run TestPHPMethodMap |
✅ testdata/PHP_METHOD_MAP.md in both plugins | ⬜ pending |
| 19-05 | 05 | 4 | D-02 | — | no family/parent/child/QuestStream in production sources | unit | go test -short ./... -run TestNoQuestStreamTrace |
✅ queststream_trace_test.go in both plugins | ⬜ pending |
Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky
Wave 0 Requirements
- Each new repo:
go.mod,plugin.go,updatesbaseline,harness_test.go/testmain_test.go(flag.Parse+testing.Short) testdata/goldens/for serializers and events (capture from Wavepath PHP)acme.teamsfixture plugin (test files only)- PHP→Go test method map markdown in the last plan
scripts/check-phase19.shat the framework repo (names tests across the three plugin modules)- sm-user-plugin handle migration + authorizer tests
Existing framework tests (go test ./modules/lighthouse/..., beachcomber, attach) already cover the seams; they do not cover chat behavior.
Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|---|---|---|---|
| Capture Wavepath serializer and event goldens | SC-19-3 | Needs a live PHP Wavepath backend | Record toApiArray and Centrifugo payloads from Wavepath; store under testdata/goldens/ |
| Repo create / first push | Discretion | tea repos create and remote push need a human |
tea repos create --owner golem15 then analog go.mod/replace; push main |
Validation Sign-Off
- All tasks have
<automated>verify or Wave 0 dependencies - Sampling continuity: no 3 consecutive tasks without automated verify
- Wave 0 covers all MISSING references
- No watch-mode flags
- Feedback latency < 60s
nyquist_compliant: trueset in frontmatter
Approval: pending