Yearning v4 — AI SQL Review & Database Change Governance

AI precheck, cryptographically frozen approvals, gh-ost online DDL and cross-engine rollback for every SQL change.

Source repo
cookieY/Yearning
Stars
★ 9k
Last updated
today
FARS reviewed
Nov 20, 2026
License
AGPL-3.0
Primary language
Go

At a glance

Works with
Universal · cross-platformCodex · Claude Code · OpenAI API
You'll need
DockerPostgreSQL 14–18Go 1.26+ (local build)Node.js 24.x + pnpm 10.x (local build)Shell / CLINetwork accessLocal filesystem
Typical use
A DBA team where developers file ALTER/DML tickets: configure a change_review flow per datasource so Staging and Production each have serial approval steps, and only designated executors can execute — the requester cannot self-deploy.
Main limitation
You must supply a PostgreSQL 14–18 metadata database and per-datasource read-only plus read-write credentials — this is infrastructure, not an importable library.
Website
v4.yearning.io ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-22

What does this agent do, and when should you use it?

Yearning v4 is an open-source (AGPL-3.0-or-later) SQL review and database change governance platform: a React 19 + shadcn/ui workspace served by a single Go modular monolith, with its metadata plane on PostgreSQL. Change orders are parsed with the TiDB SQL Parser or pg_query_go, collapsed into canonical fingerprints, and reviewed by an AI Review Agent that can only call five read-only tools; anything that fails is blocked by a non-bypassable Submission Gate. Passing orders are frozen server-side — stages, approvers, executors, SQL SHA-256 and the AI review snapshot — and no role, including admin, can edit, delegate or skip them. Execution runs DML in transactions, DDL directly, and MySQL ALTER TABLE through built-in in-process gh-ost, while capturing row before-images and schema snapshots as AES-256-GCM-encrypted rollback evidence. Around that core sit governed read-only query grants with server-side column masking, Top SQL diagnostics from performance_schema / pg_stat_statements, LDAP and OIDC SSO, plus an OpenAPI 3 spec, an SSE event stream and a SKILL.md agent skill for Claude Code and Codex CLI.

