Skip to content

Identify the serving Fly Machine in deep health - #159

Draft
bporterfield wants to merge 1 commit into
mainfrom
codex/fly-health-identity
Draft

bporterfield wants to merge 1 commit into
mainfrom
codex/fly-health-identity

Conversation

@bporterfield

Copy link
Copy Markdown
Collaborator

Summary

  • include runtime.flyMachineId in GET /api/health when Fly supplies FLY_MACHINE_ID
  • keep the existing non-Fly response shape unchanged
  • extract the deep-health handler around the Postgres boundary so the HTTP contract is
    directly testable

Why

A hosted rollout probes the tenant hostname through Fly routing. While the old spare is
still serving, a generic 200 does not prove that the updated warm Machine booted
successfully. Returning Fly's injected Machine ID lets the private rollout gate bind
health to the exact Machine it updated.

This is only the public application bridge. It does not change hosted rollout behavior by
itself.

Verification

  • focused deep-health contract: 3 passing
  • full public unit suite: 131 passing
  • npm run lint
  • Next production compilation succeeded; the isolated checkout then stopped on an
    unrelated pre-existing CLI type error at packages/cli/src/cloud/index.ts:137
  • git diff --check

Hosted rollout dependency

After merge, compose a hosted bridge image from this commit and roll every existing
hosted warm/spare pair onto it with the current rollout gate. Only then should the
separate private exact-machine gate be enabled, so rollback targets also carry this
identity contract.

Provider verification still required

Confirm on a real staging tenant that runtime.flyMachineId exactly matches the ID returned
by the Fly Machines API.

Expose Fly runtime identity on the deep-health contract so a hosted rollout can distinguish the updated warm Machine from its still-live spare.

Co-Authored-By: Codex <noreply@openai.com>

Signed-off-by: Ben Porterfield <benporterfield@gmail.com>

This branch has not been deployed

No deployments
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