fix: isolate sentinel-constant test + disable js-lint

Two CI failures fixed:

1. PHPUnit constant-scoping bleed: test_p0_executor_path_sentinel_key_does_not_
   leak defines PRV_OPENROUTER_API_KEY as a process-scoped PHP constant.
   Running after CaptureWriter (alphabetically earlier), KeyStoreTest's
   resolver tests saw the canary value instead of empty/option.
   Fix: @runInSeparateProcess + @preserveGlobalState disabled so the
   constant is confined to its own forked PHP process.

2. JS lint job failure: has_js: true caused the reusable CI's lint-js job
   to attempt npm ci, but pr-vision has no package.json.
   Fixed: has_js: false.

Agent-Session: claude/adopt-ci-20260616
This commit is contained in:
peptiderepo
2026-06-16 15:38:26 +00:00
parent 166c5d4caf
commit c84ab59b7b
2 changed files with 9 additions and 1 deletions

View File

@@ -122,6 +122,14 @@ class CaptureWriterTest extends TestCase {
// ── Test 4 (P0 SECURITY — executor path): sentinel must not leak ──────
/**
* Defines PRV_OPENROUTER_API_KEY as a process-scoped PHP constant.
* Must run in a separate process to prevent that constant from bleeding
* into sibling test classes (e.g. KeyStoreTest) within the same PHPUnit run.
*
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function test_p0_executor_path_sentinel_key_does_not_leak(): void {
if ( ! defined( 'PRV_OPENROUTER_API_KEY' ) ) {
define( 'PRV_OPENROUTER_API_KEY', 'sk-or-TEST-LEAK-CANARY' );