For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/index.md.
  • English
  • YEARNING V4 · AI AGENTIC SQL REVIEW PLATFORM
    PUBLIC BETA

    The AI Agentic
    SQL Review Platform.

    Autonomous metadata-probing AI SQL review paired with a scoped Database AI Assistant, frozen multi-stage approvals, in-process gh-ost, cross-engine rollback, and Top-SQL diagnostics.

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

    Yearning v4.0 is currently in Public Beta. Please evaluate in staging or test environments first and keep backups before any cutover. Share feedback on GitHub Issues →

    Agentic Probes & Rules
    5 tools · 48 rules
    Max SQL Batch
    100,000 stmts / 32 MiB
    Approval Chain
    1..N stages · 1..10 steps
    Rollback Capture
    100,000 rows in TX

    Yearning 4.0 Core Capabilities

    Rebuilt from scratch in Go and React 19 on PostgreSQL, uniting an autonomous Agentic SQL review engine, a Database AI Assistant, and deterministic production execution.

    GOVERNANCE1..N stages · 18 gh-ost params

    Frozen Multi-Stage Approvals & In-Process gh-ost

    Freezes rules, stages, actors, and snapshots at submission with zero admin override. Embeds Go gh-ost in-process (18 parameters, pt-osc retired) with exclusive datasource leases and result_unknown verification.

    Approval & gh-ost Tuning →
    RECOVERY0 Binlog/WAL · 100k rows

    Binlog-Free Cross-Engine Automatic Rollback

    Captures in-transaction DML before-images (up to 100k rows fail-closed) and reversible DDL/gh-ost schema snapshots across MySQL and PostgreSQL, encrypted at rest and derived into governed rollback orders.

    Rollback Protection Guide →
    DATA ACCESSServer Masking · SSE Lock

    Governed Read-Only Query & PII Masking

    Time-bounded Query Grants with read-only AST guards, server-side PII masking before rows leave the backend, 6h HMAC cursor pagination, controlled CSV/JSONL/XLSX export, and instant SSE revocation lock.

    Query Workspace Guide →
    OBSERVABILITY & AGENT6 Charts · SKILL.md

    Top-SQL Diagnostics & AI Agent Skill

    Read-only performance_schema / pg_stat_statements 6-chart overview with Brush drill-down and 4-section AI root-cause reports converting index DDL straight to orders, plus zero-dependency skills/yearning for Claude/Codex.

    Diagnostics & Agent Skill →

    Inspect the AI Agentic Review & Governance Pipeline Live

    AI agents autonomously probe metadata and synthesize evidence; deterministic governance controls every gate, approval, lease, and rollback. Switch all five scenarios below.

    Autonomous Probes · 48 Rules5 read-only probes · PlanHash bound · default cloud / san LAN tracks

    Before submission, the AI Agent autonomously calls 5 read-only database probes (tables, columns, indexes, stats, safe EXPLAIN) against 48 built-in rules and team knowledge, with automatic in-memory anonymization for cloud providers.

    1. 1
      AST Lexing & Dual Fingerprint
      Canonical + Dialect fingerprints collapse homologous statements into 1 group (up to 100k stmts / 1,000 groups)
    2. 2
      5 Autonomous Read-Only Metadata Probes
      AI Agent autonomously calls list_indexes + safe_explain to prove the WHERE column lacks an index (4.82M full scan)
    3. 3
      Built-In Rules + Custom Skill Verdict
      Evaluates 48 built-in rules, custom skills, and team knowledge; cloud track automatically runs in-memory anonymization
    4. 4
      Deterministic Gate Block & Restore
      Rule violation deterministically blocks as Critical (free LLM notes cap at Medium); UI restores real identifiers for authorized reviewers
    Developer Input SQLSQL
    UPDATE billing.orders
    SET amount_cents = 99900, remark = 'vip-promo-q4'
    WHERE customer_phone = '13800138000'
      AND status = 'pending';
    Dual Fingerprint + Read-Only Probes (Auto Cloud Anonymization)VERIFIED
    -- Step 1: Dual fingerprint collapses 1,240 homologous stmts -> 1 review group
    -- Step 2: AI Agent autonomous read-only metadata tool calls:
    -> get_table_schema(table_1)     => 14 cols, PK(id), est_rows = 4,820,000
    -> list_indexes(table_1)         => idx_status_created(status, created_at)
    -> safe_explain(UPDATE table_1)  => type=ALL, key=NULL, rows=4,820,000
    -- Step 3: Cloud default track strips literals/identifiers (AssertZeroLeak=PASS)
    2008 REVIEW_BLOCKED_BY_RISK

    Gate Blocked: billing.orders.customer_phone is unindexed and exceeds max_affect_rows threshold. Revise SQL and re-run precheck.

    Built for Daily DBA & Engineering Craft

    Rewritten from Vue to React 19, TypeScript, and shadcn/ui with real-time SSE state updates, watermarked SQL Reveal, and 6-chart Top-SQL diagnostics.

    Workbench & System Health
    /workspaceAuthentic Yearning v4 1440p UI capture (auto-switches with site theme and language)

    Five Database Families, One Governance Plane

    Strict separation between read-only review/query credentials and read-write execution credentials, sealed with AES-256-GCM AEAD and verified TLS.

    Database EngineModeAI PrecheckExecutionIn-Process gh-ostAuto RollbackGoverned QuerySQL Diagnostics
    MySQL 5.7 / 8.0Native MySQLYesYesNativeYesYesperformance_schema
    PostgreSQL 14 – 18Native PostgreSQLYesYesN/AYesYespg_stat_statements
    TiDBMySQL ModeYesYesN/AYesYesperformance_schema
    OceanBaseMySQL ModeYesYesN/AYesYesMySQL Digest
    PolarDBMySQL & PG ModesYesYesN/AYesYesNative Digest

    Stateless Go Monolith. AI-Agent Ready.

    Zero RPC sidecars and zero Pod-local state. Every API obeys OpenAPI v4, double-submit CSRF, Idempotency-Key, If-Match optimistic locks, and SSE realtime events. Connect Claude Code, Codex, or Antigravity via the zero-dependency yearning Skill without deploying an MCP server.

    Web UI / AgentReact 19 · SKILL.mdGo Control PlaneAST · Agentic AITarget ClustersMySQL · PG · TiDBPostgreSQL Meta3 Roles · AEAD KeyringAI Providersdefault vs san LANOutbox & SSEAudit · IM · Events
    skills/yearning/scripts/yearning_api.py
    export YEARNING_BASE_URL="http://localhost:8080"
    export YEARNING_USERNAME="admin"
    export YEARNING_PASSWORD_FILE="/path/to/password"
    
    # Discover granted change flows & run AI Agentic precheck
    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';"
    Zero dependencies (Python 3 stdlib)CSRF · Idempotency-Key · If-Match

    Enterprise Security & AI Guardrails Built Into the Runtime

    So security teams can safely adopt Agentic AI in production: enforced by Go runtime contracts rather than prompt conventions.

    Read Security & AI Trust Whitepaper →
    ZERO-LEAK PRIVACY

    Per-Request Anonymization & Local LAN Track

    Cloud providers strip literals/comments and anonymize identifiers in per-request memory with fail-closed AssertZeroLeak (2005/6003). Self-hosted LAN vLLM/Ollama run on an isolated san track that never falls back raw payloads to cloud.

    NON-INTRUSIVE AI

    Read-Only Metadata Only, Zero Execution Power

    AI Precheck uses 5 read-only metadata tools; the AI Assistant executes zero SQL (not even SELECT/EXPLAIN); Diagnostics never touches execution credentials or database parameters. AI can never approve or run changes.

    ANTI-HALLUCINATION

    Deterministic Rules, Medium Cap & AST Checks

    Built-in rules and runtime-invalid SQL block deterministically as Critical, while free LLM observations cap at Medium so hallucinations never block valid releases. Missing metadata stays partial, and assistant SQL must pass dialect AST verification (6004).

    DEFENSE IN DEPTH

    6-Purpose AEAD, Least Privilege & 90-Day Audit

    Six-purpose AES-256-GCM keyring with AAD binding, 3-role PostgreSQL metadata isolation, Argon2id + TTY-only admin reset, mandatory LDAPS/OIDC PKCE, watermarked SQL Reveal, 90-day append-only audit logs, and Distroless containers.

    Try v4 Public Beta in Three Minutes

    PUBLIC BETA

    Deploy on Docker Compose, standalone Linux binary, or Kubernetes in staging first, and share any feedback via GitHub Issues.

    git clone --single-branch --branch v4 https://github.com/cookieY/Yearning.git
    cd Yearning
    docker compose up -d
    # Open http://<host-ip>:8080  (admin / Yearning@2026!)