Skip to content

Expose operator inventory quality on the node model - #2

Merged
lr00rl merged 1 commit into
mainfrom
feat/node-inventory
Jul 7, 2026
Merged

Expose operator inventory quality on the node model#2
lr00rl merged 1 commit into
mainfrom
feat/node-inventory

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds operator-registered node inventory quality metadata to the shared node model and proto contract.

What / Why

Operators keep provenance/quality notes for nodes in the dashboard fleet inventory (e.g. "98% pure, high quality" residential/ISP purity). This exposes that as an operator-owned, purely-informational field on the node model so the server and dashboard can carry it. Nothing in the control plane branches on it; agents never report or overwrite it.

  • model.Node.Inventory *NodeInventory (json:"inventory,omitempty"), placed with the other operator-owned fields (Name / Comment / Tags / Role).
  • New NodeInventory type: PurityPercent *int (0-100), Quality string (<=64 chars), Notes string (<=2048 chars, matching MachineProfile.Notes). All fields omitempty.
  • Proto: new message NodeInventory { uint32 purity_percent = 1; string quality = 2; string notes = 3; } in common.proto, and NodeInventory inventory = 28; added to NodeView (next free field number; no existing fields renumbered).
  • Extended the pinned proto-contract test to assert the new NodeView field and the new message.

Test evidence

  • gofmt -l . clean.
  • go test -race ./...ok github.com/LatticeNet/lattice-sdk/model, including TestProtoContractsExistAndStayRedacted with the new pinned field/message.

Dashboard counterpart

The dashboard branch feat/lines-node-rows consumes node.inventory.

https://claude.ai/code/session_014jDcsi9xQEcy7DJQVksJac

@lr00rl
lr00rl merged commit ed2f261 into main Jul 7, 2026
1 check passed
@lr00rl
lr00rl deleted the feat/node-inventory branch July 7, 2026 02:33
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