Skip to content

anthropic + anthropic_admin StackQL providers (monorepo factory)#1

Merged
jeffreyaven merged 8 commits into
mainfrom
claude/anthropic-stackql-providers-m8s5mg
Jul 8, 2026
Merged

anthropic + anthropic_admin StackQL providers (monorepo factory)#1
jeffreyaven merged 8 commits into
mainfrom
claude/anthropic-stackql-providers-m8s5mg

Conversation

@jeffreyaven

Copy link
Copy Markdown
Contributor

Masters TWO StackQL providers from one factory pipeline, per the work order and the binding rules in CLAUDE.md.

Surface

Provider Services Resources Methods Source
anthropic 12 26 104 (45 select-routed) official Stainless OpenAPI spec (hash d272f069e15d096063103c857fb8e2a7, vendored + drift-guarded)
anthropic_admin 6 11 27 (16 select-routed) hand-authored from the canonical platform docs .md reference pages

Spec coverage: 126 spec ops − 104 provider ops == exactly the documented 22-op exclusion list (2 SSE streams, 10 OAuth-only tunnels ops, 10 beta twins of GA ops) — mechanized as guard 1.

Guard results (all green, wired in CI)

  1. Spec-coverage diff: spec ops 126 − provider ops 104 == exclusions 22
  2. Select-shape consistency: all SELECT methods per resource project identical columns ✅
  3. Signature uniqueness: no (resource, verb) required-params clashes ✅
  4. No-polymorphism scan: zero anyOf/oneOf/allOf/additionalProperties in generated services ✅
  5. .stats.yml drift check: factory/locate.mjs vs pinned snapshot ✅
  6. Zero-column selects: every SELECT method projects ≥1 column ✅

Plus: regeneration is byte-idempotent from the committed CSVs + vendored spec (CI enforces with git diff --exit-code).

Test output

  • Meta routes (harness from stackql-provider-aws): anthropic 12/26/104 zero errors, every resource selectable · anthropic_admin 6/11/27 zero errors
  • Mock smoke (wire-contract-enforcing mock: 401 without x-api-key, 400 without anthropic-version, 400 on beta paths without the per-endpoint anthropic-beta flag; 2-page cursor lists): anthropic 13/13 (inference-as-SELECT with naive body fan-out, agents INSERT/RETURNING → SELECT → UPDATE → EXEC-archive lifecycle, pagination walk, after_id lists terminate) · anthropic_admin 20/20 (admin key-space rejection, invites + workspaces lifecycles, usage/cost/claude_code report pagination, "group_by[]" wire test, rate-limits model filter)
  • Live subsets gated on ANTHROPIC_API_KEY / ANTHROPIC_ADMIN_KEY (admin live is READ-ONLY)
  • All 23 anthropic EXEC methods + admin archive dispatch-verified on the wire

Empirical findings (pinned in CLAUDE.md)

  • All four admin open questions resolved on the mock: (a) ship $.data bucket rows (deep $.data[*].results[*] objectKey works but drops bucket timestamps); (b) array query params take one scalar value, bracketed identifiers must be DOUBLE-quoted (backticks are a parser error — corrects few-shot 5); (c) ending_at optional; (d) fast-mode beta header optional with no default
  • stackql v0.10.542 EXEC-prepare panic found + worked around: response schemas without an array-typed property SIGSEGV at prepare; bare-scalar responses fail to bind. factory/post-pass.mjs stamps a synthetic schema_override envelope on affected exec-only methods (19 total). Worth reporting upstream.
  • beta-flags table corrected from PyPI anthropic 0.116.0: files/skills/user_profiles carry their own flags, not managed-agents
  • provider-utils docgen Required-Params gap fixed: local postinstall patch + prepared upstream diff (factory/upstream/provider-utils-select-required-params.patch) — method tables now show model, messages, max_tokens etc. for SELECT-routed body methods

Microsites

Two Docusaurus 3.10 sites (anthropic-provider.stackql.io, anthropic-admin-provider.stackql.io), both yarn build clean, cross-linked auth docs, Netlify per-site base-directory config committed (no GitHub Pages). SQL samples scrubbed: auto-injected headers removed, bracketed/hyphenated identifiers double-quoted, samples are actually routable.

Note

A stray stackql-provider branch exists on the remote (created before the default-branch correction; the git proxy swallows branch deletions) — safe to delete in the UI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a


Generated by Claude Code

