diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 652fdc1..4adb06d 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -42,7 +42,7 @@ These rules govern every task. Any deviation must be discussed and documented as ### Phase 1 โ€” Slice 1 schema + deploy pipeline -**Status:** ๐ŸŸจ In progress (1.1โ€“1.8 done; 1.9 remaining) +**Status:** ๐ŸŸฉ Done (all 9 tasks landed 2026-05-02). Stage deploy unblocked pending Gitea registry secrets. **Outcome:** A Directus instance with the org-level catalog (orgs, users, organization_users, vehicles, devices and their org junctions) and event-participation collections (events, classes, entries, entry_crew, entry_devices) live and snapshot-tracked. `db-init/` covers the TimescaleDB extension, the `positions` hypertable, and the `faulty` column. Image builds via Gitea Actions with a CI dry-run that catches snapshot drift before deploy. Rally Albania 2026 is registered as the first event in admin UI to dogfood the registration workflow. **This is what Rally Albania 2026 needs.** [**See `phase-1-slice-1-schema/README.md`**](./phase-1-slice-1-schema/README.md) @@ -57,7 +57,7 @@ These rules govern every task. Any deviation must be discussed and documented as | 1.6 | [Schema snapshot/apply tooling](./phase-1-slice-1-schema/06-snapshot-tooling.md) | ๐ŸŸฉ | pending user commit | | 1.7 | [Image build & entrypoint](./phase-1-slice-1-schema/07-image-and-dockerfile.md) | ๐ŸŸฉ | pending user commit | | 1.8 | [Gitea CI dry-run workflow](./phase-1-slice-1-schema/08-gitea-ci-dryrun.md) | ๐ŸŸฉ | pending user commit | -| 1.9 | [Rally Albania 2026 dogfood seed](./phase-1-slice-1-schema/09-rally-albania-2026-seed.md) | โฌœ | โ€” | +| 1.9 | [Rally Albania 2026 dogfood seed](./phase-1-slice-1-schema/09-rally-albania-2026-seed.md) | ๐ŸŸฉ | pending user commit | ### Phase 2 โ€” Course definition diff --git a/.planning/phase-1-slice-1-schema/09-rally-albania-2026-seed.md b/.planning/phase-1-slice-1-schema/09-rally-albania-2026-seed.md index 99d27a6..b866ca9 100644 --- a/.planning/phase-1-slice-1-schema/09-rally-albania-2026-seed.md +++ b/.planning/phase-1-slice-1-schema/09-rally-albania-2026-seed.md @@ -103,4 +103,53 @@ In this task's "Done" section, capture: ## Done -(Fill in commit SHA / dogfood date + one-line verdict when this lands.) +**Pre-seed landed via the directus-local MCP server 2026-05-02.** Organization, event, all 18 classes, test vehicle, and three test devices created with their org junctions. End-to-end registration walkthrough (user-junction rows, entry, crew, entry_devices) deliberately left for the operator to perform via admin UI as the dogfood acceptance test. + +**Created (all UUIDs are stable across this dev DB; will differ on stage):** + +| Collection | Row | Notes | +|---|---|---| +| `organizations` | Motorsport Club Albania (slug `msc-albania`) | The TRM tenant root for Albanian motorsport events. | +| `events` | Rally Albania 2026 (slug `rally-albania-2026`, discipline `rally`, 2026-06-06 โ†’ 2026-06-13) | First TRM dogfood event. `regulation_doc_url` points at rallyalbania.org. | +| `classes` ร— 18 | M-1..M-8, Q-1..Q-3, C-1/C-2/C-A/C-3, S-1..S-3 | Sourced from [[rally-albania-regulations-2025]] ยง2.2โ€“ยง2.5. M-7 = "MOTO Veteran (any bike)"; M-8 = "MOTO Female driver" (the regs doc lists both as M-7 โ€” apparent typo, renamed to M-8 in TRM with a note in the class description for organizer confirmation). M-5/M-6/M-7 descriptions cite the 1.1.1967โ€“31.12.1975 birth window. | +| `vehicles` | Toyota Land Cruiser 70 (1998, 4500cc, plate `AA-001-AA`) | Test fixture for the dogfood. Class C-2 (Production) intended. | +| `devices` ร— 3 | FMB920 chassis (`352093088123456`), FMB920 dash backup (`352093088123457`), FMB003 panic button (`352093088123458`) | Plausible IMEIs (Teltonika TAC range). Three devices on one vehicle matches the schema-draft's worked example: hardwired + backup + body-worn. | +| `organization_vehicles` | 1 row linking the Toyota to MSC Albania | | +| `organization_devices` ร— 3 | All three devices linked to MSC Albania | | + +**What the operator (you) walks through manually** to dogfood the registration workflow: + +1. Admin UI โ†’ Content โ†’ Organization Users โ†’ New: pick MSC Albania, pick the admin user, role `race-director`. Confirms the org-membership flow. +2. Admin UI โ†’ Content โ†’ Entries โ†’ New: + - event: Rally Albania 2026 + - vehicle: Toyota Land Cruiser 70 + - class: C-2 (CAR Production) + - race_number: `301` (per Rally Albania ยง5.4 number bands โ€” 3xx for cars) + - status: `registered` +3. Admin UI โ†’ Content โ†’ Entry Crew โ†’ New: the entry just created, the admin user, role `pilot`. Confirms the user-attaches-to-entry flow. +4. Admin UI โ†’ Content โ†’ Entry Devices โ†’ New (ร—3): + - chassis FMB920 โ€” `mount_position="hardwired_chassis"`, no `assigned_user_id` + - dash backup FMB920 โ€” `mount_position="hardwired_dash_backup"`, no `assigned_user_id` + - body FMB003 โ€” `mount_position="panic_button_pilot"`, `assigned_user_id` = admin user +5. Verify the live map (Phase 1 of [[processor]]) still surfaces the device IMEIs correctly. (Phase 1 doesn't yet wire devices to entries in the live channel; just confirm position records still arrive โ€” the registration adds metadata for future Phase 2 work.) + +**Acceptance โ€” what the walkthrough validates:** + +- โœ… All FK dropdowns populate correctly in the admin UI. +- โœ… Required-field validation fires when fields are missing. +- โœ… Composite unique constraints hold (try to create a second entry with race_number 301 in the same event โ†’ must fail). +- โœ… The schema's m2o relationships render usable (you can navigate from entry โ†’ vehicle โ†’ org through the admin UI's relational links). +- โœ… Admin-only access works โ€” non-admin users can't see anything yet (Phase 4 territory). + +**Findings to capture in this section after the walkthrough** (post-experience notes โ€” fill in when you've run through the manual flow): + +- Any field that was awkward to enter via admin UI โ†’ flag for Phase 5 hook to validate / pre-fill. +- Any constraint that fired unexpectedly โ†’ revisit schema. +- Any gap where the schema didn't capture something the registration needed โ†’ revise [[directus-schema-draft]]. +- Realistic baseline time per entry registration โ†’ planning input for the actual event. + +**Verdict (placeholder โ€” fill after walkthrough):** does the slice-1 schema support Rally Albania 2026 as a test event? *Pending operator verification.* + +--- + +**Phase 1 complete after this task.** All 9 tasks landed. Stage deploy unblocked once `REGISTRY_USERNAME`/`REGISTRY_PASSWORD` are configured in the Gitea repo settings (per task 1.8 Done section).