docs(phase-12): update validation strategy

This commit is contained in:
Arthur Belleville 2026-05-16 10:38:26 +02:00
parent deab7a9aa2
commit fa208a5bf7
No known key found for this signature in database

View file

@ -1,7 +1,7 @@
---
phase: 12
slug: native-tablo-chat
status: draft
status: complete
nyquist_compliant: true
wave_0_complete: true
created: 2026-05-16
@ -32,13 +32,13 @@ created: 2026-05-16
| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| 12-01-01 | 01 | 1 | CHAT-03 | T-12-01/T-12-02 | Message schema carries tablo/author/body/timestamps/edit/delete metadata | integration | `cd backend && just generate` | Yes | pending |
| 12-01-02 | 01 | 1 | CHAT-01/CHAT-02/CHAT-06 | T-12-03/T-12-04/T-12-05 | Owner-only history and POST validation with escaped output | integration | `cd backend && go test ./internal/web -run 'TestDiscussion' -count=1` | Yes | pending |
| 12-01-03 | 01 | 1 | CHAT-01/CHAT-06 | T-12-05 | UI contract renders escaped history, day separators, composer, and fallback | integration | `cd backend && go test ./internal/web -run 'TestDiscussion' -count=1` | Yes | pending |
| 12-02-01 | 02 | 2 | CHAT-01 | T-12-06 | Unread count comes from persistent owned read state | integration | `cd backend && go test ./internal/web -run 'TestTablosListDiscussionUnread|TestDiscussionReadState' -count=1` | Yes | pending |
| 12-02-02 | 02 | 2 | CHAT-01 | T-12-06/T-12-07 | Dashboard badge shows only accurate unread counts | integration | `cd backend && go test ./internal/web -run 'TestTablosListDiscussionUnread' -count=1` | Yes | pending |
| 12-03-01 | 03 | 3 | CHAT-04/CHAT-05 | T-12-08/T-12-09 | Authenticated SSE streams flush owned message events without external provider | integration/manual | `cd backend && go test ./internal/web -run 'TestDiscussionStream' -count=1` | Yes | pending |
| 12-03-02 | 03 | 3 | CHAT-04/CHAT-05 | T-12-08/T-12-10 | Two browser views receive messages without refresh through local/prod proxy path | manual | Browser UAT | N/A | pending |
| 12-01-01 | 01 | 1 | CHAT-03 | T-12-01/T-12-02 | Message schema carries tablo/author/body/timestamps/edit/delete metadata | integration | `cd backend && go test ./internal/web -run 'TestDiscussionSchemaIncludesLifecycleMetadataAndBodyConstraints' -count=1` | Yes | COVERED |
| 12-01-02 | 01 | 1 | CHAT-01/CHAT-02/CHAT-06 | T-12-03/T-12-04/T-12-05 | Owner-only history and POST validation with escaped output | integration | `cd backend && go test ./internal/web -run 'TestDiscussion' -count=1` | Yes | COVERED |
| 12-01-03 | 01 | 1 | CHAT-01/CHAT-06 | T-12-05 | UI contract renders escaped history, day separators, composer, and fallback | integration | `cd backend && go test ./internal/web -run 'TestDiscussion' -count=1` | Yes | COVERED |
| 12-02-01 | 02 | 2 | CHAT-01 | T-12-06 | Unread count comes from persistent owned read state | integration | `cd backend && go test ./internal/web -run 'TestTablosListDiscussionUnread|TestDiscussion.*Read' -count=1` | Yes | COVERED |
| 12-02-02 | 02 | 2 | CHAT-01 | T-12-06/T-12-07 | Dashboard badge shows only accurate unread counts | integration | `cd backend && go test ./internal/web -run 'TestTablosListDiscussionUnread' -count=1` | Yes | COVERED |
| 12-03-01 | 03 | 3 | CHAT-04/CHAT-05 | T-12-08/T-12-09 | Authenticated SSE streams flush owned message events without external provider | integration/manual | `cd backend && go test ./internal/web -run 'TestDiscussionStream|TestDiscussionBroker|TestDiscussionPostBroadcasts|TestDiscussionStaticScript' -count=1` | Yes | COVERED |
| 12-03-02 | 03 | 3 | CHAT-04/CHAT-05 | T-12-08/T-12-10 | Two browser views receive messages without refresh through local/prod proxy path | manual | Browser UAT approved 2026-05-16 | N/A | COVERED |
## Wave 0 Requirements
@ -64,4 +64,20 @@ Existing infrastructure covers all phase requirements:
- [x] Feedback latency target < 60s.
- [x] `nyquist_compliant: true` set in frontmatter.
**Approval:** pending execution
**Approval:** audited 2026-05-16
## Validation Audit 2026-05-16
| Metric | Count |
|--------|-------|
| Gaps found | 1 |
| Resolved | 1 |
| Escalated | 0 |
### Gap Filled
- Added `TestDiscussionSchemaIncludesLifecycleMetadataAndBodyConstraints` in `backend/internal/web/handlers_discussion_test.go` to verify `discussion_messages` lifecycle metadata columns and direct database body constraints required by CHAT-03/CHAT-06.
### Final Verification
- `cd backend && TEST_DATABASE_URL='postgres://xtablo:xtablo@localhost:5432/xtablo?sslmode=disable' go test ./internal/web -run 'TestDiscussionSchemaIncludesLifecycleMetadataAndBodyConstraints|TestDiscussion' -count=1`