{
  "schema": "huanxi.upgrade-package.v1",
  "upgrade_kind": "schema",
  "source_release": "0.8.13.34",
  "target_release": "0.8.13.35",
  "source_schema": "0.8.2-runtime-tables.85",
  "target_schema": "0.8.2-runtime-tables.86",
  "forward_sql": "forward.sql",
  "rollback_sql": "rollback.sql",
  "forward_sha256": "7a130c068b99b70c4a3e709651d5aebc93076f36c5a07ab20ac09ff9f944f1c9",
  "rollback_sha256": "e6011d5ffbf195b0df63c5bde58777af15e31c231bdf6c07b9bc8c028a1ad954",
  "rollback_mode": "logical",
  "service_stop_required": true,
  "database_backup_required": true,
  "preserve_tables": [
    "employees",
    "projects",
    "assignments",
    "assignment_results",
    "runtime_conversation_messages",
    "input_commands",
    "skill_packages",
    "skill_versions",
    "skill_contribution_events"
  ],
  "append_only_tables": [],
  "notes": "Schema hop 0.8.13.34 -> 0.8.13.35, schema 0.8.2-runtime-tables.85 -> .86. Renumbered from the original .84->.85 draft after PR #1001 (sql-index-coverage) landed on .85 first; this hop now stacks on .85. Adds huanxi.capability_index: a persistent, REBUILDABLE vector cache for the hybrid capability (tool+skill) discovery retriever (short board 3). Before this, discovery doc vectors lived only in a per-process in-memory dict, re-embedded on every cold start / in every worker process (6-77s warm cost); the cache is shared across workers and survives restart. Keyed by (entry_id, corpus_digest) where corpus_digest is a sha256 over the entry corpus (name+description+content+keywords), so a code change to a tool description or a skill body mints a new digest and a stale vector is never served. tool and skill entries share this one index table; the retriever path was already unified so the index is too. pgvector is optional: the JSONB embedding column always persists the cache (linear cosine fallback), and when the vector type is present the schema mirrors it into embedding_vector + an HNSW index, matching the kb_chunks pattern. forward.sql is idempotent (IF NOT EXISTS) and advances the schema marker to .86; rollback DROPs the cache table (no authority data lost -- the retriever re-warms from code + the skill hub) and reverts the marker to .85. rollback_mode=logical. Runtime .py touched: new capability_index.py store + tool_retrieval.py cache integration + run_runtime.py wiring; no dashboard change (wheel-only refresh)."
}
