mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-09 14:22:53 +00:00
fix: stop orphaned URL mirror continuation (client-reliability-5)
This commit is contained in:
1 parent
140618f88f
commit
12f927321f
8 files changed
+225
No files matched your search
@@ -0,0 +1,50 @@
|
||||
# Item5 integrity note
|
||||
|
||||
```yaml
|
||||
test_integrity_note:
|
||||
change_type: ["new_tests"]
|
||||
scenarios:
|
||||
- id: SCN-active-primary-disposed-mirror
|
||||
given: "primary media is active, with an alternate mirror"
|
||||
when: "the last owner disposes then primary media errors"
|
||||
then: "no mirror HEAD starts; chain settles null without cache or stale UI, later fresh request succeeds"
|
||||
- id: SCN-active-shared-mirror
|
||||
given: "two registrations share active media"
|
||||
when: "one owner disposes and primary errors"
|
||||
then: "ordered mirror serves live owner, healthy cache avoids later requests, disposed badge stays unchanged"
|
||||
- id: SCN-active-rejoin-mirror
|
||||
given: "primary active media survives last-owner disposal"
|
||||
when: "same-source live owner rejoins before primary error"
|
||||
then: "dedup survives and ordered mirror serves new owner without duplicate primary IO"
|
||||
- id: SCN-active-later-mirror-disposal
|
||||
given: "first mirror media is active and another mirror exists"
|
||||
when: "last owner disposes then first mirror errors"
|
||||
then: "next mirror HEAD does not start, cancellation settles without cache or stale UI"
|
||||
- id: SCN-active-timeout-cleanup-retry
|
||||
given: "media is active with real configured initial and longer retry deadlines"
|
||||
when: "last owner disposes and controlled clock reaches initial timeout"
|
||||
then: "slot/source clear, no new retry resources or cache, later fresh request is healthy"
|
||||
- id: SCN-completed-active-final-error-cache
|
||||
given: "active primary has no further candidate"
|
||||
when: "last owner disposes then media errors"
|
||||
then: "completed active failure keeps existing offline cache result without stale UI"
|
||||
observable_outcomes:
|
||||
- "fetch/media starts, source cleanup, slot release, promise settlement and actual cache/inflight records"
|
||||
- "live/disposed connected badge state and ordered mirror requests"
|
||||
determinism_controls:
|
||||
- "Real observer/controller/cache with controlled IntersectionObserver, jsdom native media event APIs and stubbed external fetch/media IO"
|
||||
- "node:test mock clock advances configured4000ms timeout; no sleeps, retries, public network or forced exit"
|
||||
anti_cheat_rationale:
|
||||
prevents:
|
||||
- "returning cancelled for live shared/rejoining owners"
|
||||
- "guarding only first mirror or discarding completed active results"
|
||||
- "caching cancellation as offline or starting obsolete retry resources"
|
||||
- "over-mocking queue/controller instead of service boundaries"
|
||||
relaxation:
|
||||
did_relax_any_assertion: false
|
||||
if_true_explain_spec_basis: ""
|
||||
```
|
||||
|
||||
Existing assertions unchanged; six new scenarios (18 total lifecycle scenarios). Baseline before guard naturally exits1 with new primary/later-mirror failures (16pass/2fail/0cancelled). Fixed18pass/0fail/0cancelled. Unique note avoids shared integrity-file writes during parallel trial.
|
||||
|
||||
`python3 /tmp/item5-mutants.py`: six deliberately broken variants each naturally exit1 with named assertion failures,0 cancelled, restored in finally before gates. Missing candidate guard kills primary/later-mirror scenarios; cancelling live mirrors kills shared+rejoin controls; checking only first mirror kills later-mirror case; caching cancellation kills null/cache expectations; discarding final active errors kills existing-offline-cache scenario; removing both media no-owner checks kills timeout cleanup/retry. Results `/tmp/item5-mutants.json` and `/tmp/item5-mutant-*.log`. No gate/test-registration changes or timed-out mutants counted.
|
||||
@@ -0,0 +1,10 @@
|
||||
# Item5 precommit evidence
|
||||
|
||||
- `env -u NODE_TEST_CONTEXT node tests/url-health-lifecycle.test.mjs` before guard: natural exit1,16pass/2fail/0cancelled, disposed active primary and later-mirror cases fail. After guard and formatting: natural exit0,18/18,0 failed/cancelled/skipped (`/tmp/item5-lifecycle-final.log`).
|
||||
- `python3 /tmp/item5-mutants.py`: six/six reverted variants naturally exit1 with named assertion failures,0 cancelled; no timeouts or survivors. Unique integrity mapping test_logs/TEST_INTEGRITY_client-reliability-5.md.
|
||||
- `env -u NODE_TEST_CONTEXT node scripts/run-unit-tests.mjs url-health health-disposal`: natural exit0,4 files/28 scenarios (lifecycle18,controller4,multisource4,view lifecycle2). `/tmp/item5-focused.log`.
|
||||
- `env -u NODE_TEST_CONTEXT npm run lint` with approved git subprocess access: exit0,11 stages (`/tmp/item5-lint.log`).
|
||||
- `env -u NODE_TEST_CONTEXT npm run build`: exit0 including artifact verification (`/tmp/item5-build.log`). No dependency/runner/gate changes.
|
||||
- First mailbox_read tool review hit its deadline; accumulated visible tool waits at least57s, exact approval wall duration not separately instrumented. It was a tool/approval stall, not product failure or rejection. One permitted retry succeeded; pickup mailbox sent13:27:49 UTC.
|
||||
- Full-suite/browser slots requested13:32:54 UTC. Dispatch queued local full slot behind administrative drain and reserves initial browser to QA; no full/browser launches made. Full-slot wait duration will be measured through grant, not inferred from silence.
|
||||
- Current code/tests based on0c1dd7e8 plus notes-only140618f8; final verified unstable merge, full/browser grants/checks, unchanged normal landing/durable ancestry remain. Active abort,real decoding/playback/live peers/CPU and whole Stage3 unverified.
|
||||
Reference in new issue
Block a user