Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.

feat(conformance): schema keyword, credential and discovery conformance - #83

Merged
LazyGreed merged 4 commits into
mainfrom
feat/schema-keyword-conformance
Oct 4, 2026
Merged

LazyGreed merged 4 commits into
mainfrom
feat/schema-keyword-conformance

Conversation

@LazyGreed

@LazyGreed LazyGreed commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • SDK: each schema profile classifies every keyword group as preserve / normalize / consume / reject in one exhaustive match. Exposed via SchemaProfile::disposition and classified_keywords.
  • Adapter runner: shared probe fixture (schema-keywords.json); adapter profiles are schema_version 2 and declare schema_profile. Canonical request -> build_body -> exact wire.
  • Credential conformance: drives the compiled component under wasmtime against a scripted host (refresh, rotation, leases, failure classification). claude-code-oauth, antigravity-oauth.
  • Discovery conformance: shared account-model-source suite (ownership, endpoint, credential attachment, failure classification, exact discovered-model[]) plus per-plugin catalog cases. ai-studio, b-ai, antigravity-oauth.
  • CI: scripts/validate_conformance.py derives requirements from plugin.toml: provider_adapters -> adapter, credential_strategies -> credential, account_model_sources -> discovery. Missing profile, wrong name, or no crate test calling the runner fails. "No adapter" is derived, never flagged; host-adapter plugins are covered by Kinetix core adapter evidence, not fake tests.

Production fixes found by the suites

  • All discovery sources: HTTP status checked before UTF-8 (non-UTF-8 5xx/401 body was protocol_error); host retry_after preserved on transport failure.
  • Antigravity discovery: 401/403 -> credential_expired, 429 -> rate_limited, 4xx -> protocol_error, 5xx retryable (was all upstream_unavailable); empty catalog is an error; sorted by id.
  • Antigravity credential: empty refresh token no longer triggers an upstream call; retry_after preserved.

Known gaps

  • auth_flows (PKCE) has no shared suite yet; legacy model_sources (opencode-free) is not covered.
  • HTTP Retry-After response headers are ignored by OAuth error classification and discovery 429 handling.
  • Antigravity defaults to a 3600s TTL when expires_in is missing (declared in its credential profile, unchanged). It also keeps a separate refresh implementation for discovery, now covered by discovery cases.
  • Nested $id is rejected by ref-inlining profiles regardless of disposition, so $id is probed at the root.

Test plan

  • scripts/run-ci.sh passes locally; cargo clippy --workspace --all-targets clean

…ge from manifests

- sdk: per-profile exhaustive keyword Disposition (preserve/normalize/consume/reject)
- adapter-conformance: probe every classified keyword on the wire in both schema modes; replace schema_max_length with schema_profile (profile schema_version 2)
- ci: validate_conformance.py classifies plugins from plugin.toml and requires an adapter-conformance profile and runner test for any provider_adapters
…ed plugin

Shared credential-strategy fixtures run through the real component under a
scripted wasmtime host. credential_strategies now requires a
credential-conformance profile and a crate test that feeds it to the runner.

Antigravity fixes found by the suite: preserve host retry-after on refresh
transport failures, and treat an empty refresh_token as absent.
…mpiled plugin

Shared account-model-source suite drives each compiled component through
ownership, endpoint, credential attachment and failure classification, plus
exact discovered-model output for recorded provider catalogs. Declaring
account_model_sources now requires discovery-conformance.json and a crate test
calling the runner.

Fix status handling found by the suite: check HTTP status before UTF-8, keep
host retry_after on transport failure, and map Antigravity catalog failures
(401/403, 429, 5xx, 4xx), empty catalogs and ordering like the other sources.
@LazyGreed LazyGreed changed the title feat(conformance): classify schema keywords and derive adapter coverage from manifests feat(conformance): schema keyword, credential and discovery conformance Oct 4, 2026
@LazyGreed
LazyGreed merged commit 3f90a32 into main Oct 4, 2026
1 check passed
@LazyGreed
LazyGreed deleted the feat/schema-keyword-conformance branch October 4, 2026 08:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant