Compare commits

..

5 Commits

Author SHA1 Message Date
peptiderepo
dc5145cd92 style: auto-fix PHPCS violations via phpcbf 2026-06-16 14:39:26 +00:00
peptiderepo
0bac82be52 fix: array_merge P0 + restore check-constants self-test P1 (v0.22.0)
P0: replace `+` array union with array_merge() in
Settings_Fields_Extended::get_fields(). PHP `+` keeps left-side keys
when both arrays are integer-indexed — silently drops all 11 image fields
(indexes 0–10 collide with indexes 0–10 of the local array). array_merge()
is already the operator used by the parent class at class-settings-fields.php:84.

P1: restore `php scripts/check-constants.php --self-test` step in the
check-constants CI job. Step was present in v0.21.0 and accidentally dropped
in the CI rewrite. Script logic is intact; CI now exercises it again.

Also adds SettingsFieldsExtendedTest (3 assertions) as a regression guard:
cardinality (29 = 18 local + 11 image), presence check, and per-field
id/section contract. If a + union ever re-appears, test_get_fields_returns_29_fields
fails with a message naming the root cause.

Agent-Session: engineer-infra-prab-p0fix-20260616
2026-06-16 14:38:46 +00:00
peptiderepo
7217c154bb fix: resolve pre-existing PHPCS violations (Yoda conditions + short ternaries)
Fixes non-auto-fixable PHPCS errors surfaced by the estate reusable CI:
- scripts/check-constants.php: Yoda conditions at lines 140, 201
- templates/admin/ideas-browser.php: Elvis (?:) → explicit ternary (line 75)
- templates/admin/review-queue.php: Elvis (?:) → explicit ternaries (lines 144, 161-163)
- templates/admin/metabox-generation-info.php: Elvis (?:) → explicit ternaries (7 lines)
- .github/mu-plugins/prautoblogger-deploy-receiver.php: phpcs:ignore for
  ZipArchive->numFiles (native PHP property, can't be snake_cased); Elvis (?:) fix

All violations were pre-existing; none introduced by this PR.

Agent-Session: claude/adopt-ci-20260616
2026-06-16 14:04:40 +00:00
peptiderepo
1813d419e5 style: auto-fix PHPCS violations via phpcbf 2026-06-16 14:01:59 +00:00
peptiderepo
3890485dcb ci: adopt estate reusable CI + split 300-line violations (v0.22.0)
- ci.yml → thin caller of peptide-e2e reusable CI (tests: brain-monkey)
  + keep check-constants as parallel job; workflow_call trigger enabled
- deploy.yml: retire standalone validate job; gate on ci.yml via workflow_call
- composer.json: add 'test' script (vendor/bin/phpunit --testdox)
- Version bumped to 0.22.0

300-line splits (9 files over limit → all under 300):
- class-keyword-extractor.php: shared tokeniser from Idea_Scorer + Semantic_Dedup
- class-image-aspect-ratio.php: aspect-ratio snap from OR provider + OR batch
- class-settings-sanitizer.php: option sanitization from Admin_Page
- class-settings-fields-images.php: image fields from Settings_Fields_Extended
- class-runware-image-validator.php: credential check from Runware_Image_Provider
- Runware batch: 15 phpcs:disable lines → 1 grouped suppression

Agent-Session: claude/adopt-ci-20260616
2026-06-16 14:00:48 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ permissions:
jobs:
ci:
uses: peptide-repo/peptide-e2e/.github/workflows/ci.yml@main
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
with:
tests: brain-monkey
secrets: inherit

View File

@@ -19,7 +19,7 @@ jobs:
deploy:
name: Deploy (shared pipeline)
needs: ci
uses: peptide-repo/peptide-e2e/.github/workflows/deploy-app.yml@main
uses: peptiderepo/peptide-e2e/.github/workflows/deploy-app.yml@main
with:
target_path: wp-content/plugins/prautoblogger
secrets: inherit