SiteKit

Repairing an Adapter

Record the broken workflow, compare against the old adapter, and ship a versioned fix.

Adapters are repaired through the same source-controlled path used to create them.

Detect

A pipeline fails loudly:

SchemaValidationError
  adapter: [email protected]
  operation: records.getMetrics
  path: metrics[0].value
  expected: number
  received: string

Or a scheduled live test fails:

sitekit test analytics_portal --live

Re-record

sitekit record analytics_portal --repair --scenario record-metrics

The repair recording is smaller than first onboarding. It targets the failed operation and captures enough traffic to compare old and new behavior.

Analyze Repair

sitekit analyze analytics_portal --repair

The LLM receives:

  • Old adapter IR.
  • Old schema snapshot.
  • Failing test output.
  • New redacted capture.
  • Generated client code.
  • Existing known facts.

It proposes an adapter patch. It does not ship the patch.

 schemas:
   Metric:
-    value: number
+    value: numberFromString

Validate

sitekit test analytics_portal --fixtures
sitekit test analytics_portal --live
sitekit generate analytics_portal --target typescript --target python

If public client behavior is compatible, bump patch:

sitekit version analytics_portal patch

If the public client contract changes, bump minor or major:

sitekit version analytics_portal minor

Publish Locally

npm install @local/[email protected]
pip install ./packages/analytics-portal-py

Repair produces a new adapter version. It never mutates a package silently under an existing version.

On this page