Relationships
#1344 apps sync/lookup fail with 'partial() cannot be used on object schemas containing refinements'
Opened by kitquiet · 7/22/2026· Shipped 7/23/2026
Description
Both the sync and lookup methods on @swamp/cloudflare/access/apps fail
immediately with the same error, before making any observable progress:
.partial() cannot be used on object schemas containing refinementsThis is a Zod error, not a Cloudflare API error — it happens before any HTTP
call would plausibly complete (instant failure, no partial data written).
Points to an internal schema helper calling .partial() on a Zod object
schema that has .refine()/.superRefine() applied somewhere in the apps
model's schema definition — Zod disallows .partial() on refined schemas by
design, so this looks like a bug in how the model's diff/sync logic
constructs its internal schema, not a transient API issue.
Reproduction
swamp extension pull @swamp/cloudflare/access- Create a model instance with valid
account_idand a scopedapiToken(Access: Apps and Policies, Edit) via vault expression. swamp model validate <name> --json— passes cleanly.swamp model method run <name> sync --json→ immediate failure:.partial() cannot be used on object schemas containing refinementsswamp model method run <name> lookup --json→ same exact error.
Environment
@swamp/cloudflare/accessversion: 2026.07.21.1 (latest at time of filing)- swamp CLI version: 20260722.020746.0-sha.5d00afa2
Impact
Both discovery-oriented methods (sync, lookup) are completely unusable —
there's no way to enumerate or import existing Access applications into swamp
state via this model type today. create/get/adopt/update/delete
weren't tested here (this was blocking a read-only discovery step before any
mutation), so it's possible only the methods sharing this particular
diff/schema code path are affected.
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/cloudflare/access@2026.07.21.1 - swamp:
20260722.020746.0-sha.5d00afa2 - OS:
linux(x86_64) - Deno:
2.8.3 - Shell:
/bin/bash
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.