1 Commits

Author SHA1 Message Date
peptiderepo
c1fcb46116 ci(review): drop panel to Haiku-only per QA A/B decision 2026-06-12
A/B analysis across 13 PRs (convo/cto/threads/2026-06-qa-ab-review/02-analyst-findings.md):
- DeepSeek: high false-positive rate (absint()="code exec", PLUGIN_DIR="dir traversal")
- Kimi: ~60% model failure rate, 1 unique-real finding in 13 PRs
- Neurometric: summarizer only, 0 unique-real findings, unreliable heuristic verdict label
- Haiku: 0 failures, lowest noise, equivalent real-signal catch vs 4-voice panel

Removes DeepSeek, Kimi, and Neurometric voices. Haiku is now sole reviewer.
Also removes NEUROMETRIC_API_KEY env var (no longer needed).
No plugin version bump -- CI-only change (precedent: prautoblogger #150).

Agent-Session: engineer-panel-haiku-20260612
2026-06-12 14:25:45 +00:00
11 changed files with 167 additions and 61 deletions

View File

@@ -1,20 +1,91 @@
name: CI
name: CI — Lint & Test
on:
pull_request: {}
push:
branches: [ main ]
workflow_call: {}
pull_request:
branches: [ main ]
workflow_call:
# Required: reusable phpcs job declares contents: write for phpcbf auto-commit,
# but GitHub enforces that the caller must also declare it at workflow level.
permissions:
contents: write
contents: read
jobs:
ci:
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
# ── PHP Syntax Check ─────────────────────────────────────────────
lint-php:
name: PHP Lint (${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
tests: stubs
has_js: true
secrets: inherit
php-version: ${{ matrix.php }}
- name: Syntax check all PHP files
run: find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l
# ── WordPress Coding Standards (PHP CodeSniffer) ──────────────────
lint-phpcs:
name: WordPress Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install Composer dependencies
run: |
composer install --no-interaction --prefer-dist --no-progress
- name: Run PHPCS with WordPress-Core standard
run: composer run lint
continue-on-error: true
# ── PHPUnit Tests ────────────────────────────────────────────────
test-phpunit:
name: PHPUnit Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Run PHPUnit tests
run: composer run test
# ── JavaScript Lint ──────────────────────────────────────────────
lint-js:
name: JavaScript Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check JavaScript syntax
run: |
for f in $(find assets/js -name '*.js' -type f); do
node --check "$f" || exit 1
done
echo "All JavaScript files passed syntax check"

View File

@@ -24,6 +24,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: main
- name: Verify required files exist
run: |
for file in peptide-search-ai.php includes/ assets/ readme.txt; do
[ -e "$file" ] && echo "✓ $file" || { echo "❌ Missing: $file"; exit 1; }
done
- name: Verify PSA_VERSION constant
run: |
if grep -q "define( 'PSA_VERSION'" peptide-search-ai.php; then
@@ -32,6 +37,11 @@ jobs:
else
echo "❌ PSA_VERSION not found"; exit 1
fi
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Validate PHP syntax
run: find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l > /dev/null
deploy:
name: Deploy (shared pipeline)

View File

@@ -43,7 +43,7 @@ peptide-search-ai/
│ └── psa-directory.css Directory card grid, filter pills, modal styles, dark mode support
│
└── .github/workflows/
├── ci.yml Thin caller → peptide-e2e reusable CI (stubs, has_js:true); blocking PHPCS + 300-line rule
├── ci.yml PHP lint, PHPCS, JS syntax checks on PR/push
└── deploy.yml Pre-deploy validation, orphan deploy branch sync, SSH deploy
```

View File

@@ -5,22 +5,6 @@ All notable changes to the Peptide Search AI plugin will be documented in this f
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- `.github/workflows/ci.yml`: added `workflow_call: {}` trigger so `deploy.yml`'s `uses: ./.github/workflows/ci.yml` gate resolves correctly. No plugin code changed.
## [4.7.0] — 2026-06-16
### Changed
- `.github/workflows/ci.yml`: replaced per-repo CI jobs with thin caller for the reusable `peptiderepo/peptide-e2e/.github/workflows/ci.yml@main` (tests: stubs, has_js: true). Adds blocking PHPCS, 300-line file-size enforcement, and phpcbf auto-commit on PRs.
- `.github/workflows/deploy.yml`: dropped redundant file-existence and PHP-syntax checks now covered by the reusable CI; kept PSA_VERSION constant check.
- `includes/class-psa-admin.php`: removed dead backward-compat proxy methods (all delegated to `PSA_Admin_Page`; zero external callers). File reduced from 327 → 290 lines (estate 300-line rule compliance).
- `includes/class-psa-ai-generator.php`: removed untested backward-compat proxies (save_peptide_meta, assign_category_term); retained build_validation_prompt and build_generation_prompt as tested proxies (AIGeneratorTest uses reflection). Section headers condensed. File 309 → 299 lines.
- `includes/class-psa-search.php`: removed dead backward-compat proxy methods (all delegated to `PSA_Search_Handler`; zero external callers). File reduced from 307 → 294 lines.
- `peptide-search-ai.php`: synced `PSA_VERSION` constant (was stuck at 4.5.0) with plugin header (was 4.6.0); both now 4.7.0.
- `package.json` / `package-lock.json`: added minimal npm manifest (no dependencies) so the reusable `lint-js` job can run `npm ci` and fall back to `node --check` on the three JS asset files.
## [4.6.0] — 2026-04-26
### Changed

View File

@@ -286,4 +286,42 @@ class PSA_Admin {
$options = get_option( 'psa_settings', array() );
return $options[ $key ] ?? $default;
}
// ── Backward-compatible proxies (rendering moved to PSA_Admin_Page) ─
/** @see PSA_Admin_Page::enqueue_batch_scripts() */
public static function enqueue_batch_scripts( string $hook ): void {
PSA_Admin_Page::enqueue_batch_scripts( $hook ); }
/** @see PSA_Admin_Page::render_section_description() */
public static function render_section_description(): void {
PSA_Admin_Page::render_section_description(); }
/** @see PSA_Admin_Page::render_api_key_field() */
public static function render_api_key_field(): void {
PSA_Admin_Page::render_api_key_field(); }
/** @see PSA_Admin_Page::render_model_field() */
public static function render_model_field(): void {
PSA_Admin_Page::render_model_field(); }
/** @see PSA_Admin_Page::render_validation_model_field() */
public static function render_validation_model_field(): void {
PSA_Admin_Page::render_validation_model_field(); }
/** @see PSA_Admin_Page::render_publish_field() */
public static function render_publish_field(): void {
PSA_Admin_Page::render_publish_field(); }
/** @see PSA_Admin_Page::render_pubchem_field() */
public static function render_pubchem_field(): void {
PSA_Admin_Page::render_pubchem_field(); }
/** @see PSA_Admin_Page::render_budget_field() */
public static function render_budget_field(): void {
PSA_Admin_Page::render_budget_field(); }
/** @see PSA_Admin_Page::render_settings_page() */
public static function render_settings_page(): void {
PSA_Admin_Page::render_settings_page(); }
}

View File

@@ -237,6 +237,8 @@ class PSA_AI_Generator {
);
}
// ── Private helpers ─────────────────────────────────────────────────
/**
* Get plugin settings with defaults, decrypted API key, and constant override.
*
@@ -287,13 +289,21 @@ class PSA_AI_Generator {
return true;
}
/** @see PSA_AI_Content::build_validation_prompt() — kept for test reflection. */
public static function build_validation_prompt( string $name ): string {
return PSA_AI_Content::build_validation_prompt( $name );
}
// ── Backward-compatible proxies ─────────────────────────────────────
/** @see PSA_AI_Content::build_generation_prompt() — kept for test reflection. */
/** @see PSA_AI_Content::build_validation_prompt() */
public static function build_validation_prompt( string $name ): string {
return PSA_AI_Content::build_validation_prompt( $name ); }
/** @see PSA_AI_Content::build_generation_prompt() */
public static function build_generation_prompt( string $peptide_name ): string {
return PSA_AI_Content::build_generation_prompt( $peptide_name );
}
return PSA_AI_Content::build_generation_prompt( $peptide_name ); }
/** @see PSA_AI_Content::save_peptide_meta() */
public static function save_peptide_meta( int $post_id, array $ai_data, ?array $pubchem_data ): void {
PSA_AI_Content::save_peptide_meta( $post_id, $ai_data, $pubchem_data ); }
/** @see PSA_AI_Content::assign_category_term() */
public static function assign_category_term( int $post_id, array $ai_data ): void {
PSA_AI_Content::assign_category_term( $post_id, $ai_data ); }
}

View File

@@ -290,4 +290,18 @@ class PSA_Search {
'source' => get_post_meta( $post->ID, 'psa_source', true ),
);
}
// ── Backward-compatible proxies ─────────────────────────────────────
/** @see PSA_Search_Handler::ajax_search() */
public static function ajax_search(): void {
PSA_Search_Handler::ajax_search(); }
/** @see PSA_Search_Handler::create_pending_placeholder() */
public static function create_pending_placeholder( string $peptide_name ) {
return PSA_Search_Handler::create_pending_placeholder( $peptide_name ); }
/** @see PSA_Search_Handler::schedule_background_generation() */
public static function schedule_background_generation( int $post_id, string $peptide_name ): void {
PSA_Search_Handler::schedule_background_generation( $post_id, $peptide_name ); }
}

13
package-lock.json generated
View File

@@ -1,13 +0,0 @@
{
"name": "peptide-search-ai",
"version": "4.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "peptide-search-ai",
"version": "4.7.0",
"devDependencies": {}
}
}
}

View File

@@ -1,8 +0,0 @@
{
"name": "peptide-search-ai",
"version": "4.7.0",
"description": "Peptide Search AI WordPress plugin — JS assets",
"private": true,
"scripts": {},
"devDependencies": {}
}

View File

@@ -3,7 +3,7 @@
* Plugin Name: Peptide Search AI
* Plugin URI: https://github.com/peptiderepo/peptide-search-ai
* Description: Searchable peptide database with AI-powered auto-population and browsable directory.
* Version: 4.7.0
* Version: 4.6.0
* Author: peptiderepo
* License: GPL v2 or later
* Text Domain: peptide-search-ai
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'PSA_VERSION', '4.7.0' );
define( 'PSA_VERSION', '4.5.0' );
define( 'PSA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'PSA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'PSA_PLUGIN_FILE', __FILE__ );