Thoroughness pass: deploy rename, prompt tightening, StrictMode 3, Pester + ps-quality CI #168
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!168
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/spirelens-omnibus-thoroughness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes out the original 6-item PS5→PS7 hardening plan plus the follow-on items uncovered during the issue-agent debug arc on #142.
1. Deploy paths follow the bridge rename
prepare-issue-agent-job.ps1now reads fromout/SpireLensMcpBridge/SpireLensMcpBridge.dlland copies asmods/SpireLensMcpBridge.{dll,json}, matching the manifest id after spire-lens-mcp#1 + spire-lens-mcp#9. The mod loader pairs<id>.dll↔<id>.jsonby basename, so basename must match the manifest id. Added explicit stale-file cleanup formods/SpireLensMcp.{dll,json}left over on existing runners (the previous$staleMcpFoldercleanup only matched a folder the deploy never created).2. Test-plan LLM prompt — per-id
scenario_id_validationcontractRun 25171327395 failed at
run-issue-agent-phases.ps1:776:The LLM declared
ANGERinscenario_setup.deckbut didn't include a matching entry inscenario_id_validation.cards. The prior prompt said "every id must be validated through MCP catalog tools" — interpreted by the LLM as "do the lookup," not "include the artifact row." Tightened to: (a)scenario_id_validation.cardsMUST contain one entry per id indeck/add_cards/remove_cards, same for relics; (b) walk every id and confirm coverage before writing the JSON.3.
Set-StrictMode -Version 2.0 → 3.0in all 6 scriptsEmpirically verified on PS 7.4 that V2 already catches missing PSCustomObject/hashtable/OrderedDict properties + uninitialized variables; V3 only adds out-of-bounds array indexing. Audited every array-indexing pattern; both spots (
$args[$i+1]in aCount-1bounded loop,$match[0]guarded byCount -eq 0early-return) are safe. NoGet-PropertyValue-funnel refactor was actually required — V2 was already enforcing that surface.4. Pester tests for the JSONL parsers
.github/scripts/tests/{Phases,Summarize}.Tests.ps1— 42 tests covering:ConvertTo-Array292a33a) — array-shape preservation across null/single/many inputGet/Set-PropertyValue35d3cda) — works for both[ordered]@{}and PSCustomObjectFormat-FailureCategories[ordered]@{}iteration bugGet-ClaudeToolCallSummary/Get-ClaudeCostSummarypermission_denialsaccountingGet-ExitCodeText4cb3d25Get-NestedPropertyValue,Read-JsonOrNull,Format-Usd,Get-TextBlob,Test-TextMentions*Tests don't dot-source the parent scripts (they have script-level main flows that need GH Actions context).
Helpers.psm1::Import-ScriptFunctionsAST-extracts the function bodies from the live source so tests stay in lockstep — no copied helpers to drift.5.
ps-quality.yml— PSScriptAnalyzer + Pester on PRsTriggers on PRs touching
.github/scripts/**or this workflow. Fails on Error-severity ScriptAnalyzer findings (currently 0 in the script tree) and on any failing Pester test. Pester output uploads as a JUnitXml artifact for downstream consumption.The 81 existing Warning-severity findings are intentionally tolerated until the surface is tuned — they're mostly
PSAvoidUsingWriteHost(the scripts use Write-Host for GH Actions log groups) and naming-preference rules likePSUseSingularNouns. Workflow comment notes the eventual ratchet.Out of scope / explicitly deferred
SpireLens.Mcprename — wider refactor, separate concern from the bridge surface naming. Documented in spire-lens-mcp#9.PSAvoidUsingEmptyCatchBlockswallows are intentional per-line JSONL parse tolerance).