Skip to content

refactor: Phase 4.4 — absorb flaky-test-detection.yml into checks.yml - #2508

Open
ashleyshaw with Copilot wants to merge 5 commits into
developfrom
copilot/phase-4-4-absorb-flaky-test-detection
Open

refactor: Phase 4.4 — absorb flaky-test-detection.yml into checks.yml#2508
ashleyshaw with Copilot wants to merge 5 commits into
developfrom
copilot/phase-4-4-absorb-flaky-test-detection

Conversation

CopilotAI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

flaky-test-detection.yml (42 lines) ran as a standalone scheduled workflow, adding unnecessary scheduling overhead. Absorbed into checks.yml as a schedule-gated job — 116 → 155 lines, well under the 400-line decision gate.


Refactor Pull Request

This repository enforces changelog, release, and label automation for all PRs and issues.
See the organisation-wide Automation Governance & Release Strategy for required rules.

Linked issues

Closes#1409

Summary

Absorbs flaky-test-detection.yml into checks.yml as a schedule/workflow_dispatch-gated job. Net: −1 workflow file. All test-related CI logic now centralised in checks.yml.

Safety Nets

  • Existing tests covering behaviour: Jest suite unchanged; flaky-detection logic copied verbatim
  • New/refined tests added: None — logic is identical, only location changed
  • Static analysis/lint rules touched: None

Approach

  • Added schedule (0 */12 * * 1-5) and workflow_dispatch triggers to checks.yml
  • Added flaky-detection job gated on github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' with 5-run matrix and Mergify upload step — verbatim from deleted file
  • all-checks composite status job intentionally excludes flaky-detection from needs (it's a quality signal, not a PR gate)
  • Deleted flaky-test-detection.yml
  • Dead code removed? Yesflaky-test-detection.yml deleted
# checks.yml — new trigger blockschedule:
- cron: "0 */12 * * 1-5"# Every 12 hours, Monday-Fridayworkflow_dispatch: # Allow manual trigger for testing# checks.yml — new jobflaky-detection:
name: Flaky Test Detection (Run ${{ matrix.run_number }})if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'runs-on: ubuntu-lateststrategy:
fail-fast: falsematrix:
run_number: [1, 2, 3, 4, 5]

Metrics / Benchmarks (if applicable)

  • Before: 2 workflow files, 116-line checks.yml
  • After: 1 fewer workflow file, 155-line checks.yml

Verification

  • Unit tests pass locally
  • Key flows smoke-tested: workflow YAML syntax valid; schedule/workflow_dispatch triggers verified
  • No user-visible diffs observed

Risk & Rollback

  • Risk level: Low
  • Rollback plan: Revert commit; re-create flaky-test-detection.yml from git history

Changelog

Changed

Removed


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)
  • 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)

Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
CopilotAI changed the title [WIP] Refactor to absorb flaky-test-detection.yml into checks.ymlrefactor: Phase 4.4 — absorb flaky-test-detection.yml into checks.ymlAug 29, 2026
CopilotAI requested a review from ashleyshawAugust 29, 2026 15:54
@ashleyshaw
ashleyshaw requested a lite review from CopilotAugust 29, 2026 16:24

CopilotAI 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

The new schedule/workflow_dispatch triggers will also run the existing lint/test/validate jobs unless they are additionally gated, which materially increases scheduled CI workload beyond the stated intent.

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

Pull request overview

This PR consolidates flaky-test detection into the existing CI workflow by removing the standalone scheduled workflow and introducing a schedule-/manual-dispatch-only job inside checks.yml, aiming to reduce workflow sprawl while keeping the flaky-signal available.

Changes:

  • Added schedule and workflow_dispatch triggers to checks.yml.
  • Added a flaky-detection matrix job (5 runs) gated to schedule/workflow_dispatch.
  • Deleted .github/workflows/flaky-test-detection.yml after absorbing its logic.
File summaries
FileDescription
.github/workflows/checks.ymlAdds schedule/dispatch triggers and a gated flaky-detection job within the unified CI workflow.
.github/workflows/flaky-test-detection.ymlRemoves the now-redundant standalone flaky-test detection workflow.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • 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.github/workflows/checks.yml Outdated
Comment on lines +18 to +20
schedule:
- cron: "0 */12 * * 1-5" # Every 12 hours, Monday-Friday
workflow_dispatch: # Allow manual trigger for testing

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — lint, test, validate, and all-checks jobs now have github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' in their if conditions, so only flaky-detection runs on scheduled and manual triggers.

@ashleyshaw
ashleyshaw marked this pull request as ready for review August 29, 2026 16:32
ashleyshawand others added 2 commits August 29, 2026 23:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
…workflow_dispatch
Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
auto-merge was automatically disabled August 29, 2026 16:57

Head branch was pushed to by a user without write access

@github-actions

github-actionsBot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Governance Issues

❌ Milestone Issue

No milestone assigned. Please select a milestone from the right sidebar.


View PR Governance Check

@ashleyshaw
ashleyshaw enabled auto-merge (squash) August 29, 2026 17:00
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2508

CI Status:pending
Files changed: 2

Recommendations

  • CI checks not green

3 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2508

CI Status:pending
Files changed: 2

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2508

CI Status:pending
Files changed: 2

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2508

CI Status:pending
Files changed: 2

Recommendations

  • CI checks not green

@github-actions

github-actionsBot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🚫 This PR description is missing required template content.

Missing required section(s): 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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 4.4: Absorb flaky-test-detection.yml into checks.yml

3 participants

@ashleyshaw