Skip to content

Commit ef162ab

Browse files
committed
게이트: SW 봉인 법이 메시지 에코가 아니라 실제 배선을 본다
tests/run.mjs의 자산 소비 법이 gate.js에서 문자열 `coreIntegrity=/pyproc-assets.json`을 찾고 있었다. 그 문자열은 check의 info 메시지에만 있던 에코라, 메시지 문구를 다듬자 법이 깨졌다(33d8106에서 실제로 깨졌고 그 커밋이 RED로 나갔다). 반대 방향도 나쁘다: 등록 옵션이 사라져도 메시지만 남으면 통과한다. 이제 registerPyProcServiceWorker 호출의 실제 옵션 전달을 정규식으로 찾는다. 음성 시험: gate.js에서 coreIntegrity 옵션 줄을 지우자 RED, 되돌리자 GREEN. 기록: 직전 커밋 29b1550은 RED 트리로 나갔다. npm test를 파이프에 걸어 exit 코드를 잃은 채 && 로 이어붙인 것이 원인이다. 푸시 게이트가 잡을 자리였고 푸시 전에 고친다. 검증: npm test 3196 passed 0 failed (exit 0으로 확인)
1 parent 29b1550 commit ef162ab

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/run.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2612,7 +2612,10 @@ check("브라우저 게이트가 CLI asset manifest를 소비", () => {
26122612
}
26132613
if (!gateSrc.includes('fetch("/pyproc-assets.json"')) throw new Error("gate.html이 CLI 산출 manifest를 fetch하지 않음");
26142614
if (!gateSrc.includes('assetOk.verified > 1') || !gateSrc.includes('"src/processOs/ipc.js"')) throw new Error("gate.html이 graph 단위 preflight를 검증하지 않음");
2615-
if (!gateSrc.includes("registerPyProcServiceWorker") || !gateSrc.includes("coreIntegrity=/pyproc-assets.json"))
2615+
// 배선을 본다. 예전에는 info 문자열의 `coreIntegrity=/pyproc-assets.json` 에코를 찾았는데,
2616+
// 그것은 메시지 문구를 다듬는 것만으로 법이 깨지고(2026-08-03 실제로 깨졌다) 반대로 실제
2617+
// 등록이 사라져도 메시지만 남으면 통과한다. 실제 옵션 전달을 찾는다.
2618+
if (!gateSrc.includes("registerPyProcServiceWorker") || !/coreIntegrity:\s*"\/pyproc-assets\.json"/.test(gateSrc))
26162619
throw new Error("gate.html이 Service Worker 등록 경로와 SW coreIntegrity를 검증하지 않음");
26172620
if (!gateSrc.includes("Runtime -> SyscallBridge 상속 거부") || !gateSrc.includes("assetIntegrity 상속 childWorker"))
26182621
throw new Error("gate.html이 Runtime assetIntegrity 상속 경로를 검증하지 않음");

0 commit comments

Comments
 (0)