FAILURE MAP
← Case archive

FA-12526 / Biological sequence representation / Open access

Circular sequence windows miss the origin-spanning start · case 01

Circular sequence windows miss the origin-spanning start.

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

ROOT CAUSE

Linear window limits omit wrapping starts.

VERIFIED REPAIR

Implement the stated sequence contract while preserving its positional and symbol semantics.

Unsuccessful approach: Duplicating the sequence enumerates duplicate starts beyond the original length.

Case contract

For nonempty ACGT string and 1<=k<=length, return exactly length windows of size k wrapping around origin, in start-index order. Empty returns [].

Why this case matters

An offline abstract sequence-data model; useful for testing representation invariants without biological inference.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s,k):
    return [s[i:i+k] for i in range(len(s)-k+1)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variable circle', solve('A'*N+'C',2), ['AA']*(N-1)+['AC','CA'])
check('empty', solve('',1), [])
check('singleton', solve('G',1), ['G'])
check('whole circle', solve('ACG',3), ['ACG','CGA','GAC'])
check('unit', solve('AC',1), ['A','C'])
check('repeated', solve('AA',2), ['AA','AA'])
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
variable circle['AC']['AC', 'CA']Failed
empty[][]Passed
singleton['G']['G']Passed
whole circle['ACG']['ACG', 'CGA', 'GAC']Failed
unit['A', 'C']['A', 'C']Passed
repeated['AA']['AA', 'AA']Failed

SHA-256 / 5dee27133686f45b33ddfc46d0ca6ca3657e1f777abadedd83e1e8e04edeee28

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s,k):
    t=s+s
    return [t[i:i+k] for i in range(len(t)-k+1)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variable circle', solve('A'*N+'C',2), ['AA']*(N-1)+['AC','CA'])
check('empty', solve('',1), [])
check('singleton', solve('G',1), ['G'])
check('whole circle', solve('ACG',3), ['ACG','CGA','GAC'])
check('unit', solve('AC',1), ['A','C'])
check('repeated', solve('AA',2), ['AA','AA'])
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
variable circle['AC', 'CA', 'AC']['AC', 'CA']Failed
empty[][]Passed
singleton['G', 'G']['G']Failed
whole circle['ACG', 'CGA', 'GAC', 'ACG']['ACG', 'CGA', 'GAC']Failed
unit['A', 'C', 'A', 'C']['A', 'C']Failed
repeated['AA', 'AA', 'AA']['AA', 'AA']Failed

SHA-256 / ec7c858112eb29885d60b97f837f74503750ad2d0dc7bf3146e6baf754614a49

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s,k):
    t=s+s
    return [t[i:i+k] for i in range(len(s))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variable circle', solve('A'*N+'C',2), ['AA']*(N-1)+['AC','CA'])
check('empty', solve('',1), [])
check('singleton', solve('G',1), ['G'])
check('whole circle', solve('ACG',3), ['ACG','CGA','GAC'])
check('unit', solve('AC',1), ['A','C'])
check('repeated', solve('AA',2), ['AA','AA'])
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
variable circle['AC', 'CA']['AC', 'CA']Passed
empty[][]Passed
singleton['G']['G']Passed
whole circle['ACG', 'CGA', 'GAC']['ACG', 'CGA', 'GAC']Passed
unit['A', 'C']['A', 'C']Passed
repeated['AA', 'AA']['AA', 'AA']Passed

SHA-256 / ca618c9e9399aa6042b25d2293ef9562cd54c1fd2061d8b204079707d013f8f9

Verification & scope

Synthetic strings and explicit policies only; no biological interpretation or laboratory workflow. 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:57.661293+00:00.

Case digest / 386ee7afc4848ba7556971a7f340639ff86148fbba5422c886612b2d09920cbb