claude added 8 commits July 8, 2026 21:24
- factory/: locate (stats.yml drift check), download, pre-pass (3.1
  downlevel, header defaults, exclusions), service-map (12-service
  taxonomy), scrub-unions (post-normalize union collapse), post-pass
  (body binding, cursor pagination)
- beta-flags.yaml extracted from PyPI anthropic 0.116.0 (corrects the
  audit-time table for files/skills/user_profiles)
- messages service generated, loaded in stackql v0.10.542, meta routes
  + mock SELECTs green (inference-as-SELECT, naive body translate,
  $.data unwrap, header auto-injection all verified)
- spike findings recorded in CLAUDE.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
…hods

- factory/csv-review-bootstrap.mjs: one-time mapping review of all 104
  ops (resource splits, work_items rename, work_stats relocation,
  exec routing for lifecycle/multipart/JSONL, SELECT for inference)
- factory/guards.mjs: guards 1-4,6 (spec-coverage diff, select-shape
  consistency, signature uniqueness, no-polymorphism, zero-column
  selects) — all green; guard 5 is locate.mjs
- npm run build: locate->download->prepass->split->normalize+scrub->
  analyze->generate->post-pass->guards; regen verified byte-idempotent
- meta walk: SHOW/DESCRIBE clean on all 26 resources; every EXEC
  method name parse-tested (add/run/stop/poll/... all safe)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
- bin/: meta-route harness + server scripts (aws archetype); walk is
  green: 12 services / 26 resources / 104 methods, zero errors
- tests/mock/mock-server.cjs: wire-contract-enforcing mock (401 no key,
  400 no anthropic-version, 400 beta path without per-endpoint flag),
  2-page cursor agents list, after_id lists with populated last_id,
  stateful agents store; admin routes included for Phase 3
- tests/smoke.cjs + manifest.yaml + queries/: manifest-driven runner
  (aws smoke.py architecture, Node port) — 13/13 mock tests green
  incl. agents INSERT(RETURNING)/SELECT/UPDATE/EXEC-archive lifecycle,
  pagination walk, inference-as-SELECT; live subset gated on
  ANTHROPIC_API_KEY

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
- hand-authored per-service source specs transcribed from the canonical
  platform docs .md reference pages (organization/users/invites,
  workspaces/members/rate_limits, api_keys list-get-update only,
  usage_report messages+claude_code, cost_report, org rate_limits)
- all four admin open questions resolved empirically on the mock and
  pinned in CLAUDE.md: (a) $.data row shape (deep objectKey works but
  drops bucket timestamps), (b) array query params take one scalar,
  double-quoted identifiers, (c) ending_at optional, (d) fast-mode
  header optional with no default
- found + worked around stackql v0.10.542 EXEC prepare panic (response
  schemas without an array property SIGSEGV; bare-scalar responses fail
  to bind): post-pass stamps a synthetic schema_override envelope on
  exec-only methods; all 23 anthropic EXEC methods + admin archive
  dispatch-verified
- guards green (6 services / 11 resources / 27 methods); meta routes
  zero errors; mock smoke 20/20 (invites + workspaces lifecycles,
  report pagination walks, group_by wire test, rate limit filters);
  both trees byte-idempotent

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
- Docusaurus 3.10 (+@docusaurus/faster) sites for both providers,
  skeleton mirrored from stackql-provider-databricks; both yarn build
  clean with zero warnings
- docgen via provider-utils generate-docs-v2 with per-provider
  headerContent (auth docs, coverage/exclusion lists, cross-links
  between the two sites)
- factory/patch-provider-utils.mjs (postinstall): fixes the docgen
  Required-Params gap — SELECT-routed body-bearing methods now show
  body-required fields (model, messages, max_tokens) in method tables
  and produce routable SELECT samples; prepared upstream diff in
  factory/upstream/provider-utils-select-required-params.patch
- factory/scrub-docs.mjs: removes auto-injected header params from SQL
  samples and double-quotes hyphenated/bracketed identifiers (backticks
  are a stackql parser error — empirically corrected from the original
  guidance)
- netlify.toml per site (base-directory pattern, selective builds);
  root netlify.toml documents the two-site setup

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
- .github/workflows/ci.yml: drift check (guard 5), full regen with
  byte-idempotency enforcement (git diff --exit-code), guards 1-4+6 via
  the build scripts, meta routes + mock smoke on both providers, and
  both website builds
- READMEs: root, factory/, and per-provider

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
… quoting)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5qQSBivc7W458yqJG9i5a
@jeffreyaven
jeffreyaven merged commit c69aa1b into main Jul 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants