Skip to content

chore(tooling): enforce version sync, simplify release automation, add CI quality gates#4

Open
palicko wants to merge 2 commits into
mainfrom
chore/tooling-efficiency
Open

chore(tooling): enforce version sync, simplify release automation, add CI quality gates#4
palicko wants to merge 2 commits into
mainfrom
chore/tooling-efficiency

Conversation

@palicko

@palicko palicko commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Machine-enforces what AGENTS.md only documented, and fixes the two long-standing CI reds along the way.

Release & versioning (Track A)

  • scripts/check-versions.mjs + unconditional versions CI job — asserts every mirrored version source agrees: package.json ↔ composer.json ↔ top CHANGELOG entry ↔ theme style.css, compatibility-matrix top row, .webentor/project.json baselines, and core↔theme shared devDependency ranges.
  • Changesets removed (versioning is manual per AGENTS.md; the action only worked because no changeset files existed). release.yml now runs: check-versions gate → publish-npm.mjs (publishes committed versions missing from npm) → release-tags.sh (pushes missing core-v*/setup-v*/starter-v* tags and dispatches the split workflows, closing the npm↔Packagist gap — no more forgotten tag pushes).
  • pnpm release:prep core=0.16.0 theme=2.2.0 ... — one command stamps all mirrored version fields, scaffolds changelog entries, inserts the matrix row, and updates project.json baselines; self-verifies via check-versions.

CI fixes & quality gates (Track B)

  • Root-caused the red core job: --filter './packages/webentor-core...' silently skipped webentor-configs' own dependencies; the correct selector is --filter '{packages/webentor-core}...'.
  • Starter job no longer attempts composer install (blocked on premium-plugin dist secrets): now composer validate + phpcs via setup-php, plus theme PSR12 linting.
  • phpcs wired for core (composer lint) with sane ruleset excludes; pre-existing PSR2/PSR12 violations in theme app/ fixed (whitespace/docblock/line-wrapping only, behavior-neutral).
  • Orphaned lint-staged config activated in the pre-commit hook (direct eslint/stylelint; verified it blocks a broken file and passes clean ones).
  • No-op grumphp removed from the test-site harness.

Hygiene (Track D)

  • renovate.json (grouped monthly updates; standalone theme tree separated; test-site + internal packages excluded). Follow-up: enable the Renovate app on the repo.
  • Stale composer.lock content-hashes refreshed (core after the phpcs dep; starter was already stale on main).
  • AGENTS.md release workflow rewritten for the new automation; changelog path casing fixed; dead demo-bump workflow/stub removed.

Deliberately not included

  • Typecheck in CI: core has ~136 pre-existing tsc errors (54 from undeclared @wordpress/* type deps, 27 fixable with resolveJsonModule, rest are real block typing issues). A note in ci.yml marks where to add it once green.
  • Unit tests / PHPStan / E2E-in-CI (out of scope per plan).

Verification

  • check-versions green on HEAD; fails correctly on injected drift (style.css version, devDep range).
  • pnpm run ci green; composer lint green in core, starter, theme.
  • pnpm test-release all 5 phases pass (CI checks, versions, publish dry-run, subtree split, tags dry-run).
  • release:prep tested with a multi-package bump (core+starter+theme) and reverted.
  • Pre-commit hook verified both directions (clean commit rebuilds+passes; lint error aborts).
  • Publish + tag scripts are idempotent against current released state (all skips).

https://claude.ai/code/session_018UWsPchYR5GKjCr1pPYyjg

palicko added 2 commits July 7, 2026 10:07
…d CI quality gates

Release & versioning:
- Add scripts/check-versions.mjs + unconditional CI job: asserts
  package.json/composer.json/CHANGELOG/style.css, compatibility-matrix top
  row, .webentor/project.json baselines, and core<->theme shared
  devDependency ranges all agree
- Remove changesets (versioning has been manual per AGENTS.md);
  release.yml now runs check-versions -> scripts/publish-npm.mjs
  (publishes committed versions missing from npm) ->
  scripts/release-tags.sh (pushes missing core-v*/setup-v*/starter-v*
  tags and dispatches split workflows, closing the npm<->Packagist gap)
- Add scripts/release-prep.mjs (pnpm release:prep pkg=x.y.z ...): stamps
  all mirrored version fields, scaffolds changelog entries, inserts the
  matrix row, updates project.json baselines in one reviewed diff
- Retire scripts/sync-composer-versions.mjs and the kill-switched
  demo-bump workflow/stub; rework test-release.sh phases accordingly

CI fixes & quality gates:
- Fix filtered installs: '{packages/x}...' selector (bare './x...'
  skipped workspace deps' own dependencies - root cause of the long-red
  core lint job)
- Starter job: composer validate + phpcs via setup-php instead of
  composer install (blocked on premium-plugin dist secrets); also lints
  the theme (PSR12 app/)
- Add phpcs to webentor-core (composer lint) and CI; scope core/starter
  rulesets (node_modules, blade, built assets, LocalValetDriver)
- Fix pre-existing PSR2/PSR12 violations in theme app/ files
- Wire the orphaned lint-staged config into the pre-commit hook and
  point it at direct eslint/stylelint invocations
- Drop the no-op grumphp setup from the test-site harness

Hygiene:
- Add renovate.json (grouped monthly updates; standalone theme tree
  separated; test-site and internal packages excluded)
- Refresh stale composer.lock content-hashes (core, starter)
- Update AGENTS.md release workflow + changelog path casing

Claude-Session: https://claude.ai/code/session_018UWsPchYR5GKjCr1pPYyjg
The theme's standalone lockfile had drifted many releases behind its
manifest (still resolving @webikon/webentor-core ^0.10-era versions), so
consumer installs and the CI frozen-lockfile install could not succeed.
Regenerated with 'pnpm install --ignore-workspace'; build verified.

Claude-Session: https://claude.ai/code/session_018UWsPchYR5GKjCr1pPYyjg
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.

1 participant