Skip to content

fix(v0.6): reinstall corrected SQLite W41 conflict guard - #154

Merged
akhiabanchian merged 7 commits into
mainfrom
fix/v0.6-w41-sqlite-guard-upgrade
Sep 24, 2026
Merged

akhiabanchian merged 7 commits into
mainfrom
fix/v0.6-w41-sqlite-guard-upgrade

Conversation

@ammarheidari

@ammarheidari ammarheidari commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Authority

W41 remediation under #150 / tracker #146 after PR #153 merged to protected main at fb2cf62cb54c85d10a6ce71c048d37c54b8c68ba.

Problem

PR #153 corrected SQLite terminal .../partition/{n} parsing, but the durable SQLite guard marker remained legacy-topic-guard-scope = 2. A database that had already installed the older v2 trigger set could therefore be treated as current on restart and retain the stale first-/partition/ parsing logic.

A second rolling-upgrade risk also exists unless guarded at the database boundary: a late/restarted v2 process can replay its old installer after v3 activation and attempt to replace the corrected business triggers and move the marker back to v2.

Fix

  • advance the SQLite conflict-guard schema marker from v2 to v3, forcing a transactional reinstall of corrected terminal-suffix triggers for existing v2 databases;
  • install and retain a database-level monotonic anti-downgrade trigger on the guard schema marker so a late v2 installer aborts when attempting v3→v2;
  • keep that monotonic fence present during current repair transactions and create it idempotently, so a missing business trigger can be repaired without opening a downgrade window;
  • regression-test the exact pre-fix v2 SQLite installer SQL from commit 225eb37fd2;
  • prove: stale v2 admits the problematic cluster-id-with-/partition/ claim; current startup upgrades v2→v3 and blocks it; a subsequent real v2 installer aborts and rolls back its stale trigger DDL; a current repair with the monotonic fence already present restores a missing business trigger and remains blocking.

PostgreSQL behavior is unchanged; its helper is versioned independently and was not affected by the SQLite parsing defect.

Scope

Two files only:

  • src/backend/Infrastructure/Kafdeck.Infrastructure.Persistence/MutationConflictGuardSchema.cs
  • tests/Kafdeck.Architecture.Tests/V06W41FleetPersistenceTests.cs

No new mutation kind, route, provider surface, generic executor, migration runner, release/version/manifest change, or publication action.

Admission

MERGE BLOCKED until all applicable exact-head CI is green, substantive review is complete, zero required unresolved threads remain, fresh current-head CODEOWNER approval from akhiabanchian exists, and final live head/base/main/mergeability/ruleset reconciliation passes.

Refs #150 #146.

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 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-24T18:00:45.341470Z 06d0c1f Manual request
ℹ️ 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.

Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
@ammarheidari
ammarheidari force-pushed the fix/v0.6-w41-sqlite-guard-upgrade branch from 5339f82 to 78a53f7 Compare September 24, 2026 17:51

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 78a53f7cba

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

Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
Signed-off-by: Ammar Heidari <ammar@arad-itc.org>

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 06d0c1fee5

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

@akhiabanchian
akhiabanchian merged commit 3b1e36d into main Sep 24, 2026
9 checks passed
@akhiabanchian
akhiabanchian deleted the fix/v0.6-w41-sqlite-guard-upgrade branch September 24, 2026 19:59
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.

2 participants