FA-78076 / Subtitle cue timing / Open access
Two-point subtitle synchronisation: mapped rounding · case 01
Mapped times with half-millisecond or larger fractions are one millisecond early.
ROOT CAUSE
Mapped times are floored instead of rounded half up.
VERIFIED REPAIR
Round the exact mapped time half up.
Unsuccessful approach: Banker rounding sends exact halves with an even floor downwards.
Case contract
anchors [[a1,b1],[a2,b2]] (a1 != a2, b1 != b2) map subtitle time a to video time b linearly through both points. Each time is mapped exactly, rounded half up, clamped at 0; cues whose mapped end is not after the mapped start are dropped.
Why this case matters
Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return math.floor(b1+(t-a1)*k)
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: mapped rounding', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('regression variant: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: mapped rounding', [[[7777, 8777], [7777, 7780], [1500, 2000], [999, 1002]], [[0, 1000], [4000, 4500]]], [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('normal control', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]])], [('regression: mapped rounding', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair variant: mapped rounding', [[[7777, 7780]], [[2000, 2500], [1000, 0]]], [[16943, 16950]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[0, 2500], [250, 750], [0, 3]], [[10000, 10500], [20000, 20500]]], [[500, 3000], [750, 1250], [500, 503]]), ('normal control', [[[0, 2500], [0, 3]], [[1000, 1500], [0, -3000]]], [[0, 8250]])], [('regression: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: mapped rounding', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('partial repair probe: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair variant: mapped rounding', [[[7777, 7779], [9295, 11795], [7777, 7780]], [[0, 0], [1000, 1500]]], [[11666, 11669], [13943, 17693], [11666, 11670]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[5033, 5036], [999, 1000]], [[9000, 9000], [5000, 4000]]], [[4041, 4045]]), ('normal control', [[[1, 2], [1500, 4000]], [[15000, 15000], [5000, 5000]]], [[1, 2], [1500, 4000]]), ('normal control', [[[250, 251], [1500, 2500], [0, 2], [0, 2]], [[10000, 10500], [14000, 15500]]], [[0, 1125]])], [('regression: mapped rounding', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: mapped rounding', [[[1, 501], [7777, 7778]], [[1000, 0], [11000, 12500]]], [[8471, 8473]]), ('partial repair probe: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair variant: mapped rounding', [[[999, 1999], [0, 3], [7777, 7779]], [[0, 0], [2000, 3000]]], [[1499, 2999], [0, 5], [11666, 11669]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1500, 1501], [999, 1001], [7777, 7780], [250, 252]], [[11000, 10500], [10000, 7000]]], []), ('normal control', [[[1500, 1503], [999, 3499]], [[1000, 0], [3000, 3500]]], [[875, 880], [0, 4373]]), ('normal control', [[[999, 1499], [7777, 10277]], [[10000, 10500], [10003, 9503]]], [])], [('regression: mapped rounding', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('regression variant: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair probe: mapped rounding', [[[1, 2501], [5729, 5732], [250, 252]], [[7000, 8500], [5000, 6000]]], [[0, 2876], [6911, 6915], [63, 65]]), ('partial repair variant: mapped rounding', [[[11711, 11713], [1500, 1503]], [[0, -3000], [1000, 2500]]], [[61411, 61422], [5250, 5267]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[250, 1250]], [[1000, 1000], [5000, 5500]]], [[156, 1281]]), ('normal control', [[[13786, 13787], [7777, 8277], [1, 2501], [250, 251]], [[10000, 11000], [10003, 9503]]], []), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: mapped rounding | [[0, 1]] | [[1, 2]] | Failed |
| regression variant: mapped rounding | [[3695, 4320], [3694, 3695], [1812, 1813], [2125, 2250]] | [[3696, 4321], [3694, 3695], [2125, 2250]] | Failed |
| partial repair probe: mapped rounding | [[3388, 3389], [250, 500]] | [[0, 1], [3389, 3390], [250, 500]] | Failed |
| partial repair variant: mapped rounding | [[7804, 8679], [7804, 7807], [2312, 2750], [1874, 1876]] | [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]] | Failed |
| boundary control | [[2000, 4000]] | [[2000, 4000]] | Passed |
| boundary control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [[0, 625]] | [[0, 625]] | Passed |
| normal control | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | Passed |
SHA-256 / 8366c7519f50c8028ef772662e7763facdeb81262e336ebe5652dcb3a786e358
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return round(b1+(t-a1)*k)
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: mapped rounding', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('regression variant: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: mapped rounding', [[[7777, 8777], [7777, 7780], [1500, 2000], [999, 1002]], [[0, 1000], [4000, 4500]]], [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('normal control', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]])], [('regression: mapped rounding', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair variant: mapped rounding', [[[7777, 7780]], [[2000, 2500], [1000, 0]]], [[16943, 16950]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[0, 2500], [250, 750], [0, 3]], [[10000, 10500], [20000, 20500]]], [[500, 3000], [750, 1250], [500, 503]]), ('normal control', [[[0, 2500], [0, 3]], [[1000, 1500], [0, -3000]]], [[0, 8250]])], [('regression: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: mapped rounding', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('partial repair probe: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair variant: mapped rounding', [[[7777, 7779], [9295, 11795], [7777, 7780]], [[0, 0], [1000, 1500]]], [[11666, 11669], [13943, 17693], [11666, 11670]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[5033, 5036], [999, 1000]], [[9000, 9000], [5000, 4000]]], [[4041, 4045]]), ('normal control', [[[1, 2], [1500, 4000]], [[15000, 15000], [5000, 5000]]], [[1, 2], [1500, 4000]]), ('normal control', [[[250, 251], [1500, 2500], [0, 2], [0, 2]], [[10000, 10500], [14000, 15500]]], [[0, 1125]])], [('regression: mapped rounding', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: mapped rounding', [[[1, 501], [7777, 7778]], [[1000, 0], [11000, 12500]]], [[8471, 8473]]), ('partial repair probe: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair variant: mapped rounding', [[[999, 1999], [0, 3], [7777, 7779]], [[0, 0], [2000, 3000]]], [[1499, 2999], [0, 5], [11666, 11669]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1500, 1501], [999, 1001], [7777, 7780], [250, 252]], [[11000, 10500], [10000, 7000]]], []), ('normal control', [[[1500, 1503], [999, 3499]], [[1000, 0], [3000, 3500]]], [[875, 880], [0, 4373]]), ('normal control', [[[999, 1499], [7777, 10277]], [[10000, 10500], [10003, 9503]]], [])], [('regression: mapped rounding', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('regression variant: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair probe: mapped rounding', [[[1, 2501], [5729, 5732], [250, 252]], [[7000, 8500], [5000, 6000]]], [[0, 2876], [6911, 6915], [63, 65]]), ('partial repair variant: mapped rounding', [[[11711, 11713], [1500, 1503]], [[0, -3000], [1000, 2500]]], [[61411, 61422], [5250, 5267]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[250, 1250]], [[1000, 1000], [5000, 5500]]], [[156, 1281]]), ('normal control', [[[13786, 13787], [7777, 8277], [1, 2501], [250, 251]], [[10000, 11000], [10003, 9503]]], []), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: mapped rounding | [[0, 2]] | [[1, 2]] | Failed |
| regression variant: mapped rounding | [[3696, 4320], [3694, 3695], [1812, 1813], [2125, 2250]] | [[3696, 4321], [3694, 3695], [2125, 2250]] | Failed |
| partial repair probe: mapped rounding | [[3388, 3390], [250, 500]] | [[0, 1], [3389, 3390], [250, 500]] | Failed |
| partial repair variant: mapped rounding | [[7805, 8680], [7805, 7808], [2312, 2750], [1874, 1877]] | [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]] | Failed |
| boundary control | [[2000, 4000]] | [[2000, 4000]] | Passed |
| boundary control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [[0, 625]] | [[0, 625]] | Passed |
| normal control | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | Passed |
SHA-256 / d0aeff413ac530ac4a6c9a3c108e21f8c68bfc8fae6da79544310143e0ce10ef
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return math.floor(b1+(t-a1)*k+Fraction(1,2))
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: mapped rounding', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('regression variant: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: mapped rounding', [[[7777, 8777], [7777, 7780], [1500, 2000], [999, 1002]], [[0, 1000], [4000, 4500]]], [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('normal control', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]])], [('regression: mapped rounding', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: mapped rounding', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair variant: mapped rounding', [[[7777, 7780]], [[2000, 2500], [1000, 0]]], [[16943, 16950]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[0, 2500], [250, 750], [0, 3]], [[10000, 10500], [20000, 20500]]], [[500, 3000], [750, 1250], [500, 503]]), ('normal control', [[[0, 2500], [0, 3]], [[1000, 1500], [0, -3000]]], [[0, 8250]])], [('regression: mapped rounding', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: mapped rounding', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('partial repair probe: mapped rounding', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair variant: mapped rounding', [[[7777, 7779], [9295, 11795], [7777, 7780]], [[0, 0], [1000, 1500]]], [[11666, 11669], [13943, 17693], [11666, 11670]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[5033, 5036], [999, 1000]], [[9000, 9000], [5000, 4000]]], [[4041, 4045]]), ('normal control', [[[1, 2], [1500, 4000]], [[15000, 15000], [5000, 5000]]], [[1, 2], [1500, 4000]]), ('normal control', [[[250, 251], [1500, 2500], [0, 2], [0, 2]], [[10000, 10500], [14000, 15500]]], [[0, 1125]])], [('regression: mapped rounding', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: mapped rounding', [[[1, 501], [7777, 7778]], [[1000, 0], [11000, 12500]]], [[8471, 8473]]), ('partial repair probe: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair variant: mapped rounding', [[[999, 1999], [0, 3], [7777, 7779]], [[0, 0], [2000, 3000]]], [[1499, 2999], [0, 5], [11666, 11669]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('normal control', [[[1500, 1501], [999, 1001], [7777, 7780], [250, 252]], [[11000, 10500], [10000, 7000]]], []), ('normal control', [[[1500, 1503], [999, 3499]], [[1000, 0], [3000, 3500]]], [[875, 880], [0, 4373]]), ('normal control', [[[999, 1499], [7777, 10277]], [[10000, 10500], [10003, 9503]]], [])], [('regression: mapped rounding', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('regression variant: mapped rounding', [[[16012, 18512], [0, 2], [999, 1002], [1, 4]], [[10000, 10000], [11000, 10500]]], [[13006, 14256], [5000, 5001], [5500, 5501], [5001, 5002]]), ('partial repair probe: mapped rounding', [[[1, 2501], [5729, 5732], [250, 252]], [[7000, 8500], [5000, 6000]]], [[0, 2876], [6911, 6915], [63, 65]]), ('partial repair variant: mapped rounding', [[[11711, 11713], [1500, 1503]], [[0, -3000], [1000, 2500]]], [[61411, 61422], [5250, 5267]]), ('boundary control', [[[1000, 2000]], [[0, 0], [1000, 2000]]], [[2000, 4000]]), ('boundary control', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('normal control', [[[250, 1250]], [[1000, 1000], [5000, 5500]]], [[156, 1281]]), ('normal control', [[[13786, 13787], [7777, 8277], [1, 2501], [250, 251]], [[10000, 11000], [10003, 9503]]], []), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: mapped rounding | [[1, 2]] | [[1, 2]] | Passed |
| regression variant: mapped rounding | [[3696, 4321], [3694, 3695], [2125, 2250]] | [[3696, 4321], [3694, 3695], [2125, 2250]] | Passed |
| partial repair probe: mapped rounding | [[0, 1], [3389, 3390], [250, 500]] | [[0, 1], [3389, 3390], [250, 500]] | Passed |
| partial repair variant: mapped rounding | [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]] | [[7805, 8680], [7805, 7808], [2313, 2750], [1874, 1877]] | Passed |
| boundary control | [[2000, 4000]] | [[2000, 4000]] | Passed |
| boundary control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [[0, 625]] | [[0, 625]] | Passed |
| normal control | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]] | Passed |
SHA-256 / f95e03bd9aa4f5800d31dcf1263ccee5e1e12ead44b62493067ab735e9448ccc
Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to any subtitle standard. 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:49:31.975810+00:00.
Case digest / e4ac31a194ada9c5417f97a926012ca136894c55ca010621e5d8d1665a2ef045