diff --git a/context/CONTEXT_2026-10-20_03-10-00_client-reliability-4.md b/context/CONTEXT_2026-10-20_03-10-00_client-reliability-4.md new file mode 100644 index 00000000..518f5a81 --- /dev/null +++ b/context/CONTEXT_2026-10-20_03-10-00_client-reliability-4.md @@ -0,0 +1,3 @@ +# client-reliability-4 + +Investigation only at4c54858c. URL queued media last-owner disposal reproduced: obsolete starts1 expected0; shared live-owner control passes. See test_logs/TEST_LOG_2026-10-20_03-10-00_client-reliability-4.md and /tmp/bitvid-client-reliability-4-url-lifecycle.mjs. Await dispatch scope before product/tests. diff --git a/decisions/DECISIONS_2026-10-20_03-10-00_client-reliability-4.md b/decisions/DECISIONS_2026-10-20_03-10-00_client-reliability-4.md new file mode 100644 index 00000000..cb6bb709 --- /dev/null +++ b/decisions/DECISIONS_2026-10-20_03-10-00_client-reliability-4.md @@ -0,0 +1,3 @@ +# client-reliability-4 + +Stop at smallest reproduced queued URL media defect. Keep active URL/torrent cancellation separate. Exercise real cache/observer/controller and only virtualize external IO. Await explicit routing before product/regression tests. diff --git a/docs/TODO.md b/docs/TODO.md index db184bb1..d16a51ff 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -13,6 +13,8 @@ ## client-reliability +- 2026-10-20: client-reliability-4 investigation at4c54858c reproduces queued URL media start after feed disposal: active3/queued1 before and after disposal, then1 obsolete start(expected0); shared live-owner control deduplicates and receives healthy badge. Strict assertion exits1, diagnostic/control naturally exit0. No product/tests changed; awaiting dispatch fix routing. Active abort/browser/fallback/CPU unverified. Evidence: test_logs/TEST_LOG_2026-10-20_03-10-00_client-reliability-4.md. + - 2026-10-19: client-reliability-1 assigned: reproduce/classify and fix profile-modal suite hang without weakening assertions. Initial evidence: three isolated 60s timeouts (one clean environment), full baseline stopped at file 220/425; read docs/agents/prompts/client-reliability.md and claim the item. Scope excludes app.js and unrelated subsystems. - 2026-10-19: client-reliability-1 fix committed at dbdac18d (test-only fixture, original assertions preserved; native focus contract and both mutants fail when broken). Isolated27/27 natural exit2.44s, lint11/11. Full60s/file run passed226/425 files including profile-modal; file227 tests/race/nostr-client-init-race.test.mjs timed out;198 later files untested. Await dispatch routing for this unowned blocker before normal landing/close. No product/browser/build qualification or landing claimed. See test_logs/TEST_LOG_2026-10-19_20-13-00_client-reliability-final.md. diff --git a/docs/agents/backlog/client-reliability-4.json b/docs/agents/backlog/client-reliability-4.json index a0f79de3..9e0d67c5 100644 --- a/docs/agents/backlog/client-reliability-4.json +++ b/docs/agents/backlog/client-reliability-4.json @@ -1,9 +1,9 @@ { - "id": "client-reliability-4", - "area": "client-reliability", - "status": "open", - "title": "Reproduce remaining source-health cancellation defect at current HEAD before scoping a fix", - "blockedOn": null, - "addedOn": "2026-10-20", - "filedAt": "604c8c61f4783717eb0cff7ca7ca33efb59aac8a" + "id": "client-reliability-4", + "area": "client-reliability", + "status": "in-progress", + "title": "Reproduce remaining source-health cancellation defect at current HEAD before scoping a fix", + "blockedOn": null, + "addedOn": "2026-10-20", + "filedAt": "604c8c61f4783717eb0cff7ca7ca33efb59aac8a" } diff --git a/test_logs/TEST_LOG_2026-10-20_03-10-00_client-reliability-4.md b/test_logs/TEST_LOG_2026-10-20_03-10-00_client-reliability-4.md new file mode 100644 index 00000000..42d382aa --- /dev/null +++ b/test_logs/TEST_LOG_2026-10-20_03-10-00_client-reliability-4.md @@ -0,0 +1,13 @@ +# client-reliability-4 investigation evidence + +- Inspected HEAD `4c54858c981d25cca7bd39b5a696aa14224a6299`; filedAt `604c8c61` defect still applies. Merged unstable by approved non-destructive fast-forward after sandbox ORIG_HEAD restriction. +- Real `attachUrlHealthBadges` → `createCardObserver` → `UrlHealthController.handleUrlHealthBadge` → `probeUrlList` → `probeUrl` → `probeUrlWithVideoElement`; real cache get/store/inflight functions. Callback wiring matches VideoListView render. DOM is jsdom; controlled observer delivery, stubbed fetch responses, native media load/pause boundary and explicit loadeddata events. No controller/queue method substitutions, no public traffic, sleeps, retries or forced process exit. +- Scratch diagnostic `/tmp/bitvid-client-reliability-4-url-lifecycle.mjs` loads cache before browser globals so unrelated Nostr helpers resolve installed Node packages. Initial fixture imported cache after DOM and caused unrelated bootstrap fallback warnings/delay; corrected fixture runs naturally in under1s. Initial run is not the final evidence. +- `node /tmp/bitvid-client-reliability-4-url-lifecycle.mjs last-owner`: natural exit0. Four HEAD requests, three media starts, active3/queued1/settled0. Dispose returned registration and remove feed: observer disconnected, active3/queued1/settled0. Release one active media loadeddata: media starts4, active3/queued0/settled1; obsolete starts1, expected0. Explicitly finish remaining media: settled4/active0/queued0. +- `node /tmp/bitvid-client-reliability-4-url-lifecycle.mjs last-owner --expect-fixed`: natural exit1 with assertion1!==0. Same deterministic counts; cleanup completes before failing assertion. +- `node /tmp/bitvid-client-reliability-4-url-lifecycle.mjs shared-owner`: natural exit0. Second registration has same queued event/source; still only four HEAD/probe promises (dedup holds). Dispose original feed; release active slot: queued shared media starts exactly once and retained live badge becomes healthy. Final settled4/active0/queued0. +- Smallest reproduced defect: URL media wait queue starts after last registered feed/card is disposed. Active URL media also remains3 immediately after disposal, but this assignment stops at the smallest queued defect; active abort semantics are not independently qualified. +- Proposed fix scope: `js/urlHealthObserver.js` unregister boundary; `js/ui/urlHealthController.js` queued owner release/settlement and live-owner guards; focused new URL lifecycle regression plus Test Integrity Note. Prefer existing `onCardUnregister` hook; no shared observer module, VideoListView, app, cache policy, concurrency, HEAD/active abort, HLS or torrent changes absent further evidence/routing. Need owner-aware dedup by existing event/source and playable mode; avoid negative cache results for cancellation or deleting newer inflight work. +- Acceptance: last-owner queued media starts0; cancellation settles and allows later same-source request; one removed owner preserves live shared owner and healthy badge; three-media concurrency and mirror order preserved; disposed registrations receive no stale UI effects; hidden healthy URL-only card reveal remains working. Mutant evidence and product/browser/full gates belong to routed fix. +- Not verified: browser/native decoding, real network/playback fallback, active URL/torrent abort, HLS cancellation, CPU/RSS, full Stage3. No product/regression-test changes, tests/lint/build not rerun for this investigation; preview untouched. +- Next: dispatch routes bounded fix before implementation. Item4 claimed; investigation result sent, no additional work started. diff --git a/todo/TODO_2026-10-20_03-10-00_client-reliability-4.md b/todo/TODO_2026-10-20_03-10-00_client-reliability-4.md new file mode 100644 index 00000000..f869b712 --- /dev/null +++ b/todo/TODO_2026-10-20_03-10-00_client-reliability-4.md @@ -0,0 +1,6 @@ +# client-reliability-4 + +- [x] Merge/read current rules and claim. +- [x] Real observer/controller queued URL disposal reproduction, strict failure, shared-owner control. +- [x] Record evidence and proposed scope. +- [ ] Dispatch routes fix or accepts investigation closure. No product/testing gates claimed.