Public dry run dryrun-0b6a82183be2
Source commit: 0b6a82183be25780b308c75442a9b5f602f727d4
This commit is contained in:
parent
8c0c336ae9
commit
5386bb851f
16 changed files with 608 additions and 95 deletions
|
|
@ -32,6 +32,7 @@ function expect(source, name, pattern) {
|
|||
|
||||
const criteria = read("cli_acceptance_criteria.md");
|
||||
const cli = read("crates/disasmer-cli/src/main.rs");
|
||||
const outputModeSmoke = read("scripts/cli-output-mode-smoke.js");
|
||||
|
||||
expect(criteria, "header", /^# Disasmer CLI-First MVP Acceptance Criteria/m);
|
||||
expect(
|
||||
|
|
@ -76,6 +77,8 @@ assert.deepStrictEqual(
|
|||
|
||||
for (const [name, pattern] of [
|
||||
["top-level version metadata", /#\[command\(name = "disasmer", version, arg_required_else_help = true\)\]/],
|
||||
["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\)/],
|
||||
["auth status command", /enum AuthCommands[\s\S]*Status\(AuthStatusArgs\)/],
|
||||
["auth logout command", /enum AuthCommands[\s\S]*Logout\(AuthLogoutArgs\)/],
|
||||
|
|
@ -99,6 +102,8 @@ for (const [name, pattern] of [
|
|||
for (const [name, pattern] of [
|
||||
["CLI parse coverage", /fn cli_first_mvp_command_surface_parses\(\)/],
|
||||
["CLI version coverage", /fn top_level_version_is_available\(\)/],
|
||||
["CLI JSON parse coverage", /fn cli_first_json_mode_parses_for_primary_commands\(\)/],
|
||||
["CLI human output coverage", /fn human_report_is_text_not_json\(\)/],
|
||||
["project local config coverage", /fn project_init_select_and_status_use_local_project_config\(\)/],
|
||||
["build no full repo upload coverage", /fn build_command_reuses_bundle_inspection_without_full_repo_upload\(\)/],
|
||||
["safe coordinator-required plans", /fn node_enroll_and_process_commands_have_safe_plan_without_coordinator\(\)/],
|
||||
|
|
@ -106,4 +111,26 @@ for (const [name, pattern] of [
|
|||
expect(cli, name, pattern);
|
||||
}
|
||||
|
||||
for (const [name, pattern] of [
|
||||
["agent --json flag", /struct AgentEnrollArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["bundle inspect --json flag", /struct BundleInspectArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["build --json flag", /struct BuildArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["run --json flag", /struct RunArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["node attach --json flag", /struct AttachArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["DAP plan --json flag", /struct DapArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
["shared scope --json flag", /struct CliScopeArgs[\s\S]*#\[arg\(long\)\]\s*json: bool/],
|
||||
]) {
|
||||
expect(cli, name, pattern);
|
||||
}
|
||||
|
||||
for (const [name, pattern] of [
|
||||
["human default assertion", /default output should be human-readable text, not JSON/],
|
||||
["login JSON mode", /\["login", "--coordinator", "https:\/\/coord\.example\.test", "--json"\]/],
|
||||
["doctor human mode", /\["doctor"\]/],
|
||||
["bundle inspect JSON mode", /\["bundle", "inspect", "--project", project, "--json"\]/],
|
||||
["auth expiry posture", /token_expiry_posture[\s\S]*expires_at/],
|
||||
]) {
|
||||
expect(outputModeSmoke, name, pattern);
|
||||
}
|
||||
|
||||
console.log("CLI-first contract smoke passed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue