Skip to content

repoPaths never reaches node registration on the native-broker path (11.8.0) #1582

Description

@khaliqgant

Summary

repoPaths (shipped in 11.8.0 via #1581) never reaches the node registration
when agent-relay node up runs with a native broker — the mode every real
fleet node uses. The result: it is currently impossible for any node to declare
repo keys, so repo-based placement can never match.

Measured on the live fleet: 0 of 1045 nodes carry a single repo: tag or
repoKeys value.

Evidence

Verified against the published 11.8.0 artifacts (not source), CLI and broker
binary both at 11.8.0, on node sf-mini.

The child emits repoPaths into its descriptor:

  • dist/cli/lib/node-provider-child.js:104 — adds repoPaths to the descriptor
  • dist/cli/lib/node-provider-child.js:253parseDescriptorRepoPaths(parsed.repoPaths)

The comment there states: "The parent passes these values directly to its
native broker."
It does not. A full survey of the shipped package finds every
repoPaths occurrence:

dist/index.cjs:20433-20435          readRepoKeys()   <- reader only
dist/cli/lib/node-provider-child.js:104,105,253,258  <- child emit + parse

No consumer reads descriptor.repoPaths back to hand it to the broker, and
repo_keys appears only twice — a zod schema (dist/index.cjs:16136) and the
same reader (:20430). There is no writer on the native-broker path.

The working emitter lives in @agent-relay/fleet:

  • dist/index.js:201 nodeRegistrationTags() — derives repo:<key> tags
  • dist/serve-node.js:61,69 — calls it and sets tags at registration

…but serve-node only runs for SDK-style nodes. With a native broker the Rust
process performs registration and is never told the repo keys.

Reproduction

  1. Give a node definition a repoPaths map and serve it via
    agent-relay node up --broker-name <n> --config <def>.
  2. Read the node back: agent-relay fleet nodes.
  3. Observed: tags: [], repoKeys: None. Capabilities from the same
    definition do register (proving the definition is loaded).

Confirmed with --no-spawn and without it, and after upgrading the broker
binary from 11.7.1 to 11.8.0 (agent-relay-broker 11.8.0).

Impact

Repo-based placement cannot be used by any node. A dispatcher that resolves a
target by repo key finds no eligible node and rejects every assignment.

Suggested fix

On the native-broker path, forward the parsed descriptor.repoPaths (or the
derived nodeRegistrationTags() output) into the broker's registration payload,
which already models repo_keys: Option<Vec<String>>.

Please include a test that asserts a node started with a repoPaths definition
registers with the derived repo:<owner/name> keys, and one asserting a
definition without repoPaths leaves existing tags unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions