mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-26 07:58:14 +00:00
89bead7a0e
Restart-PveContainer gained ConfirmImpact.High in the F062 fix, which correctly prompts for confirmation on destructive operations. The integration test was missing -Confirm:$false, causing a NullReferenceException in non-interactive CI. The cascading failure also broke the Copy-PveContainer test (F081). Also updates CONTRIBUTING.md to reference .NET SDK 10.0+ (was 9.0+) to match all CI workflows and test project TFM (F083). Includes scan-6 review report and findings database update (F001-F083). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
PSProxmoxVE — Claude Code Instructions
Project Overview
C# binary PowerShell module for managing Proxmox VE (PVE) infrastructure. Two projects:
src/PSProxmoxVE/— Cmdlets and module surface (targets netstandard2.0)src/PSProxmoxVE.Core/— Services, models, HTTP client (targets netstandard2.0)
Tests: xUnit (tests/PSProxmoxVE.Core.Tests/) and Pester 5 (tests/PSProxmoxVE.Tests/).
Build & Test
# Build
dotnet build PSProxmoxVE.sln
# xUnit tests
dotnet test tests/PSProxmoxVE.Core.Tests/
# Pester tests (requires pwsh)
pwsh -Command "Invoke-Pester tests/PSProxmoxVE.Tests/ -Output Detailed"
# Run all tests via helper
pwsh -File tools/Invoke-Tests.ps1
Key Conventions
- All cmdlets use
Pvenoun prefix - All cmdlet classes must be
sealed - All cmdlets must have
[OutputType]attribute - Destructive cmdlets must set
ConfirmImpact = ConfirmImpact.High - VmId parameters:
[ValidateRange(100, 999999999)], nullable when optional - JSON: Newtonsoft.Json only (
[JsonProperty]), no System.Text.Json attributes - Task polling: always use
TaskService.WaitForTask, never inline loops - Passwords:
SecureStringtype, never plainstring - URL paths:
Uri.EscapeDataString()on all dynamic path segments - No bare
catch {}blocks — use specific or filtered exceptions - Verb class constants required (
VerbsCommon.Get, not"Get")
Review System
This repo uses a structured review system to track findings and prevent regressions.
Key files
docs/review/findings.json— stable findings database. IDs are permanent (F001, F002...). Never renumber. Read this before any coding session to understand open issues.docs/review/REVIEW_REPORT.md— latest full review report (scan-6, 2026-03-23)DECISIONS.md— architectural decisions and anti-patterns. Read this before writing any new code. It documents patterns that were deliberately chosen or changed and must not be reintroduced.
Before starting a coding session
- Read
DECISIONS.mdto understand established patterns - Check
docs/review/findings.jsonfor open findings relevant to the area you're working in - Do not introduce patterns listed as anti-patterns in DECISIONS.md
Finding ID stability
Finding IDs (F001, F002...) are permanent. A resolved finding is never deleted from
findings.json — it is marked resolved with evidence of the fix. If a finding reappears,
it is marked regressed and retains its original ID.