Skip to content

feat(pm-stack): roadmap-annotations shared-schema contract (#1744 Move 1 step 2) - #16975

Merged
developing-today-fleet[bot] merged 7 commits into
mainfrom
archer/1452e-1744-roadmap-annotations-schema
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 7 commits into
mainfrom
archer/1452e-1744-roadmap-annotations-schema

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What

The next bounded slice of #1744 (Move 1, step 2, second store), in the established #6103 / shared_comments pattern: the P1 schema contract for the roadmap-annotations store — roadmap-annotations.json → public.agg_roadmap_annotations + public.agg_roadmap_annotation_aliases.

  • migrations/20261129_0001_roadmap_annotations.up.sql — typed columns for every RoadmapAnnotation field (mirroring aggregator/src/roadmap-annotations.ts and its validators): kind check (decision|outcome|context), a real date column so the database rejects impossible calendar dates the way validRoadmapDate does, the same jsonb author contract as agg_actions/shared_comments, non-empty body with the validator's 20,000 cap, and a (stable_ref, annotation_date, created_at) index for the store's per-subject reads. The alias map gets its own table with a self-alias check (mirroring addAlias). Both tables: RLS enabled, append-only service_role grants (SELECT, INSERT — the store never updates or deletes).
  • Paired .down.sql refuses to drop either table while it holds rows.
  • golden/20261129_0001_roadmap_annotations.sqlite.sql — the Turso translation, hand-derived by the translator's documented rules using only constructs already pinned by the shared_comments golden.
  • test-migration.sh — applies the pair in order, probes shape/grants/constraints (unknown kind, impossible date, incomplete author, empty body, self-alias), proves the down migration refuses populated tables, then rolls back clean.
  • test_turso_migrations.py — kind-contract and self-alias probes against the translated schema.
  • README + migration plan: the new tables join the migration list, and P1's remaining scope no longer names roadmap annotations.

Scope guard

Schema-only, exactly like #6103: no rows copied, no reader/writer cutover, roadmap-annotations.json remains the only live backend and the rollback target. #1744 acceptance criterion 3 is untouched.

Refs #1744. Lane 1452-E (bravo SUSTAIN).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T21:10:23Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/hatch-personal",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/hatch-personal",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "c988860cb23068b92ca9a64ab9b5daddfc0f79d5"
    },
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…(Move 1 step 2)

pm-stack/shared-schema/migrations/20261129_0001_roadmap_annotations.up.sql
…(Move 1 step 2)

pm-stack/shared-schema/migrations/20261129_0001_roadmap_annotations.down.sql
…(Move 1 step 2)

pm-stack/shared-schema/golden/20261129_0001_roadmap_annotations.sqlite.sql
…(Move 1 step 2)

pm-stack/shared-schema/README.md
…(Move 1 step 2)

pm-stack/SHARED-SCHEMA-MIGRATION-PLAN.md
…(Move 1 step 2)

pm-stack/shared-schema/test-migration.sh
…(Move 1 step 2)

pm-stack/shared-schema/test_turso_migrations.py
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b1a4abe-c088-4fa6-8155-c3ff2a3cc7d9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants