Repository navigation
[ai][docs] vocabulary plan: migrations declare and test their delete paths - #671
Merged
Merged
Conversation
…paths Carries the two still-valid items from the retired SQLite schema v2 freeze plan (removed in 510415a, before #559 merged) into the two-phase programme; nothing else in it survives the shared-VRLOG design. - The 000055-pattern bullet: every new or rebuilt foreign key declares its ON DELETE action and has a delete-path test, with PRAGMA foreign_key_check after the move. - P2-B acceptance: deleting a clip has a declared, tested effect on its labels (lidar_replay_annotations.replay_case_id cascades today, so it deletes reviewed labels), and nothing writes pcap_file once it is a read-only projection. - P2-F acceptance: deleting a site has a declared, tested effect on its deployments (site_config_periods.site_id cascades today). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Carry the two still-valid items from the retired SQLite schema v2 freeze plan into the two-phase vocabulary programme (#631). That plan was removed in 510415a, before #559 merged. A review against #631 found nothing else in it that survives the shared-VRLOG design (VRLOG as the observation authority, SQLite as a rebuildable catalogue), so the plan itself is not restored.
Changes
ON DELETEaction and have a delete-path test, withPRAGMA foreign_key_checkafter the move. A rename keeps today's cascades without anyone noticing.lidar_replay_annotations.replay_case_idisON DELETE CASCADE, so deleting a clip deletes reviewed labels, which no recording can rebuild.pcap_fileonce it is a read-only projection.site_config_periods.site_idisON DELETE CASCADE.Validation
internal/db/schema.sql(lines 451 and 966).migrate.go);schema_consistency_test.go, P1-B);migration_rejects);foreign_key_checkalready runs inmigration_055_test.go.Checklist
DESIGN.md.README.mdis up to date. (Not affected.)docs/DEVLOG.mdis up to date. (Plan acceptance items only.)🤖 Generated with Claude Code