Version Pinning & Model Lock

March 6, 2026 · View on GitHub

🧭 Quick Return to Map

You are in a sub-page of OpsDeploy.
To reorient, go back here:

Think of this page as a desk within a ward.
If you need the full triage and all prescriptions, return to the Emergency Room lobby.

Lock models, prompts, embeddings, rerankers, tokenizers, and analyzers so prod can’t drift.
Use this page to make “what ran” exactly the same as “what you tested,” and to detect any silent shift before a rollout.


Open these first


What to pin (and where)

LayerPin fieldsWhy it matters
LLM modelMODEL_VER, provider model ID, decoding paramsMinor provider updates shift ΔS/λ; force exact version and params.
Prompt packPROMPT_VER, header checksumHeader order changes λ; lock and audit.
EmbeddingEMBED_MODEL_VER, EMBED_DIM, NORM, metricAny mismatch breaks neighborhood semantics.
RerankerRERANK_CONF, model/ver, cutoffTop-k order flips alter ΔS and coverage.
Tokenizer/AnalyzerTOK_VER, ANALYZER_CONFCJK/diacritics/full/half width change token boundaries.
ChunkerCHUNK_SCHEMA_VER, overlap, windowAlters anchor alignment and traceability.
IndexINDEX_HASH, build time, doc schemaGuarantees the retriever sees the tested graph.
Tools/FunctionsTOOL_SCHEMA_VERJSON looseness raises ΔS and loop risk.

Acceptance targets

  • Prod = Staging for: MODEL_VER, PROMPT_VER, EMBED_MODEL_VER, EMBED_DIM, NORM, metric, RERANK_CONF, TOK_VER, ANALYZER_CONF, CHUNK_SCHEMA_VER, INDEX_HASH.
  • ΔS(question, retrieved) ≤ 0.45 and coverage ≥ 0.70 on gold set after pinning.
  • λ convergent across 3 paraphrases and 2 seeds with the pinned headers.
  • First call cold-start passes in ≤ 5 minutes.

60-second lock checklist

  1. Freeze versions in config
    Single source of truth (env or KV) for all fields above; deny deploy if any are unset.
  2. Emit version headers on every request
    Log and return: all pins + BUILD_ID and GIT_SHA. Refuse if missing.
  3. Index integrity
    Retriever must assert INDEX_HASH matches; otherwise hard-fail with fix tip.
  4. Semantic sanity
    Run 20–40 gold items; verify ΔS/coverage/λ targets before canary.

CI/CD gate (paste-ready)

# opsdeploy/version_lock.yml
checks:
  require_fields:
    - MODEL_VER
    - PROMPT_VER
    - EMBED_MODEL_VER
    - EMBED_DIM
    - NORM
    - metric
    - RERANK_CONF
    - TOK_VER
    - ANALYZER_CONF
    - CHUNK_SCHEMA_VER
    - INDEX_HASH
  assert_equal_envs:
    - { field: MODEL_VER, envs: [staging, prod] }
    - { field: PROMPT_VER, envs: [staging, prod] }
    - { field: EMBED_MODEL_VER, envs: [staging, prod] }
    - { field: INDEX_HASH, envs: [staging, prod] }
  deny_if_missing: true
  deny_if_changed_without_alias_swap: [INDEX_HASH]
decision:
  on_fail: block_rollout
  on_pass: proceed
artifacts:
  - logs/version_manifest.json
  - logs/index_hash.txt

Runtime header contract (client/server)

Client must send X-WFGY: MODEL_VER,PROMPT_VER,EMBED_MODEL_VER,EMBED_DIM,NORM,metric,RERANK_CONF,TOK_VER,ANALYZER_CONF,CHUNK_SCHEMA_VER,INDEX_HASH,BUILD_ID,GIT_SHA

Server must validate

  • All fields present.
  • Exact match to server’s pins.
  • If mismatch: return 409 + a JSON diff and links to fix pages.

Typical failure → exact fix


Version manifest example

{
  "MODEL_VER": "gpt-4o-2025-07-15",
  "PROMPT_VER": "p-2025.08.31-h1",
  "EMBED_MODEL_VER": "text-embedding-3-large",
  "EMBED_DIM": 3072,
  "NORM": "l2",
  "metric": "cosine",
  "RERANK_CONF": "bge-rerank-v2@top32",
  "TOK_VER": "tiktoken-2025.07",
  "ANALYZER_CONF": "icu-cjk-folding-v3",
  "CHUNK_SCHEMA_VER": "s128/o32",
  "INDEX_HASH": "a1d9f0...e7",
  "BUILD_ID": "2025.08.31.01",
  "GIT_SHA": "abcdef1"
}

Rollback note

If any pin drifts in prod, treat as outage. Block writes, flip to Blue/previous alias, then reopen with: blue_green_switchovers.md


🔗 Quick-Start Downloads (60 sec)

ToolLink3-Step Setup
WFGY 1.0 PDFEngine Paper1️⃣ Download · 2️⃣ Upload to your LLM · 3️⃣ Ask “Answer using WFGY + <your question>”
TXT OS (plain-text OS)TXTOS.txt1️⃣ Download · 2️⃣ Paste into any LLM chat · 3️⃣ Type “hello world” — OS boots instantly

Explore More

LayerPageWhat it’s for
⭐ ProofWFGY Recognition MapExternal citations, integrations, and ecosystem proof
⚙️ EngineWFGY 1.0Original PDF tension engine and early logic sketch (legacy reference)
⚙️ EngineWFGY 2.0Production tension kernel for RAG and agent systems
⚙️ EngineWFGY 3.0TXT based Singularity tension engine (131 S class set)
🗺️ MapProblem Map 1.0Flagship 16 problem RAG failure taxonomy and fix map
🗺️ MapProblem Map 2.0Global Debug Card for RAG and agent pipeline diagnosis
🗺️ MapProblem Map 3.0Global AI troubleshooting atlas and failure pattern map
🧰 AppTXT OS.txt semantic OS with fast bootstrap
🧰 AppBlah Blah BlahAbstract and paradox Q&A built on TXT OS
🧰 AppBlur Blur BlurText to image generation with semantic control
🏡 OnboardingStarter VillageGuided entry point for new users

If this repository helped, starring it improves discovery so more builders can find the docs and tools.
GitHub Repo stars