Skip to content

Compute Fabric G1: stable local host identity + Host Capability Snapshot v1 #280

Description

@James3014

Status

P0 — READY_NOW / DIRECT_CANONICAL bounded implementation
AUTO_CHAIN=false.

Parent product contract: James3014/Nexus-new#1061.

Fresh source watermark at creation:

Goal

Make DevSpace the canonical physical-host fact source required by Compute Fabric Placement without adding scheduling/placement authority.

Provide a truthful HostCapabilitySnapshot v1 that works in the default one-host case with zero fabric-specific configuration and can later support explicit 1..N host inventory.

Ownership boundary

DevSpace owns:

  • persistent physical hostId;
  • static host facts;
  • dynamic host telemetry/readback;
  • verified DevSpace identity/capability facts;
  • snapshot identity, observation time and freshness inputs.

DevSpace does not own:

  • CapabilityPlanner route/capability selection;
  • host placement/filter/score policy;
  • PlacementDecision / HostPlacementLease;
  • retry/failover permission;
  • verification/acceptance;
  • a second task/workspace/operation ledger.

Required semantics

1. Persistent local physical host identity

  • hostId must survive DevSpace process restart.
  • hostId != serverInstanceId.
  • current serverInstanceId remains ephemeral runtime identity.
  • no machine-specific James/M1/M4/M5 identity may be encoded in product logic.
  • identity storage must stay owner-controlled and outside project/workspace authority.

2. Zero-config singleton host snapshot

When DEVSPACE_PHYSICAL_HOST_REGISTRY is absent, DevSpace must still expose one truthful local host snapshot.

No separate LocalPlacementEngine and no requirement that a single-machine user configure a physical host registry.

Remote/explicit Host Registry behavior from #123 remains additive and unchanged.

3. Three-layer capability model

Snapshot must separate:

  • static facts: hostId, architecture/OS, memory class/total memory and other stable physical facts supported by current host;
  • dynamic state: free/available memory, load/CPU pressure or other bounded observable telemetry, connectivity/readiness freshness;
  • verified capabilities: current DevSpace source/build identity and devspace.capability_manifest.v1 identity/readback.

Dynamic telemetry MUST NOT mutate or be hashed into capability_manifest.v1; that manifest remains verified MCP tool/schema identity.

4. Snapshot identity/freshness

Expose enough bounded metadata to distinguish:

  • physical host identity;
  • runtime/server generation;
  • verified capability-manifest identity;
  • telemetry observation generation/time.

A later placement consumer must be able to reject stale observations without treating telemetry as authority.

Initial bounded implementation surface

Prefer the smallest current-source surface around:

  • src/physical-host-registry.ts
  • src/build-identity.ts
  • a new narrow host-capability snapshot module if required
  • corresponding focused tests
  • minimal server/config registration wiring only if required to expose read-only snapshot

Do not touch #242 HerdR/local-agent lifecycle/cutover files unless a fresh unavoidable dependency is physically proven first.

Required controls

Positive:

  1. no registry configured -> exactly one local snapshot available;
  2. restart -> same hostId, different serverInstanceId permitted;
  3. static/dynamic/verified layers are separately readable;
  4. dynamic telemetry change does not change capabilityManifestSha256;
  5. explicit remote registry continues to work.

Negative:

  1. malformed/stale persistent host identity fails closed rather than silently minting conflicting authority;
  2. no telemetry field can grant mutation/execution authority;
  3. no host snapshot action performs remote execution;
  4. no serverInstanceId substitution for persistent hostId;
  5. no duplicate local + explicitly configured same-host identity without an explicit deterministic contract.

Verification

At minimum:

  • focused unit tests for host identity/snapshot;
  • existing physical-host-registry tests;
  • typecheck;
  • production build;
  • git diff --check;
  • exact changed-path audit;
  • restart identity witness on the M5 host if the source Candidate reaches host-verification state.

Claim ceiling

Maximum before independent review/integration:

DEVSPACE_HOST_CAPABILITY_SNAPSHOT_V1_CANDIDATE_READY

No merge/deploy/cutover/placement authority is granted by this Issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions