FA-69241 / Tide and marine navigation tables / Open access
Light characteristic abbreviation: Single-flash lights have no group count · case 01
Plain "Fl" lights are reported with a null group.
ROOT CAUSE
The absent parenthesised group yields None instead of the implicit single group.
VERIFIED REPAIR
Default the group to [1].
Unsuccessful approach: Defaulting to [0] suggests the light never flashes.
Case contract
Input a chart light abbreviation such as "Fl(3)WR.10s15m20M". Return [class, groups, colours, period_s, height_m, range_nm]: class includes an "Al." prefix; groups is a list (composite "2+1" -> [2,1], default [1]); colours default "W"; missing numbers are None. Unparseable strings return None.
Why this case matters
Tide tables and passage plans turn published predictions into go/no-go decisions about depth, clearance and timing.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(x):
m=re.match(r"^(Al\.|)(LFl|Fl|VQ|Q|Iso|Oc|F)(?:\(([0-9+]+)\))?\.?([WRGY]*)\.?(?:(\d+(?:\.\d+)?)s)?(?:(\d+)m)?(?:(\d+)M)?$",x)
if not m: return None
cls=m.group(1)+m.group(2)
grp=[int(p) for p in m.group(3).split('+')] if m.group(3) else None
col=m.group(4) or 'W'
per=float(m.group(5)) if m.group(5) else None
return [cls,grp,col,per,int(m.group(6)) if m.group(6) else None,int(m.group(7)) if m.group(7) else None]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('light characteristic abbreviation "LFl.10s"', 'LFl.10s', ['LFl', [1], 'W', 10.0, None, None]), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20]), ('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None])], [('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None])], [('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5])], [('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None])], [('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None]), ('light characteristic abbreviation "Q.1.2s"', 'Q.1.2s', ['Q', [1], 'W', 1.2, None, None]), ('light characteristic abbreviation "Mo(A)10s"', 'Mo(A)10s', None), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20])]]
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 |
|---|---|---|---|
| light characteristic abbreviation "LFl.10s" | ['LFl', None, 'W', 10.0, None, None] | ['LFl', [1], 'W', 10.0, None, None] | Failed |
| light characteristic abbreviation "Fl(3)WR.10s15m20M" | ['Fl', [3], 'WR', 10.0, 15, 20] | ['Fl', [3], 'WR', 10.0, 15, 20] | Passed |
| light characteristic abbreviation "Q" | ['Q', None, 'W', None, None, None] | ['Q', [1], 'W', None, None, None] | Failed |
| light characteristic abbreviation "VQ(6)10s" | ['VQ', [6], 'W', 10.0, None, None] | ['VQ', [6], 'W', 10.0, None, None] | Passed |
| light characteristic abbreviation "Iso.WRG.4s" | ['Iso', None, 'WRG', 4.0, None, None] | ['Iso', [1], 'WRG', 4.0, None, None] | Failed |
| light characteristic abbreviation "Oc(2)R.8s12m9M" | ['Oc', [2], 'R', 8.0, 12, 9] | ['Oc', [2], 'R', 8.0, 12, 9] | Passed |
| light characteristic abbreviation "Al.Fl.WR.5s" | ['Al.Fl', None, 'WR', 5.0, None, None] | ['Al.Fl', [1], 'WR', 5.0, None, None] | Failed |
SHA-256 / d0247511f568b90aca4721deb0e3753a9214af78d98e2e21884d907251c66f5a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(x):
m=re.match(r"^(Al\.|)(LFl|Fl|VQ|Q|Iso|Oc|F)(?:\(([0-9+]+)\))?\.?([WRGY]*)\.?(?:(\d+(?:\.\d+)?)s)?(?:(\d+)m)?(?:(\d+)M)?$",x)
if not m: return None
cls=m.group(1)+m.group(2)
grp=[int(p) for p in m.group(3).split('+')] if m.group(3) else [0]
col=m.group(4) or 'W'
per=float(m.group(5)) if m.group(5) else None
return [cls,grp,col,per,int(m.group(6)) if m.group(6) else None,int(m.group(7)) if m.group(7) else None]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('light characteristic abbreviation "LFl.10s"', 'LFl.10s', ['LFl', [1], 'W', 10.0, None, None]), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20]), ('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None])], [('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None])], [('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5])], [('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None])], [('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None]), ('light characteristic abbreviation "Q.1.2s"', 'Q.1.2s', ['Q', [1], 'W', 1.2, None, None]), ('light characteristic abbreviation "Mo(A)10s"', 'Mo(A)10s', None), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20])]]
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 |
|---|---|---|---|
| light characteristic abbreviation "LFl.10s" | ['LFl', [0], 'W', 10.0, None, None] | ['LFl', [1], 'W', 10.0, None, None] | Failed |
| light characteristic abbreviation "Fl(3)WR.10s15m20M" | ['Fl', [3], 'WR', 10.0, 15, 20] | ['Fl', [3], 'WR', 10.0, 15, 20] | Passed |
| light characteristic abbreviation "Q" | ['Q', [0], 'W', None, None, None] | ['Q', [1], 'W', None, None, None] | Failed |
| light characteristic abbreviation "VQ(6)10s" | ['VQ', [6], 'W', 10.0, None, None] | ['VQ', [6], 'W', 10.0, None, None] | Passed |
| light characteristic abbreviation "Iso.WRG.4s" | ['Iso', [0], 'WRG', 4.0, None, None] | ['Iso', [1], 'WRG', 4.0, None, None] | Failed |
| light characteristic abbreviation "Oc(2)R.8s12m9M" | ['Oc', [2], 'R', 8.0, 12, 9] | ['Oc', [2], 'R', 8.0, 12, 9] | Passed |
| light characteristic abbreviation "Al.Fl.WR.5s" | ['Al.Fl', [0], 'WR', 5.0, None, None] | ['Al.Fl', [1], 'WR', 5.0, None, None] | Failed |
SHA-256 / 0a4c83bdba2cba6dc6a43e95387b78bfb0f73506ab5becd2be4698e263717476
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(x):
m=re.match(r"^(Al\.|)(LFl|Fl|VQ|Q|Iso|Oc|F)(?:\(([0-9+]+)\))?\.?([WRGY]*)\.?(?:(\d+(?:\.\d+)?)s)?(?:(\d+)m)?(?:(\d+)M)?$",x)
if not m: return None
cls=m.group(1)+m.group(2)
grp=[int(p) for p in m.group(3).split('+')] if m.group(3) else [1]
col=m.group(4) or 'W'
per=float(m.group(5)) if m.group(5) else None
return [cls,grp,col,per,int(m.group(6)) if m.group(6) else None,int(m.group(7)) if m.group(7) else None]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('light characteristic abbreviation "LFl.10s"', 'LFl.10s', ['LFl', [1], 'W', 10.0, None, None]), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20]), ('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None])], [('light characteristic abbreviation "Q"', 'Q', ['Q', [1], 'W', None, None, None]), ('light characteristic abbreviation "VQ(6)10s"', 'VQ(6)10s', ['VQ', [6], 'W', 10.0, None, None]), ('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Oc(2)R.8s12m9M"', 'Oc(2)R.8s12m9M', ['Oc', [2], 'R', 8.0, 12, 9]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None])], [('light characteristic abbreviation "Iso.WRG.4s"', 'Iso.WRG.4s', ['Iso', [1], 'WRG', 4.0, None, None]), ('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "Fl(2+1)G.15s"', 'Fl(2+1)G.15s', ['Fl', [2, 1], 'G', 15.0, None, None]), ('light characteristic abbreviation "Q(9)15s"', 'Q(9)15s', ['Q', [9], 'W', 15.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5])], [('light characteristic abbreviation "Al.Fl.WR.5s"', 'Al.Fl.WR.5s', ['Al.Fl', [1], 'WR', 5.0, None, None]), ('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "Fl.2.5s"', 'Fl.2.5s', ['Fl', [1], 'W', 2.5, None, None]), ('light characteristic abbreviation "Fl(4)Y.20s8m5M"', 'Fl(4)Y.20s8m5M', ['Fl', [4], 'Y', 20.0, 8, 5]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None])], [('light characteristic abbreviation "F.R"', 'F.R', ['F', [1], 'R', None, None, None]), ('light characteristic abbreviation "LFl.G.12s24m15M"', 'LFl.G.12s24m15M', ['LFl', [1], 'G', 12.0, 24, 15]), ('light characteristic abbreviation "Fl.10s20M"', 'Fl.10s20M', ['Fl', [1], 'W', 10.0, None, 20]), ('light characteristic abbreviation "Al.Oc.WG.6s"', 'Al.Oc.WG.6s', ['Al.Oc', [1], 'WG', 6.0, None, None]), ('light characteristic abbreviation "Q.1.2s"', 'Q.1.2s', ['Q', [1], 'W', 1.2, None, None]), ('light characteristic abbreviation "Mo(A)10s"', 'Mo(A)10s', None), ('light characteristic abbreviation "Fl(3)WR.10s15m20M"', 'Fl(3)WR.10s15m20M', ['Fl', [3], 'WR', 10.0, 15, 20])]]
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 |
|---|---|---|---|
| light characteristic abbreviation "LFl.10s" | ['LFl', [1], 'W', 10.0, None, None] | ['LFl', [1], 'W', 10.0, None, None] | Passed |
| light characteristic abbreviation "Fl(3)WR.10s15m20M" | ['Fl', [3], 'WR', 10.0, 15, 20] | ['Fl', [3], 'WR', 10.0, 15, 20] | Passed |
| light characteristic abbreviation "Q" | ['Q', [1], 'W', None, None, None] | ['Q', [1], 'W', None, None, None] | Passed |
| light characteristic abbreviation "VQ(6)10s" | ['VQ', [6], 'W', 10.0, None, None] | ['VQ', [6], 'W', 10.0, None, None] | Passed |
| light characteristic abbreviation "Iso.WRG.4s" | ['Iso', [1], 'WRG', 4.0, None, None] | ['Iso', [1], 'WRG', 4.0, None, None] | Passed |
| light characteristic abbreviation "Oc(2)R.8s12m9M" | ['Oc', [2], 'R', 8.0, 12, 9] | ['Oc', [2], 'R', 8.0, 12, 9] | Passed |
| light characteristic abbreviation "Al.Fl.WR.5s" | ['Al.Fl', [1], 'WR', 5.0, None, None] | ['Al.Fl', [1], 'WR', 5.0, None, None] | Passed |
SHA-256 / 56d897adf2dd17a1ce060f59146deb7fd4dea75242a07792936c387acd5cc54e
Verification & scope
A deterministic toy model with stipulated rules and constants; not certified hydrographic software or a substitute for official tide tables. 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:48:09.600384+00:00.
Case digest / 0175744d8d89fced4e8ce737ce8eaabb4ca7c6d28789e3e1b0d8d5f74d0be14b