Skip to main content

DriftScope

Runtime API drift + source blast-radius detector.

DriftScope complements OpenAPI diff tools by using observed JSON responses as the evidence source and mapping risky changes into consuming Python/JavaScript/TypeScript code.

Quick start

Python 3.10+. Runtime dependencies: none.

python -m pip install driftscope-runtime

python -m driftscope compare \
  --endpoint "GET /rate_limit" \
  --baseline examples/baseline.json \
  --current examples/current.json \
  --source-dir examples/app \
  --out out/report.json \
  --junit out/report.junit.xml \
  --sarif out/report.sarif.json \
  --fixture-out out/regression-fixture.json

High-severity drift returns exit code 2 for CI.

Probe a public JSON endpoint

python -m driftscope probe https://api.example.com/resource --out snapshots/current.json

Only HTTP(S) is allowed and responses are capped at 5 MB by default.

Benchmark

python -m driftscope benchmark benchmark/corpus.json --out benchmark/results.json

The corpus contains 50 minimal runtime fixtures mapped to officially documented GitHub REST API 2026 breaking changes/affected endpoints. It measures runtime detectability and source-impact mapping and includes a stale-spec counterfactual replay where the old spec is intentionally held unchanged while runtime payloads change. That replay demonstrates the no-spec/stale-spec coverage gap; it is not a claim about historical wall-clock detection timing. It does not claim the fixtures are archived production traffic.

What is implemented

  • runtime JSON structural fingerprints;
  • removed/type/nullability/presence drift;
  • bounded observed scalar-domain and numeric-range drift;
  • Python AST source usage mapping;
  • JS/TS property/destructuring usage mapping;
  • impacted-file and risk scoring;
  • deterministic SHA-256 report certificates;
  • generated regression-fixture manifests;
  • JSON/JUnit/SARIF output;
  • safe bounded HTTP JSON probe;
  • GitHub Actions CI;
  • 50-case provenance-backed benchmark.

Security

DriftScope performs no shell execution. The probe restricts schemes and response size. Source scanning is read-only and ignores common dependency/build directories.

Limits

  • Runtime sampling cannot prove behavior for unseen payload variants.
  • Source mapping is conservative static evidence, not a full call graph.
  • The included spec-only benchmark metadata is not an oasdiff run.
  • Wall-clock 'earlier than spec update' claims require archived runtime traffic and timestamped historical spec snapshots; this build does not invent those timestamps.

Metadata

Release files for driftscope-runtime 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for driftscope-runtime 0.2.1
File Size Uploaded
driftscope_runtime-0.2.1.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for driftscope-runtime 0.2.1
File Interpreter ABI Platform
driftscope_runtime-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / driftscope_runtime-0.2.1.tar.gz

Download URL driftscope_runtime-0.2.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
40a85bb8152c415c7eaa59a0b981029d01f678767d2e245320166e24a115a1d2
BLAKE2b-256 checksum
How to use checksums
ddfc747d2c0e5617c5ed12af6aaea24eb78b27bc705d115206b0aeb8963a3bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.

Transparency log

Release files / driftscope_runtime-0.2.1-py3-none-any.whl

Download URL driftscope_runtime-0.2.1-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1fd2bce7f744b9e075b594dd585980f5d109b25fc546e41361d5553ff8bb883
BLAKE2b-256 checksum
How to use checksums
4cd71714e689975d914fff798f29e87687d1a6a4bbc75ab6ca7b4b6cc07d3174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page