Repository navigation
docs(openspec): archive migrate-to-ent-and-atlas - #1228
Conversation
e385a99 to
5bc3549
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
046a9c5 to
7441d0d
Compare
5bc3549 to
cd1af5b
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
7441d0d to
c783cfd
Compare
cd1af5b to
27ae783
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
c783cfd to
1dd750b
Compare
27ae783 to
748c630
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
1dd750b to
a6224c5
Compare
748c630 to
82be539
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
a6224c5 to
a664c85
Compare
82be539 to
2f3071d
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
a664c85 to
ad03de6
Compare
2f3071d to
3b4f259
Compare
Four wording corrections so the OpenSpec specs match what the code does: - Fresh-install seeding text claimed the Go side passes a time.Now() to schema_migrations.tstamp. Goose's database.InsertRequest exposes only Version, so the tstamp column relies on the database's default timestamp function. Reword the Requirement and Scenario lines to match. - The "Forbidden DDL" scenario claimed cmd/ent-lint SHALL fail on a forbidden DDL statement. The linter has not yet been wired up for that check (see cmd/ent-lint/main.go:21 deferral comment and the scope note already documented in ent-schema-lint/spec.md). Update the THEN clause to describe the current manual-review enforcement, retaining the future-cmd/ent-lint intent. - The example output in ent-schema-lint/spec.md no longer matches cmd/ent-lint/main.go:511-515 — the real output includes the source line number and a fuller "Ent will fabricate a phantom FK column" trailer. Update the example accordingly. Addresses gemini-code-assist comments on PR #1228 (PRRT_kwDONV6tZs6D4drm, PRRT_kwDONV6tZs6D4dr2, PRRT_kwDONV6tZs6D4dsA, PRRT_kwDONV6tZs6D4dsG). Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
Automated stack merge failed during the rebase step. The |
The parent atlas-sum-check commit upgrades ariga.io/atlas in go.mod from v0.36.2 to v0.38.0 (needed for the new check binary). The vendor tree shrinks/grows accordingly, so the FOD hash changes. Bump vendorHash to match — without this, golangci-lint-check fails with "inconsistent vendoring: ariga.io/[email protected] ... but not marked as explicit in vendor/modules.txt".
The parent atlas-sum-check commit upgrades ariga.io/atlas in go.mod from v0.36.2 to v0.38.0. ent-codegen-drift-check uses proxyVendor=true with its own vendorHash, so the bump on ncps.goModules isn't enough — the drift check's GOPROXY cache also needs to be re-populated for the new atlas version. Without this, the check fails with: ariga.io/[email protected]: reading file://.../v0.38.0.zip: no such file or directory
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Verify ran clean (109/109 tasks, valid). Five ent-lint invariants without a triggering pattern in ncps today (A3, A5, snake_case enum, expand-contract, CHECK-presence) were descoped from this change and deferred to a future change that introduces a matching schema pattern. The ent-schema-lint spec and tasks.md were trimmed so the spec promise matches the shipped implementation. Archive synced delta specs to main: rewrote data-model (dropped sqlc/dbmate requirements, swapped Querier -> *database.Client, added Ent schemas as source of truth), created database-migrations, database-orm, and ent-schema-lint capabilities under openspec/specs/, then moved the change to openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
openspec/specs/data-model/spec.md (1)
38-38: 💤 Low valueMinor phrasing inconsistency.
Line 38 states SQL shapes are "documented elsewhere in this specification," but they appear inline in the same document (lines 51-300). Consider "documented in subsequent sections of this specification" for clarity.
🤖 Prompt for 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. In `@openspec/specs/data-model/spec.md` at line 38, Update the phrasing of the sentence that reads "The SQL `CREATE TABLE` shapes documented elsewhere in this specification SHALL exactly match..." to clarify the location of those SQL shapes by replacing "documented elsewhere in this specification" with "documented in subsequent sections of this specification" (the sentence immediately following the list of tables `config`, `narinfos`, ...); ensure the replacement appears in the same paragraph that starts "The system SHALL define every table..." so the sentence now clearly points to later sections of this document.
🤖 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 `@openspec/specs/database-migrations/spec.md`:
- Line 184: The spec is inconsistent about expand-contract DDL enforcement:
update the statement that currently says "cmd/ent-lint SHALL fail with a
non-zero exit" to match ent-schema-lint's manual review stance or document the
change; specifically, in the text referencing cmd/ent-lint replace the
requirement with either "SHALL be rejected by code review (expand-contract
enforcement reviewed manually for v1)" or add a note stating "expand-contract
enforcement added to cmd/ent-lint post-v1" so the references to cmd/ent-lint and
the expand-contract policy in openspec/specs/ent-schema-lint/spec.md are
consistent.
---
Nitpick comments:
In `@openspec/specs/data-model/spec.md`:
- Line 38: Update the phrasing of the sentence that reads "The SQL `CREATE
TABLE` shapes documented elsewhere in this specification SHALL exactly match..."
to clarify the location of those SQL shapes by replacing "documented elsewhere
in this specification" with "documented in subsequent sections of this
specification" (the sentence immediately following the list of tables `config`,
`narinfos`, ...); ensure the replacement appears in the same paragraph that
starts "The system SHALL define every table..." so the sentence now clearly
points to later sections of this document.
🪄 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: d4fab4a7-a3ad-4c39-b472-e969f53acb36
📒 Files selected for processing (13)
openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/.openspec.yamlopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/proposal.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/specs/data-model/spec.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/specs/database-migrations/spec.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/specs/database-orm/spec.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/specs/ent-schema-lint/spec.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/tasks.mdopenspec/changes/migrate-to-ent-and-atlas/specs/ent-schema-lint/spec.mdopenspec/specs/data-model/spec.mdopenspec/specs/database-migrations/spec.mdopenspec/specs/database-orm/spec.mdopenspec/specs/ent-schema-lint/spec.md
💤 Files with no reviewable changes (1)
- openspec/changes/migrate-to-ent-and-atlas/specs/ent-schema-lint/spec.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1228 +/- ##
=====================================
Coverage 5.50% 5.50%
=====================================
Files 6 6
Lines 400 400
=====================================
Hits 22 22
Misses 374 374
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Verify ran clean (109/109 tasks, valid). Five ent-lint
invariants without a triggering pattern in ncps today (A3, A5,
snake_case enum, expand-contract, CHECK-presence) were descoped
from this change and deferred to a future change that
introduces a matching schema pattern. The ent-schema-lint spec
and tasks.md were trimmed so the spec promise matches the
shipped implementation.
Archive synced delta specs to main: rewrote data-model (dropped
sqlc/dbmate requirements, swapped Querier -> *database.Client,
added Ent schemas as source of truth), created
database-migrations, database-orm, and ent-schema-lint
capabilities under openspec/specs/, then moved the change to
openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/.