Skip to content

ci: guard migration numbering and run console tests - #210

Merged
ryuzdev merged 1 commit into
mainfrom
ci/migrations-and-console-tests
Dec 1, 2026
Merged

ryuzdev merged 1 commit into
mainfrom
ci/migrations-and-console-tests

Conversation

@ryuzdev

@ryuzdev ryuzdev commented Dec 1, 2026

Copy link
Copy Markdown
Member

Two CI gaps, one branch each half:

Migration numbering guard (new scripts/check-migrations.sh, runs in the shell job)

  • Fails when files in crates/outer/migrations/ are not a contiguous 0001..N sequence of NNNN_snake_case.sql names: duplicate numbers, gaps, and bad names each name the exact file and what to rename it to.
  • Also rejects editing/renaming a migration already on origin/main (diff against the merge base; quiet on push-to-main runs where new migrations show as added). Skipped when no merge base is available; naming checks always run. Shell job checkout now uses fetch-depth: 0 so the merge base exists in CI.
  • History here: two 0003s, 0005->0006, 0010, 0011->0012, 0014->0017 renumber collisions; contiguity + uniqueness is the core.

Console unit tests in CI (docs job)

  • Adds bun test pages/console after install. 3 console tests sat broken on main for days; currently 114 pass.

AGENTS.md documents both, one line each.

Checks run locally:

  • bash scripts/check-migrations.sh passes on main (8 migrations, 0001..0008); fails with an exact rename message on temp copies with a duplicate 0008, a gap (0007 removed), and a bad name; fails when a merged migration is edited in a test clone, passes on a pure-add branch there
  • shellcheck deploy/*.sh scripts/*.sh clean, script also verified under dash
  • bun test pages/console: 114 pass, 0 fail
  • workflow YAML parses (jobs: rust, hostile-gates, docs, shell)

- scripts/check-migrations.sh enforces contiguous 0001..N NNNN_snake_case.sql names and rejects edits to shipped migrations (shell job, shellcheck-clean).
- docs job runs bun test pages/console after install; AGENTS.md documents both.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: a7106727-4b5a-4c8f-acee-edb37b1b0b42
Commits

Reviewing files that changed from the base of the PR and between 4633f4d and fd180a9.

Files selected for processing: 3

  • .github/workflows/ci.yml
  • AGENTS.md
  • scripts/check-migrations.sh
  • 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

@ryuzdev
ryuzdev merged commit 5ca085e into main Dec 1, 2026
5 checks passed
@ryuzdev
ryuzdev deleted the ci/migrations-and-console-tests branch December 1, 2026 07:15
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.

1 participant