Skip to content

ci: fail when the architecture validator drifts from core - #91

Merged
erseco merged 1 commit into
mainfrom
ci/architecture-validator-drift-check
Aug 6, 2026
Merged

ci: fail when the architecture validator drifts from core#91
erseco merged 1 commit into
mainfrom
ci/architecture-validator-drift-check

Conversation

@erseco

@erseco erseco commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

ci: fail when the architecture validator drifts from core

The validator here is a verbatim copy of the canonical file in
exelearning/exelearning. Until now nothing enforced that: the copies stayed
identical only because whoever changed one remembered to re-copy the rest.

Twice during the recent review rounds that memory was the only safeguard,
and once a sync commit was lost without anyone noticing for hours.

The step fetches the canonical file from core's default branch and diffs it
against this copy. A drift fails the job and prints the diff, so the report
says what changed rather than just that something did.

It needs no dependency and no setup: curl and diff are on the runner.

Verified locally: the step passes against the current copy, and fails with a readable diff when a line is appended to it.

+// drift injected by a local edit
  would FAIL — correct

The validator here is a verbatim copy of the canonical file in
exelearning/exelearning. Until now nothing enforced that: the copies stayed
identical only because whoever changed one remembered to re-copy the rest.

Twice during the recent review rounds that memory was the only safeguard,
and once a sync commit was lost without anyone noticing for hours.

The step fetches the canonical file from core's default branch and diffs it
against this copy. A drift fails the job and prints the diff, so the report
says what changed rather than just that something did.

It needs no dependency and no setup: curl and diff are on the runner.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Test in WordPress Playground

Test the plugin with the code from this branch:

Preview in WordPress Playground

ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELP upload, shortcode, Gutenberg block and preview work normally.

@codecov-commenter

codecov-commenter commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.87%. Comparing base (a1428c4) to head (d0a0c44).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #91   +/-   ##
=========================================
  Coverage     96.87%   96.87%           
  Complexity      864      864           
=========================================
  Files            39       39           
  Lines          4323     4323           
=========================================
  Hits           4188     4188           
  Misses          135      135           
Flag Coverage Δ
javascript 95.70% <ø> (ø)
php 97.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erseco
erseco merged commit b9f2510 into main Aug 6, 2026
5 checks passed
@erseco
erseco deleted the ci/architecture-validator-drift-check branch August 6, 2026 09:34
Sign up for free to 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.

2 participants