Fix Iroh relay policy Vercel deployment
Merged
AZ
2d ago+42+42+01234567890123456789-21-21-01234567890123456789
Summary
- keep relay-catalog validation inside the Vercel web project
- make the generator portable across Bun and Next.js type checking
- reconcile the Swift line budget after the Iroh merge
Testing
- regression commit fails before the fix
bun test tests/vercel-build-inputs.test.ts tests/relay-policy.test.ts tests/relay-token-route.test.ts tests/relay-preferences-route.test.tsSKIP_ENV_VALIDATION=1 bun run vercel-buildpython3 scripts/swift_file_length_budget.py --base-ref origin/main
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Fixes Vercel deploys for the Iroh relay policy by validating the relay catalog inside the web app and making the generator Node-compatible so Bun/Next.js type checks and builds pass. Also updates CI/Presence workflows and adds a regression test to keep validation inside the Vercel project.
- Bug Fixes
- Moved the generator to
web/tools/generate-managed-iroh-relay-catalog.ts; run--checkfromwebin root,web, andworkers/presencescripts and CI. - Made the generator Node-compatible (replaced Bun-only APIs, switched to
process.argv, fixed repo root resolution, preserved--check). - Added
web/tests/vercel-build-inputs.test.tsto ensurevercel-buildcalls the in-web script. - Updated CI and Presence workflow triggers to the new generator path.
- Made the relay retry test deterministic and fixed Iroh test import in
MobileHostAuthorizationTests.swift.
- Moved the generator to
Summary by CodeRabbit
- Build & Tooling
- Updated managed relay catalog generation/check commands to use the new in-repo generator path across root, web, and presence scripts.
- Switched the generator to run on Node.js for consistent handling during builds.
- Updated CI/deployment validation to call the new generator path and adjusted workflow triggers to watch the new file location.
- Tests
- Added a Bun test ensuring the deployment build includes an embedded relay catalog validation step.
- Improved a Swift test’s sleep timing assertion and updated its imports.