Skip to content

feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests - #2495

Open
ashleyshaw with Copilot wants to merge 9 commits into
developfrom
copilot/reporting-agent-v2-phase-6-1
Open

feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests#2495
ashleyshaw with Copilot wants to merge 9 commits into
developfrom
copilot/reporting-agent-v2-phase-6-1

Conversation

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Implements the five Phase 6.1 production validation deliverables (deployment checklist, environment setup, smoke tests, rollback plan, monitoring/alerting) as a testable Node.js module, mirroring the existing staging-validation-helpers.js pattern.

Changes

scripts/automation/production-validation-helpers.js — pure functions for each deliverable:

  • runDeploymentChecklist — verifies all deployment checklist items
  • setupProductionEnvironment — confirms required services are running and healthy
  • runSmokeTests — exercises key production endpoints (health, auth, report generation, webhooks)
  • validateRollbackPlan — asserts plan is documented, tested, and within time threshold
  • configureMonitoring — wires notification channels and validates alert thresholds
  • executeAllProductionValidations — orchestrates all five, returns GO/NO-GO + summary

scripts/automation/production-validation.js — CLI wrapper; supports --task <name> or --all, with --verbose, --no-dry-run, and --max-rollback flags.

scripts/automation/__tests__/production-validation.test.js — 56 unit, integration, and edge-case tests; all passing, 0 CodeQL alerts.

Changelog

Added

  • production-validation-helpers.js: seven functions covering all Phase 6.1 validation deliverables.
  • production-validation.js: CLI script for running individual or all production checks.
  • production-validation.test.js: 56-test suite (unit + integration + edge cases).

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant):
    • Semantic HTML and heading order verified
    • Keyboard navigation and visible focus states verified
    • ARIA used only where needed
    • Contrast and non-colour cues reviewed (WCAG 2.2 AA or higher)
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised
    • Output escaped for its rendering context
    • Privileged actions enforce nonce and capability checks
    • No secrets/sensitive data introduced; OWASP risks reviewed
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

Copilot AI added 2 commits August 29, 2026 15:34
…d tests

Closes #2043

- production-validation-helpers.js: five Phase 6.1 deliverable functions
  (runDeploymentChecklist, setupProductionEnvironment, runSmokeTests,
  validateRollbackPlan, configureMonitoring) plus parseProductionArguments
  and executeAllProductionValidations
- production-validation.js: CLI script mirroring staging-validation.js
- __tests__/production-validation.test.js: 56 unit, integration, and
  edge-case tests – all passing
Copilot AI changed the title [WIP] Finalize production validation for reporting agent v2 feat(automation): Phase 6.1 – Production Validation helpers, CLI and tests Aug 29, 2026
Copilot AI requested a review from ashleyshaw August 29, 2026 15:40
@ashleyshaw
ashleyshaw requested a lite review from Copilot August 29, 2026 16:17

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.

🟡 Changes recommended

There are API/CLI usability issues (empty override arrays silently falling back to defaults and failures not surfacing error messages) plus a potentially risky lockfile change removing libc constraints for native optional deps.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a Phase 6.1 “production validation” automation module (helpers + CLI) under scripts/automation/, modelled on the existing staging validation pattern, plus a Jest test suite to exercise the new helpers.

Changes:

  • Added production-validation-helpers.js with pure helper functions for checklist, environment, smoke tests, rollback validation, monitoring config, arg parsing, and orchestration.
  • Added production-validation.js CLI entrypoint to run a single task or all checks and set process exit codes accordingly.
  • Added production-validation.test.js Jest suite covering defaults, overrides, and edge cases for the helpers.
File summaries
File Description
scripts/automation/production-validation.js New CLI wrapper for running Phase 6.1 production validation tasks and reporting results.
scripts/automation/production-validation-helpers.js New helper module implementing the production validation task functions and orchestration.
scripts/automation/tests/production-validation.test.js New Jest coverage for the production validation helper functions.
package-lock.json Lockfile update removing libc constraints from several platform-specific optional native packages.
Review details

Suppressed comments (1)

scripts/automation/production-validation-helpers.js:220

  • Similar to the checklist helper, providing options.channels: [] currently falls back to the default channels. This is surprising for an API that accepts overrides and makes it hard to intentionally configure zero channels during testing. Only default when options.channels is undefined, and fail fast on an empty array.
  const channels =
    options.channels && options.channels.length > 0
      ? options.channels
      : defaultChannels;

  • Files reviewed: 3/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/automation/production-validation-helpers.js Outdated
Comment thread scripts/automation/production-validation-helpers.js
Comment thread scripts/automation/production-validation.js
@ashleyshaw
ashleyshaw marked this pull request as ready for review August 29, 2026 16:31
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@ashleyshaw
ashleyshaw enabled auto-merge (squash) August 29, 2026 16:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

ashleyshaw and others added 2 commits August 29, 2026 18:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🚫 This PR description is missing required template content.

Missing required section(s): Linked issues, Global DoD checklist

Please update the PR body using one of the repository PR templates:

Empty placeholders, unchecked checklist boxes, and stub issue references do not count.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@ashleyshaw ashleyshaw added this to the v1.1 milestone Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Branch Naming Issue

This PR's branch name copilot/reporting-agent-v2-phase-6-1 doesn't follow the standard pattern.

Standard pattern: {type}/{scope}-{title} (e.g., feat/something, fix/bug-name)

Based on linked issue type: task

Correct template should be: pr_feature.md

No action required — this is informational. Future PRs should use the correct branch name.

See Branching Strategy for more info.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2495

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

❌ Branch Name Validation Failed

The branch name copilot/reporting-agent-v2-phase-6-1 does not follow the LightSpeed branching strategy.

Required Format

{type}/{scope}-{short-title}
  • type: one of the allowed prefixes (lowercase)
  • scope: lowercase, hyphens only (no underscores or uppercase)
  • title: lowercase, hyphens only (no underscores or uppercase)

Allowed Branch Types

feat, fix, hotfix, release, refactor, chore, docs, test, perf, ci, build, deps, security, revert, research, design, a11y, ux, i18n, ops, proto, ds, api, schema, telemetry, content, seo, config, migrate, qa, uat, audit, codex

Valid Examples

  • feat/branch-naming-enforcement
  • fix/validation-script-bug
  • chore/update-dependencies
  • docs/branching-strategy-guide
  • hotfix/critical-security-patch

Invalid Examples

  • claude/my-branch (type "claude" not allowed)
  • Feature/MyBranch (uppercase not allowed)
  • fix-bug (missing type prefix)
  • feat/my_feature (underscores not allowed)
  • feat/MyFeature (uppercase not allowed)

Solution

Rename your branch to follow the pattern and update the PR.

For more information, see docs/BRANCHING_STRATEGY.md.

@claude claude Bot added area:ci Build and CI pipelines area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content type:bug Bug or defect labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content type:bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting Agent v2 Phase 6.1: Production Validation

3 participants