Skip to content

test: add install verification workflow#922

Merged
rjmurillo merged 5 commits into
mainfrom
copilot/add-ci-workflow-install-script
Jan 16, 2026
Merged

test: add install verification workflow#922
rjmurillo merged 5 commits into
mainfrom
copilot/add-ci-workflow-install-script

Conversation

Copilot AI commented Jan 15, 2026

Copy link
Copy Markdown
Contributor
  • Review install script/config and verification requirements
  • Add Verify-InstallOutput script with Pester coverage
  • Add verify-install-script workflow with paths-filter matrix
  • Document CI verification in scripts/README.md
  • Run targeted verification tests and update session log
Original prompt

This section details on the original issue you should resolve

<issue_title>test: add CI workflow to verify install script on Windows, macOS, and Linux</issue_title>
<issue_description>## Summary

Create a GitHub Actions workflow to verify the PowerShell install script (scripts/install.ps1) works correctly on all supported platforms.

Background

The install script installs agent definitions to three environments:

  • Claude Code: $HOME/.claude/agents/ (global) or .claude/agents/ (repo)
  • GitHub Copilot CLI: $HOME/.config/gh-copilot/agents/ (global) or .copilot/agents/ (repo)
  • VS Code: $HOME/.vscode/agents/ (global) or .vscode/agents/ (repo)

Currently, the install script is only tested manually. Automated CI verification ensures cross-platform compatibility.

Research Findings

Authentication Blockers

CLI Blocker Impact
Claude Code API key required Cannot verify CLI loads agents
GitHub Copilot CLI Paid subscription + PAT Cannot verify CLI loads agents
VS Code Not preinstalled Would add 1-3 min per platform

Recommendation: Use file-based verification (check files exist and match source) rather than CLI verification. This tests 90% of script functionality without authentication.

PowerShell Availability

PowerShell Core (pwsh) is preinstalled on all GitHub-hosted runners:

  • ubuntu-latest: pwsh 7.x
  • macos-latest: pwsh 7.x
  • windows-latest: pwsh 7.x (plus Windows PowerShell 5.1)

CLI Installation Commands (for reference)

Claude Code CLI:

# Windows
npm install -g @anthropic-ai/claude-code

# macOS/Linux
curl -fsSL https://claude.ai/install.sh | bash

GitHub Copilot CLI:

# Via gh extension
gh extension install github/gh-copilot

Proposed Workflow Design

Option A: Single Workflow with Matrix (Recommended)

name: Verify Install Script
on:
  push:
    paths: ['scripts/install.ps1', 'scripts/lib/**', 'src/**']
  pull_request:
    paths: ['scripts/install.ps1', 'scripts/lib/**', 'src/**']

jobs:
  verify-install:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        environment: [Claude, Copilot, VSCode]
        scope: [Global, Repo]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - name: Run install script
        shell: pwsh
        run: |
          if ('${{ matrix.scope }}' -eq 'Global') {
            ./scripts/install.ps1 -Environment ${{ matrix.environment }} -Global -Force
          } else {
            ./scripts/install.ps1 -Environment ${{ matrix.environment }} -RepoPath . -Force
          }
      - name: Verify files installed
        shell: pwsh
        run: |
          # Verification script checks expected files exist
          ./scripts/tests/Verify-InstallOutput.ps1 -Environment ${{ matrix.environment }} -Scope ${{ matrix.scope }}

Option B: Separate Workflows per OS

Pros: OS-specific configuration easier to manage
Cons: More files to maintain, harder to see overall status

Acceptance Criteria

