Data plane smoke
After deploy, confirm that working with data works on your Worker — not only that the process boots.
What it checks
Section titled “What it checks”npm run smoke:data (script: shareout-app/scripts/data-plane-smoke.sh) runs against
a live origin with an API token:
GET /health(optionalschema: ready)POST /v1/publish— private smoke artifact- JSON —
PUT/GET/v1/data/{id}/json/smoke_settings - Tables — insert + query
/tables/smoke_rows - Datasets —
upload-url→PUTbytes →confirm→/content - Deletes the artifact (unless you keep it)
Run it
Section titled “Run it”cd shareout-appexport SHAREOUT_ORIGIN=https://shareout.<your-account>.workers.devexport SHAREOUT_TOKEN=so_… # Settings → API tokensnpm run smoke:dataKeep the artifact for debugging:
KEEP_SMOKE_ARTIFACT=1 npm run smoke:dataPrerequisites
Section titled “Prerequisites”| Need | Why |
|---|---|
| Workers deploy with D1 migrations applied | Tables + datasets metadata |
SESSION_SECRET set |
Auth for tokens |
R2 bound as ARTIFACTS |
Dataset file storage |
Personal token (so_…) |
Owner writes to data routes |
If health.schema is not ready, apply migrations:
npx wrangler d1 migrations apply DB --remoteFailures to expect
Section titled “Failures to expect”| Symptom | Fix |
|---|---|
| publish 401 | Token wrong or revoked |
| json/tables 403 | Token not owner of artifact (shouldn’t happen with same token) |
| dataset upload 5xx | R2 binding missing or misconfigured |
confirm UPLOAD_INCOMPLETE |
PUT to uploadUrl failed (check CORS/presign for direct R2) |
