Skip to content

Add upstream config sync script and detection accuracy tests#26

Merged
UltraBob merged 3 commits intomainfrom
feature/upstream-config-sync
Mar 24, 2026
Merged

Add upstream config sync script and detection accuracy tests#26
UltraBob merged 3 commits intomainfrom
feature/upstream-config-sync

Conversation

@UltraBob
Copy link
Owner

Summary

  • Add scripts/sync-upstream-configs.sh — fetches latest configs from Drupal core (11.x) and GitLab CI templates, compares against local assets, and optionally applies updates with --update
  • Add .github/workflows/upstream-config-check.yml — weekly automated check that opens a GitHub issue when upstream configs drift
  • Add detection accuracy tests to the full install test: true positives (PHPCS, PHPStan, ESLint, Stylelint, Prettier, CSpell catch known violations), true negatives (clean code passes PHPCS/PHPStan), and exclusion path tests (contrib code not flagged by default runs)
  • Add Docker volume cleanup in test teardown to prevent mariadb/mutagen/snapshot volume accumulation
  • Add "Maintaining upstream configs" section to README

Closes #25

Test plan

  • sync-upstream-configs.sh check mode reports file status correctly
  • sync-upstream-configs.sh --update applies changes with proper headers
  • Branch override (--branch-core=) and error handling work
  • DCQ_FULL_TESTS=1 bats --jobs 4 ./tests/test.bats passes (full install test with detection accuracy assertions)
  • Verify weekly workflow fires correctly (manual workflow_dispatch trigger)

… cleanup

Add a maintainer script that fetches the latest config files from Drupal core
and GitLab CI templates, compares them against local assets, and optionally
applies updates. A weekly GitHub Actions workflow detects upstream drift and
opens an issue when changes are found.

Expand the full install test with detection accuracy assertions for every
wrapper command: true positives (tools catch known violations), true negatives
(clean code passes), and exclusion path tests (contrib code is not flagged).

Clean up Docker volumes (mariadb, mutagen, snapshots) in test teardown to
prevent accumulation across test runs.
The local .cspell.json asset has populated ignorePaths, dictionaries,
dictionaryDefinitions, and words arrays (expanded by prepare-cspell.php
at install time). Upstream has empty arrays. Strip these from both sides
before comparing so the script only flags structural changes to fields
like description, flagWords, and overrides.

Also revert accidental asset updates from test run.
@UltraBob UltraBob merged commit 0c44ed7 into main Mar 24, 2026
3 checks passed
@UltraBob UltraBob deleted the feature/upstream-config-sync branch March 24, 2026 20:26
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.

Maintainer script to gather latest versions of upstream configs

1 participant