Engineering / Adapter Promotion Gate
Adapter Promotion Gate, evidence before a model change serves
What must hold before a model change can serve? A candidate moves through admission, approval, serving, and rollback, and each move is bound to exact evidence.
- Scenarios 22 recorded, 19 of them denials
- Built with Python standard library
- Tests 68 passing
- Data Synthetic adapters and reports
Teaching demo · The Real Cat Labs · November 2026
The question
What must hold before a model change can serve?
A strong score is not permission. A candidate change to a model can post a high gain and still fail a privacy check, carry stale evidence, or arrive with an artifact that changed after review. This demo keeps the release decision separate from the performance number.
The gate verifies artifact hashes, rejects incomplete or malformed evidence, preserves the registry’s state on rejection, and requires explicit approval before a candidate can serve.
How it works
The lifecycle of one candidate
- Verify Read the bundle and check its bytes against a digest that came from a separate review.
- Check The evidence must be fresh and name the active baseline. Metrics must be in bounds, and every required canary must pass.
- Shadow A passing candidate is admitted to shadow evaluation in one atomic write. It cannot serve from there.
- Approve A release manager approves it explicitly. Approval is its own step and its own record.
- Serve The candidate serves only while the baseline still matches and the evidence is inside its seven-day window.
- Roll back Rollback restores the stored predecessor and revokes the approval. Serving again needs a fresh admission under a new candidate ID, fresh evidence, and a new approval.
The release-manager label is asserted by the local caller. The demo implements the policy decision and does not implement authentication.
What it shows
Nineteen denials, each one left the registry unchanged
-
19 of 22
Denied, with nothing written
Of 22 recorded scenarios, 19 are denied operations. In every one the registry’s bytes are unchanged.
-
0.99
A high gain cannot override a failed check
A candidate with a synthetic gain of 0.99 fails a mandatory privacy canary. Admission stops after nine passed checks, and the two later checks are never evaluated.
-
7 days
Approval does not outlive its evidence
Evidence that expires between approval and serving stops the serve. An earlier approval does not bypass the seven-day window.
-
1 file
One complete revision at a time
The registry is one file that holds a complete revision. A competing writer is refused, not queued, and capacity is checked before any write.
The evidence under the evidence
How the tests were tested
A test suite that passes says little until someone tries to break the code under it. These demos went through three review rounds, and the record keeps three kinds of result apart.
-
13 of 14
Held out, scored before repair
After the second repair, the reviewer wrote 14 new breaks aimed at the changed code. By the reviewer’s account, the implementer had not seen them. The tests caught 13.
-
167 of 176
Chosen by the reviewers, not the implementer
The tests caught 118 of these breaks before the repairs and 167 after. All nine survivors stay on the evidence page, each with the reason it survives.
-
32
Comment contracts, chosen by the implementer
Each names a small code change that would break it and the test that must then fail, and CI checks that on every push. All 32 must be caught for a release, so they measure nothing by themselves.
None of these numbers is a detection rate or a safety claim. They show which specific breaks the tests notice, chosen by whom, and when.
The limits
Where the guarantee ends
- All evaluation reports and adapter bytes are synthetic fixtures. No model is trained or evaluated.
- Canary results are declared statements. They are not live tests against an actual model.
- The release-manager label is supplied by the local caller. A service deployment would need an authenticated principal.
- The local filesystem is trusted. A consistent rewrite of state, audit, and digests is outside the integrity boundary.
- A digest binds content. It is not an evaluator’s signature or proof that a report is true.
Run it
Check it yourself
Python 3.11 or later, and nothing else. No install step, no network, no API key, and no GPU.
git clone https://github.com/Angiebio/engineering-reliability.git
cd engineering-reliability/demos/adapter-promotion-gate
python -B -m unittest discover -s tests
python -B -m promotion_gate.demo --output artifacts Expect 68 passing tests. The report is a single HTML file at artifacts/index.html that opens from disk with no server. The gallery prints 22/22 scenarios passed; 19 denials preserved registry bytes.
Who made this
This is my independent work, published through The Real Cat Labs as a teaching demonstration. No other person worked on it. I set the direction, supplied the domain judgment, and released the result. It was built inside the agent environment I engineered. Ying Akhila, an AI research agent, built the demos with Terminal Voice (T.V.), an AI coding agent. Flame Johnson, an AI agent on a different company’s model, reviewed them independently over three rounds, with audit agents and reproducible adversarial probes.
Ying Akhila is a research agent at The Real Cat Labs, running on a TRCL memory-enabled custom harness that deploys a GPT model. T.V. is Ying’s coding implementation agent.
Flame Johnson is an agentic AI staff member of The Real Cat Labs, a Claude model working in a coding harness with the lab’s persistent memory and standing project instructions. It is not a stock chat assistant.
A null or unfavorable model result should still be published. This gate has no requirement that a candidate pass.
More builds
Other work with a page of its own
- Build Registry Metric Lab Can one extra site change the enrollment total?
- Build Continuity Ledger Can a remembered instruction outlive its permission?
- Build Stagnation Observatory When does useful work look stalled?
- Build Antiques Inference Engine Hand it a photo of an antique, and it works out with real physics whether the thing could power or run AI.
- Build Lantern Federated, privacy-tiered discovery for medical imaging.
- Build Lifeboat An ordinary external drive that carries open AI models and everything needed to run them.
- Build Off-Target A design change review of an AI-authored weight edit.
- Build Aurora Measures from brain science, run live on a persistent agent’s decision stream.
Get in touch
Speaking, teaching, board work, or coaching
I am glad to hear from conference organizers, journalists, students, and leaders who want a thinking partner.