Skip to content

feat(contribute): Executor seam for the contributor node + cloudy-agent#14

Merged
NetworkTheoryAppliedResearchInstitute merged 1 commit into
mainfrom
feat/contribute-seam
Jul 13, 2026
Merged

feat(contribute): Executor seam for the contributor node + cloudy-agent#14
NetworkTheoryAppliedResearchInstitute merged 1 commit into
mainfrom
feat/contribute-seam

Conversation

@NetworkTheoryAppliedResearchInstitute

Copy link
Copy Markdown
Contributor

What

The next queued Phase-1 build: the contributor-node Executor seam, built before physically moving the coordinator's 4,015-line internal/agent so the heavy Docker/gopsutil/spiffe port lands against a fixed, tested contract.

internal/contribute (stdlib-only, adds no module deps):

  • Executor (one-shot) and ServiceExecutor (long-running) interfaces
  • WorkloadKind {Compute, Print, Storage, Service} — Service is a first-class variant, per the SaaS discussion
  • Placement {Scavenged, Pinned}; NodeContract; Registry
  • Two invariants, enforced + tested: scavenged nodes accept only preemptible executors (owner-never-interrupted); a Service requires pinned placement (a service can't yield to the owner mid-flight)

cmd/cloudy-agent runs the seam end to end:

  • a real Storage executor holding opaque sealed shards and proving possession via internal/storage's challenge/response (the node can't read what it stores)
  • placeholder Compute (echo) + Service (presence) executors standing in for the Docker port
  • owner-gate control loop: defers scavenged work while the owner is active; pinned capacity never gated

Tests / verification

  • go build/vet/test ./... green; import tripwire green (contribute is not a JFA leaf, imports none of the four)
  • Ran the daemon in both modes: pinned advertises [compute storage service] and stores→proves→echoes→serves; scavenged correctly omits Service and honors the owner gate

Not in this PR (named next steps, land behind this seam)

Docker executor, gopsutil hardware sampling, opt-out/allowlist/printers/telemetry port from SoHoLINK internal/agent, and the agent→cloudyd→/v0 relay. CONFORMANCE.md carries the labeled seam-built / runtime-pending entry.

Author does not self-merge — for review.

Introduces internal/contribute, the runtime-agnostic contract a Cloudy
member machine implements to contribute capacity, ahead of moving the
coordinator's transitional internal/agent code. Building the seam first
means the heavy Docker/gopsutil/spiffe port lands against a fixed, tested
contract instead of the contract being whatever today's Docker code does.

- Executor (one-shot) and ServiceExecutor (long-running) interfaces;
  WorkloadKind {Compute,Print,Storage,Service}; Placement {Scavenged,Pinned}.
- Two invariants enforced at registration/validation and covered by tests:
  scavenged nodes accept only preemptible executors (owner-never-interrupted),
  and a Service requires pinned placement (a service cannot yield to the owner).
- cmd/cloudy-agent runs the seam end to end: a REAL Storage executor holding
  opaque sealed shards and proving possession via internal/storage's
  challenge/response, plus placeholder Compute (echo) and Service (presence)
  executors standing in for the Docker port. Owner-gate loop defers scavenged
  work while the owner is active; pinned capacity is never gated.

Stdlib-only; adds no module dependencies. Not a JFA leaf (imports none of
economy/covenant/record/dispute); import tripwire green. CONFORMANCE.md
updated with the labeled seam-built / runtime-pending entry.

The Docker executor, gopsutil hardware sampling, opt-out/allowlist/printers,
and the agent->cloudyd->/v0 relay are the named next steps behind this seam.

Signed-off-by: Jodson Graves <info@ntari.org>
@NetworkTheoryAppliedResearchInstitute
NetworkTheoryAppliedResearchInstitute merged commit 079e631 into main Jul 13, 2026
1 check 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