You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inherits all scolta-php 0.2.4 fixes and features (phrase-proximity scoring, WASM config key fix, quoted-phrase forced-mode, second WASM rebuild)
Added
REST API smoke test suite (tests/RestApiSmokeTest.php): Eight test methods covering all six registered WP REST routes (/expand-query, /summarize, /followup, /health, /build-progress, /rebuild-now). Guards against handler crashes, verifies valid HTTP status codes, asserts /health and /build-progress return 200 with array bodies, and asserts /rebuild-now returns 409 when a build lock is already held. Previously, only four routes were covered; build-progress and rebuild-now had no handler-invocation tests.
Fixed
test_no_api_key_returns_error test failure: Test now properly clears SCOLTA_API_KEY from getenv, $_ENV, and $_SERVER before simulating the no-key guard, restoring all values in a finally block. Previously the test assumed no env key was set, but DDEV injects the key into the container environment.
Version strings: Plugin header, SCOLTA_VERSION constant, and composer.json all bumped to 0.2.4-dev; VersionConsistencyTest guards against future drift.
CLI handler invocation: Added CliIndexerDispatchTest confirming do_build_php() and do_build_binary() are actually invoked. do_build_php/do_build_binary promoted from private to protected to allow the test-double subclass.
Admin rebuild notice persistence: Notice no longer vanishes after first page view. Transient is now read without immediate deletion; per-user dismissal is tracked via user meta (scolta_dismissed_rebuild_notice) keyed to a unique notice_id. TTL extended to 7 days.
CLI indexer dispatch: wp scolta build now correctly uses the admin-configured indexer when no --indexer flag is passed. The WP-CLI docblock had default: auto in the [--indexer] parameter block, causing WP-CLI to inject $assoc_args['indexer'] = 'auto' on every invocation — making the admin setting permanently unreachable. Removed the default: line so the flag is only set when explicitly passed.
rebuild-index with PHP pipeline: wp scolta rebuild-index now emits a clear error when the active indexer is set to PHP, explaining that the command is binary-only (the PHP pipeline writes the index directly; no HTML staging files exist to re-index). Suggests wp scolta build instead.
Admin "Exported HTML files" counter: The dashboard widget no longer shows a misleading 0 for sites using the PHP indexer. The HTML file count row is now hidden when the PHP pipeline is active (forced or auto-resolved), since the PHP indexer writes the index format directly without intermediate HTML staging files.
Shortcode and admin status: PHP vs binary pipeline index detection: [scolta_search] and the admin status panel now correctly detect whether the index was built by the PHP pipeline ({output_dir}/pagefind/pagefind.js) or the binary pipeline ({output_dir}/pagefind.js). Previously both always checked only the flat path, so PHP-pipeline sites never rendered the search UI (shortcode returned the "not built" error for admins, empty for visitors) and never showed index stats in the admin.