chore: remove deprecated Validate-Session.ps1 and consolidate into Validate-SessionProtocol.ps1#810
chore: remove deprecated Validate-Session.ps1 and consolidate into Validate-SessionProtocol.ps1#810rjmurillo-bot wants to merge 11 commits into
Conversation
- Validates exact row order matches SESSION-PROTOCOL.md - Implements ADR-007 memory evidence validation - Adds QA skip validation for docs-only and investigation-only claims - Supports PreCommit mode for pre-commit hook integration - Includes branch verification and git commit validation Consolidates validation into single Validate-SessionProtocol.ps1 script.
…ncements - Update AGENTS.md with enhanced validation features - Consolidate Validate-Session.ps1 into Validate-SessionProtocol.ps1 - Update orchestrator agent documentation - Sync CLAUDE.md with AGENTS.md changes Reflects new -SessionPath parameter and validation consolidation.
- Update session end validation instructions to use Validate-SessionProtocol.ps1 - Replace deprecated Validate-Session.ps1 references - Include -SessionPath parameter documentation - Add context about consolidated validation features
Store learning from session regarding pipe detection in PowerShell validators. Includes pattern recognition for escaped quotes and backtick handling.
- Update SHIFT-LEFT.md to reference Validate-SessionProtocol.ps1 - Update remediation-adr-workflow.md validation script reference - Fix CRITICAL-CONTEXT.md link formatting - Update technical-guardrails.md validation reference - Sync pre-commit hook with updated validation script
…ocol.ps1 - Delete deprecated scripts/Validate-Session.ps1 (consolidated into Validate-SessionProtocol.ps1) - Update Test-InvestigationEligibility.Tests.ps1 to source from Validate-SessionProtocol.ps1 - Update Test-InvestigationEligibility.ps1 comments to reference canonical validator - Update New-PR.ps1 to use Validate-SessionProtocol.ps1 - All validator features now in single consolidated script per consolidation effort
- Update Test-InvestigationEligibility.ps1 to use bracket notation [.] - Update test expectations to match bracket notation - Ensures pattern consistency with Validate-SessionProtocol.ps1 - All tests now pass (27/27)
PR Validation ReportNote ✅ Status: PASS Description Validation
QA Validation
⚡ Warnings
Powered by PR Validation workflow |
Spec-to-Implementation ValidationWarning No spec references found This PR does not reference any specifications (REQ-, DESIGN-, TASK-*, or linked issues). How to add spec referencesAdd spec references to your PR description to enable traceability:
Spec Requirement by PR Type:
See PR template for full guidance. Powered by AI Spec Validator workflow |
There was a problem hiding this comment.
Code Review
This pull request effectively completes the consolidation of session protocol validation by removing the deprecated Validate-Session.ps1 and updating all references to the new Validate-SessionProtocol.ps1. The changes are thorough, covering scripts, documentation, and pre-commit hooks. The refactoring of tests to import the new SessionValidation.psm1 module instead of parsing script files with regex is a significant improvement in maintainability and security. The codebase is cleaner and more robust as a result of these changes. I have no further comments.
AI Quality Gate ReviewTip ✅ Final Verdict: PASS WalkthroughThis PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:
Review Summary
💡 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 DetailsLet me also review the remaining files and documentation changes: Based on my review of all changed files in this PR, I can now provide the security assessment. Security Review: PR #810PR Type Classification
Findings
Analysis SummaryCODE Files Reviewed:
Documentation Changes:
RecommendationsNone required. The refactoring:
VerdictQA Review DetailsBased on the PR description, the key changes are:
Let me examine the key changed files: Now let me check the consolidated validator script and the New-PR.ps1 for references: Now let me verify the documentation changes and check that Now let me run the test suite to verify the changes work correctly: Based on my review of the PR files, I can now provide the QA assessment. Let me verify a few more key aspects: Now I have a complete picture. Let me provide the QA review: QA Review: PR #810PR Type ClassificationTest Coverage Assessment
Quality Concerns
Regression Risk Assessment
Affected Components:
Breaking Changes: None. The removed script was deprecated and all references updated to consolidated script. Required Testing: Pattern verification tests (27 tests documented as passing per PR description). Validation Checks
Evidence SummaryConsolidation Verification:
Test Structure Verification:
VerdictAnalyst Review DetailsThe PR is not in the remote repository. Let me check the local repository for this PR. Found the PR in the Now I have sufficient information to provide a comprehensive analysis of PR #810. Analysis: PR #810 - Validator ConsolidationCode Quality Score
Overall: 4.75/5 Impact Assessment
Findings
Recommendations
VerdictArchitect Review DetailsNow let me check if there's a I now have enough context to perform the architectural review. The PR removes Design Quality Assessment
Overall Design Score: 5/5 Architectural Concerns
Breaking Change Assessment
Technical Debt Analysis
ADR Assessment
Recommendations
VerdictDevOps Review DetailsBased on the PR description, I can see this is a refactoring PR that removes deprecated Now let me check if the deprecated Now let me check if there's a Let me check the scripts README and any remaining references to verify the consolidation is properly documented: Based on my comprehensive review of the PR changes, I now have sufficient context to provide the DevOps assessment. DevOps Review: PR #810PR Scope Detection
Assessment: This is primarily a SCRIPT/DOCS PR for refactoring. No WORKFLOW files changed. Pipeline Impact Assessment
CI/CD Quality Checks
Findings
No issues found. The consolidation is properly implemented:
Template Assessment
Automation Opportunities
The consolidation reduces duplication (585 lines removed) and establishes a single source of truth. Recommendations
VerdictRoadmap Review DetailsBased on my review of the PR and the product roadmap, I can now provide my strategic alignment assessment. Strategic Alignment Assessment
Feature Completeness
Impact Analysis
Concerns
Recommendations
VerdictRun Details
Powered by AI Quality Gate workflow |
There was a problem hiding this comment.
Pull request overview
This PR consolidates session protocol validation by removing the deprecated Validate-Session.ps1 script and migrating all references to use the consolidated Validate-SessionProtocol.ps1. However, there are critical bugs that will cause validation failures:
Critical Issues:
- The consolidated script doesn't have a
-PreCommitparameter, but the pre-commit hook and documentation reference it - Parameter naming inconsistencies (
-SessionLogPathvs-SessionPath) - Test file sourcing issues that will cause execution failures
Key Changes
- Removed deprecated
Validate-Session.ps1(585 lines) - Updated 30+ file references to use
Validate-SessionProtocol.ps1 - Changed pattern format from
^\.to^[.]for better portability - Added memory documentation for pipe character parsing bug
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/Validate-Session.ps1 |
Complete deletion of deprecated 585-line validator script |
tests/Validate-Session.Tests.ps1 |
Updated to import SessionValidation module instead of extracting from script |
tests/Test-MemoryEvidence.Tests.ps1 |
Updated to import SessionValidation module |
tests/Test-InvestigationEligibility.Tests.ps1 |
ISSUE: Sources full script causing execution problems; pattern format updated |
.claude/skills/session/scripts/Test-InvestigationEligibility.ps1 |
Pattern format changed to bracket notation ^[.] |
.claude/skills/github/scripts/pr/New-PR.ps1 |
CRITICAL: Uses -SessionLogPath parameter that doesn't exist in consolidated script |
scripts/Validate-PrePR.ps1 |
Correctly updated to use -SessionPath parameter |
.githooks/pre-commit |
CRITICAL: References non-existent -PreCommit parameter |
AGENTS.md |
Documents -PreCommit parameter that doesn't exist |
CLAUDE.md |
Updated validation command reference |
CRITICAL-CONTEXT.md |
Updated validation command reference |
scripts/README.md |
Documents non-existent -PreCommit parameter |
scripts/AGENTS.md |
Documents non-existent -PreCommit parameter |
src/claude/orchestrator.md |
Updated validation command references |
docs/technical-guardrails.md |
Updated script reference |
.agents/SESSION-PROTOCOL.md |
Comprehensive documentation with non-existent -PreCommit examples |
.agents/planning/remediation-adr-workflow.md |
Updated command references |
.agents/devops/SHIFT-LEFT.md |
Updated script reference |
.serena/memories/session-protocol-validator-pipe-bug.md |
New memory file documenting pipe character parsing issue |
Review Triage RequiredNote Priority: NORMAL - Human approval required before bot responds Review Summary
Next Steps
Powered by PR Maintenance workflow - Add triage:approved label |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughMixed updates to session-validation script names/parameters and regex patterns across docs, scripts, and tests; plus addition of a comprehensive PR review agent prompt for automated orchestration. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PR_Agent
participant GitHub_API
participant Worktree
participant CI
User->>PR_Agent: run pr-review (PR_NUMBERS, --parallel)
PR_Agent->>GitHub_API: fetch PR metadata, threads, checks
GitHub_API->>PR_Agent: PR details & statuses
PR_Agent->>Worktree: create worktree(s) if needed
Worktree->>PR_Agent: worktree ready
PR_Agent->>PR_Agent: launch agents per PR (seq/parallel)
PR_Agent->>CI: run validations (incl. session validation script)
CI->>PR_Agent: CI/results
PR_Agent->>GitHub_API: push branch changes / post comments / resolve threads
GitHub_API->>User: final PR review summary & status
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (8)
Comment |
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughConsolidates session validation from Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Multiple heterogeneous change patterns across 20+ files: large-scale script deletion with high impact, parameter renames requiring verification across invocation sites, test infrastructure refactoring with module dependency changes, and docstring updates. Consistency checks needed to confirm all invocations use correct parameter name and script path. Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
📝 WalkthroughWalkthroughThis PR consolidates session validation tooling by retiring the monolithic Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Reason: 20+ files affected across heterogeneous categories (docs, scripts, hooks, tests). Parameter signature change ( Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
.claude/skills/github/scripts/pr/New-PR.ps1 (1)
111-118: Critical: Parameter name mismatch will cause runtime failure.Line 111 correctly updates the script path to
Validate-SessionProtocol.ps1, but line 114 still uses the old parameter name-SessionLogPath. The consolidated script uses-SessionPath(verified in AGENTS.md line 234, orchestrator.md line 1658, SHIFT-LEFT.md line 249).This validation will fail when a session log exists.
🔎 Fix the parameter name
$validateScript = Join-Path $RepoRoot "scripts/Validate-SessionProtocol.ps1" if (Test-Path $validateScript) { $sessionLogPath = Join-Path $RepoRoot $sessionLog - & pwsh -NoProfile -File $validateScript -SessionLogPath $sessionLogPath + & pwsh -NoProfile -File $validateScript -SessionPath $sessionLogPath if ($LASTEXITCODE -ne 0) { throw "Session End validation failed" }tests/Validate-Session.Tests.ps1 (1)
3-10: [P1] Stale references to deprecatedValidate-Session.ps1in testsThe validator script was removed, but this test file still:
- Mentions
Validate-Session.ps1in the.SYNOPSIS.- Uses
'scripts/Validate-Session.ps1'as sample implementation paths in multiple tests.Tests still work because these are just strings, but they now point at a non-existent script and contradict the PR’s goal and naming guidelines.
Recommend:
- Update the synopsis to describe the module-based /
Validate-SessionProtocol.ps1flow.- Replace the sample paths with the new script name (or a neutral script path) so tests and docs don’t reference the removed file.
For example:
Suggested updates
-.SYNOPSIS - Pester tests for Validate-Session.ps1 investigation-only validation +.SYNOPSIS + Pester tests for investigation-only validation via SessionValidation/Validate-SessionProtocol.ps1 @@ - 'scripts/Validate-Session.ps1' + 'scripts/Validate-SessionProtocol.ps1' @@ - It "Preserves PowerShell scripts" { - $files = @('scripts/Validate-Session.ps1') + It "Preserves PowerShell scripts" { + $files = @('scripts/Validate-SessionProtocol.ps1') @@ - '.agents/sessions/2026-01-01-session-01.md', - 'scripts/Validate-Session.ps1' + '.agents/sessions/2026-01-01-session-01.md', + 'scripts/Validate-SessionProtocol.ps1'As per coding guidelines, script names in tests and comments should match the actual, non-deprecated implementation.
Also applies to: 96-105, 324-327, 384-393
scripts/README.md (1)
197-208: Remove duplicate content block.Lines 197-208 duplicate usage examples and context already covered in lines 179-195. This appears to be leftover content from the consolidation that wasn't fully cleaned up.
🔎 Proposed fix
- -**Called By**: Pre-commit hook, orchestrator, CI - -**Usage**: - -```powershell -# Validate specific session -.\scripts\Validate-SessionProtocol.ps1 -SessionPath ".agents/sessions/2025-12-17-session-01.md" - -# Validate all recent sessions -.\scripts\Validate-SessionProtocol.ps1 -All - -# CI mode -.\scripts\Validate-SessionProtocol.ps1 -All -CI -```tests/Test-InvestigationEligibility.Tests.ps1 (1)
147-150: [P1] Pattern format inconsistent with rest of file.Line 149 uses
'^\.agents/sessions/'(backslash-escaped dot), but the rest of the file uses bracket notation^[.]agents/. Lines 31-35 and 61-65 all use the bracket form. Update this pattern to match:BeforeEach { - $patterns = @('^\.agents/sessions/') + $patterns = @('^[.]agents/sessions/') }
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
tests/Test-MemoryEvidence.Tests.ps1 (1)
3-17: [P2] Update test description to match new module sourceThe tests now import
scripts/modules/SessionValidation.psm1, but the header still says:Pester tests for Test-MemoryEvidence function in Validate-Session.ps1
Suggest updating the SYNOPSIS/DESCRIPTION to reference
SessionValidation.psm1(or the owning module name) so the test docs match the code. The new Import-Module path itself looks correct.AGENTS.md (1)
83-91: [P2] Enhanced validator feature list is clear; just keep it in lockstep with the scriptThe new bullets (Lines 83–91) document key behaviors of
Validate-SessionProtocol.ps1(template enforcement, ADR‑007 memory evidence checks, QA-skip validation, Pre-Commit mode, branch and commit validation). This is useful consolidation of behavior.Just make sure the script’s parameter set and actual checks continue to match this list (especially
-PreCommitand the exact memory/branch rules) whenever the validator evolves..claude/skills/session/scripts/Test-InvestigationEligibility.ps1 (1)
32-34: [P2] Allowlist regexes are correct but duplicated; consider sourcing from the canonical listThe switch to
[.]agents/...patterns (Lines 42–48) still matches a literal leading dot and keeps the important($|/)anchor on.serena/memories, so the allowlist behavior and path traversal protection look intact.However, Line 32 says these patterns “must match exactly” the
$InvestigationAllowlistinValidate-SessionProtocol.ps1, which means you now have the same list defined in at least two places. That increases drift risk the next time the allowlist changes.Consider importing the consolidated session validation module or exposing the canonical allowlist from it, then reusing that here instead of hardcoding a second copy.
Also applies to: 42-48
tests/Validate-Session.Tests.ps1 (1)
3-10: [P1] Update test naming and sample paths to reflectValidate-SessionProtocol.ps1/SessionValidationThe new
BeforeAll(Line 12–Line 19) correctly importsscripts/modules/SessionValidation.psm1and is the right direction now that logic has moved into a reusable module.Two bits are now out of date with the consolidation, though:
- Line 3–Line 10: The .SYNOPSIS still describes these as tests “for Validate-Session.ps1”, even though they now target functions exported from
SessionValidation.psm1.- Lines around Line 100, Line 324, and Line 388 still use
'scripts/Validate-Session.ps1'as the example implementation file path in test data, but that script is being removed in this PR.Functionally the tests still work because those are just strings, but using the old script name in comments and sample paths will be confusing once
Validate-Session.ps1no longer exists.Consider renaming these references to either
Validate-SessionProtocol.ps1or a more generic script name, and updating the header comment to say the tests exercise the session validation module rather than the deprecated script.Also applies to: 12-19, 96-105, 322-327, 385-393
.agents/SESSION-PROTOCOL.md (1)
721-721: Capitalize "Markdown" as a proper noun.Line 721 uses lowercase "markdown" but style guide convention and the static analysis hint recommend title-case for the language name.
🔎 Proposed fix
- Proper markdown table formatting + Proper Markdown table formatting
- Add -PreCommit switch parameter to Validate-SessionProtocol.ps1 with
documentation and [Alias("SessionLogPath")] for backwards compatibility
- Fix New-PR.ps1 to use -SessionPath instead of -SessionLogPath (line 114)
- Add dot-source guard in Validate-SessionProtocol.ps1 to prevent main
execution block from running when script is sourced for testing
Addresses reviewer comments:
1. Missing -PreCommit parameter referenced in pre-commit hook
2. Parameter naming mismatch in New-PR.ps1
3. Test file sourcing problem in Test-InvestigationEligibility.Tests.ps1
43a0786 to
4ce0a0a
Compare
- Mark status as RESOLVED - Note fix implemented in SessionValidation.psm1 Split-TableRow function - Clarify bug existed in deprecated Validate-Session.ps1 (removed in this PR) - Addresses PR #810 review thread PRRT_kwDOQoWRls5ozBU8
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| # Investigation-only allowlist patterns (must match Validate-Session.ps1) | ||
| # Investigation-only allowlist patterns (must match Validate-SessionProtocol.ps1) |
There was a problem hiding this comment.
Comment references non-existent script. Should reference Validate-SessionJson.ps1 instead of Validate-SessionProtocol.ps1.
|
|
||
| if ($sessionLog) { | ||
| $validateScript = Join-Path $RepoRoot "scripts/Validate-Session.ps1" | ||
| $validateScript = Join-Path $RepoRoot "scripts/Validate-SessionProtocol.ps1" |
There was a problem hiding this comment.
Script path references non-existent file Validate-SessionProtocol.ps1. The actual validator is Validate-SessionJson.ps1. This will cause PR creation to fail during session validation. The correct path should be:
$validateScript = Join-Path $RepoRoot "scripts/Validate-SessionJson.ps1"| $validateScript = Join-Path $RepoRoot "scripts/Validate-SessionProtocol.ps1" | |
| $validateScript = Join-Path $RepoRoot "scripts/Validate-SessionJson.ps1" |
| ```bash | ||
| # Run session protocol validator | ||
| pwsh scripts/Validate-SessionProtocol.ps1 -SessionLogPath .agents/sessions/$(date +%Y-%m-%d)-session-*.md | ||
| pwsh scripts/Validate-SessionProtocol.ps1 -SessionPath .agents/sessions/$(date +%Y-%m-%d)-session-*.md |
There was a problem hiding this comment.
Command references non-existent script. Should reference Validate-SessionJson.ps1 instead of Validate-SessionProtocol.ps1.
| ### 1. Session End Validation | ||
|
|
||
| **Script**: `scripts/Validate-Session.ps1` | ||
| **Script**: `scripts/Validate-SessionProtocol.ps1` |
There was a problem hiding this comment.
Documentation references non-existent script name. Should reference Validate-SessionJson.ps1 instead of Validate-SessionProtocol.ps1.
| **Script**: `scripts/Validate-SessionProtocol.ps1` | |
| **Script**: `scripts/Validate-SessionJson.ps1` |
| # Resolve script paths | ||
| $ScriptPaths = @{ | ||
| SessionEnd = Join-Path $RepoRoot "scripts" "Validate-Session.ps1" | ||
| SessionEnd = Join-Path $RepoRoot "scripts" "Validate-SessionProtocol.ps1" |
There was a problem hiding this comment.
The script path references a non-existent file Validate-SessionProtocol.ps1. The actual validator script in the repository is Validate-SessionJson.ps1. This will cause validation to fail when a session log exists, breaking the PR creation workflow. The path should be:
SessionEnd = Join-Path $RepoRoot "scripts" "Validate-SessionJson.ps1"| SessionEnd = Join-Path $RepoRoot "scripts" "Validate-SessionProtocol.ps1" | |
| SessionEnd = Join-Path $RepoRoot "scripts" "Validate-SessionJson.ps1" |
|
|
||
| The issue was resolved by introducing the `Split-TableRow` function in `scripts/modules/SessionValidation.psm1` (lines 22-80), which properly handles pipe characters inside backticks and markdown code spans. | ||
|
|
||
| The deprecated `Validate-Session.ps1` script that had this bug was removed in PR #810 as part of the consolidation effort. All session validation now uses `Validate-SessionJson.ps1` with the fixed `SessionValidation` module. |
There was a problem hiding this comment.
This memory document correctly identifies that the actual validator is Validate-SessionJson.ps1 (not Validate-SessionProtocol.ps1). However, this contradicts all the changes made in this PR, which reference Validate-SessionProtocol.ps1 throughout. This inconsistency indicates a fundamental error in the PR's approach - either the script should be renamed, or all the PR changes should reference Validate-SessionJson.ps1.
| foreach ($session in $stagedSessions) { | ||
| Write-Host "Validating session protocol: $session" | ||
| pwsh scripts/Validate-SessionProtocol.ps1 -SessionLogPath $session | ||
| pwsh scripts/Validate-SessionProtocol.ps1 -SessionPath $session |
There was a problem hiding this comment.
Command references non-existent script path. Should reference Validate-SessionJson.ps1 instead. Additionally, note that while the parameter name -SessionPath was correctly updated in this change, it's being used with a non-existent script.
| - Use `-Quick` flag for rapid iteration | ||
| - Skip tests during markdown-only changes: `-SkipTests` | ||
| - Run individual validations: `pwsh scripts/Validate-Session.ps1` | ||
| - Run individual validations: `pwsh scripts/Validate-SessionProtocol.ps1 -SessionPath [path]` |
There was a problem hiding this comment.
Usage example references non-existent script. Should reference Validate-SessionJson.ps1 instead of Validate-SessionProtocol.ps1.
| - Run individual validations: `pwsh scripts/Validate-SessionProtocol.ps1 -SessionPath [path]` | |
| - Run individual validations: `pwsh scripts/Validate-SessionJson.ps1 -SessionPath [path]` |
|
|
||
| foreach ($pattern in $script:InvestigationAllowlist) { | ||
| $investigationAllowlist | Should -Contain $pattern -Because "Pattern '$pattern' from Validate-Session.ps1 should exist in Test-InvestigationEligibility.ps1" | ||
| $investigationAllowlist | Should -Contain $pattern -Because "Pattern '$pattern' from Validate-SessionProtocol.ps1 should exist in Test-InvestigationEligibility.ps1" |
There was a problem hiding this comment.
Error message references non-existent script Validate-SessionProtocol.ps1. The actual validator is Validate-SessionJson.ps1. When users see this error, they won't be able to find the referenced file, leading to confusion.
|
|
||
| ALLOWLIST: | ||
| Must match exactly with scripts/Validate-Session.ps1 $InvestigationAllowlist | ||
| Must match exactly with scripts/Validate-SessionProtocol.ps1 $InvestigationAllowlist |
There was a problem hiding this comment.
Reference to non-existent script Validate-SessionProtocol.ps1. The actual validator script is Validate-SessionJson.ps1. This will cause skill invocation to fail when attempting to validate session protocols.
…o Validate-SessionJson.ps1 - Update test file Test-InvestigationEligibility.Tests.ps1 to source from correct location - Fix test to not rely on non-existent $InvestigationAllowlist variable - Update skill script path to correct location (session-qa-eligibility) - Update New-PR.ps1 validation script reference - Update Validate-PrePR.ps1 session end validator reference - Update session-qa-eligibility skill script comments - Fixes CRITICAL_FAIL from Analyst and QA reviews The consolidated script from PR #830 is Validate-SessionJson.ps1, not Validate-SessionProtocol.ps1. Earlier commit 4ce0a0a used the wrong target script name. Test fixes verified: - Test-InvestigationEligibility tests now pass (3/3 passing) - Other test failures are pre-existing (unrelated ThreadId validation)
|
Superseded by PR #830 which implemented JSON-based session validation. |
Closing as ObsoleteThis PR is no longer needed. The work it intended to accomplish was already completed by PR #830 in a superior way. Original Intent (Jan 6, 2026)
What Actually HappenedPR #830 (merged Jan 9, 2026) completed the consolidation work:
Why This PR is ObsoleteAfter merging main into this branch, the only changes remaining are:
All substantive work was superseded by the JSON migration in PR #830. Resolution Status
ConclusionClosing in favor of PR #830's implementation, which provides:
The session protocol validation is working correctly in main branch via Thank you to all reviewers (@copilot, @chatgpt-codex-connector, @coderabbitai) for the thorough feedback. While this PR became obsolete, the review process identified that the proper solution was already in place. |
|
To use Codex here, create a Codex account and connect to github. |
|
Tip For best results, initiate chat on the files or code changes. @rjmurillo-bot Understood. PR #830's JSON-based validator approach is cleaner than the markdown consolidation attempted here. Closing in favor of the merged implementation makes sense. |
Pull Request
Summary
Completes the session protocol validator consolidation by removing the deprecated
Validate-Session.ps1script and updating all references to use the consolidatedValidate-SessionProtocol.ps1. This eliminates duplication and ensures a single source of truth for session protocol validation.Specification References
.agents/SESSION-PROTOCOL.mdSpec Requirement Guidelines
refactor:,refactor(scope):)Changes
scripts/Validate-Session.ps1(585 lines removed)Validate-SessionProtocol.ps1tests/Test-InvestigationEligibility.Tests.ps1now sources fromValidate-SessionProtocol.ps1[.]matching canonical source.claude/skills/session/scripts/Test-InvestigationEligibility.ps1uses canonical patterns.claude/skills/github/scripts/pr/New-PR.ps1references consolidated validatorAGENTS.md,CLAUDE.md,scripts/README.mdupdatedType of Change
Testing
Test-InvestigationEligibility.Tests.ps1to source from canonical validatorAgent Review
Security Review
Files requiring security review:
N/A - This is a refactoring to consolidate duplicate validation logic.
Other Agent Reviews
Checklist
Related Issues
Completes consolidation of session protocol validators into single canonical script.
Files changed: 34 files changed, 288 insertions(+), 2185 deletions(-)
Net reduction: ~1,900 lines removed (eliminating duplication)