Skip to content

review: judge lenses over the cli - #134

Merged
CMGS merged 3 commits into
masterfrom
review/judge
Sep 9, 2026
Merged

CMGS merged 3 commits into
masterfrom
review/judge

Conversation

@CMGS

@CMGS CMGS commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

What

A judgment-lens pass (reuse, simplification, efficiency, altitude, interface, over-design, dead) over every production file of the cli, read in full. Two commits, one per wave; every change is listed in the commit bodies. Highlights:

  • cmd/pod/resource.go and describe: the --filter expression is parsed once, before the RPC, and applied as a predicate inside describe, so every node's percentages are computed once for any output format; the two channel drainers collapse into describeChOr, the four ratio blocks into ratio and sumParams.
  • cmd/node/status.go: the periodic mode beats once before its ticker instead of waiting a full interval for the first report.
  • cmd/utils/file.go: SplitFiles rejects a malformed src:dst spec instead of silently dropping it.
  • cmd/image: the build progress index is the map's size; cache and remove hold the RPC options directly.
  • cmd/workload: the force flag is built once; copy opens its destination with O_EXCL instead of stat-then-write; sendlarge logs its error once; the lambda stdin flag lives in the deploy options only.
  • dead code cut: the ParseRAMInHuman wrapper, the --cpu/--memory shortcut defaults that IsSet never saw, zero-value flag fields, the filter goroutine.

Lines

Production −103 net; tests −55 net (the cli-side re-test of core's ParseRAMInHuman is gone; a filter test moved into describe).

Evidence

Gate on the branch: build, vet, full tests, make lint, make fmt-check and asl on both GOOS green; comment delta +0 −2.

CMGS added 3 commits September 9, 2026 08:58
The build progress index is the map's size; cache and remove hold the
RPC options directly; the lambda stdin flag lives in the deploy options
only.
The node status command beats once before its ticker; pod flags drop
their zero-value defaults and pod nodes rejects a missing name; the
pod resource filter is parsed once, before the RPC, and applied as a
predicate inside describe, so every node's percentages are computed
once for any output format; SplitFiles rejects a malformed spec
instead of dropping it; the ParseRAMInHuman wrapper is gone; the force
flag is built once; copy opens its destination with O_EXCL; sendlarge
logs once; ramOption returns on the shortcut first; describe collapses
the two channel drainers into describeChOr and the four ratio blocks
into ratio/sumParams; CPUs render without trailing zeros; the spec
yaml tags carry only names.
The path is the user's --dir joined with the workload's file name, the
same path WriteFile took before the O_EXCL open replaced it.
@CMGS
CMGS merged commit c860ec4 into master Sep 9, 2026
3 checks passed
@CMGS
CMGS deleted the review/judge branch September 9, 2026 08:16
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