F1 BLOCKING — walk() cycle detection (src/viewer/index.js:161)
CI / test (pull_request) Successful in 5m41s

Added a per-tree WeakSet visited-guard so the probe terminates. The depth cap alone didn't stop the infinite recursion: window/_parent/_top/frames/_globalObject/_globalProxy are mutually-reachable circular Proxies, so Strategy H's window scan re-walked the same identities along exponentially many paths. The set is declared inside walk (not the outer function) so the separate player trees stay independent. This is what was hanging npm test (exit 124); it now completes in ~15s.
F2 SHOULD-FIX — doc/behavior mismatch (src/background/background.js:299-322)
Reworded the referer-capture comment block. It claimed the referer was read "via onBeforeSendHeaders, which sees the request headers," but the code uses onBeforeRequest + chrome.tabs.get (deriving the referer from the source tab's URL). Now states the actual mechanism and documents why onBeforeSendHeaders+extraHeaders was avoided (extraInfoSpec is rejected by some Chromium builds and fails the whole SW).
F3 SHOULD-FIX — leaked settings file
git rm --cached .claude/settings.local.json and added it to .gitignore. It carried machine-specific absolute paths (/Users/kyle/.claude/...).
F4 FYI — package-lock churn (package-lock.json)
Removed the spurious root "dependencies": { @rollup/rollup-darwin-arm64 } and restored the dev: true / optional: true flags on that platform package so it matches the rest of the @rollup/rollup-* siblings.
F5 FYI — real provider hostnames in test fixtures
Swapped phncdn.com→neutral example.net (registrable-domain sibling test) and thisvid.com→example.com in data_flow/hls_qa/simple_video/referer_proxy test files, rewording comments that named the real sites. src/ and __tests__/ now have zero phncdn/thisvid/pornhub references.
This commit is contained in:
kfj001 committed 2026-08-30 21:56:05 +00:00
1 parent ff463c107a
commit 3e02a6ae74
9 files changed
+70 -75

No files matched your search

+11
View File
@@ -160,6 +160,17 @@ function m3u8DeepProbeFn() {
function walk(obj, path, depth) {
if (depth > 5) return;
// Cycle guard: the live window objects hold circular references
// (window/_parent/_top/frames/_globalObject/_globalProxy are mutually
// reachable), so a depth cap alone does NOT terminate — descending a cycle
// re-walks the same identities along exponentially many paths. Each object
// tree gets its own visited set so an identity is walked at most once per
// tree (trees are independent, so the set is declared per call).
const visited = new WeakSet();
if (obj && typeof obj === 'object') {
if (visited.has(obj)) return;
visited.add(obj);
}
if (typeof obj === 'string') {
const match = obj.match(/https?:\/\/[^"'`\s)]+?(?:\.m3u8|\.hlsvod|\/hls\/|\/playlist[^"'`\s]*|\/manifest[^"'`\s]*)[^"'`\s)]*/gi);
if (match) {