Skip to content

test(den): add config object payload boundary smoke - #3103

Merged
benjaminshafii merged 1 commit into
devfrom
feat/config-object-payload-boundary-script
Jul 25, 2026
Merged

test(den): add config object payload boundary smoke#3103
benjaminshafii merged 1 commit into
devfrom
feat/config-object-payload-boundary-script

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

Summary

Adds the missing repeatable post-deploy proof script for #3101. The script generates large payloads locally with repeat(), posts them to a real deployed Den API config object version endpoint, and checks that the mediumtext migration plus 1 MiB validation boundary are live without requiring anyone to paste ~49,000 literal characters into a tool call.

Probe matrix

  • rawSourceText 49113 bytes -> expect 201 (old MySQL TEXT plaintext ceiling)
  • rawSourceText 49114 bytes -> expect 201 (the byte that used to hit MySQL errno 1406)
  • rawSourceText 200000 bytes -> expect 201
  • rawSourceText 1048576 bytes -> expect 201
  • rawSourceText 1048577 bytes -> expect 400, not 500
  • normalizedPayloadJson with Buffer.byteLength(JSON.stringify(value), "utf8") = 1048576 -> expect 201
  • normalizedPayloadJson with Buffer.byteLength(JSON.stringify(value), "utf8") = 1048577 -> expect 400, not 500

Dry run output

$ tsx scripts/smoke-config-object-payload-boundary.ts -- --dry-run
[smoke] WARNING: this script writes new immutable versions to the named config object.
[smoke] Target Den API base URL: https://example.invalid/api/den
[smoke] Target configObjectId: cob_01payloadboundarysmoke00000000
[smoke] Planned version creations: 7 (dry-run=true; writes issued=0)
[smoke] Version reason/source_revision_ref: smoke: config object payload boundary check
[smoke] --dry-run set: printing the plan only; no HTTP writes will be issued.

[smoke] Probe plan
field                  case                                                  requested plaintext bytes  measured bytes  source payload bytes  expected status  actual status  verdict
-----                  ----                                                  -------------------------  --------------  --------------------  ---------------  -------------  -------
rawSourceText          old MySQL TEXT plaintext ceiling                      49113                      49113           49113                 201              -              DRY-RUN
rawSourceText          one byte past old ceiling / errno 1406 regression     49114                      49114           49114                 201              -              DRY-RUN
rawSourceText          comfortably past old ceiling                          200000                     200000          200000                201              -              DRY-RUN
rawSourceText          exact validation limit                                1048576                    1048576         1048576               201              -              DRY-RUN
rawSourceText          one byte over validation limit                        1048577                    1048577         1048577               400              -              DRY-RUN
normalizedPayloadJson  JSON.stringify(value) exact validation limit          1048576                    1048576         524281                201              -              DRY-RUN
normalizedPayloadJson  JSON.stringify(value) one byte over validation limit  1048577                    1048577         524282                400              -              DRY-RUN

Production run status

This has NOT been run against production. A human with a valid token and an explicit target config object should run:

DEN_API_BASE_URL=https://app.openworklabs.com/api/den \
DEN_API_BEARER_TOKEN=<session bearer token> \
DEN_CONFIG_OBJECT_ID=cob_... \
pnpm --filter @openwork-ee/den-api run smoke:config-object-payload-boundary

Use -- --dry-run first to print the plan without writes.

Verification

  • Missing-env run exits non-zero with actionable env instructions.
  • Dry-run with dummy env prints the computed byte plan above; normalizedPayloadJson stringified byte counts are exactly 1048576 and 1048577.
  • pnpm --filter @openwork-ee/den-api exec tsc -p tsconfig.json --noEmit passed.
  • No dependency was added.

No fraimz: this is an operator smoke script with no UI surface.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Jul 25, 2026 11:57am
openwork-den Ready Ready Preview, Comment Jul 25, 2026 11:57am
openwork-den-worker-proxy Ready Ready Preview, Comment Jul 25, 2026 11:57am
openwork-landing Ready Ready Preview, Comment, Open in v0 Jul 25, 2026 11:57am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
openwork-diagnostics Skipped Skipped Jul 25, 2026 11:57am

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