You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invoke-PSScriptAnalyzer.ps1 writes logs/psscriptanalyzer-summary.json with keys Errors, Information, TotalFiles, TotalIssues, Warnings, HasErrors — but no Timestamp field. This is the only JSON result file in logs/ that completely lacks a timestamp, preventing correlation with other lint results.
Current Behavior
The summary JSON has no way to determine when the scan was performed. All other JSON result files in logs/ include a timestamp.
Expected Behavior
The summary JSON includes a Timestamp field using Get-StandardTimestamp from CIHelpers.psm1, consistent with all other result files.
Root Cause
The summary hashtable was built with only statistical fields and no timestamp was included in the original implementation.
Files Requiring Changes
File
Change
scripts/linting/Invoke-PSScriptAnalyzer.ps1
Add Timestamp = Get-StandardTimestamp to summary hashtable
Select Task Researcher from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Research adding a Timestamp field to psscriptanalyzer-summary.json. Investigate: (1) Read scripts/linting/Invoke-PSScriptAnalyzer.ps1 and find the summary hashtable construction (exact line numbers). (2) Identify all fields currently in the summary hashtable. (3) Verify Get-StandardTimestamp is available from CIHelpers.psm1 (from Issue #993). (4) Check whether CIHelpers.psm1 is already imported. (5) Check existing Pester tests for summary JSON assertions. (6) Verify no downstream consumers (CI workflows) parse the summary JSON in a way that would break with an added field.
Phase 2: Plan
Select Task Planner from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Plan adding a Timestamp field to the psscriptanalyzer-summary.json output. The plan should cover: (1) Adding Timestamp = Get-StandardTimestamp to the summary hashtable. (2) Verifying CIHelpers.psm1 is imported. (3) Updating Pester tests to assert the Timestamp field exists. (4) Validation: npm run test:ps, npm run lint:ps.
Phase 3: Implement
Select Task Implementor from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Implement adding a Timestamp field to psscriptanalyzer-summary.json following the plan. Steps: (1) Add Timestamp = Get-StandardTimestamp to the summary hashtable at the identified location. (2) Verify CIHelpers.psm1 import is present. (3) Update Pester test assertions. (4) Run npm run lint:ps and npm run test:ps. (5) Run npm run lint:ps and verify logs/psscriptanalyzer-summary.json now contains a Timestamp field with ISO 8601 UTC format.
Phase 4: Review
Select Task Reviewer from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Review the Timestamp field addition to psscriptanalyzer-summary.json. Verify: (1) Timestamp = Get-StandardTimestamp is added to the summary hashtable. (2) CIHelpers.psm1 is imported. (3) The new field is a valid ISO 8601 UTC string ending in Z. (4) No other summary fields were modified. (5) Pester tests updated and passing. (6) npm run lint:ps clean. (7) The summary JSON now includes the Timestamp field alongside existing fields.
Summary
Invoke-PSScriptAnalyzer.ps1writeslogs/psscriptanalyzer-summary.jsonwith keysErrors,Information,TotalFiles,TotalIssues,Warnings,HasErrors— but noTimestampfield. This is the only JSON result file inlogs/that completely lacks a timestamp, preventing correlation with other lint results.Current Behavior
The summary JSON has no way to determine when the scan was performed. All other JSON result files in
logs/include a timestamp.Expected Behavior
The summary JSON includes a
Timestampfield usingGet-StandardTimestampfrom CIHelpers.psm1, consistent with all other result files.Root Cause
The summary hashtable was built with only statistical fields and no timestamp was included in the original implementation.
Files Requiring Changes
scripts/linting/Invoke-PSScriptAnalyzer.ps1Timestamp = Get-StandardTimestampto summary hashtableFix Guidance
Get-StandardTimestampis available (requires Issue Add Get-StandardTimestamp utility to CIHelpers module #993 merged first).Invoke-PSScriptAnalyzer.ps1.Timestamp = Get-StandardTimestampto the hashtable.Timestampfield exists and is a valid ISO 8601 UTC string.Depends on: #993 (Get-StandardTimestamp utility)
RPI Framework Starter Prompts
Phase 1: Research
Select Task Researcher from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 2: Plan
Select Task Planner from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 3: Implement
Select Task Implementor from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 4: Review
Select Task Reviewer from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
References
scripts/linting/Invoke-PSScriptAnalyzer.ps1— target scriptscripts/lib/Modules/CIHelpers.psm1—Get-StandardTimestampsource