Skip to content

Comments

Release v1.0.0 — Major module overhaul with health checks, build pipeline, and test suite#5

Merged
christaylorcodes merged 5 commits intomainfrom
develop
Feb 3, 2026
Merged

Release v1.0.0 — Major module overhaul with health checks, build pipeline, and test suite#5
christaylorcodes merged 5 commits intomainfrom
develop

Conversation

@christaylorcodes
Copy link
Owner

Summary

This PR promotes the complete v1.0.0 rewrite from develop to main, covering 5 commits and 199 files changed (+27,789 / -8,346 lines).

Highlights

  • New health check systemTest-CWAAHealth, Repair-CWAA, and scheduled task registration for auto-remediation
  • Sampler/ModuleBuilder build pipeline — replaces single-file build with proper source/ layout, build.ps1, and build.yaml
  • Comprehensive test suite — 496 tests (mocked, cross-version, module structure, security, live)
  • CI/CD via GitHub Actions — smoke tests, PSScriptAnalyzer, prerelease/stable PSGallery publish
  • New functionsTest-CWAAServerConnectivity, Write-CWAAEventLog, Initialize-CWAANetworking, Resolve-CWAAServer, and more
  • Security hardening — graduated SSL validation, vulnerability checks, credential redaction
  • Full documentation refresh — PlatyPS-generated help, architecture docs, 6 example scripts, migration guide

Breaking changes

  • Module source moved from ConnectWiseAutomateAgent/ to source/ (build output is the distributable)
  • All LT aliases are preserved for backward compatibility

Testing

All 496 Pester tests pass (8 skipped, 0 failed). PSScriptAnalyzer clean (warnings only).

See CHANGELOG.md for the full list of additions, changes, and fixes.

christaylorcodes and others added 5 commits January 31, 2026 23:47
Health check system (Test-CWAAHealth, Repair-CWAA, scheduled task management),
server connectivity testing, Windows Event Log integration, lazy networking
initialization with graduated SSL trust, installer cleanup utility, credential
redaction, and 3 private helpers eliminating ~300 lines of duplication.

403 tests across 4 suites, PSScriptAnalyzer clean, CI/CD pipeline for
PSGallery publish, 6 example scripts, full documentation with architecture
diagrams, input validation hardening, and WhatIf/Confirm on all destructive
operations. Variable naming cleanup, error handling standardization, and
PowerShell Core compatibility (5.1 + 7+).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tors

Extract 5 private helper functions to eliminate duplicated code:
- Assert-CWAANotProbeAgent (probe protection in Uninstall/Redo/Reset)
- Invoke-CWAAMsiInstaller (MSI install with retry logic)
- Test-CWAADotNetPrerequisite (.NET 3.5 prerequisite check)
- Test-CWAAServiceExists (service existence check)
- Wait-CWAACondition (generic polling replacing inline stopwatch loops)

Centralize magic numbers as $Script:CWAA* constants in Initialize-CWAA
(timeouts, version thresholds, port ranges, process/service names).

Add -ShowProgress parameter to Install/Uninstall/Update-CWAA with
Write-Progress bars. Add -Credential (PSCredential) to Install-CWAA
and -ProxyCredential to Set-CWAAProxy as secure alternatives.

Improve pipeline support: add ValueFromPipeline/ByPropertyName to
7+ functions, fix ServerPassword escaping placement in Install-CWAA,
change Server to string[] where Get-CWAAInfo pipes arrays.

Add pre-commit hook (.githooks/) running PSScriptAnalyzer and Pester.
455 tests pass, PSScriptAnalyzer clean, single-file build regenerated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nfrastructure

CI/CD: Add release-prerelease and release-stable jobs to ci-publish.yml
that create GitHub Releases with the single-file artifact attached after
successful PSGallery publish. Add Build/Extract-ChangelogEntry.ps1 for
extracting version-specific release notes from CHANGELOG.md.

Version locking: Update all 7 example scripts to pin module versions
with $ModuleVersion variable, -RequiredVersion on Install/Import-Module,
and version-locked GitHub Release URLs for the single-file fallback.
Add version locking section to Docs/Security.md, FAQ entry, and README
guidance recommending pinned versions for production deployments.

Test refactoring: Split monolithic test files (3319-line Mocked.Tests.ps1
and 688-line Tests.ps1) into 9 focused test suites by domain (Commands,
CrossCutting, DataReaders, Installation, PrivateHelpers, ServiceOps,
Module, Documentation, Security). Add shared TestBootstrap.ps1 for
dual-mode loading (Module vs SingleFile), MockHelpers.ps1, test-local.ps1
pre-push validation script, and Invoke-AllTests.ps1 dual-mode runner.
Extend CrossVersion tests with SingleFile dot-source and IEX contexts.

Documentation: Add AGENTS.md as concise AI agent orientation doc (226
lines) replacing verbose CLAUDE.md content. Slim CLAUDE.md to a pointer.
Update CONTRIBUTING.md to reference AGENTS.md for conventions. Remove
MAP.md and TODO.md (planning moved to GitHub Issues/Milestones). Fix
stale MAP.md reference in README.md.

Community: Add GitHub issue templates (bug report, feature request, AI
task), PR template, CODE_OF_CONDUCT.md, SECURITY.md, and
copilot-instructions.md. Add Scripts/Invoke-QuickTest.ps1 for fast
targeted testing during development loops.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace custom Build/ scripts with the standardized
Sampler/ModuleBuilder/InvokeBuild pipeline. ModuleBuilder compiles
individual source files into a single .psm1 at build time, eliminating
40+ dot-source operations at import.

Key changes:
- Rename ConnectWiseAutomateAgent/ to source/ for ModuleBuilder convention
- Add build.ps1, build.yaml, RequiredModules.psd1, Resolve-Dependency.*
- Add source/prefix.ps1 (WOW64 warning) and suffix.ps1 (Initialize-CWAA)
- Add .build/Build_SingleFile_Distribution.build.ps1 for standalone .ps1
- Replace .github/workflows/ci-publish.yml with ci.yml + pr-validation.yml
- Remove Build/ directory (4 scripts) and root ConnectWiseAutomateAgent.ps1
- Update all test files, hooks, docs, and CI for new source/output paths
- Source manifest uses wildcard exports; ModuleBuilder writes explicit lists

Build targets PS 7+; compiled output remains PS 3.0+ compatible.
Verified: 496 tests pass, 0 failures, PSScriptAnalyzer clean.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Promote CHANGELOG entry from [1.0.0-alpha001] to [1.0.0]
- Add GitVersion.yml for CI versioning (was untracked)
- Fix LICENSE copyright year to 2021-2026
- Fill PlatyPS placeholders in module overview doc (Download Help Link, Help Version)
- Add .PARAMETER ProgressAction to all 30 public function source files
- Replace ProgressAction placeholder in 30 function docs and 62 MAML XML entries
- Includes all pending changes from Sampler/ModuleBuilder migration, CI/CD pipeline,
  test refactoring, documentation updates, and example scripts

All 496 tests pass (8 skipped, 0 failed). PSScriptAnalyzer clean (warnings only).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@christaylorcodes christaylorcodes merged commit 55ed8ad into main Feb 3, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant