Commit Graph

36 Commits

Author SHA1 Message Date
peptiderepo
4f16ed9035 ci: verify deploy pipeline after SSH secret rotation 2026-04-25 20:11:19 +00:00
peptiderepo
2bb686a348 fix: PHPCS violations in brand components (Yoda conditions, array formatting, PHP tag) 2026-04-25 20:02:23 +00:00
peptiderepo
e23c141009 feat: brand identity v1.0.0 — Direction C Trusted Guide (theme v2.0.0-alpha.1)
Implements weeks 1–4 of the CMO brand identity sprint.

Key changes:
- CSS token system (assets/css/brand.css): full palette, verdict tokens, component styles
- Poppins/Inter/IBM Plex Mono Google Fonts loading with preload
- Full favicon/PWA/OG asset pack (peptide-repo-brand v1.0.0)
- 5-state verdict badge + card + evidence row components
- verdict_state + signal_row post meta on pr_peptide CPT
- Homepage hero: teal bg, new H1/subhead, lime search bar
- Archive verdict filter chips (CSS + pre_get_posts query hook)
- Affiliate disclosure component (3 contexts)
- page-how-we-review.php + page-about.php templates
- Footer Our Method links
- a11y: skip-to-content, reduced-motion, aria on verdict badges

QA: PASS (0 blockers) — qa-reviews/peptide-starter-theme/2026-04-26-a2bff59.md
Staging verified: https://staging.peptiderepo.com
2026-04-26 02:59:00 +07:00
peptiderepo
e40602d58c chore: remove dead Elementor CSS remnant from style.css (v1.7.1) 2026-04-24 02:21:04 +07:00
peptiderepo
59363e3795 fix: bump style.css version to 1.7.0 (missed in WooCommerce removal PR) 2026-04-24 02:17:57 +07:00
peptiderepo
a1917d62c2 chore: remove WooCommerce from theme — not used on peptiderepo.com (v1.7.0)
Remove all WC asset dequeue logic, cart icon conditional, and WC-specific tests from the theme. Eliminates the class of fatal errors seen in the 2026-04-23 incident where is_woocommerce() was called after WC deactivation.

