Skip to content

feat(nix-checks): add schema-equivalence-check + refresh ci.yml - #1223

Merged
kalbasit merged 1 commit into
mainfrom
feat-nix-checks-schema-equivalence
May 23, 2026
Merged

kalbasit merged 1 commit into
mainfrom
feat-nix-checks-schema-equivalence

Conversation

@kalbasit

Copy link
Copy Markdown
Owner

Adds the schema-equivalence-check derivation that runs
TestSchemaEquivalence across SQLite, Postgres, and MySQL. Postgres
and MySQL are spun up via the existing pre-check-{postgres,mysql}.sh
helpers; cleanup is wired through a trap to post-check-*.sh. The
parent ncps buildPhase is replaced with a no-op so the check skips
the full binary build (only the migrations test pass is needed).

Drive-by: refresh .github/workflows/ci.yml to drop references to the
removed sqlc/dbmate tooling (db/migrations/**, db/query.*.sql,
sqlc.yml, go generate ./pkg/database) and replace them with the
Ent generator flow (ent/schema/**, ent/generate.go,
go generate ./ent/...). The build job is unchanged — it still runs
nix flake check, which now exercises all four new derivations.

Marks tasks 8.7, 13.4, 13.5, and 13.6 complete in the
migrate-to-ent-and-atlas change.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request go Pull requests that update go code labels May 21, 2026
This was referenced May 21, 2026
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from b816e63 to 99c0299 Compare May 22, 2026 21:54
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 90e681a to a7a9235 Compare May 22, 2026 21:54
kalbasit added a commit that referenced this pull request May 22, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from 99c0299 to c199666 Compare May 22, 2026 23:02
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from a7a9235 to 5509f29 Compare May 22, 2026 23:02
kalbasit added a commit that referenced this pull request May 22, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from c199666 to 5132a2b Compare May 22, 2026 23:16
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 5509f29 to 27ac0ea Compare May 22, 2026 23:16
kalbasit added a commit that referenced this pull request May 22, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from 5132a2b to 8913971 Compare May 22, 2026 23:28
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 27ac0ea to 2551daa Compare May 22, 2026 23:28
kalbasit added a commit that referenced this pull request May 22, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from 8913971 to eb26bb2 Compare May 22, 2026 23:54
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 2551daa to 3750cae Compare May 22, 2026 23:54
kalbasit added a commit that referenced this pull request May 22, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from eb26bb2 to 3a60ea9 Compare May 23, 2026 00:07
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 3750cae to d3ecada Compare May 23, 2026 00:07
kalbasit added a commit that referenced this pull request May 23, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from 3a60ea9 to 0c17a85 Compare May 23, 2026 00:36
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from d3ecada to 16b7c11 Compare May 23, 2026 00:36
kalbasit added a commit that referenced this pull request May 23, 2026
Quote the path expansions when sourcing the pre/post-check helper
scripts in schema-equivalence-check. Nix store paths don't contain
spaces in practice, but quoting is shell best practice and silences
shellcheck-style nitpicks on the inherited shell content.

Addresses gemini-code-assist comment on PR #1223 (PRRT_kwDONV6tZs6D32tm).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-nix-checks-atlas-sum branch from 0c17a85 to 3c9e1b6 Compare May 23, 2026 03:31
@kalbasit
kalbasit force-pushed the feat-nix-checks-schema-equivalence branch from 16b7c11 to eaa8115 Compare May 23, 2026 03:31
@kalbasit

Copy link
Copy Markdown
Owner Author

Automated stack merge failed during the rebase step. The merge-stack label has been removed from all PRs in the stack. Please resolve conflicts locally, push, and re-apply the label on the top-most PR to retry. Run: https://github.com/kalbasit/ncps/actions/runs/26326665317

Adds the `schema-equivalence-check` derivation that runs
`TestSchemaEquivalence` across SQLite, Postgres, and MySQL. Postgres
and MySQL are spun up via the existing `pre-check-{postgres,mysql}.sh`
helpers; cleanup is wired through a trap to `post-check-*.sh`. The
parent ncps `buildPhase` is replaced with a no-op so the check skips
the full binary build (only the migrations test pass is needed).

Drive-by: refresh `.github/workflows/ci.yml` to drop references to the
removed sqlc/dbmate tooling (`db/migrations/**`, `db/query.*.sql`,
`sqlc.yml`, `go generate ./pkg/database`) and replace them with the
Ent generator flow (`ent/schema/**`, `ent/generate.go`,
`go generate ./ent/...`). The build job is unchanged — it still runs
`nix flake check`, which now exercises all four new derivations.

Marks tasks 8.7, 13.4, 13.5, and 13.6 complete in the
migrate-to-ent-and-atlas change.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 130-133: The workflow currently references the action using the
tag 'stefanzweifel/git-auto-commit-action@v7'; replace that tag with the
action's full commit SHA to pin the exact revision (e.g.,
'stefanzweifel/git-auto-commit-action@<full-sha>') so the CI step uses an
immutable reference, fetching the SHA from the action repo's commit history or
release that corresponds to v7; keep the existing inputs (like commit_message)
unchanged.

In `@openspec/changes/migrate-to-ent-and-atlas/tasks.md`:
- Line 145: Update the stale checklist entry that currently reads "13.6 Confirm
the existing `.github/workflows/ci.yml` still passes (no edits expected — the
new checks plug into `nix flake check`)" to reflect that edits to
`.github/workflows/ci.yml` may occur in this PR; locate the checklist item in
tasks.md (the line starting with "13.6 Confirm the existing
`.github/workflows/ci.yml` still passes") and remove or rephrase "(no edits
expected — the new checks plug into `nix flake check`)" to something like
"(ensure CI passes; edits to `.github/workflows/ci.yml` may be included)" so the
checklist accurately represents the current changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 585bb01f-8e0f-489b-b585-b90a6cceaf39

📥 Commits

Reviewing files that changed from the base of the PR and between 92c915d and 2aca6b8.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • nix/checks/flake-module.nix
  • openspec/changes/migrate-to-ent-and-atlas/tasks.md

Comment thread .github/workflows/ci.yml Resolved
@codecov

codecov Bot commented May 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.97%. Comparing base (92c915d) to head (2aca6b8).

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1223      +/-   ##
========================================
+ Coverage   5.50%   6.97%   +1.47%     
========================================
  Files          6       6              
  Lines        400     301      -99     
========================================
- Hits          22      21       -1     
+ Misses       374     276      -98     
  Partials       4       4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

enhancement New feature or request go Pull requests that update go code merge-stack size:L This PR changes 100-499 lines, ignoring generated files. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant