Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,33 @@ jobs:
- name: Node SDK conformance (stripe-node, octokit, twilio-node)
run: just conformance-node

- name: Conformance matrix freshness (CONFORMANCE.md)
- name: Generated files fresh (CONFORMANCE.md, README counts)
run: |
just conformance-matrix
if ! git diff --exit-code CONFORMANCE.md conformance/matrix.json; then
echo "::error::CONFORMANCE.md or conformance/matrix.json is stale — run 'just conformance-matrix' and commit"
just readme-counts
if ! git diff --exit-code CONFORMANCE.md conformance/matrix.json README.md; then
echo "::error::CONFORMANCE.md, conformance/matrix.json or README.md is stale — run 'just conformance-matrix readme-counts' and commit"
exit 1
fi

# The repo description quotes the adapter count; it went stale silently
# once (said 91 through 95). GITHUB_TOKEN cannot write repo metadata, so
# this job only fails loudly on drift after landing on main — the fix is
# `just repo-description` (needs an admin gh token locally).
repo-description:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Description count matches adapters/
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
want="$(find adapters -mindepth 2 -maxdepth 2 -name adapter.yaml | wc -l)"
desc="$(gh api repos/StuntAPI/stunt --jq .description)"
have="$(printf '%s' "$desc" | sed -E 's/^[^0-9]*([0-9]+).*/\1/')"
echo "repo has $want adapters; description says '$have'"
if [ "$have" != "$want" ]; then
echo "::error::repo description is stale — run 'just repo-description' (needs an admin token)"
exit 1
fi
48 changes: 30 additions & 18 deletions conformance/cmd/genmatrix/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,16 +943,22 @@ type matrixJSON struct {
}

type adapterJSON struct {
ID string `json:"id"`
APIName string `json:"api_name"`
APIVersion string `json:"api_version"`
Routes int `json:"routes"`
WSRoutes int `json:"ws_routes,omitempty"`
GraphQL bool `json:"graphql,omitempty"`
GRPCService string `json:"grpc_service,omitempty"`
Verification string `json:"verification"`
SDKs []sdkJSON `json:"sdks"`
Behaviors []string `json:"behaviors"`
ID string `json:"id"`
// Manifest identity for the website catalog sync (stunt-www
// scripts/sync-catalog.mjs): the catalog must derive these from this
// file, never re-parse adapter.yaml with a second parser.
DisplayName string `json:"display_name"`
AdapterVersion string `json:"adapter_version"`
RealHosts []string `json:"real_hosts"`
APIName string `json:"api_name"`
APIVersion string `json:"api_version"`
Routes int `json:"routes"`
WSRoutes int `json:"ws_routes,omitempty"`
GraphQL bool `json:"graphql,omitempty"`
GRPCService string `json:"grpc_service,omitempty"`
Verification string `json:"verification"`
SDKs []sdkJSON `json:"sdks"`
Behaviors []string `json:"behaviors"`
// VMBehaviors are verified by the engine-level Go suite (markers in
// adapters/<name>_style_test.go) — real handler execution, no SDK.
VMBehaviors []string `json:"vm_behaviors,omitempty"`
Expand Down Expand Up @@ -1033,14 +1039,20 @@ func renderJSON(adapters []*adapter.Adapter, checks []check, sdkVer map[string]s
m.Generated.Tiers.Boot++
}
row := adapterJSON{
ID: a.ID,
Routes: len(a.Endpoints),
WSRoutes: len(a.Websockets),
Verification: tier,
Behaviors: []string{},
VMBehaviors: vmBehav[a.ID],
Missing: gaps[a.ID].Missing,
Deviations: gaps[a.ID].Deviations,
ID: a.ID,
DisplayName: a.Name,
AdapterVersion: a.Version,
RealHosts: a.RealHosts,
Routes: len(a.Endpoints),
WSRoutes: len(a.Websockets),
Verification: tier,
Behaviors: []string{},
VMBehaviors: vmBehav[a.ID],
Missing: gaps[a.ID].Missing,
Deviations: gaps[a.ID].Deviations,
}
if row.RealHosts == nil {
row.RealHosts = []string{}
}
if row.Missing == nil {
row.Missing = []string{}
Expand Down
Loading
Loading