Skip to content

Add shared WorkOS Vault test client#482

Merged
RhysSullivan merged 2 commits intomainfrom
workos-vault-test-client
May 4, 2026
Merged

Add shared WorkOS Vault test client#482
RhysSullivan merged 2 commits intomainfrom
workos-vault-test-client

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Summary

  • Extracts the in-memory makeFakeVaultClient previously inlined in apps/cloud/src/services/__test-harness__/api-harness.ts into a published subpath @executor-js/plugin-workos-vault/testing (makeTestWorkOSVaultClient).
  • Matches the current Effect-shaped WorkOSVaultClient interface (post Effect v4 migration) and ships tagged errors (TestWorkOSVaultNotFoundError / Conflict / InvalidRequest) carrying numeric status so the existing isStatusError checks in secret-store.ts route 404 / 409 / 400 through the same paths a real WorkOS SDK rejection would.
  • Adds optional knobs useful for exercising the secret store: conflictOnNextSecretUpdate, rejectNamesWithColon, rejectReadNamesLongerThan.
  • Wires the new entry into package.json exports (and publishConfig.exports) plus tsup.config.ts so the subpath is consumable both inside the workspace and once published.
  • Updates api-harness.ts and mcp-session.e2e.node.test.ts to consume the new subpath; deletes the inlined fake.

This is a re-cut of #424 against current main. The mcp.ts audience-fallback removal from that PR is dropped — it already landed via #429 — and the workos-vault.contract.test.ts is out of scope for this extraction.

Test plan

  • bun run --cwd packages/plugins/workos-vault typecheck
  • bun run --cwd apps/cloud typecheck
  • bun run --cwd packages/plugins/workos-vault build
  • bun run --cwd packages/plugins/workos-vault test (11/11)
  • bun run --cwd apps/cloud test:node (12 files, 68/68)
  • bun run lint

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing f7e010e Commit Preview URL

Branch Preview URL
May 04 2026, 03:19 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud f7e010e May 04 2026, 03:20 AM

Extract the in-memory `WorkOSVaultClient` previously inlined in
`apps/cloud/.../api-harness.ts` into a published subpath
`@executor-js/plugin-workos-vault/testing` so other apps and downstream
consumers can stand up vault-backed tests without copying the fake.

`makeTestWorkOSVaultClient` matches the current Effect-shaped client
surface (post v4 migration) and adds optional knobs for exercising
secret-store retry paths: `conflictOnNextSecretUpdate`,
`rejectNamesWithColon`, and `rejectReadNamesLongerThan`. Errors are
tagged (`TestWorkOSVaultNotFoundError`/`Conflict`/`InvalidRequest`) and
carry numeric `status` so the production `isStatusError` checks in
`secret-store.ts` route 404/409/400 through the same paths the real
SDK exercises.

Re-cut from #424 against current `main`; the `mcp.ts` and contract test
pieces from that PR are intentionally dropped (the audience-fallback
removal landed via #429 and the contract test is out of scope for this
extraction).
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@482

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@482

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@482

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@482

@executor-js/storage-core

npm i https://pkg.pr.new/@executor-js/storage-core@482

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@482

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@482

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@482

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@482

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@482

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@482

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@482

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@482

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@482

executor

npm i https://pkg.pr.new/executor@482

commit: f7e010e

@RhysSullivan RhysSullivan force-pushed the workos-vault-test-client branch from 9255434 to f7e010e Compare May 4, 2026 03:18
@RhysSullivan RhysSullivan merged commit 88b493c into main May 4, 2026
9 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.

1 participant