Review: Sprint schema -- migrations + models for sprint tracking

review-1560-2026-06-23b Review

review ready

Verdict: APPROVED

Re-review of board item #1560. Prior review (review-1560-2026-06-23) returned NEEDS_REFINEMENT with 4 issues. All 4 have been resolved.

Prior Issues -- Verification

  • [x] arch-rails-db note missing -- FIXED. arch-rails-db exists as architecture note in paldocs project. Contains ER diagram, components table, key decisions about schema_format and pgvector.
  • [x] story-paldocs-sprint-orchestration had wave references -- FIXED. Title now "Sprint Orchestration -- cross-project sprint planning UI". Acceptance criteria say "flat parallel batch with no internal dependencies". No "wave" appears anywhere in the note.
  • [x] Board item title stale -- FIXED. Board item #1560 title is "Sprint schema -- migrations + models for sprint tracking".
  • [x] Schema format unclear -- FIXED. New "Schema Format" section added to issue body. States config.active_record.schema_format = :sql, producing db/structure.sql via pg_dump, and mentions regenerating db/ci_schema.sql for CI. Verified against HEAD: config is :sql, structure.sql exists (841 lines).

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- present, references paldocs#49 dependency
  • [x] Repo -- ldraney/paldocs
  • [x] User Story -- present, well-formed
  • [x] Context -- present, includes wave_number removal rationale and data model overview
  • [x] File Targets -- present, 7 files (3 migrations, 4 models) with clear modify/create vs do-not-touch sections
  • [x] Schema Format -- present (new section), clarifies :sql format and structure.sql
  • [x] Feature Flag -- none (correct, internal model change with no user-visible impact)
  • [x] Acceptance Criteria -- 5 criteria, all testable via Rails console/RSpec
  • [x] Test Expectations -- 4 test items + run command (bundle exec rspec)
  • [x] Constraints -- present, documents dependency, status enum values, nullability, unique index
  • [x] Checklist -- present
  • [x] Related -- present, references project, story, arch notes, upstream/downstream issues
All required sections for template-issue-feature are present and complete.

Traceability

  • [x] story:sprint-orchestration label -- present on board item
  • [x] story note verified -- story-paldocs-sprint-orchestration exists in pal-e-docs (note_type: user-story, project: paldocs). Listed in project-paldocs user-stories section.
  • [x] arch:rails-db label -- present on board item
  • [x] arch note verified -- arch-rails-db exists in pal-e-docs (note_type: architecture, project: paldocs). Contains ER diagram and schema decisions.
  • [x] Forgejo issue -- paldocs#50, open
  • [x] sprint:1 label -- present, consistent with sprint batch

File Targets

  • [x] db/migrate/XXXXXX_create_sprints.rb -- new file, does not exist yet (correct)
  • [x] db/migrate/XXXXXX_create_sprint_projects.rb -- new file, does not exist yet (correct)
  • [x] db/migrate/XXXXXX_add_sprint_id_to_board_items.rb -- new file, does not exist yet (correct)
  • [x] app/models/sprint.rb -- new file, does not exist yet (correct)
  • [x] app/models/sprint_project.rb -- new file, does not exist yet (correct)
  • [x] app/models/board_item.rb -- verified exists. Currently has COLUMNS constant and board association. Sprint belongs_to addition is valid.
  • [x] app/models/project.rb -- verified exists. Currently has notes, repos, page_note associations. Sprint has_many through addition is valid.
Exclusions (db/structure.sql auto-generated, controllers, views) are sensible and well-documented.

Repo Placement

OK. Issue filed on ldraney/paldocs, all file targets are in paldocs. Single-repo change.

Dependencies

  • paldocs#49 (schema ownership transfer) -- CLOSED/MERGED (commit 3576a91). Board item #1559 in done column. Dependency satisfied.
  • paldocs#56 (sprint planning UI) -- DOWNSTREAM, depends on this ticket. In backlog, sprint:2 label. No blocking issue.
  • paldocs#67 (docs: codify sprint philosophy) -- RELATED, in next_up, sprint:1. Parallel work, no dependency.
  • paldocs#52 (embedding pipeline) -- in next_up, sprint:1. No dependency relationship. Can run in parallel.

Acceptance Criteria

5 acceptance criteria, all testable via Rails console or RSpec model specs. Run command (bundle exec rspec) is real and matches the project's test setup. No missing criteria. Criteria correctly scope to model/schema layer only, leaving UI concerns to #56.

Blast Radius

Low. New tables and new model files. The only modifications to existing models are adding associations to BoardItem (belongs_to :sprint) and Project (has_many :sprint_projects, :sprints through). Both are additive. The board_items.sprint_id column is nullable, so existing records are unaffected. No similar patterns exist elsewhere in the codebase.

Decomposition Assessment

7 file targets, 1 repo, 5 AC. Estimated agent time: 3-4 minutes. Three new migrations + two new models + two model updates form a single coherent unit. No decomposition needed.

Recommendation

No action needed. All prior issues resolved. Scope is solid, traceability complete, file targets verified, fits in a single agent pass.