1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Hosted API drift
# Checks that the remote transport still conforms to the published hosted API
# spec (`tests/fixtures/hosted-openapi.json`). Runs ONLY when the vendored spec
# or the remote transport changes — never on unrelated engine work — and is
# deliberately NOT part of `make ci`, so a hosted-service change can't gate an
# OSS engine release. The drift test is `#[ignore]`d for that reason and run
# explicitly here.
#
# This surfaces on the refresh PR (which the refresh-hosted-openapi workflow
# opens when the spec changes): red means the client no longer matches the API —
# update the transport in `src/catalog/remote/` (the node and python bindings
# call through it, so fixing the Rust core covers all three).
on:
pull_request:
paths:
- "tests/fixtures/hosted-openapi.json"
- "src/catalog/remote/**"
- "tests/remote.rs"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
drift:
name: Remote transport ⇄ hosted API spec
runs-on: ubuntu-latest
steps:
# Full history so the base branch's fixture is available to diff against.
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Report-only changelog: when the vendored spec itself changed, grade the
# delta with oasdiff so the PR summary reads "N breaking / M additive"
# instead of raw JSON hunks. Never fails the job — by the time a refresh
# PR exists the service has already shipped the change; the conformance
# test below is the gate for "does the client still match".
- name: Summarize the spec delta (report-only)
if: github.event_name == 'pull_request'
run: |
set -euo pipefail
BASE_REF="origin/${{ github.base_ref }}"
if git diff --quiet "$BASE_REF"...HEAD -- tests/fixtures/hosted-openapi.json; then
echo "fixture unchanged in this PR — no spec delta to summarize"
exit 0
fi
VERSION=1.28.0
curl -fsSL "https://github.com/oasdiff/oasdiff/releases/download/v${VERSION}/oasdiff_${VERSION}_linux_amd64.tar.gz" | tar -xz oasdiff
git show "$BASE_REF:tests/fixtures/hosted-openapi.json" > /tmp/base-spec.json
{
echo "## Hosted API spec delta (base → PR)"
echo '```'
./oasdiff changelog /tmp/base-spec.json tests/fixtures/hosted-openapi.json || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# `--ignored` runs exactly the ignored drift test (kept out of `make ci`).
- run: cargo test --features remote --test remote -- --ignored