Repository navigation
fix(migrations): renumber agent_task_queue_context to clear duplicate prefix 627 (CHE-1824) - #290
Merged
Conversation
…e duplicate 627 prefix (CHE-1824) 627_agent_task_queue_context and 627_unpin_archived_chat_sessions share a numeric prefix, which fails TestMigrationNumericPrefixesAreUnique on main. The later-merged migration is renumbered to 630; 628 and 629 stay free for open pull requests. Versions are file basenames, so a database that applied the old name reruns the identical idempotent ADD COLUMN IF NOT EXISTS and records the new version; the legacy row stays. The SQL bytes are unchanged.
Author
This was referenced Oct 16, 2026
added 3 commits
October 16, 2026 16:50
congvc-bot-x99 Bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
…31-636 (CHE-1199) main now holds 627-629 and PR #290 (CHE-1824) takes 630 and 653.
This was referenced Oct 16, 2026
This was referenced Oct 17, 2026
Merged
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: Ready for Cheese's review and merge. Fresh current-target CI: PASS. Repair for the duplicate migration prefix 627 on
main.mainnow holds three 627 migrations. Current base5a0ad9516afbdd143a2ba7361602ccf1dec535a0, heade52d3a3b20afbf3bff72ba58356c9b742accee8c. It blocks CHE-1727 PR #254 CI. It is not a change to wakeups.Conditions:
gpt-6-luna, Codex/OpenAI), independent of author x99-claude-sonnet (Anthropic). Comment01a1453a-8793-7aaa-b787-b6e866fc1638on CHE-1824 covers this exact base/head. Its OCR receipt passes the pinned schema checker. Native selection and direct review cover all 15 raw-tree paths through two previews: 9 selected and 6 excluded. The range preview uses merge basea736250c26b9ba25cef9e0c13af6bc7ee1e7aa19; the separate intervening-main preview completes coverage. It is not one raw-range OCR selection. A changed base/head requires fresh applicable verification.e52d3a3b20afbf3bff72ba58356c9b742accee8conly by Cheese comment01a144d7-04c1-7f15-82eb-f545479c6953. Original behavioral-red evidence remains NOT-RUN, not PASS. The first commit of this PR (96d1464b5) mixed the compatibility test, the README and the rename. The unchanged uniqueness test failed onmain: https://github.com/cheese-work/multica/actions/runs/38854767783. The history is not rebuilt. New tests added later do not clear that gap. No other check or merge gate is waived.bc2dc1fbcprecedes the fix commite52d3a3b2.script-checksfailure onmain(a Helm download, run https://github.com/cheese-work/multica/actions/runs/38877201171) is not part of this PR. A migration fix alone is not an all-main CI PASS.Change:
627_notification_channel_preferencestays:628_notification_channel_preference_indexbuilds an index on its table, so it must run before 628.627_agent_task_queue_contextbecomes630_agent_task_queue_context(unchanged from the earlier push).627_unpin_archived_chat_sessionsbecomes653_unpin_archived_chat_sessions. Up and down SQL bytes are identical (sha256of up8ae4bf08..., of downd7d8808e...).schema_migrations, in sorted order, and does not compare against the highest applied number. A database that applied an old name runs the same idempotent SQL again under the new name and keeps its old row. The context migration isADD COLUMN IF NOT EXISTS. The unpin migration is oneUPDATEthat clears pins on archived rows, which handlers already keep clear.server/cmd/migrate/README.mddocuments this.Evidence:
TestMigrationNumericPrefixesAreUniquefails withmigrations 627_notification_channel_preference and 627_unpin_archived_chat_sessions share numeric prefix 627. The new testTestUnpinArchivedChatSessionsRenumberKeepsTheDatafails atbc2dc1fbcbecause653_unpin_archived_chat_sessions.up.sqldoes not exist. That second failure is a missing-file failure, not behavioral-red evidence.e52d3a3b2, on a task-ownedpgvector/pgvector:pg17container (DSN verified as loopback, not 5432):go test ./internal/migrationspasses.go test ./cmd/migratepasses in full (53 s), including both renumber tests, each for a fresh and a previously applied database, run twice.go run ./cmd/migrate upon an empty database applies 627, 628, 629, 630 and 653 in order, and a second run skips them.go vetis clean.golangci-lint run --new-from-merge-base=origin/mainreports 0 issues.b69eaf6b45c1405b770cda0010c425fdf8c023a9has this exact base/head as parents and treee79b04ab5f1681d096f6616383ab54eae8dc8702.7eb28c6dbab1512d79f349567e9343b43a63a6b9has the same parents and tree as the GitHub candidate. Race build, tagged vet, migrations, lifecycle checks, sqlc, vulnerability scan and lint pass. The regular and agent suites FAIL on X99. Matching pristine-main controls fail in execenv, governance/receipt and the Codex deadline test. Wecom fails intermittently on both trees. These local suite results remain FAIL, not green, and do not substitute for GitHub CI. The earlier CLI-package path artifact disappears outside the Multica workdir. All database services were task-owned and removed. No shared or production database access occurred.Writing lint: the three passive-voice warnings are true positives retained for negative restrictions. The semicolon warning is a true positive retained for OCR-scope separation. The long-sentence warning is a true positive retained for migration-number reservations. The synonym warning is a false positive because "fix commit" identifies the implementation commit.
Changelog: none
Closes CHE-1824