Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

ContractBridge: Let Local Gemma Repair API Drift Without Trusting It Blindly

Description and use

ContractBridge leverages Gemma to automatically detect and repair API contract drift, enabling clients to continue functioning without manual intervention.

Problem

An API provider releases a new version that changes routes, request fields, and response status values, breaking existing clients that have not been updated.

Outcome

ContractBridge automated the repetitive parts of repairing API drift while keeping human control over critical decisions. The temporary bridge restored functionality immediately, and a permanent patch was prepared for long‑term fix.

Workflow

  • 1. Verify client works against v1.
  • 2. Switch provider to v2 and observe failure.
  • 3. ContractBridge records the mismatch and starts repair workflow.
  • 4. Gemma proposes mapping rules for changed route, fields, arrays, and status value.
  • 5. ContractBridge runs 12 deterministic checks in a locked‑down container.
  • 6. Operator reviews and rejects the first candidate, requesting clarification on status change.
  • 7. Gemma revises mapping and passes checks again.
  • 8. Operator approves the repair, activating temporary bridge and generating permanent patch.
  • 9. Unchanged client retries request and succeeds through the bridge.

Evidence

Fixing this usually means comparing two contracts, writing a temporary adapter, testing it, patching the client, and remembering to remove the adapter later.

Source

Gemma suggests how the old and new contracts fit together. Regular code checks that suggestion, builds both fixes, and tests them.

Source

ContractBridge sits between an application and an API it depends on. Most of the time it simply passes requests through. When the provider stops matching the contract the client expects, it records the mismatch and starts a repair workflow.

Source

The same checkout then failed. The cart stayed intact, and the failed POST was not automatically replayed.

Source

Gemma ran locally and suggested six mapping rules for the changed route, fields, arrays, and status value. ContractBridge turned that suggestion into a candidate and ran 12 checks in a locked-down container before showing it to me.

Source

Once the revised mapping looked right, I approved it. ContractBridge activated the temporary bridge and prepared a permanent application patch.

Source

  • Record date: 2026-10-25T22:11:10.660Z