mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-08 08:11:17 -10:00
OPR.0.4.0.26: fix rig ps --help to match the slimmed node-list contract (rev1-r2)
rev1-r2 BLOCKING (candidate d2115e9d): the rig ps help still advertised the
pre-0.4.0 node payload - it said --full emits the complete per-node payload
"including ... recoveryGuidance" and that --nodes --json --full is "same as
pre-0.4.0 default". Both are now false: the node-list intentionally returns
recoveryGuidance null and contextUsage.currentUsage null (relocated to the
single-node detail / whoami).
Fix (AC-4 in-CLI documentation):
- Rewrote the --full description: full relative to the compact CLI projection,
but the node-list carries recoveryGuidance: null and
contextUsage.currentUsage: null even with --full; fetch full guidance and
currentUsage from /api/rigs/:rigId/nodes/:logicalId or rig whoami.
- Dropped "(same as pre-0.4.0 default)" from the --nodes --json --full example.
- Added a regression test (captures the rendered help via outputHelp) asserting
the help no longer advertises the old contract and documents the null
relocation.
ps.test 63/63 green; cli tsc clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
1 parent
d2115e9d19
commit
98986a3501
2 files changed
+26
-3
No files matched your search
@@ -484,8 +484,12 @@ Default frontier source: use 'rig queue list' for pending work items.
|
||||
|
||||
Compact defaults: 'rig ps --nodes' shows a compact summary per node
|
||||
(rig, session, lifecycle, activity state, reason when attention, queue counts).
|
||||
Use '--full' (or '--verbose') for the complete per-node payload including
|
||||
contextUsage, recoveryGuidance, resume commands, and agent references.
|
||||
Use '--full' (or '--verbose') for the complete per-node LIST payload
|
||||
(contextUsage scalars, resume commands, agent references). Note (OPR.0.4.0.26):
|
||||
the node-list payload intentionally carries recoveryGuidance: null and
|
||||
contextUsage.currentUsage: null even with --full; fetch the full recovery
|
||||
guidance and currentUsage from the single-node detail
|
||||
(/api/rigs/:rigId/nodes/:logicalId) or 'rig whoami'.
|
||||
|
||||
Compact field set (--nodes default): rigName, canonicalSessionName,
|
||||
lifecycleState, agentActivity.state, agentActivity.reason (when attention),
|
||||
@@ -505,7 +509,7 @@ Examples:
|
||||
rig ps --filter name-prefix=demo Filter by rig-name prefix
|
||||
rig ps --nodes Per-node compact summary (human; truncated to ${HUMAN_NODE_BUDGET})
|
||||
rig ps --nodes --json Per-node compact summary (JSON; bare array)
|
||||
rig ps --nodes --json --full Complete per-node payload (same as pre-0.4.0 default)
|
||||
rig ps --nodes --json --full Complete per-node LIST payload (guidance/currentUsage relocated to node detail)
|
||||
rig ps --nodes --json --rig openrig-build Compact nodes filtered to one rig
|
||||
rig ps --nodes --json --session dev1-impl@myrig Filter to a single session
|
||||
rig ps --nodes --json --limit 50 Bounded per-node JSON envelope
|
||||
|
||||
@@ -845,3 +845,22 @@ describe("Ps CLI", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("OPR.0.4.0.26 — rig ps help reflects the slimmed node-list contract", () => {
|
||||
it("no longer advertises the pre-0.4.0 complete node payload (recoveryGuidance/currentUsage relocated)", () => {
|
||||
// Capture the FULL rendered help (the addHelpText "after" block is only in
|
||||
// outputHelp, not helpInformation). Normalize whitespace so commander's
|
||||
// line-wrapping doesn't split tokens.
|
||||
let out = "";
|
||||
const cmd = psCommand();
|
||||
cmd.configureOutput({ writeOut: (s) => { out += s; } });
|
||||
cmd.outputHelp();
|
||||
const help = out.replace(/\s+/g, " ");
|
||||
// The now-false pre-0.4.0 promises are gone.
|
||||
expect(help).not.toContain("same as pre-0.4.0 default");
|
||||
expect(help).not.toContain("recoveryGuidance, resume commands");
|
||||
// The new node-list contract is documented in-CLI (AC-4).
|
||||
expect(help).toContain("recoveryGuidance: null");
|
||||
expect(help).toContain("contextUsage.currentUsage: null");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user