feat(ci): endpoint-audit gate (client vs 1.29.0 server spec + test coverage)#216
Open
VascoSch92 wants to merge 1 commit into
Open
feat(ci): endpoint-audit gate (client vs 1.29.0 server spec + test coverage)#216VascoSch92 wants to merge 1 commit into
VascoSch92 wants to merge 1 commit into
Conversation
Adds scripts/endpoint-audit.mjs which diffs the client's HTTP surface against the agent-server OpenAPI spec (live from the running container, or the committed specs/agent-server.openapi.json fallback) and reports: - mismatch: client calls an endpoint the server does not expose (gated) - missing API: server exposes an endpoint the client does not implement Runs as a release gate in release.yml (boots the 1.29.0 image for the live spec). Today's 3 known drifts (cloud-proxy, generate_title, skills /update -> /refresh) are baselined in endpoint-audit.config.json so the gate fails only on new drift. Run locally with: npm run audit:endpoints
a63b449 to
a47c7e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #214 (agent-server image → 1.29.0).
What
Adds an endpoint-audit gate that reconciles the client's HTTP surface against the agent-server OpenAPI spec and against test coverage, reporting four classes of drift:
How
/openapi.json, fetched live from the running container (committedspecs/agent-server.openapi.jsonfor 1.29.0 is the offline fallback). So the audited surface tracks the server version automatically.HttpClientappends${METHOD} ${pathname}to$OH_AUDIT_OUTwhen set (test/CI only — no-op and zero cost in prod). No grep heuristics.release.yml(release gate) andintegration-tests.yml(every PR/push, against the live 1.29.0 server).Gating (ratchet)
Today's 3 known drifts against 1.29.0 are baselined in
endpoint-audit.config.jsonso the gate is green now and fails only on new drift:POST /api/cloud-proxy— dropped server-sidePOST /api/conversations/{id}/generate_title— dropped server-sidePOST /api/skills/installed/{name}/update— server now exposes…/refresh(The ACP
/api/acp/*drift is already resolved by #214.) Coverage gaps are report-only by default (gate.missingUnit/Integ: false) — flip totrueto enforce later.Try it
npm run audit:endpoints # unit coverage + report (uses committed spec offline)Files
scripts/endpoint-audit.mjs— the analyzerendpoint-audit.config.json— specs, external-backend prefixes, allowlists, gate flagsspecs/agent-server.openapi.json— 1.29.0 spec (offline fallback)src/client/http-client.ts— runtime recorder hookpackage.json—audit:unit/audit:integration/audit:report/audit:endpoints.github/workflows/{release,integration-tests}.yml— wiring