FAILURE MAP
← Case archive

FA-11121 / Streaming segment lifecycle / Open access

Segment uri relative resolution · case 01

The manifest filename is incorrectly treated as a directory.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The manifest filename is incorrectly treated as a directory.

VERIFIED REPAIR

Preserve the media contract: Resolve a simple relative segment path against the directory of an absolute manifest path. Paths contain no query, fragment, dot-segments or URLs; absolute segment paths stay absolute.

Unsuccessful approach: Always prefixing the directory corrupts already-absolute segment references.

Case contract

Resolve a simple relative segment path against the directory of an absolute manifest path. Paths contain no query, fragment, dot-segments or URLs; absolute segment paths stay absolute.

Why this case matters

A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(base_path, segment):
    return base_path+"/"+segment
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('/live/list.m3u8', 'seg1.ts')),'/live/seg1.ts')
check('fixture 2',solve(*('/live/list.m3u8', '/shared/seg.ts')),'/shared/seg.ts')
check('fixture 3',solve(*('/list.m3u8', 'x.ts')),'/x.ts')
check('fixture 4',solve(*('/a/b/list', 'part')),'/a/b/part')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1/live/list.m3u8/seg1.ts/live/seg1.tsFailed
fixture 2/live/list.m3u8//shared/seg.ts/shared/seg.tsFailed
fixture 3/list.m3u8/x.ts/x.tsFailed
fixture 4/a/b/list/part/a/b/partFailed

SHA-256 / e728aad1defcde9f7e5d50a6ab202a9637d434be8b774a698dab83e80042da58

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(base_path, segment):
    return base_path.rsplit("/",1)[0]+"/"+segment
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('/live/list.m3u8', 'seg1.ts')),'/live/seg1.ts')
check('fixture 2',solve(*('/live/list.m3u8', '/shared/seg.ts')),'/shared/seg.ts')
check('fixture 3',solve(*('/list.m3u8', 'x.ts')),'/x.ts')
check('fixture 4',solve(*('/a/b/list', 'part')),'/a/b/part')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1/live/seg1.ts/live/seg1.tsPassed
fixture 2/live//shared/seg.ts/shared/seg.tsFailed
fixture 3/x.ts/x.tsPassed
fixture 4/a/b/part/a/b/partPassed

SHA-256 / 31794352d55ba205abe74deee0db3b73321c68263dd706e30e3172fbd7a55856

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(base_path, segment):
    return base_path.rsplit("/",1)[0]+"/"+segment if not segment.startswith("/") else segment
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('/live/list.m3u8', 'seg1.ts')),'/live/seg1.ts')
check('fixture 2',solve(*('/live/list.m3u8', '/shared/seg.ts')),'/shared/seg.ts')
check('fixture 3',solve(*('/list.m3u8', 'x.ts')),'/x.ts')
check('fixture 4',solve(*('/a/b/list', 'part')),'/a/b/part')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1/live/seg1.ts/live/seg1.tsPassed
fixture 2/shared/seg.ts/shared/seg.tsPassed
fixture 3/x.ts/x.tsPassed
fixture 4/a/b/part/a/b/partPassed

SHA-256 / 7f34548e359fc4333821d952d008f8058735c19221c035b436ab7cef9048972d

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:45.075475+00:00.

Case digest / cbf101ba978f12232461920f8c7c7592132d5ba44b0d2737342378407b894223