Skip to content

Adapt the provider connector to admitted Worker attachments #1440

Closed

Description

@privateip

Parent: Deliver Galactic Worker with Local and Fabric delivery for tenant services

Deliverable

A provider-facing connector adapter that uses admitted Worker attachments while keeping the Edge provider contract. It satisfies the connector part of the "Deliver service consumers" phase exit and the parent's revocation criterion.

#1431 decides whether the adapter is a new "galactic-connector" component or the existing galactic-edge. This Task implements whichever it chose.

References:

  • Edge agent seam: cmd/galactic-edge and internal/edge/agent/agent.go (Datapath: Register, Unregister, Forget, SyncRoutes).
  • Claims: internal/edge/provider/provider.go and the Edge CRDs api/v1alpha1/edge{provider,attachment,instance,route,service}_types.go.
  • Contract: docs/edge/provider-contract.md.
  • Existing provider and tests: internal/edge/masque, tests/edgeconformance, examples/edge-provider and task test:edge-provider.

#970 (MASQUE connector) is related and does not block this Task. MASQUE negotiation and session lifecycle stay with the MASQUE provider.

Work items

  • Map admitted provider attachment identity, VPC scope, generation and route gates to Worker claims. Reuse the existing approval, revocation and provider session authority.
  • Document branch compatibility for existing galactic-edge entry points and configuration.
  • Exercise the adapter through the existing provider interface and an independent fixture. Document where MASQUE, cloud and private-interconnect adapters plug in.
  • Expose the adapter's Worker capability state and failure reasons through internal/edge/diag reasons and metrics.

Dependencies

Blocked by #1431, #1433, #1434, #1435 and #1436. Runs in parallel with #1437, #1438 and #1439.

Acceptance

  • With authorized and with denied claims, the fixture proves attach, delivery, withdrawal and replacement.
  • Revoking authority while data flows stops delivery at the tenant endpoint, as the existing provider contract requires.
  • Replaying a previous owner's claim is rejected.
  • The tests/edgeconformance MASQUE suite and task test:edge-provider still pass.
  • The evidence separates fixture results from qualification of any individual provider.
  • The delivering PR targets integration/galactic-worker, carries this evidence and says Fixes datum-cloud/galactic#1440. GitHub does not auto-close from a non-default base, so close this issue explicitly when the PR merges and record the PR and merged SHA.

Activity

  1. added theissue type on Nov 18, 2026
  2. changed the title [-]Adapt galactic-connector to admitted Worker attachments[/-] [+]Adapt the provider connector to admitted Worker attachments[/+] on Nov 18, 2026
  3. self-assigned this
    on Nov 19, 2026
  4. privateip commented on Nov 19, 2026

    @privateip
    ContributorAuthor

    Triage

    This is still open work at the head of integration/galactic-worker (6e0de371317b0facbcfdf375e37b815e762b9961). cmd/galactic-edge still wires agent.PinnedDatapath, which writes host-link rows directly. The Worker side is ready for it: the trusted sources read EdgeAttachment admission, a claim is withdrawn with AuthorizationRevoked when admission is lost, and a scope another writer owns reports ScopeOwnedElsewhere.

    Plan

    Datapath. A Worker-backed agent.Datapath replaces the direct writes when galactic-edge runs with --worker-socket. Register opens the link's gate row, then requests a routed_link claim on the EdgeAttachment that carries the link galactic-edge created, and brings the link up only after the claim reports Programmed. SyncRoutes updates each claim's prefixes. Unregister closes the gates and releases the claim. Forget drops the gate link row. Generations continue from what Observe reports, so galactic-edge keeps no state of its own.

    Ownership transfer. A new ownership.Relinquish clears a scope's owner under its lock and advances the generation. galactic-edge first requests claims for every live link, then gives up each VPC scope. Worker then claims the scope and rewrites the same rows in its first snapshot. Link creation stays with galactic-edge, which writes the VRF enslavement with ExclusiveIf. Forwarding gates stay with galactic-edge under their own edge gate scope, with the same fence rules between galactic-edge processes.

    Authority. Approval, gate decisions and provider leases are unchanged. Worker admits a connector claim only while its EdgeAttachment is Admitted on this node.

    Revocation. Two independent cuts. The existing gate close, which carries the provider contract's bound, and Worker's AuthorizationRevoked withdrawal of the link's rows.

    Replay. These are refused: a stale generation from a fenced galactic-edge process; a claim naming a replaced, deleted or unadmitted attachment; a claim pointing at a link stamped with another attachment's ID (new reason HandoffInterfaceNotOwned); another caller naming the attachment; and a gate write after the gate scope was taken over.

    Compatibility and rollback. Without --worker-socket, galactic-edge behaves as today. Rollback: stop Worker, run galactic-worker handback, then restart galactic-edge without --worker-socket. galactic-edge takes the handed-back scopes over.

    Contract (D30, proposed).

    • An additive edge_link claim spec, with destinations optional when it is set.
    • A connector routed_link registers galactic-edge's link and never creates or deletes it.
    • The new reason HandoffInterfaceNotOwned.
    • Gates move to an edge gate scope.
    • The revocation bound is set by the gate, and Worker's withdrawal is a second cut.
    • galactic-edge is added to the allowlist example.

    Diagnostics. New agent reasons for Worker refusals and unavailability, and a capability-state gauge and refusal counter.

    Evidence

    • Fixture: unit and root tests against a real Worker for attach, delivery, withdrawal, replacement, denied claims, revocation while traffic flows, and replay.
    • Lab: the existing edge and MASQUE verifications, run with Worker on the edge nodes.
    • Provider qualification: the tests/edgeconformance MASQUE suite, reported separately from the fixture results.
  5. privateip commented on Nov 19, 2026

    @privateip
    ContributorAuthor

    Changes from the approved plan

    Three implementation details differ from the plan above. None changes the acceptance criteria.

    1. VRF enslavement takes no VPC fence in Worker mode. The plan had galactic-edge enslave its link with ExclusiveIf on the VPC scope. Register waits for Worker to program the link, and Worker's commit needs that same lock, so holding it would deadlock. Instead, galactic-edge claims each attachment before it creates the link. Worker keeps a VPC's host state for as long as a claim holds it, so the VRF cannot be reclaimed while the link is made. Link creation stays galactic-edge's own, like CNI's attachment interfaces.
    2. Claim before create. In Worker mode galactic-edge no longer creates a VPC's node state. The early claim makes Worker create it.
    3. The edge gate scope applies in both modes. Gates commit under edge-gates-<vpc> with or without --worker-socket. A gate opens, or is confirmed closed, only once no older galactic-edge process holds the VPC's own scope. That covers the switch from gates under the VPC scope.

    Two additions:

    • Worker refuses to register a link that has no forwarding-gate row yet (HandoffInterfaceMissing), which keeps "gated before any forwarding program attaches" across the two processes.
    • A connector claim's address comes from EdgeAttachment.status.address (trusted sources, D10), so edge_link carries only the link name and prefixes.
  6. privateip commented on Nov 21, 2026

    @privateip
    ContributorAuthor

    Delivered by #1470, merged into integration/galactic-worker as c1ee280.

    galactic-edge, run with --worker-socket, now claims each edge link from Galactic Worker. The PR's evidence comment maps each acceptance item to fixture tests and lab results. Two lab results are tolerated under the epic's merge rule: verify:fabric-api, tracked in #1477, and TestMASQUE/maintenance-during-use in Worker mode, tracked in #1476. #1442 covers TestMASQUEService/node-restart with the packaged Worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions