A column rename can leave application queries referring to a name that no longer exists. A migration changes the database, but the application still needs a compatible change.
SH-PSCBS is my experimental tool for connecting those two sides. It detects PostgreSQL schema differences and prepares code repair proposals for review.
Try the workflow
git clone https://github.com/iago511/Self-Healing-Polyglot-Schema-Code-Bifurcation-System.git sh-pscbs
cd sh-pscbs
docker compose -f compose.demo.yaml up --build --exit-code-from demo --attach demo
The demo renames a column, shows a SQL diff, runs pytest, and verifies an approved commit against a disposable local Git remote. Model responses are simulated, so no API key or Ollama installation is required for this example.
Why a graph?
Each detected change becomes an event. The workflow can need clarification, a correction, another validation attempt, or a human decision. LangGraph expresses those routes, while SQLite stores snapshots, event state, and decisions.
Analysis identifies schema changes and code evidence. Planning uses Groq with read-only tools. Correction uses Ollama in an isolated project copy. Validation checks integrity and syntax and runs pytest in a network-isolated Docker container. Review compares the plan, diff, and results.
Approval creates a commit on a separate branch only after the required checks. A separate publish command pushes that branch. The destination repository still needs review and merge.
Where it needs work
This is experimental and currently focuses on PostgreSQL and Python. The CLI uses Portuguese command names. A dropped column and an added column may indicate a rename, but that is an inference. Polling can miss short-lived changes. A green test suite only covers what the tests exercise.
Groq receives relevant code and context for planning and review; generation uses Ollama. Review that data flow before monitoring private projects.
Help shape the tool
The repository includes an MIT license, architecture and usage guides, and a contribution guide. Feedback on ambiguous migrations, repair evaluation, and the first-run experience would help. Try the demo and report the smallest example that reproduces a problem.

Top comments (0)