mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 11:15:34 +00:00
b90791e2bf
D001-D021 become ADR 0001-0021 in docs/decisions/, one decision per file. D017's PESTER_VERSION amendment was a second decision in one entry and becomes ADR 0022. ADR 0023 records the migration and reverses the lane2-change-plan ruling that deliberately kept DECISIONS.md until the CI lane work landed. DECISIONS.md is reduced to a stub with a D-to-ADR redirect table, so the four released CHANGELOG entries and older issue bodies that cite it degrade to a redirect rather than a dead reference. docs/review/ and docs/lane2-change-plan.md are deleted (ADR 0024). Of 91 findings, 83 were resolved and six of the seven still open were already GitHub issues; F021 was the exception and is now #130. CLAUDE.md's Key Conventions list gains the two rules it was missing and becomes the checklist, with the ADRs carrying rationale.
31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
# ADR 0011 — Verb class constants required for cmdlet attributes
|
|
|
|
- **Status:** Accepted
|
|
- **Date:** 2026-03-21
|
|
- **Deciders:** unrecorded; adopted during review scan 2026-03-21
|
|
- **Context source:** `docs/review/findings.json` F009
|
|
|
|
## Context
|
|
|
|
`Reset-PveVm` declared `[Cmdlet("Reset", ...)]` with a string literal while every other cmdlet used the verb constants. "Reset" is an approved verb, so nothing was broken — but a typo in that position produces a cmdlet with an unapproved verb, which surfaces only as a module-load warning.
|
|
|
|
## Decision
|
|
|
|
Every `[Cmdlet]` attribute names its verb through the verb classes — `VerbsCommon`, `VerbsLifecycle` and the rest — never as a string literal.
|
|
|
|
```csharp
|
|
[Cmdlet(VerbsCommon.Reset, "PveVm")]
|
|
```
|
|
|
|
## Rejected alternatives
|
|
|
|
The string literal. It compiles, reads identically, and moves verb validation from the compiler to a runtime warning nobody reads:
|
|
|
|
```csharp
|
|
[Cmdlet("Reset", "PveVm")]
|
|
```
|
|
|
|
## Consequences
|
|
|
|
The noun half is still a string literal and gets no such protection; the `Pve` prefix convention is enforced by review, not by the compiler.
|