Commit Graph

2 Commits

Author SHA1 Message Date
peptiderepo
1880d1db1f fix(tests): guard error_log/wp_json_encode stubs + document idempotency limitation
- tests/unit/test-migration-0004.php: wrap error_log() stub in
  function_exists() guard -- prevents PHP fatal redeclaration on
  PHP Lint (8.1/8.2/8.3) which runs php -l on all .php files.

- tests/bootstrap.php: update wp_json_encode stub to accept
  int $flags = 0 second arg (matches production call signature
  wp_json_encode($clean, JSON_UNESCAPED_UNICODE)); guard with
  function_exists().

- class-pr-core-migration-0004-backfill-peptide-meta.php: add
  code comment near idempotency check documenting the all-or-nothing
  limitation (post with legitimately empty aliases will re-run).

- CONVENTIONS.md: one-line note under migration conventions item 5
  documenting the idempotency caveat.

- CHANGELOG.md: add Fixed section under v0.6.0 for CI/test-stub fix.

Agent-Session: peptide-schema-backfill v0.6.0 P1 fix
2026-06-13 05:24:04 +00:00
peptiderepo
f086b89e2d feat(cpt): consolidate peptide CPT with PSA; drop pr_peptide (v0.2.0) (#1)
Consolidates the `peptide` CPT under PR Core ownership, dropping the `pr_peptide` slug-collision that was 404ing all 89 peptide detail pages.

- POST_TYPE: pr_peptide -> peptide
- TAX_CATEGORY: pr_peptide_category -> peptide_category
- TAX_FAMILY + pr_peptide_family taxonomy removed
- Defensive post_type_exists/taxonomy_exists guards on both registrations
- Args harmonized as superset of PSA + prior PR Core (adds thumbnail support)
- Activation hook + init:999 version-change flush handler
- Uninstall scoped to _pr_core_authored flag (PSA-authored posts survive)
- Plugin version 0.1.1 -> 0.2.0, CHANGELOG in same commit
- ARCHITECTURE.md + CONVENTIONS.md updated with CPT ownership rule

QA gate verdict: PASS (qa-reviews/peptide-repo-core/2026-04-22-874f93b.md)
Sibling release: peptiderepo/peptide-search-ai#15 (PSA v4.5.0)

Known follow-up: manage_peptide_content capability is not granted to any role as of v0.2.0. No current UI/theme reads or writes PR Core-defined meta keys, so no regression. Follow-up thread to decide role assignment.
2026-04-22 16:44:04 +07:00