FA-65571 / Ecological population dynamics / Open access
Schaefer surplus-production harvest reference points: status boundary · case 01
Fishing exactly at E_msy is labelled overfished.
ROOT CAUSE
The overfished comparison includes equality.
VERIFIED REPAIR
Restore the status boundary rule: `if effort > emsy:`.
Unsuccessful approach: A one-unit tolerance mislabels slightly excessive effort as sustainable.
Case contract
MSY = rK/4 at B=K/2 and E_msy = r/(2q); equilibrium biomass under effort E is K(1-qE/r) when qE<r else 0; yield = qEB; status 'overfished' when E>E_msy, 'at-msy' when equal, else 'sustainable'; return [MSY, Bmsy, Emsy, B, yield, status] rounded; None for invalid inputs.
Why this case matters
Population projections set harvest quotas, conservation status and pest-control timing; a wrong update order, boundary or rate conversion silently changes management advice.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(r, k, effort, q):
if r <= 0 or k <= 0 or q <= 0 or effort < 0:
return None
msy = r * k / 4
bmsy = k / 2
emsy = r / (2 * q)
b = k * (1 - q * effort / r) if q * effort < r else 0.0
y = q * effort * b
if effort >= emsy:
status = 'overfished'
elif effort == emsy:
status = 'at-msy'
else:
status = 'sustainable'
return [round(msy, 4), round(bmsy, 4), round(emsy, 6), round(b, 4), round(y, 4), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])]]
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 |
|---|---|---|---|
| control: tuna fishery moderate effort | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | Passed |
| regression: effort at msy | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'overfished'] | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy'] | Failed |
| control: overfished | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | Passed |
| control: collapse effort | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | Passed |
| control: no fishing | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | Passed |
| control: high catchability | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | Passed |
| regression: slightly over msy | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'] | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'] | Passed |
SHA-256 / 1ce00ca6ed99b163ff0efeeca1c33aff5b105aa367a4ef2d3b4a0964929ec81b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(r, k, effort, q):
if r <= 0 or k <= 0 or q <= 0 or effort < 0:
return None
msy = r * k / 4
bmsy = k / 2
emsy = r / (2 * q)
b = k * (1 - q * effort / r) if q * effort < r else 0.0
y = q * effort * b
if effort > emsy + 1:
status = 'overfished'
elif effort == emsy:
status = 'at-msy'
else:
status = 'sustainable'
return [round(msy, 4), round(bmsy, 4), round(emsy, 6), round(b, 4), round(y, 4), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])]]
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 |
|---|---|---|---|
| control: tuna fishery moderate effort | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | Passed |
| regression: effort at msy | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy'] | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy'] | Passed |
| control: overfished | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | Passed |
| control: collapse effort | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | Passed |
| control: no fishing | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | Passed |
| control: high catchability | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | Passed |
| regression: slightly over msy | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'sustainable'] | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'] | Failed |
SHA-256 / 0203ef2c68a83ac963c8f93334da7a13fa06985a6829fd0b581dd01d6f2a5125
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(r, k, effort, q):
if r <= 0 or k <= 0 or q <= 0 or effort < 0:
return None
msy = r * k / 4
bmsy = k / 2
emsy = r / (2 * q)
b = k * (1 - q * effort / r) if q * effort < r else 0.0
y = q * effort * b
if effort > emsy:
status = 'overfished'
elif effort == emsy:
status = 'at-msy'
else:
status = 'sustainable'
return [round(msy, 4), round(bmsy, 4), round(emsy, 6), round(b, 4), round(y, 4), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])],
[('control: tuna fishery moderate effort',
(0.4, 10000, 100, 0.001),
[1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable']),
('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: overfished', (0.3, 5000, 250, 0.001), [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'])],
[('regression: effort at msy', (0.5, 2000, 250, 0.001), [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy']),
('control: collapse effort', (0.2, 3000, 300, 0.001), [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished']),
('control: no fishing', (0.6, 800, 0, 0.002), [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable']),
('control: high catchability', (0.8, 1500, 50, 0.01), [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished']),
('regression: slightly over msy',
(0.5, 2000, 250.4, 0.001),
[250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished']),
('control: invalid q', (0.5, 2000, 100, 0.0), None),
('control: light fishing', (1.2, 400, 20, 0.005), [120.0, 200.0, 120.0, 366.6667, 36.6667, 'sustainable'])]]
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 |
|---|---|---|---|
| control: tuna fishery moderate effort | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | [1000.0, 5000.0, 200.0, 7500.0, 750.0, 'sustainable'] | Passed |
| regression: effort at msy | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy'] | [250.0, 1000.0, 250.0, 1000.0, 250.0, 'at-msy'] | Passed |
| control: overfished | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | [375.0, 2500.0, 150.0, 833.3333, 208.3333, 'overfished'] | Passed |
| control: collapse effort | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | [150.0, 1500.0, 100.0, 0.0, 0.0, 'overfished'] | Passed |
| control: no fishing | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | [120.0, 400.0, 150.0, 800.0, 0.0, 'sustainable'] | Passed |
| control: high catchability | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | [300.0, 750.0, 40.0, 562.5, 281.25, 'overfished'] | Passed |
| regression: slightly over msy | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'] | [250.0, 1000.0, 250.0, 998.4, 249.9994, 'overfished'] | Passed |
SHA-256 / 2001816aeefc7bb9726d567c5e4b9aa19e768769c801468c3f032918e7d9d809
Verification & scope
Deterministic bounded teaching model with a stipulated contract; not a validated scientific or public-health modelling library. 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:47:35.298683+00:00.
Case digest / 993b94deb036cdd12639724ba85ae6550484ae817c5ebfb92975e5d6bbb00427