Uh oh!
There was an error while loading. Please reload this page.
feat(resources): clearer two-line view (secure-environment vs per-run allocation) - #359
Conversation
… per-run tb resources used the labels "This machine" (capacity) and "tracebloc uses" (per training run), which confused: "This machine" is actually the summed capacity of the environment's Ready nodes (misleading on a remote/multi-node cluster), and "tracebloc uses" reads like total usage when it's the per-RUN ceiling. Reframe as two plain aligned lines: Your secure environment is equipped with: 12 CPU · 23.3 GiB A training run is allocated up to: 2 CPU · 8 GiB Do you want to change the allocation? Run `tb resources set` (guided ...). - New ui.Printer.Stat: aligned label/value for full-sentence labels (Field's 14-col key is too narrow here). - The trailing hint now resolves the launcher like the home screen (invokedName + tbAliasAvailable) so it reads `tb ...` on a real install and `tracebloc ...` otherwise — fixing the tb/tracebloc inconsistency Lukas spotted. - Value strips the leading "up to " (the label carries it now). Part of epic tracebloc/backend#1142 / cli#355 (copy consistency). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Jul 20, 2026
@BugBot run |
Uh oh!
There was an error while loading. Please reload this page.
Bugbot: the Stat value called trainingLine then stripped its 'up to ' prefix — a round-trip that duplicated perRunSize (resources_set.go), which already returns the clean 'CPU · mem' ceiling. Use perRunSize directly and delete trainingLine (its only caller was this stripped one). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Jul 20, 2026
@BugBot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 17738e7. Configure here.
aptracebloc
left a comment
There was a problem hiding this comment.
Verified — approving. Presentation/copy only, no logic change:
- Reword is accurate: "Your secure environment is equipped with:" (schedulable capacity) and "A training run is allocated up to:" (per-run ceiling) are clearer than the old "This machine" / "tracebloc uses", and match the v2 terminology.
ui.Statis correct — dim 42-col fixed-width label; both sentences fit, so values align.- Consistency win: the per-run value now uses the shared
perRunSize(same asresources set), with "up to" carried in the label — that resolved Bugbot's redundant-TrimPrefixfinding, andtrainingLineis removed cleanly. tb/traceblochint now resolves like the home screen. CI green.
Non-blocking note (not for this PR): "equipped with" shows the summed capacity across the environment's nodes, while a run lands on a single node — so on a multi-node environment the headline can read larger than any one run could actually use. This predates the PR (from the #237 SHOW command), --verbose shows the per-node breakdown, and "secure environment" is strictly less misleading than "This machine", so nothing to change now. Flagging only because the copy goal is clarity: a future iteration could show "the largest single node a run can land on" to match resources set's single-node fit — even more honest. Out of scope here.
LGTM.
— drafted with Claude (Opus 4.8), sent by @aptracebloc
Uh oh!
There was an error while loading. Please reload this page.
LukasWodka
commented
Jul 21, 2026
/fr-pass — verified live on dev: |
Part of epic backend#1142 / cli#355 (copy consistency). Driven by Lukas's review of
tb resources.Before
"This machine" is really the summed capacity of the environment's nodes (misleading on remote/multi-node), and "tracebloc uses" reads like total usage when it's the per-run ceiling.
After
ui.Printer.Stat(aligned full-sentence label/value)tbvstracebloclike the home screen (fixes the inconsistency Lukas spotted)Note
The allocation shown is cluster-wide per-run — jobs-manager stamps the same ceiling on every training run; there is no per-run override today (see the discussion on OOM feedback, filed separately).
gofmt/vet clean; cli + ui tests green.
Note
Low Risk
Presentation and copy only; cluster reads and ceiling logic are unchanged aside from how results are printed.
Overview
tracebloc resourcesnow shows two aligned sentences instead of section headers andFieldrows: your secure environment capacity and per-run allocation (cluster-wide ceiling), using v2 “secure environment” wording so it’s clear the first line is schedulable capacity, not “this machine,” and the second is each run’s limit, not total tracebloc usage.Adds
ui.Printer.Statfor dim, fixed-width full-sentence labels. The per-run value usesperRunSize(same formatting asresources set) with “up to” in the label only;trainingLineis removed. Help text and the closing hint are updated—the hint pickstbvstracebloclike the home screen when the alias exists.Reviewed by Cursor Bugbot for commit 17738e7. Bugbot is set up for automated code reviews on this repo. Configure here.