Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changes/fix-shared-difference-unknown-profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Fixed

- **A CLI on cli-core 0.717.0 or later passes `cli-dev audit --family` again.** cli-core 0.715 and 0.716 named an
unknown profile twice, `account-remove.unknown-profile` and `account-rename.unknown-profile`, and the CLIs published
on them still do. The audit blamed every CLI that has the first name, including the one being released, so each
release needed its own exception. It is now a shared difference, reviewed after 2026-12-10, when the family has
moved to `profile.unknown`.
15 changes: 14 additions & 1 deletion src/dev/audit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as v from "valibot"
import { beforeEach, describe, expect, it } from "vitest"
import { commandsDocument } from "../commands/document.js"
import { annotate } from "../commands/index.js"
import { AUDIT_RULES, PARITY_GROUPS, type ParityGroup, REQUIRED_ROOTS } from "../standards/audit.js"
import { AUDIT_RULES, PARITY_GROUPS, type ParityGroup, REQUIRED_ROOTS, SHARED_DIFFERENCES } from "../standards/audit.js"
import { listEnvelopeSchema } from "../standards/output.js"
import { VOCABULARY } from "../standards/vocabulary.js"
import { type AuditInput, type AuditOptions, auditClis, scorecardTable, snakeKeys } from "./audit.js"
Expand Down Expand Up @@ -327,6 +327,19 @@ describe("audit rules", () => {
"a+c reason sync.failed: code: a: provider_error, c: network_error",
])
})

// A CLI on cli-core 0.717.0 or later gives account rename profile.unknown; the published CLIs on an older one still
// name the failure twice, which is theirs to fix with their next bump, not the released CLI's.
it("lets a CLI release while older CLIs still name an unknown profile twice", () => {
const message = "no profile by this name on this computer"
const remove = { reason: "account-remove.unknown-profile", code: "not_found" as const, message, details: [] }
const rename = { reason: "account-rename.unknown-profile", code: "not_found" as const, message, details: [] }
const inputs = [inputOf(tool("a"), { reasons: [remove] }), inputOf(tool("b"), { reasons: [remove, rename] })]
const blocking = (shared: AuditOptions["shared"]) =>
auditClis(inputs, options({ only: "a", family: true, shared })).blocking.map((one) => one.target)
expect(blocking([])).toContain("a+b reason account-remove.unknown-profile=account-rename.unknown-profile")
expect(blocking(SHARED_DIFFERENCES)).toEqual([])
})
})

describe("judging an audit", () => {
Expand Down
6 changes: 6 additions & 0 deletions src/standards/audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ const FAMILY_SINCE_0_98 = [
"reason profile.unknown: code",
"b24 gives it not_found, drive validation_error (measured 2026-11-13)",
),
{
rule: REASON,
target: "reason account-remove.unknown-profile=account-rename.unknown-profile",
reason: "one failure under two names in cli-core 0.715–0.716; 0.717.0 gives account rename profile.unknown",
review_after: "2026-12-10",
},
]

export const PARITY_GROUPS: ParityGroup[] = defineParityGroups([
Expand Down