Skip to main content
← Back to list
01Issue
BugOpenExtensions
AssigneesNone

Relationships

#1344 apps sync/lookup fail with 'partial() cannot be used on object schemas containing refinements'

Opened by kitquiet · 7/22/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 refinements

This 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

  1. swamp extension pull @swamp/cloudflare/access
  2. Create a model instance with valid account_id and a scoped apiToken (Access: Apps and Policies, Edit) via vault expression.
  3. swamp model validate <name> --json — passes cleanly.
  4. swamp model method run <name> sync --json → immediate failure: .partial() cannot be used on object schemas containing refinements
  5. swamp model method run <name> lookup --json → same exact error.

Environment

  • @swamp/cloudflare/access version: 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
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

7/22/2026, 4:03:23 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.