build_usage: how much each build node is used and whether it may build, in one call #74

Merged
mesh-tools merged 4 commits from feat/build-usage-tool into main 2026-10-26 14:09:33 +00:00
Member

The operator asked: "how much are our build-agents being used? is ace now finally eligible for building stuff?" — which took six calls across four tools. Under the instruction one-question-one-tool this adds mesh-delivery-view.build_usage (no arguments).

Per node and build seat (go, node, image): whether the node holds it; its capacity and where it came from (mesh-config's resolved value, the default, "unknown to this tool", or 0 when the resolved key holds no readable value); paused; eligible / not eligible / not known with why; asks running by kind (delivery, check, recheck, try, hand); steps left running; for the last hour and day: started, finished, failed, total and median time by kind, share of time at capacity; steps a build module ended for a restart or past the step bound are counted apart (ended_stale). Every node a capacity names is listed. Mesh-wide: backlog per build seat stream and kind, tries running. A said line per seat answers in words.

The checker records the ask ids a try put (so a try's steps count as try, not check) and announces its tries state readable for the view. The view pins mesh-sdk main and uses delivery.StepBound.

Not NATS-native yet (said, queued): the backlog is read from the view program over its local socket (issue 1904 note 2), and CPU is not on the bus (disk-load keeps no state).

Tests: TestBuildUsageAnswersEveryNodesUseFromTheStates (one function added, one merged away: budget flat). Suites and vet clean. Try try-1793023393659657119 passed.

Reviewed-by: review-usage@shanks at 4f722899df

The operator asked: "how much are our build-agents being used? is ace now finally eligible for building stuff?" — which took six calls across four tools. Under the instruction one-question-one-tool this adds `mesh-delivery-view.build_usage` (no arguments). Per node and build seat (go, node, image): whether the node holds it; its capacity and where it came from (mesh-config's resolved value, the default, "unknown to this tool", or 0 when the resolved key holds no readable value); paused; eligible / not eligible / not known with why; asks running by kind (delivery, check, recheck, try, hand); steps left running; for the last hour and day: started, finished, failed, total and median time by kind, share of time at capacity; steps a build module ended for a restart or past the step bound are counted apart (`ended_stale`). Every node a capacity names is listed. Mesh-wide: backlog per build seat stream and kind, tries running. A `said` line per seat answers in words. The checker records the ask ids a try put (so a try's steps count as try, not check) and announces its `tries` state readable for the view. The view pins mesh-sdk main and uses delivery.StepBound. Not NATS-native yet (said, queued): the backlog is read from the view program over its local socket (issue 1904 note 2), and CPU is not on the bus (disk-load keeps no state). Tests: TestBuildUsageAnswersEveryNodesUseFromTheStates (one function added, one merged away: budget flat). Suites and vet clean. Try try-1793023393659657119 passed. Reviewed-by: review-usage@shanks at 4f722899df250bdcd51be70dd7d30673875d00ab
mesh-tools added 4 commits 2026-10-26 14:08:47 +00:00
The operator's question (how much are the build nodes used, is ace eligible) took six calls over four tools.
build_usage reads it from the bus's states: seats held (have), capacity (mesh-config resolved), pauses, the
build modules' steps by kind with left-running keys, the last hour and day with total and median time and time
at capacity, the running tries, and the backlog the view program reads from the seats' streams. A try now names
the asks it put, and the checker announces its tries readable, so the view tells a try's asks from a check's.
Since mesh-sdk #90 a build module ends a left-running key as failed at the moment it notices; counted as finished,
such a step put hours into the medians and the time at capacity. The view takes mesh-sdk's step bound and restart
reason from the SDK it now pins.
View: build_usage does not answer eligibility it cannot read; a resolved capacity key with no readable value is the puller's 0
mesh/delivery merged: source.main moved to novox/mesh-delivery@feef96ed160e
mesh/check checking 4f722899df25 on feef96ed160e
4f722899df
A capacity this tool cannot read is unknown to it, not 0: the seat says eligible_known false and the node not known.
A key mesh-config holds without a readable value is what the puller reads as 0, and was dropped silently.
Author
Member

Delivery novox/mesh-delivery@4f722899df25 — merged since 2026-10-26T14:09:34Z

Source — source.main moved to novox/mesh-delivery@feef96ed16. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-10-26 14:08 (new) → proposed (announced): novox/mesh-delivery#74's head announced
  • 2026-10-26 14:08 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-10-26 14:09 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-delivery@4f722899df25` — **merged** since 2026-10-26T14:09:34Z **Source** — source.main moved to novox/mesh-delivery@feef96ed160e. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-10-26 14:08 (new) → proposed (announced): novox/mesh-delivery#74's head announced - 2026-10-26 14:08 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-10-26 14:09 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit feef96ed16 into main 2026-10-26 14:09:33 +00:00
mesh-tools deleted branch feat/build-usage-tool 2026-10-26 14:09:33 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-delivery#74