Skip to content

fix: seed authorization before the server listens - #91

Merged
obany merged 2 commits into
nextfrom
bugfix/seed-before-listen
Oct 26, 2026
Merged

obany merged 2 commits into
nextfrom
bugfix/seed-before-listen

Conversation

@obany

@obany obany commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Seeds the authorization model before the server starts listening, so /readyz no longer reports ready while early authenticated requests are still rejected with 403, and lets the soak harness run the node under Bun and with each web server.

Depends on 3sixtyglobal/engine#28 being released, as it uses the new engineReady parameter of EngineServer.start.

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • ⚡ Performance improvement
  • ♻️ Code refactoring
  • 📦 Dependencies update

🛠️ Changes Made

  • Run seedAuthorizationDefaults and finalizeMigrations in the engineReady callback of server.start, before the web server listens; previously they ran after, leaving a window of about 1.1 s on Bun and 0.33 s on Node where /readyz was 200 but the model was incomplete
  • Add SOAK_RUNTIME (node or bun) and SOAK_WEB_SERVER_TYPE (fastify, hono or native) to the soak harness, recorded under config in report.json
  • Add runtime and web_server_type inputs to the soak workflow, with a Bun setup step when the runtime is bun; they apply to profiles which start a local node
  • Document the new harness options in the soak README

🧪 Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this change manually
  • Testing not required for changes

@obany
obany merged commit 6198624 into next Oct 26, 2026
2 checks passed
@obany
obany deleted the bugfix/seed-before-listen branch October 26, 2026 07:46
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