Skip to content

refactor(hub): drop provisioner-side sidecar fences - #217

Merged
TheGreatAxios merged 1 commit into
mainfrom
refactor/drop-local-fences
Nov 6, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
refactor/drop-local-fences

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

What changed

Both sidecar provisioners (the local process and Docker) kept "fences": a record of deleted deployments, used to refuse a late request to create one again. That request never reaches them. Interchange mints a new sidecar identity for every create and never re-creates a version it deleted. Both provisioners run inside the hub and already handle create and delete for a deployment in order. So the fences, the fences.json file and the database check that pruned it are removed.

One small behaviour change: a repeated delete for a sidecar id nothing ran on now answers that cleanup is done, so Interchange retires that unused id.

How it was verified

  • bun run lint, format:check, typecheck, test (325 pass), pins:verify, vendor:verify
  • Live, main vs this branch with a scripted model, one run per side, same results on both:
    • Local sidecar: project start, a second deployment on the same sidecar, hub restart mid-run, sidecar process killed, archive, and a create forced past the hub's 120s timeout. Nothing was deployed for the timed-out create.
    • Docker sandboxes (hub in Compose): the coordinator and coder each in their own container, hub restarted mid-task and with an approval pending. The same runs, containers and approval continued, the coordinator got the coder's result, and archive removed every container.

Interchange mints a new sidecar identity for every ensure and never
re-ensures a generation after destroying it. Both provisioners run inside
the hub and already order ensure before destroy, so the fences guarded
against requests that cannot arrive.
@corbits-triage

corbits-triage Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 1d010b8 Nov 6, 2026
9 checks passed
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