P2-A: move ${{ inputs.line_limit_paths }} from raw shell into env: block (PATHS)
to eliminate template-injection surface on caller-controlled input.
P2-B: replace 'npm run lint --if-present' (always exits 0 on missing script,
killing the node --check fallback) with explicit node -e detection;
fallback now actually runs when no lint npm script is defined.
P2-C: both phpcbf and phpcs steps now detect which of phpcs.xml /
phpcs.xml.dist / .phpcs.xml.dist is present and pass it to --standard;
guard and command now agree for all three config filename variants.
Validators: actionlint 1.7.4 clean, yamllint 1.38.0 clean (both files).
Version: 1.6.1
Agent-Session: claude/reusable-ci-20260616-p2-fixes
Add guard to phpcbf and phpcs strict steps: if neither phpcs.xml,
phpcs.xml.dist, nor .phpcs.xml.dist exists in the repo root, both steps
exit 0 with an info message. This prevents startup_failure on the self-test
(peptide-e2e is a Node repo with no PHPCS config) and provides clean
feedback for repos not yet configured for PHPCS.
Real PHP repos all have a phpcs.xml (prautoblogger, theme, pr-core, etc.)
so the guard is transparent for them.
Agent-Session: claude/reusable-ci-20260616
GitHub Actions permission model for reusable workflows: callers must declare
at least the permission level that any job in the called workflow requests.
Since the phpcs job declares 'permissions: contents: write' (for phpcbf
commit-back), all callers must include 'permissions: contents: write' at
their workflow level.
Changes:
- ci.yml: remove top-level permissions block (was: contents: read); phpcs job
already has job-level contents: write. Docblock now explains the caller
requirement clearly.
- ci-self-test.yml: add 'permissions: contents: write' at workflow level.
- README.md: adoption snippet now includes the required permissions block.
- Remove diagnostic bisect/minimal test workflows (used to identify the root
cause of startup_failure; finding: job-level write in reusable workflow
requires caller to declare write at workflow level).
Confirmed: ci-bisect-caller with permissions: contents: write = SUCCESS.
Confirmed: actionlint 1.7.4 + yamllint 1.38.0 both clean.
Agent-Session: claude/reusable-ci-20260616
Workflow-level permissions: write in a reusable workflow causes startup_failure
when calling workflow has default (read-only) permissions. Move write scope to
the phpcs job level only — the one job that actually needs it (phpcbf commit-back).
All other jobs run with the inherited read scope.
Self-test caller (ci-self-test.yml) confirmed clean with no top-level write
permission declared — job-level override in the reusable workflow is sufficient.
Confirmed via bisect: ci-bisect.yml (workflow-level write) startup_failed;
ci-minimal.yml (no write needed) succeeded; ci-bisect-caller with
permissions: write added succeeded. Job-level approach is the correct pattern.
Agent-Session: claude/reusable-ci-20260616
Adds ci-minimal.yml + ci-minimal-test.yml to diagnose the startup_failure
on the self-test reusable workflow call. To be removed after diagnosis.
Agent-Session: claude/reusable-ci-20260616
GitHub requires ./.github/workflows/ci.yml (not @branch-ref) for same-repo
reusable workflow calls from a PR branch. The @claude/reusable-ci-20260616
ref caused startup_failure because GitHub can't resolve branch-ref reusable
workflows that aren't on main yet.
Agent-Session: claude/reusable-ci-20260616
Add .github/workflows/ci.yml as a reusable workflow_call entrypoint for
all 7 estate repos. Consistent job names (lint-php, phpcs, file-size,
phpunit, lint-js) so deploy-app.yml can needs: them uniformly.
Inputs: php_versions (JSON matrix), tests (stubs|wp-framework|brain-monkey|none),
enforce_300, line_limit_paths, has_js, phpcs_autofix.
phpcbf auto-commit: on pull_request, phpcbf runs and commits any auto-fixable
PHPCS violations back to the branch via GITHUB_TOKEN before strict phpcs.
On push events the commit step is skipped to prevent loops.
wp-framework PHPUnit path handles all three known WP CI gotchas:
(1) install svn (ubuntu-latest lacks it);
(2) skip-db-create=true (MySQL service pre-creates wp_tests via MYSQL_DATABASE);
(3) WP_CORE_DIR trailing slash (ABSPATH concatenation guard).
Also adds:
- .github/workflows/ci-self-test.yml: self-test caller (tests: none) so the
reusable workflow is exercised on this PR.
- README.md: adoption snippet + full input reference for caller repos.
- CHANGELOG.md: v1.6.0 entry.
Agent-Session: claude/reusable-ci-20260616
Skip-if-absent Playwright spec for the board New Article / Generate Now control; now live with prautoblogger v0.21.0. Gates future deploys.
Agent-Session: m4-generate-now-smoke-20260614
Merged ahead of the v0.19.3 dossier fix so staging smoke gates it.
QA: APPROVE qa-reviews/peptide-e2e/2026-06-12-0c5c301.md (re-head after conflict resolution)
Agent-Session: cto-dossier-403-hotfix-20260612
Guards the submenu-before-parent 404 class in the deploy gate.
QA: APPROVE-W-P2 qa-reviews/peptide-e2e/2026-06-12-113bb17.md
Agent-Session: cto-board-404-hotfix-merge-20260612
Hostinger rate-limits GitHub runner IPs on wp-login.php, causing
TimeoutError (30s) during the auth setup step. This has produced 6
deploy-gate failures over 2 days across multiple repos.
Changes:
- Raise navigation timeout from 30s to 90s per attempt
- Wrap the full login sequence in a retry loop (up to 3 attempts)
- Create a fresh BrowserContext per attempt so stale cookies / throttle
state cannot carry over between retries
- Wait 15s between attempts to let transient throttle windows clear
- Log each attempt number and outcome clearly (console.log + console.error)
so any future failure is diagnosable from the CI log without a local repro
- On final failure, surface a hint pointing to the Hostinger throttle cause
Assertion behaviour: unchanged. The #wpadminbar check and storageState
write are identical to before — retries only affect getting past wp-login.
No changes to smoke test assertions, playwright.config.ts, or workflow files.
Agent-Session: e2e-login-flake-20260612
deploy-production now needs smoke; a smoke FAILURE blocks prod while a skipped
smoke (run_smoke:false) still allows it. Automated functional gate replacing
the removed human approval gate — hands-off but safe.
Agent-Session: cto gate-smoke
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
The peptide CPT menu was restructured (no top-level 'Peptides' label), so the
text=Peptides assertion failed. Assert the CPT's admin link by href
(a[href*='post_type=peptide']) and toBeAttached — robust to label changes and
submenu (hidden-until-hover) placement.
Agent-Session: cto smoke-green
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
- 02 search: target the visible .hero-search instance; the old .first()
selector matched the hidden header search-overlay (instance 1).
- 01 calculator: it auto-computes from the peptide preset; select the peptide
and assert #prc-results, scoped to .prc-calculator (the old broad
button[type=submit] selector clicked the PSA search button).
- 03 admin: 'const nav' had been swallowed into a comment (ReferenceError).
- 04 rest-api: PSA /search returns {results:[]} with no 'status' key; drop it.
Auth fixed separately via a dedicated staging CI admin (ci-smoke) + corrected
STAGING_WP_ADMIN_* secrets; the global.setup failure was cascading into these.
Agent-Session: cto smoke-green
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
Compare prod-deployment SHA to main and ignore changes confined to .github/,
tests/, and docs/build files (which the deploy excludes) — so infra-only commits
don't trip a false 'prod behind main' alert every day.
Agent-Session: cto monitor-drift-filter
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
* ci(deploy): retry rsync on Hostinger runner-IP throttle + best-effort inventory guard
Pilot surfaced an exit-255 SSH connection timeout (documented Hostinger
rate-limiting of concurrent runner IPs). rsync now retries 4x/25s; the plugin
count guard is best-effort so a throttled check can't fail a good deploy.
Agent-Session: cto harden-deploy
* ci: add daily Deploy Health Monitor (drift + deploy-failure)
Scheduled GitHub Actions check (runs on GitHub infra, not the dead local cron):
for each app repo, compares the latest production deployment SHA to main and
flags failed deploy runs. Opens one de-duplicated 'deploy-health' issue when
something is off — the alarm that was missing when deploys silently broke.
Agent-Session: cto deploy-health-monitor
---------
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
Single staging→smoke→production pipeline callable by every plugin/theme repo
via workflow_call. Replaces six copy-pasted per-repo deploy.yml files so deploy
logic is fixed once. Includes the pre/post active-plugin-count guard, LiteSpeed
purge, and health checks. Callers pass target_path + secrets: inherit.
Agent-Session: cto reusable-deploy
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
- 01 calculator: page lives at /calculator/ (confirmed live), not
/reconstitution-calculator/ — the 404 failed all 3 calc tests.
- 00 homepage: brand title is 'Peptide Repo' (with space); regex /peptiderepo/i
never matched. Broadened to /peptide ?repo/i.
- 03 admin: required-plugin slug is 'prautoblogger' (WP dir), not 'pr-autoblogger'.
These were test bugs, not site regressions — the site serves all three correctly.
Agent-Session: cto smoke-triage
Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
Third bug in the smoke-gate chain. With testDir + GH-Secrets fixes already in place, this unblocks the workflow-driven prod deploy.
Agent-Session: cto merge-peptide-e2e-post-login-fix
When smoke.yml runs via workflow_call from another repo (peptide-repo-core,
peptide-starter-theme, etc.), GitHub Actions checks out the CALLER's repo
by default. The caller has no package-lock.json, so setup-node's npm cache
lookup fails with 'Some specified paths were not resolved'.
Fix: add repository/ref to the checkout step so we always fetch peptide-e2e
regardless of who calls the workflow. This ensures npm ci and Playwright
have the correct test code and dependency lockfile.
03-admin-plugins.spec.ts and 04-rest-api.spec.ts were cut off mid-test,
causing Playwright TypeScript parse failures and the smoke gate to show
0 jobs. Added the missing test bodies, assertions, and closing braces.
New tests added:
- PR Core Settings page loads (03)
- Peptide CPT verified via /wp-json/wp/v2/types/peptide (04)
Fixes smoke gate for all future deploys.