Skip to content

Add instructions for cluster consistency invariants#893

Merged
yamatcha merged 2 commits intomainfrom
clustering-agents.md
Apr 27, 2026
Merged

Add instructions for cluster consistency invariants#893
yamatcha merged 2 commits intomainfrom
clustering-agents.md

Conversation

@arosh
Copy link
Copy Markdown
Member

@arosh arosh commented Feb 25, 2026

Summary

This PR adds clustering.instructions.md to the instructions directory to formally define the consistency and safety invariants of the MOCO clustering logic.

Context

The clustering logic in MOCO is critical for maintaining data consistency across MySQL instances and preventing split-brain scenarios.

By adding these rules as an instruction set, we enable GitHub Copilot code review to automatically verify if new changes in clustering/* adhere to these invariants. This provides an automated safety net to catch potential violations early in the development cycle.

@arosh arosh force-pushed the clustering-agents.md branch from 301d699 to e910aa2 Compare February 25, 2026 05:22
@arosh arosh marked this pull request as ready for review February 25, 2026 05:24
Signed-off-by: sho-iizuka <sho-iizuka@cybozu.co.jp>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Copilot instruction set that documents the key safety/consistency invariants for MOCO’s clustering/ logic, intended to help prevent regressions that could lead to data loss or split-brain.

Changes:

  • Introduced .github/instructions/clustering.instructions.md describing primary/writability rules, switchover/failover sequencing, errant replica handling, and replica health criteria.
  • Scoped these invariants to changes under clustering/* via applyTo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/instructions/clustering.instructions.md Outdated
Comment thread .github/instructions/clustering.instructions.md
Comment thread .github/instructions/clustering.instructions.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: sho-iizuka <sho-iizuka@cybozu.co.jp>
@arosh arosh force-pushed the clustering-agents.md branch from 4f1317c to 9dc2f25 Compare March 31, 2026 08:54
@yamatcha yamatcha merged commit 3d4131c into main Apr 27, 2026
22 checks passed
@yamatcha yamatcha deleted the clustering-agents.md branch April 27, 2026 04:47
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.

3 participants