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:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user