Each submitted SQL batch is lexed by the TiDB SQL Parser (MySQL-compatible engines) or pg_query_go (PostgreSQL), stripped of literals and comments, and reduced to Canonical and Dialect fingerprints so homologous statements collapse into groups — up to 100,000 statements / 32 MiB and 1,000 groups per order — with only one anonymized representative reviewed per group. The AI Review Agent is limited to five read-only tools — check_syntax, describe_table, list_indexes, table_stats and safe_explain — which read real schema metadata and execution plans without mutating data; the default track tokenizes identifiers (schema_1, table_1, column_1) before calling cloud OpenAI-compatible APIs, while the san track sends raw SQL to LAN vLLM/Ollama endpoints behind an addrguard SSRF guard. Approved orders become immutable snapshots (1..N serial datasource stages, 1..10 approval steps per stage, execution actors, SQL SHA-256, AI review snapshot), executed under a single-datasource lease: DML in a transaction, DDL directly, and MySQL ALTER TABLE through built-in in-process gh-ost with 18 tunable parameters and live copy progress. During execution it captures row before-images (up to 100,000 rows per statement and per order) and pre/post schema metadata, storing encrypted AES-256-GCM rollback evidence; a one-click Rollback Order re-enters the same AI precheck and approval path. On the read side, query_access flows issue time-bounded read-only grants enforced by a strict read-only AST guard, with server-side sensitive column masking, HMAC-signed streaming cursors and governed XLSX/CSV/JSONL export; /admin/diagnostics reads performance_schema or pg_stat_statements into six overview charts plus a four-section AI diagnosis. Everything is exposed over /api/v4/* with an OpenAPI 3 spec and the GET /api/v4/events/stream SSE stream, with transactional-outbox notifications to Email, DingTalk, Feishu and Slack and 90-day append-only audit logs.

  1. A DBA team where developers file ALTER/DML tickets: configure a change_review flow per datasource so Staging and Production each have serial approval steps, and only designated executors can execute — the requester cannot self-deploy.
  2. A regulated team that cannot ship raw SQL to a public LLM: run the san track against an internal vLLM/Ollama endpoint so precheck traffic never leaves the network.
  3. Analysts needing occasional production reads: request a query_access grant, get masked PII columns and streaming exports for a bounded window, and have the session revoked instantly over SSE.
  4. A platform team wiring database changes into CI/CD: generate a typed client from api/openapi/yearning-v4.yaml and drive precheck, submit, approve and execute from the pipeline under the same RBAC.
  5. A developer on Claude Code or Codex CLI: install skills/yearning/SKILL.md with the stdlib Python helper to run prechecks and governed SELECTs without a local yearning binary.
  6. An existing Yearning v3 deployment: use the versioned offline yearning migrate workflow with dry-run verification to move onto the v4 PostgreSQL metadata plane.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • docker compose up -d
Environment variables
YEARNING_ADMIN_PASSWORD YEARNING_BASE_URL
Config files
control-plane.yaml migration-workloads.yaml network-policy.yaml api/openapi/yearning-v4.yaml
Runtime
Go 1.26+ · Node.js 24
Install notes cover
Docker

How do you install or deploy this agent?

The README's own quickstart is Docker Compose: clone the v4 branch and start the bundled stack, which brings up PostgreSQL 18, generates internal TLS certificates and an AES-256-GCM keyring, and applies schema migrations automatically.

git clone --single-branch --branch v4 https://github.com/cookieY/Yearning.git
cd Yearning
docker compose up -d

Then open http://<your-host-ip>:8080. The default username is admin and the default password is Yearning@2026!; set YEARNING_ADMIN_PASSWORD (minimum 12 characters) before first boot to override it. For production, put the service behind an HTTPS reverse proxy, set YEARNING_SESSION_SECURE=true, and apply the three-role PostgreSQL grants in db/roles/grants.sql. Never run docker compose down -v during an upgrade — it deletes the yearning_app_secrets volume that holds the AEAD keyring.

Hardened Kubernetes manifests ship under backend/deploy/k8s/: control-plane.yaml, migration-workloads.yaml and network-policy.yaml.

Local development needs Go 1.26+, Node.js 24.x with pnpm 10.x, and PostgreSQL 14–18 for full server execution:

make backend-build
make backend-test
make frontend-install
make frontend-build
make frontend-test
make docker-build

How do you use this agent?

Register at least one datasource in the admin workspace with separated read-only (review/query) and read-write (execution) credentials, then define a change_review flow with its stages, approval steps and execution actors. AI precheck additionally needs a model provider (cloud OpenAI-compatible API or local vLLM/Ollama) and a global daily cost budget. For scripts and coding agents, the bundled zero-dependency Python helper handles session cookies, X-CSRF-Token, Idempotency-Key, If-Match and audited SQL reveals:

export YEARNING_BASE_URL="http://localhost:8080"
export YEARNING_USERNAME="admin"
export YEARNING_PASSWORD_FILE="/path/to/password"

python3 skills/yearning/scripts/yearning_api.py flows
python3 skills/yearning/scripts/yearning_api.py precheck \
  --flow-id <flow_id> \
  --sql "ALTER TABLE demo.users ADD COLUMN status VARCHAR(32) NOT NULL DEFAULT 'active';"

Run a governed read-only query, with masking applied server-side:

python3 skills/yearning/scripts/yearning_api.py query \
  --datasource-id <datasource_id> \
  --schema-name app \
  --sql "SELECT id, email, created_at FROM users LIMIT 20"

Beyond the helper, generate a client from api/openapi/yearning-v4.yaml and subscribe to GET /api/v4/events/stream for user-scoped io.yearning.v4.* SSE events.

What are this agent's strengths and limitations?

Pros
  • Zero-leak AI precheck: the cloud default track strips literals and tokenizes identifiers in memory (schema_1, table_1, column_1) with fail-closed assertions, while the san track keeps raw SQL on the internal LAN — both behind the same Submission Gate.
  • Submission-time freezing: rules, stages, datasources, approvers, executors, the SQL SHA-256 and the AI review snapshot are fixed server-side, and even admin cannot reassign or skip, which gives a defensible audit trail.
  • Rollback without binlog/WAL: in-transaction row before-image capture plus DDL schema snapshots, and the generated Rollback Order itself passes AI precheck and approval instead of bypassing governance.
  • Built-in in-process gh-ost runs MySQL online DDL with 18 tunable safety parameters and live table-copy progress — no external binary to operate.
  • Automation surface is real: OpenAPI 3 spec, SSE event stream, a SKILL.md agent skill and a stdlib-only Python helper let CI pipelines and coding agents drive /api/v4/* under the same RBAC.
  • Clean runtime boundary: stateless Go modular monolith on a PostgreSQL metadata plane, distroless non-root read-only-rootfs images, with Kubernetes manifests and an isolated migration Job.
Limitations
  • You must supply a PostgreSQL 14–18 metadata database and per-datasource read-only plus read-write credentials — this is infrastructure, not an importable library.
  • AI precheck and the AI assistant depend on an external model provider (cloud OpenAI-compatible API or self-hosted vLLM/Ollama), so review quality and cost track whatever model you bring.
  • AGPL-3.0-or-later with the Section 13 network clause; proprietary modifications require a separate commercial licence.
  • The governance model is deliberately rigid (serial 1..N stages, 1..10 approval steps, immutable after submission), which can feel heavy for teams with ad-hoc change habits.
  • Engine coverage stops at MySQL, PostgreSQL, TiDB, OceanBase and PolarDB, and in-process gh-ost is MySQL-only.
  • v4 is a ground-up rebuild of v3: upgrades go through a versioned offline migration workflow rather than an in-place update.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Yearning v4 — AI SQL Review & Database Change Governance This agent 51 · Major gaps — ★ 9k today Go Codex · Claude Code · OpenAI API
AgenticOS Team Agent Workspace 70 · Some gaps Self-hosted serviceFree + model costs ★ 719 today Python OpenAI API · Claude API
Hector Agent Runtime 65 · Some gaps CLIFree + model costs ★ 60 6mo ago Go OpenAI API · Claude API
Carbon Manufacturing Operations 60 · Some gaps Hosted serviceFreemium ★ 2.9k 1d ago TypeScript —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
51/ 100 5-point scale 2.6 / 5
Trust 17/29
Reliability 6/14
Adaptability 10/18
Convention 8/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

SKILL.md requires resolving flow/datasource/schema before precheck/query and stopping to ask the user when multiple candidates exist; README describes read-only tools, AES-256-GCM encryption, audited reveals, SSRF guards and rollback orders — a fairly complete design. However dependency security rests only on README claims with no go.mod/lockfile or scan evidence (deducted); source attribution is weakened because code imports github.com/cookieY/YearningX while the repo is cookieY/Yearning, and the publisher is unverified (deducted).

Reliability6 / 14 · 2.1/5

main.go returns clear errors and exit codes for missing subcommands, config errors and keyring load failures, and restoreprobe/seedprobe emit explicit assertion failures — failure messages are solid. But SKILL.md is truncated at '--reveal-s', leaving an incomplete example, and dependency availability is only asserted in README (Go 1.26/React 19) with no manifest shown (deducted).

Adaptability10 / 18 · 2.8/5

SKILL.md's description and triggers are clear and scoped to Yearning platform API interaction, with explicit capability boundaries (read-only queries, no direct SQL execution, must go through approval). Environment fit covers only the HTTP API and a Python3 stdlib helper; no guidance for non-Yearning or offline scenarios, and examples are truncated (deducted).

Convention8 / 18 · 2.2/5

README is well structured with TOC, install (Docker/K8s/migration), database matrix and full AGPL-3.0 license. But there is no CHANGELOG/versioning note, examples and FAQ are limited, known limitations are only scattered (e.g. gh-ost MySQL-only), maintenance responsibility points only to an email and Discussions, and the publisher is unverified (deducted).

Effectiveness7 / 13 · 2.7/5

SKILL.md offers directly callable CLI commands and an OpenAPI spec, giving good output usability, and clear marginal value for database change governance. On cost/benefit, README is heavy on marketing prose and screenshots while executable examples are limited and truncated (deducted).

Verifiability3 / 8 · 1.9/5

Most README capability claims (zero-leak, frozen approvals, cross-engine rollback) lack references to specific code or tests; restoreprobe/seedprobe provide some verifiable crypto assertions, but overall claim-to-evidence mapping is weak and fact/inference separation is insufficient (deducted).

Risks and how to mitigate them
  • SKILL.md is truncated at '--reveal-s'; the actual command may be incomplete — verify against the full script before use.
  • Code imports github.com/cookieY/YearningX while the repo is cookieY/Yearning; confirm publisher provenance and build consistency.
  • Many README security and governance claims lack references to specific code or tests; static review cannot verify their real implementation.
  • A default admin password and docker compose deployment example are present; in production override the password and enable HTTPS and secure sessions per README.
  • Dependency security and version compatibility (Go 1.26, React 19, etc.) are only asserted in README with no manifest or vulnerability-scan evidence.
Evidence confidence: Low Reviewed Nov 20, 2026 Reviewed revision 67cbac7af573
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/yearning.svg)](https://followagents.com/en/agents/yearning)
<a href="https://followagents.com/en/agents/yearning"><img src="https://followagents.com/badge/yearning.svg" alt="FARS review"></a>

FAQ

Is Yearning v4 — AI SQL Review & Database Change Governance open source?
Yes. The source code is on GitHub (cookieY/Yearning) under the AGPL-3.0 licence. AGPL-3.0 is a copyleft licence that also covers network use: if you run a modified version as a service, you must offer its source to users.
Is Yearning v4 — AI SQL Review & Database Change Governance safe to use?
FollowAgents' FARS review (Nov 20, 2026) scored Yearning v4 — AI SQL Review & Database Change Governance 17/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Yearning v4 — AI SQL Review & Database Change Governance still maintained?
Yes. The latest commit on GitHub is from 2026-11-22, within the last 30 days.
Who makes Yearning v4 — AI SQL Review & Database Change Governance?
Yearning v4 — AI SQL Review & Database Change Governance is published on GitHub by the account cookieY. FollowAgents has not verified which person or company is behind that account.
What is Yearning v4 — AI SQL Review & Database Change Governance's official website?
The project's GitHub repository lists https://v4.yearning.io/ as its website. That link is set by the repository owner; the source code itself is on GitHub (cookieY/Yearning).
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts