Skip to content

chore(issues): record the migration-replay vs schema.sql mirror gap on #QCNE6N - #2492

Merged
BigSimmo merged 3 commits into
mainfrom
claude/clinical-query-terms-hash-c5413b
Sep 1, 2026
Merged

chore(issues): record the migration-replay vs schema.sql mirror gap on #QCNE6N#2492
BigSimmo merged 3 commits into
mainfrom
claude/clinical-query-terms-hash-c5413b

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Retract a duplicate outstanding-issues inbox add request via the inbox's own cancel action.
  • Record the 2026-09-01 evidence as an update to the existing open row #QCNE6N instead.

No product code, no database migration, no schema change. The canonical ledger docs/outstanding-issues.md is untouched; these are immutable request files under docs/outstanding-issues-inbox/, to be applied later by a serialized npm run issues:reconcile.

What happened

The first commit on this branch queued an add for a pre-merge verification gap found while classifying today's live-drift failure. That gap is already an open row: #QCNE6N (P2, 2026-08-23) records that CI never diffs the replayed migration chain against supabase/schema.sql, and already proposes the same containerised two-database fix. The duplicate was caught by checking the ledger after queueing rather than before, and is retracted in the same session it was created.

The later commits cancel that request and reissue its content as an update to #QCNE6N. The add request file is left in place rather than deleted, because the inbox is append-only and cancel is its designed retraction path; reconciliation drops the cancelled request.

The evidence added to #QCNE6N

live-drift run 33484535655 (2026-09-01, on main at d3074946a) is red with exactly one unexpected finding: public.correct_clinical_query_terms(text,real) def_hash manifest e2356565… versus live 2ebaf978….

The cause is a mirror gap, not a live-database problem. Migration 20260831100000 (merged in PR #2477) redefined that function with a duplicated and length(canonical) between 4 and 40 predicate, and supabase/schema.sql was never updated to match. The drift manifest is generated by replaying schema.sql into the pinned Postgres image, so the manifest and live disagree even though live is exactly what the applied migration created.

That makes #QCNE6N demonstrated rather than theoretical. The only db-reset-verify assertion that runs today is committed.schema_sha256 === generated.schema_sha256, which catches an unrefreshed manifest but not a chain-versus-mirror divergence. Behaviour impact of this instance is nil — the duplicated predicate is a boolean no-op — but it cost a red daily alarm and a remediation PR, and it is the second occurrence of the failure class behind the original #316 root cause.

The remediation for the drift itself is a separate change and is not in this PR.

Verification

Documentation and ledger paperwork only. npx prettier reports all three added files unchanged (already formatted). No unit, build, browser, or provider-backed check was run, because this diff contains no executable code and there is no realistic changed failure path in append-only JSON request files. npm run check:ledger-write-discipline in CI is the gate that governs this path.

No live Supabase, OpenAI, or Railway access was used at any point in producing this PR.

🤖 Generated with Claude Code

…nding

Root-caused from live-drift run 33484535655 on main at d307494. CI's
db-reset-verify job replays the migration chain and regenerates the drift
manifest, but only asserts that schema.sql did not change without a manifest
refresh. Nothing asserts that the replayed chain equals schema.sql, so a
migration that edits a function body without a matching schema.sql edit clears
every pre-merge gate and only surfaces post-merge in live-drift.

Append-only inbox request; the canonical ledger is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@supabase

supabase Bot commented Sep 1, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 26bb63c2-7364-40e5-ba57-5ebb59dc8b59


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

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1e41c388-1956-41e8-b3a2-c1504a724dc1)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T08:48:35.674174Z 243b861 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…QCNE6N

The finding queued in the previous commit is already an open row. #QCNE6N
(P2, 2026-08-23) records that CI never diffs the replayed migration chain
against supabase/schema.sql, and already proposes the same containerised
two-database fix. Caught by checking the ledger after queueing rather than
before.

Retract the duplicate add via the inbox's own cancel action, and reissue the
2026-09-01 evidence as an update to #QCNE6N: live-drift run 33484535655 is the
first time this gap has actually produced a live/repo divergence, which moves
the row from theoretical to demonstrated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BigSimmo BigSimmo changed the title chore(issues): queue the migration-replay vs schema.sql mirror-gap finding chore(issues): record the migration-replay vs schema.sql mirror gap on #QCNE6N Sep 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 243b861d92

ℹ️ 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".

@BigSimmo
BigSimmo enabled auto-merge (squash) September 1, 2026 09:04
@BigSimmo
BigSimmo merged commit a633eb6 into main Sep 1, 2026
27 checks passed
@BigSimmo
BigSimmo deleted the claude/clinical-query-terms-hash-c5413b branch September 1, 2026 09:14
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