Skip to content

Commit f8994f0

Browse files
committed
docs(plan): reflect dive_number_of_day removal in Milestone 1 plan
Copilot review flagged drift between the plan's status section ("7 new columns including dive_number_of_day") and the actual v71 schema (6 columns, no dive_number_of_day). Status section now lists only the columns that shipped; a new "Post-completion revision" subsection documents why dive_number_of_day was dropped (trivially derivable from diveDateTime, no reader, desyncs on manually-interleaved dives). Deeper task sections are left as historical record of the original plan.
1 parent 20f97a0 commit f8994f0

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

docs/superpowers/plans/2026-04-21-macdive-uddf-gap-fill.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
- All 12 tasks landed or explicitly skipped (Task 3 proven non-bug; see Task 3 section).
1818
- Schema bumped v69 → v70 (source_uuid on dive_data_sources) → v71
19-
(7 new dive + site metadata columns: dive_number_of_day, boat_name,
20-
boat_captain, dive_operator, surface_conditions on dives; water_type,
21-
body_of_water on dive_sites).
19+
(6 new dive + site metadata columns: boat_name, boat_captain,
20+
dive_operator, surface_conditions on dives; water_type, body_of_water
21+
on dive_sites). Task 8 and Task 10's snippets below show an earlier
22+
plan that also added `dive_number_of_day`; see "Post-completion
23+
revision" note directly below.
2224
- Cross-format import dedup now works via `dive_data_sources.source_uuid`.
2325
- Parser-to-DB gap closed for MacDive rich fields. `weather` now lands
2426
on the existing weather_description column. difficulty continues to
@@ -31,6 +33,21 @@
3133
to a future milestone, likely via dive-events.
3234
- Real-sample regression test passes (gated behind `@Tags(['real-data'])`).
3335

36+
### Post-completion revision: dive_number_of_day is derived, not stored
37+
38+
Originally this milestone planned a `dive_number_of_day` INT column on
39+
`dives`, populated from UDDF `<divenumberofday>`. After landing,
40+
review found the value is trivially derivable from `diveDateTime`
41+
(`ROW_NUMBER() OVER (PARTITION BY DATE(diveDateTime) ORDER BY
42+
diveDateTime)`) and has no current reader in the app. Storing it would
43+
also desync the moment a diver manually adds a dive between two
44+
imported dives. The column, its v71 ALTER, parser extraction,
45+
`IncomingDiveData` field, and importer write path were all removed.
46+
Task 8's "Add fields to the domain model" snippet and Task 10's DB
47+
write snippet in this document are the pre-revision plan; they are
48+
kept for historical context. `<divenumberofday>` is now ignored on
49+
import and computed on demand if/when the UI needs it.
50+
3451
---
3552

3653
## File Structure

0 commit comments

Comments
 (0)