package host import ( "github.com/carlosframework/platform/internal/hostbox" "github.com/carlosframework/platform/internal/hostguard" "github.com/carlosframework/platform/internal/registry" ) // relocationSourceRows sets the box's Reconciler hooks for region HA // ยง5.3 (R5-3, Task 10b), with CARLOS_REGION_HA on only: FenceClosed reads // this box's admission fence for the host from the host guard // (hostbox.AdmissionFenceClosed), and HoldRow holds the row for the op in // "relocating" (hostbox.RegistryHoldRow). The source in releasing is then // held at its fence's close, and every other relocating participant keeps // an existing row held. A source whose reconcile is delayed past the // completion is held then, for the completed op, by reconcile's catch-up // hold while it owes that op's park-local (L18 joint round, finding 3). // Nothing here releases a source's hold: the fenced installation never // serves again, so the completion queues the source's park-local // (hostclaim.CompleteRelocation), whose retirement deletes the row by // ownership, held or not. With the flag off both hooks // stay nil and reconcile is main's: Serving alone, which refuses every // relocating claim with every row unchanged. func relocationSourceRows(getenv func(string) string, r *hostbox.Reconciler, guard hostguard.Guard, reg *registry.Registry) { if r == nil { return } r.FenceClosed, r.HoldRow = nil, nil if getenv == nil || !regionHAEnabled(getenv) { return } r.FenceClosed = hostbox.AdmissionFenceClosed(guard) r.HoldRow = hostbox.RegistryHoldRow(reg) }