fix: Paginate through all organization members in domain user backfill#826
Merged
Conversation
The auto-add domain users feature was only checking the first page of organization memberships from WorkOS (max 100). Organizations with more members would incorrectly show users as "available to add" when they were already members. Fixed by adding pagination loops that fetch all membership pages using listMetadata.after cursor, matching the pattern used elsewhere in the codebase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bokelley
added a commit
that referenced
this pull request
Apr 24, 2026
…#2889) (#2992) * feat(training-agent): dogfood @adcp/client 5.14 seller helpers (closes #2889) Adopts the five helper families shipped for seller authors in `@adcp/client` 5.11–5.14: - `wrapEnvelope` for sibling-field emission in the framework server's response adapters - `bridgeFromSessionStore` wires `comply_test_controller.seed_product` fixtures through `get_products` on sandbox requests (new behavior — closes a latent gap where seeded products never reached the buyer tool) - `mergeSeedProduct` replaces the shallow-spread overlay in `overlaySeededProducts` - `mcpAcceptHeaderMiddleware` replaces the inline Accept header + rawHeaders rewrite on `/mcp` and `/mcp-strict` - `adcpError()` + dispatcher `sanitizeAdcpErrorEnvelope` make `conflict-envelope.ts` and the response-body wrapper redundant — both deleted; a framework-path regression locks in that `recovery` is stripped from `IDEMPOTENCY_CONFLICT` envelopes at both transport layers Follow-ups filed as adcontextprotocol/adcp-client#824, #825, #826, #827 landed in 5.14 (closed), so the adoption is complete rather than partial. Deferred: migrating `comply_test_controller` off the `customTools` path to `registerTestController` for its auto-emitted capability block. Net `+183 / -459` — 276 lines of bespoke glue removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * revert: pin @adcp/client to 5.13.0, trim adoption to 5.13-safe helpers @adcp/client 5.14 regressed the storyboard runner — with 5.14 the training agent drops from 52/52 clean to 39/52 (confirmed against both this branch and main, identical behavior). Filed upstream as adcontextprotocol/adcp-client#866. For this PR, pin to 5.13.0 and narrow the adoption to what works there: `wrapEnvelope`, `mergeSeedProduct`, and a hand-rolled session- scoped `testController.getSeededProducts` callback (new behavior — seeded products now flow through `get_products`, closing a latent gap). Put back until the 5.14 bump resolves adcp-client#866: - inline Accept-header + rawHeaders rewrite on `/mcp` and `/mcp-strict` - `conflict-envelope.ts` + `wrapResponseForConflictRedaction` - response-wrapper regression test file Drop the framework-path regression test for `recovery`-absence on `IDEMPOTENCY_CONFLICT` — that path exists now only at the HTTP-layer redactor, which `dispatchTestRequest` doesn't exercise. The legacy `conflict-envelope.test.ts` covers the redactor's unit contract. Storyboards local verify: - legacy (TRAINING_AGENT_USE_FRAMEWORK=0): 52/52 clean, 380 passed, 0 failed - framework (=1): 51/52 clean, 390 passed, 1 known residual Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Test plan
🤖 Generated with Claude Code