87 lines
4.6 KiB
Markdown
87 lines
4.6 KiB
Markdown
---
|
|
phase: "14.2.1"
|
|
slug: "translate-plugin"
|
|
# status lifecycle: draft (seeded by plan-phase) → validated (set by validate-phase §6)
|
|
# audit-milestone §5.5 distinguishes NOT-VALIDATED (draft) from PARTIAL (validated + nyquist_compliant: false) (#2117)
|
|
status: draft
|
|
nyquist_compliant: false
|
|
wave_0_complete: false
|
|
created: "2026-10-06"
|
|
---
|
|
|
|
# Phase 14.2.1 — Validation Strategy
|
|
|
|
> Per-phase validation contract for feedback sampling during execution.
|
|
|
|
---
|
|
|
|
## Test Infrastructure
|
|
|
|
| Property | Value |
|
|
|----------|-------|
|
|
| **Framework** | Go `testing` + testcontainers-go v0.44.0 (Postgres) |
|
|
| **Config file** | none — `go test ./...` |
|
|
| **Quick run command** | `go test ./... -short -count=1` (plugin + `./modules/cabana` + `./modules/surf`) |
|
|
| **Full suite command** | `go test ./... -count=1` in `sm-translate-plugin`, `summercms.go`, and host `go test ./...` |
|
|
| **Estimated runtime** | ~60 seconds (short); ~180 seconds (full, Postgres) |
|
|
|
|
---
|
|
|
|
## Sampling Rate
|
|
|
|
- **After every task commit:** Run `go test ./... -short -count=1` in the repo that changed
|
|
- **After every plan wave:** Run `go test ./... -count=1` and `go vet ./...` in that repo
|
|
- **Before `$gsd-verify-work`:** Full suite must be green in plugin, `summercms.go`, and host
|
|
- **Max feedback latency:** 60 seconds (short)
|
|
|
|
---
|
|
|
|
## Per-Task Verification Map
|
|
|
|
| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|
|
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
|
|
| 14.2.1-W0 | 04 | 0 | D-05 | T-14.2.1-01 | Locales admin requires `golem15.translate.manage_locales` | integration | `go test ./... -run TestLocalesAdminForbidden -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-06 | — | `type: mltext` and `type: mlmarkdown` compile; unknown type fails boot | unit | `go test ./modules/cabana -run TestMLFieldTypes -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-07 | T-14.2.1-02 | URL prefix wins; invalid code ignored; session/cookie flag; not header-only | unit | `go test ./classes -run TestTranslatorResolve -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-08 | — | Seed inserts `en` (default, enabled) and `pl` (enabled, not default); not `de` | integration | `go test ./updates -run TestSeedEnPl -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-09/D-12 | — | `Translatable()` + get/set + `WithLocale` | unit | `go test ./classes -run TestTranslatableGetSet -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-10 | — | Tables `winter_translate_locales\|attributes\|indexes\|messages` exist after migrate | integration | `go test ./updates -run TestTranslateTables -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-11 | — | Missing `pl` falls back to default locale column | unit | `go test ./classes -run TestFallbackDefaultLocale -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | D-17 | — | Host/plugin Activate with user+translate | smoke | `go test ./... -run TestBootUserTranslate -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | T-SEC-01 | T-14.2.1-03 | Unlisted locale never stored | unit | `go test ./classes -run TestInvalidLocaleRejected -count=1` | ❌ W0 | ⬜ pending |
|
|
| 14.2.1-W0 | 04 | 0 | T-SEC-02 | T-14.2.1-04 | Nested ML body not dropped | unit | `go test ./modules/cabana -run TestMLNestedSave -count=1` | ❌ W0 | ⬜ pending |
|
|
|
|
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
|
|
|
|
---
|
|
|
|
## Wave 0 Requirements
|
|
|
|
- [ ] `sm-translate-plugin` module and test files listed above
|
|
- [ ] `modules/cabana` ML compile/save tests
|
|
- [ ] `modules/surf` Resolver-present vs absent locale tests
|
|
- [ ] Plugin Postgres harness (copy user plugin TestMain / testcontainers)
|
|
- [ ] No new test framework install
|
|
|
|
---
|
|
|
|
## Manual-Only Verifications
|
|
|
|
| Behavior | Requirement | Why Manual | Test Instructions |
|
|
|----------|-------------|------------|-------------------|
|
|
| Create Gitea remote `git@git.golem15.com:golem15/sm-translate-plugin.git` | D-15 | Requires user credentials on git.golem15.com | User creates public repo; executor verifies clone URL exists |
|
|
| Locales admin works in the proof-host SPA | D-17 | Needs running host + admin login | Boot `sm-grzybyfunkcjonalne-app`; open Locales; create/edit locale as permitted user |
|
|
|
|
---
|
|
|
|
## 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: true` set in frontmatter
|
|
|
|
**Approval:** pending
|