MUST Requirements

  • Workflow runs on push/PR when scripts/install.ps1 or scripts/lib/** change
  • Tests all 3 environments (Claude, Copilot, VSCode)
  • Tests both Global and Repo scopes
  • Runs on Windows, macOS, and Linux runners
  • Verifies correct files created in expected directories
  • Reports clear pass/fail status for each matrix combination
  • Non-interactive mode (no prompts)

SHOULD Requirements

  • Use dorny/paths-filter to skip when no relevant files changed
  • Follow existing pester-tests.yml patterns
  • Add verification helper script: scripts/tests/Verify-InstallOutput.ps1

WILL NOT (Out of Scope)

  • Verify CLI loads agents (authentication blocker)
  • Test remote installation (iex from GitHub URL)

Implementation Tasks

  1. Create Verify-InstallOutput.ps1 helper script
  2. Create .github/workflows/verify-install-script.yml
  3. Add Pester tests for the verification script
  4. Document expected behavior in scripts/README.md

Cost Estimate

  • Full matrix (3 OS × 3 env × 2 scope = 18 jobs): ~$0.15-0.25 per run
  • With paths-filter: Only runs when relevant files change

Related

  • Install script: scripts/install.ps1
  • Install module: scripts/lib/Install-Common.psm1
  • Config: scripts/lib/Config.psd1
  • Existing tests: scripts/tests/

Analysis artifact: .agents/analysis/install-script-ci-workflow-analysis.md</issue_description>

<agent_instructions>## Observations

The repository has a well-established PowerShell-based installation system with file:scripts/install.ps1 as the unified entry point, file:scripts/lib/Install-Common.psm1 providing shared functions, and file:scripts/lib/Config.psd1 defining environment-specific paths. The existing file:.github/workflows/pester-tests.yml demonstrates the pattern for cross-platform testing with `dorny/paths...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
@github-actions github-actions Bot added area-workflows GitHub Actions workflows automation Automated workflows and processes github-actions GitHub Actions workflow updates labels Jan 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Validation Report

Note

Status: PASS

Description Validation

Check Status
Description matches diff PASS

QA Validation

Check Status
Code changes detected True
QA report exists false

⚡ Warnings

  • QA report not found for code changes (recommended before merge)

Powered by PR Validation workflow

@github-actions

Copy link
Copy Markdown
Contributor

Session Protocol Compliance Report

Tip

Overall Verdict: PASS

All session protocol requirements satisfied.

What is Session Protocol?

Session logs document agent work sessions and must comply with RFC 2119 requirements:

  • MUST: Required for compliance (blocking failures)
  • SHOULD: Recommended practices (warnings)
  • MAY: Optional enhancements

See .agents/SESSION-PROTOCOL.md for full specification.

Compliance Summary

Session File Verdict MUST Failures
sessions-2026-01-15-session-2-add-workflow-verify-install-script.md ✅ COMPLIANT 0

Detailed Validation Results

Click each session to see the complete validation report with specific requirement failures.

📄 sessions-2026-01-15-session-2-add-workflow-verify-install-script

✨ Zero-Token Validation

This validation uses deterministic PowerShell script analysis instead of AI:

  • Zero tokens consumed (previously 300K-900K per debug cycle)
  • Instant feedback - see exact failures in this summary
  • No artifact downloads needed to diagnose issues
  • 10x-100x faster debugging

Powered by Validate-SessionJson.ps1

📊 Run Details
Property Value
Run ID 21057567654
Files Checked 1
Validation Method Deterministic script analysis

Powered by Session Protocol Validator workflow

@github-actions

github-actions Bot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

AI Quality Gate Review

Tip

Final Verdict: PASS

Walkthrough

This PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:

  • Security Agent: Scans for vulnerabilities, secrets exposure, and security anti-patterns
  • QA Agent: Evaluates test coverage, error handling, and code quality
  • Analyst Agent: Assesses code quality, impact analysis, and maintainability
  • Architect Agent: Reviews design patterns, system boundaries, and architectural concerns
  • DevOps Agent: Evaluates CI/CD, build pipelines, and infrastructure changes
  • Roadmap Agent: Assesses strategic alignment, feature scope, and user value

Review Summary

Agent Verdict Category Status
Security PASS N/A
QA PASS N/A
Analyst PASS N/A
Architect PASS N/A
DevOps PASS N/A
Roadmap PASS N/A

💡 Quick Access: Click on individual agent jobs (e.g., "🔒 security Review", "🧪 qa Review") in the workflow run to see detailed findings and step summaries.

Security Review Details

Now let me view the session JSON files briefly to check for any exposed secrets:

Now let me check the workflow file more carefully for injection vulnerabilities and permissions:

Security Review Analysis

PR Category Assessment

File Category Review Required
.agents/sessions/*.json CONFIG Schema check only
.github/workflows/verify-install-script.yml WORKFLOW Injection, secrets, permissions
.serena/memories/*.md DOCS None
scripts/README.md DOCS None
scripts/install.ps1 CODE Full OWASP review
scripts/tests/Verify-InstallOutput*.ps1 CODE Test fixture review

Findings

Severity Category Finding Location CWE
None - No vulnerabilities found - -

Analysis Details

Workflow Security (verify-install-script.yml)

  • [PASS] Actions pinned to commit SHAs: actions/checkout@34e114..., dorny/paths-filter@de90cc6...
  • [PASS] Minimal permissions: contents: read only
  • [PASS] Matrix values use static strings: Claude, Copilot, VSCode, Global, Repo
  • [PASS] No secret exposure in logs
  • [PASS] No pull_request_target (avoids fork injection)
  • [PASS] No untrusted input in shell commands (matrix values are hardcoded)

PowerShell Script Security (install.ps1)

  • [PASS] Version parameter validated: [ValidatePattern('^[\w./+-]+$')] prevents command injection
  • [PASS] URL construction uses [System.Uri]::EscapeDataString() for encoding
  • [PASS] No shell command execution with user input
  • [PASS] Proper temp directory cleanup in remote execution
  • [PASS] No hardcoded credentials

Verification Script Security (Verify-InstallOutput.ps1)

  • [PASS] Parameters use ValidateSet for input constraints
  • [PASS] No shell execution with user input
  • [PASS] Paths resolved via Resolve-Path (safe path handling)

Test File Security (Verify-InstallOutput.Tests.ps1)

  • [PASS] Standard Pester test structure
  • [PASS] No test fixtures with real credentials

Session JSON Files

  • [PASS] Protocol compliance metadata only
  • [PASS] No secrets or credentials

Recommendations

None required. The PR follows security best practices.


VERDICT: PASS
MESSAGE: Workflow uses pinned actions, minimal permissions (contents: read), and static matrix values. PowerShell scripts validate input parameters appropriately. No injection vectors, hardcoded secrets, or credential exposure detected.
QA Review Details

Based on my analysis, I can now provide the QA review:


QA Review: PR #922 - test: add install verification workflow

VERDICT: PASS
MESSAGE: Well-structured verification workflow with adequate test coverage for new CODE/WORKFLOW additions.

PR TYPE: MIXED (CODE + WORKFLOW + DOCS)
FILES:
  - CODE: scripts/tests/Verify-InstallOutput.ps1 (new), scripts/tests/Verify-InstallOutput.Tests.ps1 (new)
  - WORKFLOW: .github/workflows/verify-install-script.yml (new)
  - DOCS: scripts/README.md (modified), .serena/memories/install-script-ci-verification-workflow.md (new)
  - CONFIG: .agents/sessions/*.json (session logs)

Test Coverage Assessment

Area Status Evidence Files Checked
Unit tests Adequate Verify-InstallOutput.Tests.ps1 (91 lines, 3 Describe blocks) Verify-InstallOutput.ps1
Edge cases Covered Tests validate parameters, module integration, help docs Parameter validation tests :45-68
Error paths Tested Script has error handling at :47-52, :98-100, :108-109 Via -CI exit codes
Assertions Present 15+ Should assertions across test file All test cases

Quality Concerns

Severity Issue Location Evidence Required Fix
LOW Tests validate structure only, not execution behavior Verify-InstallOutput.Tests.ps1 Tests check script structure/params but no mocked execution tests Consider adding mocked execution tests in follow-up
LOW Workflow inline script uses conditional logic .github/workflows/verify-install-script.yml:85-89,94-98 if ('${{ matrix.scope }}' conditionals Acceptable for simple branching per ADR-006 exception

Regression Risk Assessment

  • Risk Level: Low
  • Affected Components: New workflow only, no changes to existing install.ps1 core logic
  • Breaking Changes: None - additive changes only
  • Required Testing: Workflow already validates via matrix (3 OS × 3 env × 2 scope = 18 combinations)

Evidence Summary

Strengths:

  1. Test file exists for new Verify-InstallOutput.ps1 script (:1-91 in Tests.ps1)
  2. Parameter validation tested: ValidateSet for Environment/Scope verified (:45-68)
  3. Module integration tested: Confirms use of Install-Common functions (:71-90)
  4. Error handling present: Script exits with code 1 on failures (:49, :52, :176-177)
  5. Workflow uses paths-filter: Efficient CI - only runs when relevant files change (:31-44)
  6. Documentation updated: scripts/README.md includes CI verification section (:163-178)

Test Coverage Verification:

  • Verify-InstallOutput.ps1 (180 lines) has corresponding Verify-InstallOutput.Tests.ps1 (91 lines)
  • Tests cover: file existence, help documentation, parameters (4 tests), module integration (3 tests)
  • Workflow delegates actual execution testing to CI matrix (18 job combinations)

Error Handling:

  • Missing module: exits 1 (:49-52)
  • Source directory validation failure: adds to error list (:98-100)
  • Destination missing: adds to error list (:109)
  • CI mode: exits non-zero on any errors (:176-177)

EVIDENCE:
- Tests found: 1 test file for 1 new script (Verify-InstallOutput.Tests.ps1)
- Edge cases: Parameter validation via ValidateSet, help documentation presence
- Error handling: Tested via -CI switch exit codes (0 success, 1 failure)
- Blocking issues: 0
Analyst Review Details

Let me examine the existing codebase patterns and the key files to complete the analysis.

Based on my analysis of the PR diff, existing codebase patterns, and workflow structures, here is my complete assessment:


Code Quality Score

Criterion Score (1-5) Notes
Readability 4 Clear structure, PowerShell standards followed, good inline comments
Maintainability 4 Reuses Install-Common.psm1 functions, follows config-driven patterns
Consistency 5 Matches existing pester-tests.yml structure (dorny/paths-filter, skip jobs, naming)
Simplicity 4 Direct file verification approach, avoids unnecessary CLI authentication complexity

Overall: 4.25/5


Impact Assessment

  • Scope: Module-wide (scripts/ and .github/workflows/)
  • Risk Level: Low
  • Affected Components:
    • scripts/install.ps1 (bugfix for same-path detection)
    • New: scripts/tests/Verify-InstallOutput.ps1
    • New: scripts/tests/Verify-InstallOutput.Tests.ps1
    • New: .github/workflows/verify-install-script.yml
    • scripts/README.md (documentation update)
    • Session logs and Serena memory (standard artifacts)

Findings

Priority Category Finding Location
Low Consistency Workflow lacks test reporter integration found in pester-tests.yml (dorny/test-reporter) .github/workflows/verify-install-script.yml
Low Consistency Skip job does not create empty test result like pester-tests.yml pattern verify-install-script.yml:101-113
Low Documentation Missing newline at end of Serena memory file .serena/memories/install-script-ci-verification-workflow.md
Info Efficiency 18-job matrix (3 OS x 3 env x 2 scope) is justified by issue cost analysis ($0.15-0.25/run) verify-install-script.yml:61-65

Recommendations

  1. Consider adding test reporter for CI visibility - The pester-tests.yml uses dorny/test-reporter for publishing results. The install verification workflow outputs pass/fail but does not publish structured test results. This is acceptable for file-based verification but could improve visibility.

  2. Add trailing newline to memory file - Standard POSIX convention.

  3. Minor: skip-verify-install job - Current skip job pattern works but does not create placeholder test results. This is acceptable since it is not a required status check.


Verdict

VERDICT: PASS
MESSAGE: Well-structured workflow follows established patterns. Bugfix in install.ps1 is correct. Pester test coverage for verification script is adequate. Documentation updated appropriately.

Summary of positive elements:

  • Reuses existing Install-Common.psm1 functions (Get-InstallConfig, Resolve-DestinationPath, Test-SourceDirectory, Get-AgentFiles)
  • Follows pester-tests.yml workflow structure (check-paths job, dorny/paths-filter, skip job pattern)
  • Bugfix adds path normalization to prevent self-referential copy in Claude Repo scope
  • 12 Pester tests validate script structure, parameters, and module integration
  • Documentation in scripts/README.md explains local usage
Architect Review Details

Based on my review of the PR changes, I can now provide a complete architectural assessment.


Design Quality Assessment

Aspect Rating (1-5) Notes
Pattern Adherence 5 Follows established patterns from pester-tests.yml; uses dorny/paths-filter per recommendations
Boundary Respect 5 Clear separation: workflow in .github/workflows/, verification script in scripts/tests/, module reuse from lib/
Coupling 4 Verification script appropriately depends on Install-Common.psm1; single module import point
Cohesion 5 Each component has single responsibility: workflow orchestrates, script verifies, module provides utilities
Extensibility 5 Matrix-based design accommodates future environments/scopes without workflow changes

Overall Design Score: 4.8/5


Architectural Concerns

Severity Concern Location Recommendation
Low APPDATA environment setup duplicates logic verify-install-script.yml:74-80 Consider moving to module function if pattern repeats

Breaking Change Assessment

  • Breaking Changes: No
  • Impact Scope: None
  • Migration Required: No
  • Migration Path: N/A

Technical Debt Analysis

  • Debt Added: Low (minimal new code, follows existing patterns)
  • Debt Reduced: Medium (adds automated verification previously done manually)
  • Net Impact: Improved

ADR Assessment

  • ADR Required: No
  • Decisions Identified: None that warrant ADR
  • Existing ADR: Aligns with ADR-005 (PowerShell-only), ADR-006 (thin workflows, testable modules), ADR-019 (script organization)
  • Recommendation: N/A

Rationale: This PR implements existing architectural decisions rather than introducing new ones. The file-based verification approach was already documented in the issue research and follows established CI patterns.


Recommendations

  1. Documentation is updated correctly in scripts/README.md
  2. Test coverage is present via Verify-InstallOutput.Tests.ps1

Verdict

VERDICT: PASS
MESSAGE: Well-structured implementation following established patterns. Matrix-based CI design provides comprehensive cross-platform coverage with minimal maintenance overhead. Proper module reuse and separation of concerns.
DevOps Review Details

Let me also check the install.ps1 changes and docs update:

Now I have all the context needed to provide a comprehensive DevOps review.


DevOps Review: PR #922 - Install Verification Workflow

PR Scope Detection

Category Files Changed
WORKFLOW .github/workflows/verify-install-script.yml
SCRIPT scripts/tests/Verify-InstallOutput.ps1
CODE scripts/tests/Verify-InstallOutput.Tests.ps1
DOCS scripts/README.md, .serena/memories/, .agents/sessions/

Review scope: Full CI/CD review for workflow, shell quality review for scripts.


Pipeline Impact Assessment

Area Impact Notes
Build None No build process changes
Test Low Adds new verification tests (18 matrix jobs)
Deploy None Verification-only workflow
Cost Low ~$0.15-0.25 per run with paths-filter optimization

CI/CD Quality Checks

Check Status Location
YAML syntax valid verify-install-script.yml
Actions pinned to SHA checkout@34e114876b..., paths-filter@de90cc6fb...
Secrets secure No secrets used
Permissions minimal contents: read on all jobs
Shell scripts robust ErrorActionPreference=Stop, proper exit codes
Matrix fail-fast disabled Intentional for comprehensive testing

Findings

Severity Category Finding Location Fix
None - No blocking issues found - -

Detailed Analysis

1. Workflow Structure (Excellent)

  • Uses dorny/paths-filter to skip unrelated changes, reducing CI cost
  • 3x3x2 matrix (18 jobs) covers all platform/environment/scope combinations
  • fail-fast: false is correct here for comprehensive coverage
  • Skip job provides clear status when paths filter excludes run

2. Action Pinning (Pass)

  • actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2
  • dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
  • Both pinned to full SHA with version comments

3. Permissions (Pass)

  • All jobs use permissions: contents: read
  • No write permissions needed for verification-only workflow

4. Shell Script Quality (Pass)

  • Verify-InstallOutput.ps1 uses $ErrorActionPreference = "Stop"
  • Proper -CI switch for non-zero exit on failure
  • Input validation via ValidateSet attributes
  • Clear [PASS]/[FAIL] status output format

5. Cross-Platform Handling (Pass)

  • APPDATA environment variable correctly set for non-Windows runners
  • Uses pwsh shell consistently (available on all GitHub runners)

6. Pester Tests (Pass)

  • Tests verify script structure, parameters, and module integration
  • Follows existing testing patterns

Template Assessment

  • PR Template: Not applicable (no template changes)
  • Issue Templates: Not applicable

Automation Opportunities

Opportunity Type Benefit Effort
None identified - Workflow is well-optimized -

Recommendations

  1. Consider adding workflow to required_status_checks once validated in production

Verdict

VERDICT: PASS
MESSAGE: Well-structured CI workflow with SHA-pinned actions, minimal permissions, and proper path filtering. Verification script has robust error handling and clear status output.
Roadmap Review Details

I have sufficient context to provide the roadmap review analysis.


Strategic Alignment Assessment

Criterion Rating Notes
Aligns with project goals High Directly supports the "Unified Install Script" epic marked Complete in v1.0. Adds verification layer for a critical P0 capability.
Priority appropriate High Install script is core infrastructure. CI verification ensures cross-platform reliability without manual testing overhead.
User value clear High Contributors and maintainers gain confidence that install changes work on all 3 platforms before merge.
Investment justified High 18 matrix combinations (3 OS x 3 env x 2 scope) covered at ~$0.20/run with paths-filter optimization.

Feature Completeness

Impact Analysis

Dimension Assessment Notes
User Value High Prevents broken installs from reaching users across Windows, macOS, Linux.
Business Impact Medium Reduces support burden and contributor friction. No direct monetization impact.
Technical Leverage High Reuses existing Install-Common.psm1 module. Verification script becomes reusable for local development.
Competitive Position Neutral Standard CI practice. Expected hygiene for cross-platform tools.

Concerns

Priority Concern Recommendation
Low Copilot CLI environment tested at same priority as Claude/VS Code despite P2 status Acceptable. Verification cost is minimal. Maintaining install correctness even for maintenance-mode platforms is reasonable.

Recommendations

  1. Proceed with merge. The change directly supports the Master Product Objective: "Enable development teams to adopt coordinated multi-agent AI workflows across VS Code, GitHub Copilot CLI, and Claude Code with minimal friction."

  2. The implementation follows established patterns from pester-tests.yml and respects ADR-005 (PowerShell only) and ADR-006 (no logic in workflow YAML).

  3. Documentation updated in scripts/README.md with local verification instructions.

Verdict

VERDICT: PASS
MESSAGE: CI verification workflow directly supports the v1.0 "Unified Install Script" epic by ensuring cross-platform reliability. Investment is proportionate to value. No strategic conflicts.

Run Details
Property Value
Run ID 21058100507
Triggered by pull_request on 922/merge
Commit 0616acc237208a8e7e4b6693d3052d535978dde3

Powered by AI Quality Gate workflow

When install.ps1 was run in Claude Repo scope, the Skills installation
attempted to copy .claude/skills to .claude/skills (same source and
destination), causing an infinite recursive copy operation.

The fix adds:
- Path normalization using [System.IO.Path]::GetFullPath() for both
  source and destination paths
- Same-path detection that compares normalized paths
- Graceful handling when source equals destination with informative
  message: "Skills already present in repository"
- Fallback message when source directory doesn't exist

This ensures the script works correctly across all installation scopes
(Global, Repo) without attempting self-referential copy operations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the area-installation Installation scripts label Jan 16, 2026
@rjmurillo-bot rjmurillo-bot changed the title [WIP] Add CI workflow to verify install script on all platforms test: add install verification workflow Jan 16, 2026
- Updated workLog with push, PR title fix, and CI verification actions
- Recorded all 18 matrix jobs passed
- Updated endingCommit to ffa395b
- Marked session end gates as complete

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rjmurillo-bot rjmurillo-bot marked this pull request as ready for review January 16, 2026 06:44
Copilot AI review requested due to automatic review settings January 16, 2026 06:44
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@rjmurillo rjmurillo merged commit 9f43310 into main Jan 16, 2026
74 of 75 checks passed
@rjmurillo rjmurillo deleted the copilot/add-ci-workflow-install-script branch January 16, 2026 06:45
@github-actions github-actions Bot added this to the 0.2.0 milestone Jan 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive CI workflow to verify the PowerShell installation script (scripts/install.ps1) works correctly across all supported platforms (Windows, macOS, Linux) and environments (Claude, Copilot, VS Code) in both Global and Repo scopes. The verification uses file-based checks to validate installations without requiring CLI authentication, addressing a known limitation. A bug in the skills installation logic was also fixed during CI testing.

Changes:

  • Added GitHub Actions workflow with 18-job matrix (3 OS × 3 environments × 2 scopes) using paths-filter optimization
  • Created verification helper script with comprehensive file/directory validation logic
  • Fixed pre-existing bug where Claude Repo scope attempted self-referential skills copy
  • Added Pester tests for verification script structure and documentation updates

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/verify-install-script.yml CI workflow with matrix strategy, paths-filter, and APPDATA setup for non-Windows runners
scripts/tests/Verify-InstallOutput.ps1 Verification helper that validates installed files/directories against config expectations
scripts/tests/Verify-InstallOutput.Tests.ps1 Pester tests covering script structure, parameters, and module integration
scripts/install.ps1 Fixed skills installation bug with path normalization and same-path detection
scripts/README.md Added CI verification section with local usage examples
.serena/memories/install-script-ci-verification-workflow.md Serena memory documenting the implementation
.agents/sessions/2026-01-15-session-2-add-workflow-verify-install-script.json Session log for initial implementation
.agents/sessions/2026-01-15-session-03.json Session log documenting bug fix and CI completion

}
}

if ($Config.InstructionsFile -and $null -ne $Config.InstructionsDest) {

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null check $null -ne $Config.InstructionsDest is inconsistent with other checks in the script. Lines 117, 129, and 143 use implicit truthiness checks without explicit null comparisons. For consistency, this should be $Config.InstructionsDest unless there's a specific reason to distinguish between null and empty string.

Suggested change
if ($Config.InstructionsFile -and $null -ne $Config.InstructionsDest) {
if ($Config.InstructionsFile -and $Config.InstructionsDest) {

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +78
} else {
Join-Path $env:HOME '.config'

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The APPDATA setup for non-Windows platforms uses string comparison '${{ runner.os }}' -eq 'macOS'. While functional, this assumes Linux is the only other option. Consider using explicit checks for both macOS and Linux or adding a comment explaining the assumption that non-Windows, non-macOS means Linux.

Suggested change
} else {
Join-Path $env:HOME '.config'
} elseif ('${{ runner.os }}' -eq 'Linux') {
Join-Path $env:HOME '.config'
} else {
throw "Unsupported runner OS '${{ runner.os }}' for APPDATA configuration."

Copilot uses AI. Check for mistakes.
Comment on lines +86 to +89
It "Uses Get-AgentFiles and Test-SourceDirectory" {
$Script:Content | Should -Match "Get-AgentFiles"
$Script:Content | Should -Match "Test-SourceDirectory"
}

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests only verify that the verification script has the correct structure and contains references to key functions. However, there are no integration tests that actually run Verify-InstallOutput.ps1 with mock installations to validate it correctly identifies missing files or directories. Consider adding integration tests that create temporary test installations and verify the script correctly passes/fails based on file presence.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-installation Installation scripts area-workflows GitHub Actions workflows automation Automated workflows and processes github-actions GitHub Actions workflow updates triage:approved Human has triaged and approved bot responses for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add CI workflow to verify install script on Windows, macOS, and Linux

3 participants