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

validation-50-2026-06-23 Doc

validation fail

Verdict: FAIL

Ticket

paldocs#50 — Sprint schema: migrations + models for sprint tracking. Merged via PR #71 (merge commit 25dcc57). Board item #1560 on board-paldocs.

Environment

Production cluster, namespace paldocs. Running image: harbor.tail5b443a.ts.net/paldocs/app:311f4a4d00a76d8b95525c75a5eebe64024e4d32 (commit 311f4a4, from PR #66 — NOT the sprint schema commit).

Tier Determination

Labels: arch:rails-db → API repo checklist (Tier 1 local + Tier 3 prod). Tier 1 blocked by same Bundler corruption as CI. Tier 3 executed.

Checks

# Criterion How Verified Result Evidence
1 Sprint.create persists with correct defaults Rails runner in prod pod: table_exists?('sprints') FAIL Returns <code>false</code> — table does not exist in production database
2 sprint.projects returns selected projects Rails runner: table_exists?('sprint_projects') FAIL Returns <code>false</code> — join table does not exist
3 BoardItem.where(sprint: s) scopes correctly Rails runner: column_exists?('board_items', 'sprint_id') FAIL Returns <code>false</code> — column not added to board_items
4 sprint.board_items returns only tagged items Depends on sprint_id column existing FAIL Blocked by check #3
5 Sprint status scopes (planning/active/complete) Depends on sprints table existing FAIL Blocked by check #1

CI Pipeline

Pipeline #146 (merge commit push): FAILURE. Step bundle-install exits 20 — Bundler 2.6.9 in CI image cannot read lockfile generated by Bundler 4.0.11. Additionally, Gemfile.lock:471 has a corrupted SHA256 for the rexml gem (extra characters). The build-and-push step was skipped, so no new Docker image was produced.
This is a pre-existing CI issue — pipelines #130 (embedding PR #65), #141 (docs PR #70), and #146 (sprint PR #71) all fail identically at bundle-install. The Bundler version mismatch predates the sprint schema work.

Root Cause

The CI Docker image bundles Bundler 2.6.9, but the repo's Gemfile.lock was generated with Bundler 4.0.11 (introduced in PR #69, the bundle-update PR). The lockfile also contains a corrupt SHA256 hash at line 471 (rexml entry has trailing 142 characters). Combined, these prevent bundle install from succeeding in CI, which blocks image builds and therefore blocks deployment.

Pod Health (Regression Check)

Current pod paldocs-79495cc784-f5l5x is Running (1/1 ready, 1 restart in 36min). Health endpoint /up returns HTTP 200. Existing functionality is unaffected — the sprint schema PR added new tables and model files only, with no changes to existing code.

Discovered Issues

  • CI Bundler version mismatch — Gemfile.lock requires Bundler 4.0.11 but CI image has 2.6.9. Needs either CI image update or lockfile regeneration with compatible Bundler. This blocks ALL deployments, not just this ticket.
  • Corrupt Gemfile.lock SHA256 — Line 471 (rexml gem) has malformed hash. Needs lockfile regeneration.

Code Review (Static Analysis)

Despite the deployment failure, the code itself is correct:
  • 3 migrations: create_sprints (with check constraint), create_sprint_projects (with unique index), add_sprint_id_to_board_items (nullable FK)
  • Sprint model: STATUSES constant, validations, 3 status scopes, has_many through associations, dependent:nullify on board_items
  • SprintProject model: belongs_to associations, uniqueness validation
  • BoardItem model: optional sprint association added
  • Project model: has_many :sprint_projects + :sprints through added
  • ci_schema.sql updated with all 3 new tables
  • 3 spec files with comprehensive coverage (CRUD, validations, scopes, associations, bidirectional access, destroy behavior)
  • No wave_number (removed per sprint philosophy — correct)
  • No controller/view changes (correct — UI is paldocs#56)