Repository navigation
feat(coderd/database/migrations/chatdmig): stop route on migrations below an early-taken version - #16
Conversation
…elow an early-taken version
|
@codex review |
…check and document the third sync stop
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21ed3bf068
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rations against early.txt UAT found that a migration already in routes.txt could be renumbered onto or below an early version without route noticing, and that early entries at or below the split were never checked. Route now checks new and renumbered migrations, and rejects early entries at or below the split.
…fore an early entry
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…n and validate early.txt in check Answers Codex review: a migration listed in early.txt was compared with the other early entries, and a malformed early.txt passed fork-ci because check never read it. Ledger versions are now compared as numbers, so an unpadded hand-edited line no longer looks renumbered.
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
UAT
Head
|
Lead merge check on head |
Part of #6.
golang-migrate keeps one version per database. When the fork takes an upstream migration from an open coder/coder branch before upstream main numbers it for good (the queue stack brings
000640_chat_queued_message_busy_behaviorfrom coder#30073), Mike's daily server records that version. If upstream main later lands a different migration at or below it, the next sync would bring that file and golang-migrate would skip it silently.This PR adds
coderd/database/migrations/chatdmig/early.txt, the checked-in list of migrations the fork took early (<version> <name> <source>, shipped empty; the queue-stack PR adds000640).chatdmig routenow fails with exit code 1, before it writesroutes.txt, when a new upstream migration that is not in the list has a version at or below a listed one. A listed migration routes normally, and a known migration that upstream renumbers is still followed by name. fork-sync already stops on any exit code other than 0 and 3, so no workflow change was needed. The README gets a short "Migrations taken early" section and lists this as a third case where a person takes over a sync.Tests:
TestRouteEarlyrunsrouteon a temp migrations tree. One case shows the guard refuses and leavesroutes.txtunchanged, one shows the early migration itself routes to chatd, and three show malformedearly.txtlines (field count, non-numeric and short version) fail. Each was shown to fail with the guard, the name exemption or the matching line check removed.Validation:
go vetandgo testforcmd/chatdmig,chatdmig check,chatdmig route(no diff onroutes.txt), and the chatdmig package suite against a scratch Postgres. No new dependencies.Review: Codex did not answer
@codex reviewwithin 30 minutes, so an Opus code-quality review of26fff65c85served as the interim gate: PASS with two P3 findings (README listed only two sync stops; twoearly.txtline checks were untested). Both are fixed in21ed3bf068.