# chunks_content

c0: pnpm run api:test
c3: command
c5: 2026-08-03T13:06:29.679833535+00:00
c1:
  > press-zone-core@ api:test /home/user/builds/press-zone-core-d6fe958f21cb
  > pnpm --filter @press-zone/core-api run test
  > @press-zone/core-api@0.0.4 test /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
  > vitest run src
   RUN  v3.2.7 /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
   ✓ src/routes/plugin.test.ts (19 tests) 21967ms
     ✓ createPluginRoute > debits credits once and returns downstream data on the happy path  1547ms
     ✓ createPluginRoute > returns 402 without recording a debit when credits are insufficient  1249ms
     ✓ createPluginRoute > retains a charged intent as pending when downstream execution is uncertain  1252ms
     ✓ createPluginRoute > never expires a charged pending intent into another debit or execution  1153ms
     ✓ createPluginRoute > binds the account before access runs and never debits when access blocks the request  1137ms
     ✓ createPluginRoute > requires a client idempotency key before charging or executing  1204ms
     ✓ createPluginRoute > rejects an oversized client idempotency key before charging or executing  1177ms
     ✓ createPluginRoute > rejects an oversized request body before charging or executing  1228ms
     ✓ createPluginRoute > replays a persisted result without another debit or execution  1139ms
     ✓ createPluginRoute > replays the same request when its host changes between retries  1214ms
     ✓ createPluginRoute > scopes a reused client key to its billing period  1053ms
     ✓ createPluginRoute > rejects reusing an idempotency key for a different request payload  1048ms
     ✓ createPluginRoute > replays a persisted BigInt result with the same JSON response  1031ms
     ✓ createPluginRoute > reconciles an uncertain result without executing downstream work again  990ms
     ✓ createPluginRoute > keeps a pending intent when reconciliation returns a different request hash  1032ms
     ✓ createPluginRoute > replays one persisted reconciliation result when retries race  1125ms
     ✓ createPluginRoute > does not let a late execution writer overwrite a reconciled result  1170ms
     ✓ createPluginRoute > replays reconciliation when late execution becomes uncertain after settlement  1142ms
     ✓ createPluginRoute > exposes the requireAuth -> bindAccount -> requirePluginAccess guard chain for mounting  1070ms
   ✓ src/routes/oauth.test.ts (16 tests) 17357ms
     ✓ oauthRoute > returns an authorization code envelope from /oauth/authorize  1048ms
     ✓ oauthRoute > exchanges a code, returns a bearer token, and stores a site credential link  1080ms
     ✓ oauthRoute > returns a 400 OAUTH_INVALID envelope when the PKCE verifier does not match  1039ms
     ✓ oauthRoute > rejects a token exchange whose redirect_uri differs from the authorization request  1119ms
     ✓ oauthRoute > rejects a token exchange that omits redirect_uri  1205ms
     ✓ oauthRoute > rejects authorization without an authenticated principal  1009ms
     ✓ oauthRoute > rejects a cross-account account_id assertion without creating credentials  1014ms
     ✓ oauthRoute > rejects exchange after the bound account becomes inactive  1016ms
     ✓ oauthRoute > rejects an unbound or tampered code instead of falling back to account_id  1049ms
     ✓ oauthRoute > rejects oversized token bodies with a stable OAuth error envelope  1163ms
     ✓ oauthRoute > rejects multipart token bodies  1310ms
     ✓ oauthRoute > rejects duplicate JSON fields  1109ms
     ✓ oauthRoute > rejects duplicate form fields  1052ms
     ✓ oauthRoute > rejects malformed UTF-8 in form bodies  1047ms
     ✓ oauthRoute > rejects token bodies over the field-count limit  1069ms
     ✓ oauthRoute > rejects token fields over the per-field byte limit  1024ms
   ✓ src/index.test.ts (11 tests) 8160ms
     ✓ createApp integration mounts > mounts public and authenticated groups with the required auth boundaries  993ms
     ✓ listStaffAccounts > filters account summaries and returns their subscription state within the requested limit  976ms
     ✓ reserveRefund > derives durable reservation facts from the settlement instead of a clien
  [truncated]


c0: pnpm run api:integration
c3: command
c5: 2026-08-03T13:06:38.938380642+00:00
c1:
  > press-zone-core@ api:integration /home/user/builds/press-zone-core-d6fe958f21cb
  > pnpm --filter @press-zone/core-api run integration
  > @press-zone/core-api@0.0.4 integration /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
  > vitest run tests/integration
   RUN  v3.2.7 /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
   ✓ tests/integration/webhook-idempotency.test.ts (1 test) 1382ms
     ✓ HTTP integration: webhook idempotency flow > turns a double-delivered settlement into one wallet seed, one invoice, and one ledger entry  1382ms
   ✓ tests/integration/staff-refund.test.ts (1 test) 990ms
     ✓ HTTP integration: staff refund flow > refunds through the mounted app path and returns a zeroed settlement wallet  990ms
   ✓ tests/integration/metered-debit.test.ts (3 tests) 2961ms
     ✓ HTTP integration: metered debit flow > mounts the metered endpoint at the documented API path  980ms
     ✓ HTTP integration: metered debit flow > persists a same-key result and debits or executes only once across HTTP retries  976ms
     ✓ HTTP integration: metered debit flow > rejects a same-key retry with a different request payload  1004ms
   ✓ tests/integration/connect.test.ts (1 test) 1021ms
     ✓ HTTP integration: connect flow > authorizes and exchanges a token through the mounted oauth app path  1020ms
   ✓ tests/integration/subscribe.test.ts (1 test) 1054ms
     ✓ HTTP integration: subscribe flow > creates the subscription, grants the tier, and seeds the wallet via the mounted app path  1054ms
   Test Files  5 passed (5)
        Tests  7 passed (7)
     Start at  16:06:30
     Duration  8.37s (transform 168ms, setup 0ms, collect 746ms, tests 7.41s, environment 0ms, prepare 49ms)


c0: pnpm run api:wrangler:dry-run
c3: command
c5: 2026-08-03T13:07:26.613075338+00:00
c1:
  > press-zone-core@ api:wrangler:dry-run /home/user/builds/press-zone-core-d6fe958f21cb
  > pnpm --filter @press-zone/core-api run wrangler:dry-run
  > @press-zone/core-api@0.0.4 wrangler:dry-run /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
  > pnpm run build && wrangler deploy --dry-run --outdir=dist
  > @press-zone/core-api@0.0.4 build /home/user/builds/press-zone-core-d6fe958f21cb/apps/api
  > rm -rf dist && tsc -p tsconfig.json --outDir dist
   ⛅️ wrangler 4.105.0
  ────────────────────
  /home/user/builds/press-zone-core-d6fe958f21cb/apps/api:
   ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @press-zone/core-api@0.0.4 wrangler:dry-run: `pnpm run build && wrangler deploy --dry-run --outdir=dist`
  Exit status 1
   ELIFECYCLE  Command failed with exit code 1.
  [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mProcessing wrangler.toml configuration:[0m
      - "unsafe" fields are experimental and may change or break at any time.
  [31m✘ [41;31m[[41;97mERROR[41;31m][0m [1mThe directory specified by the "assets.directory" field in your configuration file does not exist:[0m
    /home/user/builds/press-zone-core-d6fe958f21cb/apps/web/dist
  🪵  Logs were written to "/home/user/.wrangler/logs/wrangler-2026-08-03_13-07-25_902.log"
  pnpm install: 0 packages, 1 warnings