Version: 1.6.x → 1.7.0
Reviewed-by: peptiderepo (CTO)
QA: qa-reviews/peptide-starter-theme/2026-04-23-d239bd1e.md
2026-04-24 01:37:31 +07:00
peptiderepo
fe161cf765 ci: add pre-deploy destination canary check + plugin inventory guard
Two safety nets to prevent rsync --delete wiping the wrong directory:
1. Pre-deploy: verify destination/style.css exists (proves it's a theme dir)
2. Post-deploy: compare active plugin count before and after — fail if any dropped

Addresses root cause of 2026-04-23 theme deploy incident.
2026-04-24 00:52:02 +07:00
peptiderepo
0c5db51739 fix: guard is_woocommerce() with function_exists() — fatal when WC not active
Call to undefined function is_woocommerce() in perf-asset-policy.php:69
caused a 500 on all page loads. WooCommerce is not active on this site.
Added function_exists() guard so the WC asset dequeue block is skipped
when WooCommerce is not installed.
2026-04-23 23:50:44 +07:00
peptiderepo
d79fc94061 feat(perf): mobile performance Phase 1 — dequeue unused plugin assets + slim fonts + preconnect (#13)
Ships peptide-starter-theme v1.6.0.

Changes:
- New inc/perf-asset-policy.php module: conditional dequeue of WC/Elementor/USMI assets on pages that do not need them, Google Fonts weight slim (Roboto 100..900 → 400/500/700; Roboto Slab → 400/700), wp_resource_hints preconnect for fonts.googleapis.com + fonts.gstatic.com, cookie-notice-front script defer.
- Kill-switch constant PEPTIDE_STARTER_PERF_DEQUEUE (default true) for instant rollback via wp-config.php.
- 4 extensibility filters: peptide_starter_perf_woocommerce_{styles,scripts}, _elementor_{styles,scripts}, _usmi_{styles,scripts}, _font_weights.
- 13 unit tests in tests/test-perf-asset-policy.php.
- Bootstrap: 2 lines in functions.php (require + after_setup_theme action).
- Docs: CHANGELOG [1.6.0], ARCHITECTURE.md, CONVENTIONS.md how-to.

Target: mobile PSI 74 → 90+, LCP 5.4s → ~2.5s.

Post-deploy: purge LiteSpeed CSS bundle.

QA: qa-reviews/peptide-starter-theme/2026-04-23-a54b5c9.md (APPROVE with handle-drift verified false-positive).
2026-04-23 13:24:47 +07:00
peptiderepo
6956479df2 ci(cto-review): add app-map freshness check to QA gate (#12)
When a PR modifies the admin settings surface, file/class structure, or data flow, the QA reviewer now flags the PR as a MAJOR concern unless the PR description references an accompanying update to the CTO app-map at `Peptide Repo CTO/app-maps/<repo-slug>.md`.

The CTO workspace is a separate repo, so CI cannot verify the doc update mechanically — the reviewer inspects the PR description for an explicit mention.

Why: the CTO-level app-maps are the single-pane-of-glass reference that lets the CTO answer questions like 'which settings does this plugin expose?' without grepping the repo each time. Without a merge-gate prompt, these maps drift out of sync with the code.

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-04-22 18:33:34 +07:00
peptiderepo
d2577b8371 fix: display featured images at full width, centered
The theme was rendering featured images at WordPress 'medium' size
(300×300 square crop) instead of the full 1200×632 original. Changed
the_post_thumbnail() from 'medium' to 'full' and added responsive CSS
that scales images to 100% content width with centered alignment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 13:18:05 +07:00
peptiderepo
3eb6c13bf0 ci(deploy): tolerate 403 on post-deploy health check (#10)
The peptide-starter-theme v1.5.2 release added
peptide_starter_is_cloudflare_peer() — a CF-peer IP validator that
correctly rejects direct-to-origin requests as non-Cloudflare traffic
with HTTP 403. The deploy workflow's post-deploy health check makes
exactly such a request from a GHA runner IP, so it now reliably
receives 403 even on successful deploys.

Two deploys today (peptide-starter-theme v1.5.2, prautoblogger Commit 1a)
both succeeded but reported workflow failure due to this. The actual
deploys (rsync + cache purge) ran clean; site verified HTTP 200 from
real traffic both times.

Fix: accept either 200 (normal healthy response) or 403 (validator
actively rejecting non-CF origin — itself a positive liveness signal)
in the health check. Reject only on 5xx, 4xx-other, or connection
failure.

Reverting this fix is correct only if we either (a) bypass the
validator for our own health-check user-agent, or (b) route the
health check through Cloudflare. Both are larger changes for a
later release.

Agent-Session: cowork-deploy-healthcheck-fix-20260415

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-04-15 20:17:24 +07:00
peptiderepo
b3d51945a1 Merge PR #8: v1.5.2 — CF-peer validated client IP, grandfather migration, de-short-circuit register
Release v1.5.2-hardening. Independent QA verdict: APPROVE-WITH-P2-NOTES (Haiku 4.5 subagent, verdict file at Peptide Repo CTO/qa-reviews/peptide-starter-theme/2026-04-15-fff3fce.md). Two P2 ops follow-ups filed separately (CF-IP snapshot refresh cadence, 0.0.0.0 fallback log monitor).
2026-04-15 18:17:56 +07:00
peptiderepo
000c21a9e8 feat(ci): add Neurometric PR-Summarizer as 4th QA voice (#9)
Neurometric markets a task-specialized PR-Summarizer SLM (Qwen3-4B +
specialist system prompt) on a free tier. Adding it as a 4th voice in
the existing A/B reviewer panel to see whether a specialized small
model catches things the 3 general-purpose voices miss.

The SLM does not honor OpenAI tool-calling, so it cannot return our
structured submit_review schema. Wired as a "prose voice":

- MODELS tuple gains a 6th provider_type field
  ("openrouter_tools" | "neurometric_prose")
- call_model() dispatches; new call_neurometric_prose() path hits
  api.neurometric.ai/v1 without tools, embeds raw markdown output,
  and infers verdict from keyword heuristic
- Render branch in PR comment marks the verdict as heuristic and
  notes tokens/cost are not tracked (free tier)
- Never the primary voice; heading still driven by Haiku

Also hardens the shared render path against models that omit the
optional 'summary' field (rev.get('summary') fallback).

Requires new repo secret NEUROMETRIC_API_KEY (already set on all four
peptiderepo repos). Voice self-skips with inline error if missing.

Agent-Session: cowork-neurometric-qa-voice-20260415

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-04-15 16:12:20 +07:00
peptiderepo
3464468c51 Merge PR #7: docs: adopt Agent Operating Standard v1.0.0
Ratifies AGENT-OPERATING-STANDARD.md v1.0.0 + CLAUDE.md bootstrap across peptiderepo.

PR: https://github.com/peptiderepo/peptide-starter-theme/pull/7
QA verdict: qa-reviews/peptide-starter-theme/2026-04-15-dcaaeb3.md (APPROVE)
Author: Engineer PRTheme
Merger: CTO (executed on CEO greenlight 2026-04-15)

Agent-Session: cto/v1.5.2-release-cleanup/claude-opus-4-6
2026-04-15 11:45:59 +07:00
peptiderepo
dcaaeb34f3 docs: adopt Agent Operating Standard v1.0.0 + CLAUDE.md bootstrap
Adds the org-wide agent process doc (QA gate, peptiderepo git identity,
300-line cap, doc-in-same-commit, branch naming, commit trailer, PR-only
to main) and rewrites CLAUDE.md as a thin bootstrap pointer to it.

No runtime impact. No code change. Pure process/docs ratification.

Per CTO handoff in convo/prtheme/threads/2026-04-v1.5.2-release-cleanup/
03-cto-reply.md, this is the calibration run for the rollout pattern
across the four peptiderepo repos.

Agent-Session: prtheme/v1.5.2-release-cleanup/claude-opus-4-6
2026-04-15 10:51:14 +07:00
peptiderepo
0a7c4c93ea docs(arch): link to cross-app engineering reference docs
Adds a pointer to the cross-app engineering docs in the CTO workspace so engineers scoped to this repo can find shared reference material (Cloudflare AI Gateway routing, OpenRouter key rotation, interface pattern, image-generation stack, social distributor choice) and the incident runbook.

No code changes. Pure docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 09:03:29 +07:00
peptiderepo
c960aee16d ci: reviewer cost cap + 3-model A/B harness (#5)
* ci: cost cap + 3-model A/B harness on CTO reviewer

Two enhancements to the PR reviewer:

1. Monthly spend cap: tracked in Repo Variables (CTO_REVIEW_MONTH,
   CTO_REVIEW_SPEND_CENTS, CTO_REVIEW_CAP_CENTS). Default cap $10/month.
   Auto-resets on month rollover. Posts a skip-comment on PRs when cap hit.

2. A/B harness: reviews every PR with 3 models in parallel
   (Claude Haiku 4.5, DeepSeek V3.1, Kimi K2 Thinking). Comment shows
   all 3 verdicts side-by-side so we can compare quality/cost on real
   PRs before picking a permanent default. Drop to 1 model by editing
   the MODELS list after A/B window closes.

Agent-Session: cowork-reviewer-ab-20260414

* ci: use CTO_ADMIN_TOKEN for repo variables + restore formal APPROVE/REQUEST_CHANGES

Default GITHUB_TOKEN cannot mutate Repository Variables (always 403).
Use a PAT-backed secret CTO_ADMIN_TOKEN for the budget counter steps.
Also restores formal APPROVE/REQUEST_CHANGES verdicts now that repo
setting can_approve_pull_request_reviews is enabled.

Agent-Session: cowork-reviewer-ab-20260414

* ci: address review feedback — per-model timeout + simpler cost math

- Per-model timeout of 60s so one hung model does not block siblings
- Simplify cost_cents math (cost_usd * 100 directly, no double-rounding)

Defer: fine-grained PAT for CTO_ADMIN_TOKEN (requires manual OAuth device flow).

Agent-Session: cowork-reviewer-ab-20260414

* ci: stop exposing CTO_ADMIN_TOKEN as env var (security cleanup)

Pass the PAT only via github-token param. continue-on-error on the
budget step so a missing/expired secret degrades gracefully instead
of failing the whole workflow.

Agent-Session: cowork-reviewer-ab-20260414
2026-04-14 17:35:12 +07:00
peptiderepo
80f573a94c ci: run PHPUnit in CI (tests exist, were never executed) (#2)
* ci: add PHPUnit workflow that runs the existing test suite

59 tests exist across 8 files but were never running in CI.
This adds a ci.yml with PHP Lint + PHPCS + PHPUnit against WP test
framework on a MySQL service.

Agent-Session: cowork-pr-theme-tests-20260414

* ci: vendor install-wp-tests.sh for the PHPUnit workflow

Standard WP-CLI scaffold script, lightly hardened. Kept in-repo
instead of curl-from-github so CI is reproducible.

Agent-Session: cowork-pr-theme-tests-20260414

* chore: retrigger CI after reviewer fix landed on main

Agent-Session: cowork-pr-theme-tests-20260414

* ci: install subversion before bootstrap (svn no longer preinstalled)

ubuntu-latest dropped svn from the default image. install-wp-tests.sh
still uses svn to fetch the WP test suite from develop.svn.wordpress.org.
Add a step to apt-install subversion before the bootstrap runs.

Agent-Session: cowork-pr-theme-tests-20260414

* ci: skip db creation in install-wp-tests.sh (MySQL service already created it)

Agent-Session: cowork-pr-theme-tests-20260414

* ci: WP_CORE_DIR needs trailing slash for ABSPATH substitution

The wp-tests-config.php substitution copies WP_CORE_DIR into ABSPATH
verbatim, then later WordPress concatenates wp-settings.php. Without
the trailing slash you get /tmp/wordpresswp-settings.php.

Agent-Session: cowork-pr-theme-tests-20260414
2026-04-14 17:07:14 +07:00
peptiderepo
59e51dae99 ci: fix CTO reviewer + harden deploy ssh-keyscan (#3)
* ci: post CTO review as COMMENT instead of APPROVE

GITHUB_TOKEN cannot formally approve PRs without a repo setting toggle.
Verdict is still prominent in the first line of the review body, and
the human merges based on reading it — no behavior loss.

Agent-Session: cowork-reviewer-fix-20260414

* fix(ci): ssh-keyscan failure no longer fails the deploy

ssh-keyscan was being called with set -e in effect and stderr suppressed,
so a single keyscan failure killed the entire deploy with no diagnostic
output. Since rsync/ssh use StrictHostKeyChecking=no, the known_hosts
entry is not load-bearing — making the keyscan best-effort is safe.
stderr is now captured to /tmp/keyscan.err and emitted as a warning so
future failures are debuggable.

Agent-Session: cowork-deploy-fix-20260414
2026-04-14 16:53:19 +07:00
peptiderepo
849ff674d7 ci: add review gate (tripwire audit + Claude auto-review via OpenRouter) (#1)
* ci: add main-push audit tripwire

Flags direct pushes to main that did not come from a merged PR.
Free-plan workaround since branch protection requires GitHub Pro.

* docs: add Git Workflow section to CONVENTIONS.md

Documents the PR-gated review process enforced at the agent layer.
Free-plan workaround since branch protection requires GitHub Pro.

* ci: add Claude-powered CTO PR review workflow

Auto-reviews every PR with Claude Haiku 4.5 and posts a structured
review (APPROVE / REQUEST_CHANGES / COMMENT). Does NOT auto-merge — a
human still clicks Merge. Requires ANTHROPIC_API_KEY secret on the repo.

* ci: switch CTO reviewer from Anthropic direct to OpenRouter

Reuses the OPENROUTER_API_KEY secret that already backs the other AI
plugins. Consolidates AI spend on one bill. Model: anthropic/claude-haiku-4.5.
2026-04-14 16:45:58 +07:00
peptiderepo
fff3fce432 v1.5.2: CF-peer validated client IP, grandfather migration, de-short-circuit register
Security follow-up to v1.5.1. Closes four items from the v1.5.1 review —
two ship-blockers and two mediums — all within the ADR-0001 envelope.

PSEC-007 — peptide_starter_get_client_ip() now trusts CF-Connecting-IP
only when REMOTE_ADDR falls inside a published Cloudflare edge range.
Previously, any direct-to-origin request (which Hostinger permits) could
forge its rate-limit key by setting the header to a different IP per
attempt, bypassing every abuse control in the theme. New module
inc/cloudflare-ips.php embeds a dated snapshot of CF v4/v6 ranges and a
CIDR matcher covering both families; list is overridable via the
peptide_starter_cloudflare_ip_ranges filter for out-of-band updates.
HTTP_X_FORWARDED_FOR stays ignored unless operators opt in via the
peptide_starter_trust_xff filter.

PSEC-008 — Removed the v1.5.1 user-verification migration (Option A as
confirmed by peptiderepo). The sync-wp_mail-per-subscriber loop on
admin_init would have blocked wp-admin and hammered deliverability.
Existing accounts are now grandfathered: no ps_pending_verification
meta = verified. Verification applies only to registrations from v1.5.2
forward. The ps_verify_migration_version option (written by v1.5.1) is
cleared on theme activation.

PSEC-009 — Registration validation no longer short-circuits. All five
checks (username pattern, email validity, password length,
username_exists, email_exists) evaluate unconditionally before the
combined rejection. Closes the response-time oracle that let an
attacker distinguish microsecond-fast regex rejection from DB-round-trip
rejection and infer which field triggered the failure.

PSEC-010 — Added the happy-path verify test that v1.5.1 was missing.
Covers token match, user meta cleanup, auth cookie set, and the
peptide_starter_user_verified action firing with the correct user ID.

Seven new rate-limiter tests confirm CF-peer validation works
end-to-end: trusted CF peer honours the header, untrusted peer ignores
spoofed headers, invalid values fall through, XFF default-off, XFF
filter opt-in, CF range filter override, IPv6 CIDR match, family
mismatch rejection.

Confirmed with peptiderepo before coding: (1) Option A for PSEC-008
because zero users; (2) Cloudflare IS in front of the origin (dig
confirms 104.21.x / 172.67.x + CF-Ray response header), so PSEC-007 is
a real fix not dead code; (3) no staging — treat prod as staging.

ARCHITECTURE.md gains a client-IP trust model section; CONVENTIONS.md
documents the header-trust rules for future modules.

Version bumped to 1.5.2 in style.css and functions.php.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 15:39:09 +07:00
peptiderepo
3e1c12c94b Merge branch 'release/v1.5.1-hardening' into main — v1.5.1
Security hardening release (ADR-0001). See CHANGELOG.md § [1.5.1].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 14:04:06 +07:00
peptiderepo
cb8b73f4ab v1.5.1: frontend auth hardening — rate limiting, email verification, honeypots, CSV safety
Security-only release per ADR-0001. Closes all six ship-blockers from the
post-v1.5.0 audit: PSEC-001 (no rate limiting), PSEC-002 (account
enumeration via separate error messages), PSEC-003 (registration auto-login
with no email verification), PSEC-004 (ungated "My Data" templates),
PSEC-005 (CSV formula injection on subscriber export), PSEC-006 (no
honeypot/CAPTCHA on public forms).

Adds inc/config.php (single source of truth for all security thresholds,
filterable via peptide_starter_security_config), inc/rate-limiter.php
(Peptide_Starter_Rate_Limiter + Cloudflare-aware client IP resolver,
transient-backed, never stores raw IPs), and inc/email-verification.php
(43-char token, 24h TTL, /verify rewrite, rate-limited resend endpoint).

Auth handlers rewritten to: unify all failure messages, rate-limit before
any expensive check, drop registrations with a filled honeypot silently,
stop auto-login on register, send a verification email instead. The
require_login() helper lives in inc/helpers.php and is applied at the top
of page-tracker.php, page-subject-log.php, and page-protocol-builder.php;
page-calculator.php stays open (no PII, no writes).

Newsletter signup gains: consent checkbox, privacy link, honeypot,
autoload=false on the wp_options blob, unsubscribe token stored per row,
/newsletter-unsubscribe route, merged success+duplicate into a single "ok"
state. Admin export runs every cell through peptide_starter_csv_safe()
which prefixes leading =/+/-/@/tab/CR with a quote.

Contact handler hardens against email-header injection (rejects name
values with \r \n , < >), rate-limits, honors honeypot, tags mail
failures with a request ID for correlation without logging message
content.

Adds Tools → Mail Test (inc/mail-diagnostic.php): a permanent wp_mail
probe so we can check Hostinger outbound deliverability any time it looks
flaky. Adds a one-time admin_init migration that enrols pre-v1.5.1
subscribers into the verification flow (currently a no-op — zero users —
but guarded for the future).

Other cleanup from the audit: fallback primary menu moved out of
header.php into inc/helpers.php (redeclaration risk), placeholder footer
language links replaced with "Translations coming soon", footer copyright
now reads through the customizer getter, settings-panel gains a proper
Tab/Shift+Tab focus trap and saves/restores body overflow, documentation
heading IDs slugified from heading text with collision counters, JS files
standardized on const/let.

Six new PHPUnit suites cover rate limiter lifecycle, auth handler error
unification and rate limits, email verification token generation and
expiry, contact handler header injection + rate limit + honeypot,
newsletter signup consent + CSV safety, and require_login gate behavior.

ARCHITECTURE.md and CONVENTIONS.md updated in the same commit — new
module layout, data flows, security patterns for rate-limiting,
honeypotting, gating, and CSV-safe export.

Version bumped to 1.5.1 in style.css and functions.php.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 13:01:22 +07:00
peptiderepo
d28d5f45d5 fix: PHPCS multi-line function call signature violations in customizer.php
Reformat add_setting() and add_control() calls to comply with
PEAR.Functions.FunctionCallSignature — each argument on its own line,
opening paren last on line, closing paren on its own line. Matches the
pattern already used by add_section() calls in the same file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 12:24:52 +07:00
peptiderepo
9da702e746 v1.5.0: extend theme with navigation dropdowns, 9 page templates, auth UI, newsletter, contact panel
Major theme extension adding full-featured navigation with dropdown submenus (Tools, My Data, Resources),
9 new page templates (Calculator, Protocol Builder, Tracker, Subject Log, Documentation, Directory,
Science Feed, Profile, Sign In/Register), documentation page with sidebar ToC and scroll spy,
branded AJAX authentication forms, newsletter signup with admin export, slide-out contact/support panel,
Research Modules 6-card grid on front page, and comprehensive footer update.

Split functions.php (554→206 lines) into 6 focused inc/ modules: helpers, customizer, auth-handlers,
contact-handler, page-setup, newsletter-admin. All new components include dark mode support, CSRF
protection, input sanitization, output escaping, and graceful plugin degradation via shortcode_exists().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 08:38:30 +07:00
peptiderepo
6c7faa6eed v1.4.1: bump version to bust CSS cache after spacing fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:59:57 +07:00
peptiderepo
349eeb6377 fix: tighten spacing across hero, archive, and news sections
Reduce hero padding from 96/80px to 64/48px, shrink subtitle and
search margins, tighten news-feed and archive section padding,
and reduce peptides grid gap for better content density.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:57:22 +07:00
peptiderepo
f41a4d8fed v1.4.0: Clawdiverse-inspired theme redesign
Warm off-white light palette, decorative geometric shapes,
category-coded peptide cards with tinted borders and pill badges,
larger hero typography with accent word, header CTA button,
and redesigned single-peptide detail page with meta card grid.

Dark mode stays default per user preference. Light mode gets the
warm treatment when toggled or via prefers-color-scheme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:34:35 +07:00
peptiderepo
997f50b890 fix: use .phpcs.xml.dist config in CI instead of inline flags
The CI was overriding the project PHPCS config by passing
--standard=WordPress-Core directly. Now uses the project
.phpcs.xml.dist which includes exclusions for standard WP
patterns (class in functions.php).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:56:19 +07:00
peptiderepo
65b9f7a13c fix: resolve PHPCS coding standard violations for CI
- Convert all PHP files from CRLF to LF line endings
- Reformat multi-line function calls per WPCS standard
  (opening paren last on line, closing paren on own line)
- Fix assignment-in-conditional in single-peptide.php
- Change double quotes to single quotes in content-none.php
- Exclude InvalidClassFileName sniff (standard WP functions.php pattern)
- Fix archive-peptide.php opening PHP tag placement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:54:51 +07:00
peptiderepo
7226a08719 v1.3.2: security hardening, CI linting, test scaffold
- Add nonce + CSRF verification to newsletter form (footer.php)
- Add sanitize_callback to all 5 Customizer settings
- Add PHPCS (WordPress-Core) and JS syntax checks to CI pipeline
- Safeguard rsync --delete with dev-file excludes
- Scaffold PHPUnit tests (bootstrap, helpers, theme setup)
- Add composer.json, .phpcs.xml.dist, phpunit.xml
- Bump version to 1.3.2
- Update ARCHITECTURE.md and CHANGELOG.md

Addresses CTO audit findings: security (A- → A), testing (F → D+), CI/CD (C → B).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:49:06 +07:00
peptiderepo
4b04b22161 fix: escape get_search_query() output to prevent XSS in search forms
Wrapped get_search_query() with esc_attr() in 404.php, front-page.php,
and searchform.php. Without this, a crafted search query can inject
arbitrary HTML attributes into the search input value field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 16:22:48 +07:00
Terence Ong
71ba09e18c feat: add PRAutoBlogger posts widget to front page
Renders PRAutoBlogger-generated research articles as a card grid
between the hero section and the peptide news feed. Wrapped in
shortcode_exists() so it degrades gracefully if the plugin is
deactivated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 18:44:00 +07:00
peptiderepo
878e360c96 fix: switch to rsync deploy for private repo 2026-04-08 09:35:44 +07:00
peptiderepo
9642066846 Initial commit: peptide-starter theme v1.3.1 2026-04-08 01:30:16 +07:00