Summarize node readiness in doctor
This commit is contained in:
parent
1c4b045a6a
commit
ab84fd382d
4 changed files with 148 additions and 11 deletions
|
|
@ -102,6 +102,11 @@ expect(
|
|||
"log redaction criteria",
|
||||
/Logs are capped, truncated honestly[\s\S]*preserve byte counts and truncation flags[\s\S]*Secret-like values are redacted[\s\S]*common token\/password\/bearer patterns/
|
||||
);
|
||||
expect(
|
||||
criteria,
|
||||
"doctor node readiness criteria",
|
||||
/`disasmer doctor` reports missing local dependencies[\s\S]*explicit node readiness summary[\s\S]*missing local dependencies[\s\S]*node next actions/
|
||||
);
|
||||
expect(
|
||||
criteria,
|
||||
"quota resource-category criteria",
|
||||
|
|
@ -174,6 +179,7 @@ for (const [name, pattern] of [
|
|||
["human report renderer", /fn human_report\(value: &Value\) -> String/],
|
||||
["shared report emitter", /fn emit_report<T: Serialize>\(report: &T, json_output: bool\) -> Result<\(\)>/],
|
||||
["doctor command", /Doctor\(DoctorArgs\)/],
|
||||
["doctor node readiness summary", /fn node_readiness_summary[\s\S]*ready_to_attach[\s\S]*explicit_attach_required[\s\S]*missing_local_dependencies[\s\S]*next_actions/],
|
||||
["auth status command", /enum AuthCommands[\s\S]*Status\(AuthStatusArgs\)/],
|
||||
["auth logout command", /enum AuthCommands[\s\S]*Logout\(AuthLogoutArgs\)/],
|
||||
["key lifecycle commands", /enum KeyCommands[\s\S]*Add\(KeyAddArgs\)[\s\S]*List\(KeyListArgs\)[\s\S]*Revoke\(KeyRevokeArgs\)/],
|
||||
|
|
@ -477,6 +483,7 @@ for (const [name, pattern] of [
|
|||
["login JSON mode", /\["login", "--coordinator", "https:\/\/coord\.example\.test", "--json"\]/],
|
||||
["doctor human mode", /\["doctor"\]/],
|
||||
["doctor reachability JSON mode", /doctorJson\.coordinator_reachability\.status/],
|
||||
["doctor node readiness JSON mode", /doctorJson\.node_readiness_summary\.status[\s\S]*explicit_attach_required[\s\S]*missing_local_dependencies/],
|
||||
["bundle inspect JSON mode", /\["bundle", "inspect", "--project", project, "--json"\]/],
|
||||
["bundle inspect large input JSON mode", /large_input_policy[\s\S]*SourceSnapshot/],
|
||||
["bundle inspect restart compatibility JSON mode", /restart_compatibility[\s\S]*source_edits_can_restart_from_clean_task_boundary/],
|
||||
|
|
|
|||
|
|
@ -65,11 +65,25 @@ assertHuman("doctor", doctorHuman, [
|
|||
/dependencies:/,
|
||||
/auth:/,
|
||||
/node capabilities:/,
|
||||
/node readiness: (ready_to_attach|local_dependencies_missing|limited_capabilities)/,
|
||||
/node next:/,
|
||||
]);
|
||||
|
||||
const doctorJson = json(["doctor", "--json"]);
|
||||
assert.strictEqual(doctorJson.coordinator_reachability.checked, false);
|
||||
assert.strictEqual(doctorJson.coordinator_reachability.status, "not_configured");
|
||||
assert(
|
||||
["ready_to_attach", "local_dependencies_missing", "limited_capabilities"].includes(
|
||||
doctorJson.node_readiness_summary.status
|
||||
)
|
||||
);
|
||||
assert.strictEqual(doctorJson.node_readiness_summary.explicit_attach_required, true);
|
||||
assert.strictEqual(
|
||||
doctorJson.node_readiness_summary.command_execution_capability,
|
||||
true
|
||||
);
|
||||
assert(Array.isArray(doctorJson.node_readiness_summary.missing_local_dependencies));
|
||||
assert(doctorJson.node_readiness_summary.next_actions.length >= 2);
|
||||
|
||||
const authJson = json(["auth", "status", "--json"], {
|
||||
DISASMER_TOKEN: "token",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue