Uh oh!
There was an error while loading. Please reload this page.
Fix critical issues in refactor/config-files: workflows, security, and WordPress standards - #5
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Free review on us!CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made. Comment |
Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR addresses critical issues in the repository configuration files as part of a comprehensive refactor, focusing on fixing broken workflows, correcting file paths, and ensuring WordPress coding standards compliance.
Key changes include:
- Fixed JavaScript syntax errors in GitHub workflows that were breaking PR labeling functionality
- Corrected broken license file references and repository URLs throughout documentation
- Updated VS Code extension recommendations and documentation standards to align with WordPress conventions
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| SUPPORT.md | Fixed broken LICENSE file path reference |
| SECURITY.md | Updated markdown heading structure and LICENSE path |
| CONTRIBUTING.md | Fixed template URL placeholder and LICENSE path |
| .vscode/extensions.json | Replaced invalid VS Code extension with working alternative |
| .github/workflows/labeler.yml | Restructured from config file to proper workflow |
| .github/workflows/label-prs.yml | Fixed JavaScript syntax error in endsWith method |
| .github/prompts/inline-documentation.prompt.md | Updated documentation standards and removed hardcoded @author |
| .github/labeler.yml | Converted from YAML frontmatter to proper labeler config |
| .github/instructions/playwright-tests.instructions.md | Fixed malformed YAML frontmatter |
| .github/instructions/php-inline-documentation.instructions.md | Updated indentation standards to use tabs |
| .github/instructions/javascript-inline-documentation.instructions.md | Updated indentation standards to use tabs |
| .github/custom-instructions.md | Updated documentation URLs to canonical WordPress sources |
| .github.code-workspace | Removed duplicate workspace file |
| .all-contributorsrc | Fixed avatar URL to use numeric user ID |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
…ings Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
…b62e3a Signed-off-by: Warwick Booth <krugazul@users.noreply.github.com>
Signed-off-by: Warwick Booth <krugazul@users.noreply.github.com>
Signed-off-by: Warwick Booth <krugazul@users.noreply.github.com>
krugazul
commented
Oct 7, 2025
@ashleyshaw Ive gone through the commits, specifically the editorconfig, gitattributes and gitginore. I have no issues with those. |
Uh oh!
There was an error while loading. Please reload this page.
Implements all critical release automation components to fix blocking issues. ## Changes ### Release Agent (✅ Implemented) - Implement `.github/agents/release.agent.cjs` - Complete release automation - Validates VERSION and CHANGELOG.md - Bumps semantic versions (major/minor/patch) - Updates changelog with release date - Creates git tags - Publishes GitHub releases - Supports dry-run mode for testing - Handles both GitHub Actions and standalone execution ### Validation Scripts (✅ Implemented) - Implement `scripts/validate-version.cjs` - Semantic version validation - Validates VERSION file format - Parses version components (major.minor.patch[-prerelease][+build]) - Comprehensive error reporting - Implement `scripts/validate-changelog.cjs` - Changelog validation - Validates Keep a Changelog format - Checks version and date formats - Validates section structure - Reports detailed errors ### Utilities (✅ Implemented) - Implement `.github/agents/includes/changelogUtils.cjs` - Changelog parser - Parses Keep a Changelog format - Validates changelog structure - Extracts releases and sections - CLI tool with --validate, --parse, --latest, --unreleased modes ### Schemas (✅ Created) - Create `automation/schemas/changelog.schema.json` - Changelog validation - Create `automation/schemas/version.schema.json` - Version validation - Create `automation/schemas/frontmatter.schema.json` - Frontmatter validation ### Workflow Updates (✅ Updated) - Update `.github/workflows/release.yml` - Enable release agent - Update `.github/workflows/release-prep.yml` - Fix script references - Update `.github/workflows/changelog.yml` - Enable validation, add Node setup ## Issues Resolved - ✅ Critical Issue #1: Release agent not implemented (was placeholder) - ✅ Critical Issue #2: validate-changelog.js was placeholder (exit code 1) - ✅ Critical Issue #3: validate-version.js was empty - ✅ Critical Issue #4: changelogUtils.js missing - ✅ Critical Issue #5: Schema files missing ## Testing All components tested and working: - ✅ validate-version.cjs validates current VERSION file - ✅ validate-changelog.cjs validates current CHANGELOG.md - ✅ changelogUtils.cjs parses and validates changelog - ✅ release.agent.cjs runs successfully in dry-run mode ## Notes - All scripts renamed from .js to .cjs for CommonJS compatibility - Package.json contains "type": "module", so .cjs extension required - Release agent supports --scope=major|minor|patch and --dry-run flags - Follows LightSpeed coding standards and documentation requirements Refs: G-1, G-2 (release agent and changelog utils implementation)
* fix(validation): address footer truncation and mermaid workflow issues - Fix validate-footers.js to preserve file bodies when appending footers (issue #1118: replaceFooterTail was using last --- separator instead of frontmatter closing separator, truncating content after closing ---) - Improve validate-mermaid-pr.yml error handling and robustness (issue #1119: add graceful fallback when git diff fails, better handle edge cases where no changes detected) Test coverage gaps noted (to address on feat/agent-standards-playwright-testing): - agent-spec-validator needs tests for empty/non-array capabilities - multi-provider-consistency-checker needs tests for unsupported providers Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix(docs): use UK spelling 'standardised' in initiative memory Addresses CodeRabbit feedback: replace 'standardized' with 'standardised' to match repository's UK English documentation standard. Refs: CodeRabbit feedback on PR #1108 * docs(changelog): add entry for validation tool fixes (PR #1123) Add CHANGELOG entry documenting the footer truncation bug fix and mermaid workflow robustness improvements from PR #1123. Closes: #1118, #1119 Refs: PR #1123 * fix: resolve pre-existing linting errors (MD012 blank lines) Fixed 5 instruction files with multiple consecutive blank lines before footer separator — these pre-existing issues were blocking PR #1123 CI checks. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * chore: apply CodeRabbit improvements from #1126 (Phase 1) Applied improvements for existing files: - UK spelling: standardization → standardisation (4 audit reports, 1 framework) - UK spelling: organization → organisation (1 framework) - UK spelling: customization → customisation (1 framework) - Phase 1C-J implementation status: PENDING → COMPLETED (framework) - Deleted unfinished Gemini plugin at plugins/lightspeed-playwright-testing/.gemini-plugin/plugin.json Pending improvements (awaiting hook implementation): - Improvements #5-9: Plugin integrity hook fixes and enhancements - Improvements #6-7: Test fixture cleanup and JSDoc for missing hooks - Improvement #8: hooks/package.json scripts (file doesn't exist yet) - Improvement #9: Expanded test coverage for hooks - Improvement #10: Cookbook playwright guide (file doesn't exist yet) - Improvement #11: Plugin integrity hook documentation - Improvement #12: Isolate plugin integrity unit tests See issue #1126 for full details. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix#1: Positional mode validation — reject unsupported modes like 'typo' - Fix#2: Days input validation — reject NaN, non-integer, and non-positive values - Fix#3: Script validation — reject unknown scripts and mode-incompatible selections - Fix#4: Output file reporting — stop claiming output was saved when handlers don't write - Fix#5: Exit status — exit with code 1 when any handler fails - Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false) - Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour Test coverage expanded from 29 to 33 tests covering all fixes. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix#1: Positional mode validation — reject unsupported modes like 'typo' - Fix#2: Days input validation — reject NaN, non-integer, and non-positive values - Fix#3: Script validation — reject unknown scripts and mode-incompatible selections - Fix#4: Output file reporting — stop claiming output was saved when handlers don't write - Fix#5: Exit status — exit with code 1 when any handler fails - Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false) - Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour Test coverage expanded from 29 to 33 tests covering all fixes. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* docs: Add Phase 2 Label Orchestrator changelog entry Added comprehensive changelog entry documenting Phase 2 label-orchestrator CLI implementation, including three operating modes (audit, sync, apply), input validation, mode-specific constraints, dry-run defaults, and test coverage. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * feat: Phase 2 - Unified label orchestrator CLI - Add label-orchestrator.js: unified CLI for all label management scripts - Support modes: audit (analyse), sync (synchronise dry-run), apply (live changes) - Unified reporting, progress tracking, and error handling - 29 unit tests for argument parsing, validation, and mode dispatch - Orchestrates manage-stale-issues, review-meta-labels, review-status-labels, sync-pr-labels Resolves#1720 (Create Shared Utilities - Phase 2 expansion) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Address 7 CodeRabbit review issues in Phase 2 orchestrator - Fix#1: Positional mode validation — reject unsupported modes like 'typo' - Fix#2: Days input validation — reject NaN, non-integer, and non-positive values - Fix#3: Script validation — reject unknown scripts and mode-incompatible selections - Fix#4: Output file reporting — stop claiming output was saved when handlers don't write - Fix#5: Exit status — exit with code 1 when any handler fails - Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false) - Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour Test coverage expanded from 29 to 33 tests covering all fixes. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Eliminate trivial test conditions from exit status tests - Line 217: Replace always-false condition with direct exitCode = 0 - Line 223: Replace always-true condition with realistic error array Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Use errorCount in success test to eliminate unused variable Restore the ternary condition in the success test to match the error test pattern, making both tests consistent and eliminating the unused errorCount variable. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: Remove unused errorCount variable from success test Removed unused errorCount declaration that was causing ESLint warning. The success test now directly asserts exitCode = 0 without intermediate variable. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
…rovements Phase 1: Comprehensive fixes to project-docs-update.sh automation suite Security Fixes: - Fixed sed injection vulnerability (CVE prevention) on lines 92, 161 - Use safe delimiter (|) instead of / for sed patterns - Properly escape special characters in project names using parameter expansion - Prevents injection from project names containing /, &, \, etc. Logic Fixes: - Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks - Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery - Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure) - Fixed stats format consistency (Issue #4): standardized on colon-separated format Quality Improvements: - Added --help/-h support (Issue #6) with comprehensive usage information - Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting - Enhanced test suite with 4 new edge-case tests: * Special characters in project names (/, &, \) * Return value convention validation * Statistics format consistency * Symlink and permission handling Files Modified: - scripts/automation/project-docs-update.sh: All 7 fixes implemented - scripts/automation/test-project-docs-update.sh: New test coverage added - docs/SCRIPT_USAGE.md: NEW comprehensive documentation - CHANGELOG.md: Phase 1 entry added Test Results: - All special character injection tests passing ✓ - Script help text working correctly ✓ - Return value convention tests passing ✓ - Validation logic working as expected ✓ Addresses: Issue #1862 Relates to: Issue #1720 (Issue Maintenance Scripts) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rovements Phase 1: Comprehensive fixes to project-docs-update.sh automation suite Security Fixes: - Fixed sed injection vulnerability (CVE prevention) on lines 92, 161 - Use safe delimiter (|) instead of / for sed patterns - Properly escape special characters in project names using parameter expansion - Prevents injection from project names containing /, &, \, etc. Logic Fixes: - Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks - Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery - Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure) - Fixed stats format consistency (Issue #4): standardized on colon-separated format Quality Improvements: - Added --help/-h support (Issue #6) with comprehensive usage information - Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting - Enhanced test suite with 4 new edge-case tests: * Special characters in project names (/, &, \) * Return value convention validation * Statistics format consistency * Symlink and permission handling Files Modified: - scripts/automation/project-docs-update.sh: All 7 fixes implemented - scripts/automation/test-project-docs-update.sh: New test coverage added - docs/SCRIPT_USAGE.md: NEW comprehensive documentation - CHANGELOG.md: Phase 1 entry added Test Results: - All special character injection tests passing ✓ - Script help text working correctly ✓ - Return value convention tests passing ✓ - Validation logic working as expected ✓ Addresses: Issue #1862 Relates to: Issue #1720 (Issue Maintenance Scripts) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…rovements (#1993) Phase 1: Comprehensive fixes to project-docs-update.sh automation suite Security Fixes: - Fixed sed injection vulnerability (CVE prevention) on lines 92, 161 - Use safe delimiter (|) instead of / for sed patterns - Properly escape special characters in project names using parameter expansion - Prevents injection from project names containing /, &, \, etc. Logic Fixes: - Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks - Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery - Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure) - Fixed stats format consistency (Issue #4): standardized on colon-separated format Quality Improvements: - Added --help/-h support (Issue #6) with comprehensive usage information - Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting - Enhanced test suite with 4 new edge-case tests: * Special characters in project names (/, &, \) * Return value convention validation * Statistics format consistency * Symlink and permission handling Files Modified: - scripts/automation/project-docs-update.sh: All 7 fixes implemented - scripts/automation/test-project-docs-update.sh: New test coverage added - docs/SCRIPT_USAGE.md: NEW comprehensive documentation - CHANGELOG.md: Phase 1 entry added Test Results: - All special character injection tests passing ✓ - Script help text working correctly ✓ - Return value convention tests passing ✓ - Validation logic working as expected ✓ Addresses: Issue #1862 Relates to: Issue #1720 (Issue Maintenance Scripts) Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: Project documentation scripts — security, logic, and testing improvements Phase 1: Comprehensive fixes to project-docs-update.sh automation suite Security Fixes: - Fixed sed injection vulnerability (CVE prevention) on lines 92, 161 - Use safe delimiter (|) instead of / for sed patterns - Properly escape special characters in project names using parameter expansion - Prevents injection from project names containing /, &, \, etc. Logic Fixes: - Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks - Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery - Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure) - Fixed stats format consistency (Issue #4): standardized on colon-separated format Quality Improvements: - Added --help/-h support (Issue #6) with comprehensive usage information - Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting - Enhanced test suite with 4 new edge-case tests: * Special characters in project names (/, &, \) * Return value convention validation * Statistics format consistency * Symlink and permission handling Files Modified: - scripts/automation/project-docs-update.sh: All 7 fixes implemented - scripts/automation/test-project-docs-update.sh: New test coverage added - docs/SCRIPT_USAGE.md: NEW comprehensive documentation - CHANGELOG.md: Phase 1 entry added Test Results: - All special character injection tests passing ✓ - Script help text working correctly ✓ - Return value convention tests passing ✓ - Validation logic working as expected ✓ Addresses: Issue #1862 Relates to: Issue #1720 (Issue Maintenance Scripts) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * docs: Project Maintenance Agent — Phase 1 & 2 Documentation Create comprehensive project documentation for the Project Maintenance Agent initiative: **Files Created:** - README.md (project overview, phases, timelines, deliverables) - PLANNING.md (detailed phase breakdown, requirements, success criteria) - OPENSPEC.md (formal technical specification, API contracts, architecture) **Content Summary:** README.md (11.5 KB): - Project overview and goals - Phase 1 ✅ COMPLETE status (merged PR #1867) - Phase 2 (READY TO START) with 2-week timeline - Phase 3 (PLANNED) for team integration - Architecture overview and design decisions - Risk mitigation and next steps PLANNING.md (16 KB): - Executive summary and scope - Phase 1 completion status with test results - Phase 2 detailed requirements: * Agent specification (multi-provider support) * Three portable skills with interfaces * Provider implementations (Claude, Copilot, OpenAI) * Configuration files and testing strategy - Phase 3 GitHub Actions workflows - Success criteria and risk analysis - Open questions and dependencies OPENSPEC.md (18 KB): - Formal technical specification - Functional requirements (FR-1 through FR-5) - Non-functional requirements (NF-1 through NF-5) - Architecture diagrams and data flows - Complete API specification (input/output contracts) - Operational modes (scheduled, on-demand, integration) - Error handling and recovery strategies - Security specifications and injection prevention - Testing strategy (unit, integration, e2e, provider tests) - Configuration for different project types - Performance requirements and deployment stages - Success criteria and monitoring requirements **Key Features:** - Comprehensive Phase 2 timeline (2 weeks, ~50 hours) - 3 portable skills specification (docs-updater, validator, sync) - Multi-provider support (Claude, Copilot, OpenAI) - Both proactive (nightly audit) and reactive (on-demand) modes - Complete API contracts for integration - Security requirements and injection prevention - >80 code coverage target **Related Work:** - Phase 1 PR: #1867 (merged) - Parent Epic: #1862 - Builds on: scripts/automation/project-docs-update.sh **Project Status:** - ✅ Phase 1: Scripts fixed and tested (merged) - 🔄 Phase 2: Ready to start immediately (this documentation) - 📋 Phase 3: Planned for week 4 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This PR addresses all critical issues identified in the comprehensive repository refactor, making it production-ready for the LightSpeed WordPress organization.
Critical Fixes Applied
Broken Workflows & JavaScript Errors
Fixed a JavaScript syntax error that was breaking the entire PR labeling workflow:
Corrected invalid workflow structure where
labeler.ymlcontained configuration data instead of a proper GitHub Actions workflow. Split this into:.github/labeler.yml- Configuration for the labeler action.github/workflows/labeler.yml- Proper workflow with security permissionsSecurity Vulnerabilities
project-meta-sync.ymlwith proper environment variable handlingpermissionsblocks to prevent overprivileged GITHUB_TOKEN usageWordPress Standards Compliance
Updated documentation to reflect actual WordPress coding standards:
developer.wordpress.orglinksphpcs.*instead of non-existentwordpress.phpcs.*File Organization & Links
funding.ymlto.github/FUNDING.ymlfor proper GitHub recognition../LICENSEreferences that pointed outside the repository.github.code-workspacefile.all-contributorsrcto use numeric GitHub user ID instead of usernameDocumentation & Templates
playwright-tests.instructions.mdlightspeedwp/REPONAMEwith proper<REPOSITORY>template syntaxVS Code Configuration Cleanup
squizlabs.php-codesniffer→ replaced withwongjn.php-sniffercopilot.enableconfiguration block.gitignorewith cache files and additional VS Code settingsImpact
Before: 42 CodeRabbit review comments, non-mergeable status, broken workflows, security issues
After: Production-ready organization-wide
.githubrepository with:This comprehensive refactor provides a solid foundation for all LightSpeed WordPress projects with proper development workflows, coding standards, and community guidelines.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.