clichore: remove the dead Cloudflare scaffolding left over from the AWS migration
There was no live Workers runtime left — no wrangler.toml, no @cloudflare/* dependency, no
wrangler scripts, no Cloudflare CI, and the Env bindings are already AWS-named
(S3Bucket/KVStore/Queue). What remained was scaffolding around it.
Deleted: the `caches` polyfill (including caches.default) and the `scheduler` global, both
with zero references in first-party code AND in node_modules; WorkflowStep.sleep(), never
called by any workflow; the WorkerEntrypoint/RpcTarget/Container exports, zero importers;
the DurableObjectState/Stub/Namespace ambient declarations; nizzy writing .dev.vars (a
wrangler-only convention it was the sole writer of — vite and dotenv read the .env it also
writes); CF_PAGES_COMMIT_SHA, a Cloudflare Pages build var never set on AWS.
Also dropped the vite plugin emitting a Cloudflare Pages `_headers` file. The frontend ships
to S3+CloudFront now, so it was uploaded as an inert file. All four of its headers are
already set by the CDK ResponseHeadersPolicy in aws/lib/stacks/app-stack.ts (HSTS, CSP with
frame-ancestors 'none', X-Content-Type-Options, Referrer-Policy) and cache-control comes from
`aws s3 sync --cache-control`. No security regression.
And two docs that had become actively misleading rather than merely stale: they describe
main.ts, sync-worker.ts and aws-primary-mail-runtime.ts (all deleted), call
routes/agent/index.ts "6,300 lines" (it is 202), and present ZeroDriver/ZeroAgent/
ShardRegistry as live Durable Objects. Every phase in the migration plan is already done.
Kept deliberately: aws/scripts/backfill-utils.ts genuinely reads FROM R2 as the migration
source; the cf-migration-phase1/3 regression guards still pass; and the Cloudflare-named
KV/R2 aliases in aws-runtime-bindings and the mail test helpers are AWS adapters wearing old
labels — renaming them is churn, not cleanup.
Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 2, 2026, 3:30 PMeslint-configfeat: fix all the security vulnerabilities'Feb 8, 2026, 5:30 PMinfra-adaptersreplace cloudflare runtime with aws local servicesApr 6, 2026, 12:33 AMtestingfeat: add sentry crash observability
Co-Authored-By: Codex Sonnet 4.6 (1M context) <<email>>Jun 1, 2026, 10:45 PMtsconfigfeat: fix eslintMay 23, 2025, 5:23 AM