FA-11986 / Discrete control systems / Open access
A sampled command delay reads newly written input too early · case 01
A sampled command delay reads newly written input too early.
ROOT CAUSE
The input is returned immediately instead of passing through the delay queue.
VERIFIED REPAIR
Read the oldest queue element before shifting in the current input.
Unsuccessful approach: Shifting first shortens the delay by one sample.
Case contract
A nonempty queue stores pending oldest-first delayed commands; return [output,new_queue] after one tick. Its length is the exact integer sample delay.
Why this case matters
An offline discrete controller model isolates this state or arithmetic fault; it makes no physical plant or safety claim.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(queue, command):
return [command, queue[1:]+[command]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single delay', solve([0], N), [0,[N]])
check('two delay', solve([N,2*N], 3*N), [N,[2*N,3*N]])
check('negative history', solve([-N,0], N), [-N,[0,N]])
check('zero command', solve([N], 0), [N,[0]])
check('constant stream', solve([N,N], N), [N,[N,N]])
check('long queue', solve([N,0,-N], 2*N), [N,[0,-N,2*N]])
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 |
|---|---|---|---|
| single delay | [1, [1]] | [0, [1]] | Failed |
| two delay | [3, [2, 3]] | [1, [2, 3]] | Failed |
| negative history | [1, [0, 1]] | [-1, [0, 1]] | Failed |
| zero command | [0, [0]] | [1, [0]] | Failed |
| constant stream | [1, [1, 1]] | [1, [1, 1]] | Passed |
| long queue | [2, [0, -1, 2]] | [1, [0, -1, 2]] | Failed |
SHA-256 / 0c125ef260958750dbf713b89dbb3c1f809b1fd5e94ed04522d013aa57c12704
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(queue, command):
updated=queue[1:]+[command]
return [updated[0],updated]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single delay', solve([0], N), [0,[N]])
check('two delay', solve([N,2*N], 3*N), [N,[2*N,3*N]])
check('negative history', solve([-N,0], N), [-N,[0,N]])
check('zero command', solve([N], 0), [N,[0]])
check('constant stream', solve([N,N], N), [N,[N,N]])
check('long queue', solve([N,0,-N], 2*N), [N,[0,-N,2*N]])
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 |
|---|---|---|---|
| single delay | [1, [1]] | [0, [1]] | Failed |
| two delay | [2, [2, 3]] | [1, [2, 3]] | Failed |
| negative history | [0, [0, 1]] | [-1, [0, 1]] | Failed |
| zero command | [0, [0]] | [1, [0]] | Failed |
| constant stream | [1, [1, 1]] | [1, [1, 1]] | Passed |
| long queue | [0, [0, -1, 2]] | [1, [0, -1, 2]] | Failed |
SHA-256 / 025416d2fd7c1362849def56935516fc777a6bcc8d536d31cce6555dba77c09f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(queue, command):
return [queue[0],queue[1:]+[command]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single delay', solve([0], N), [0,[N]])
check('two delay', solve([N,2*N], 3*N), [N,[2*N,3*N]])
check('negative history', solve([-N,0], N), [-N,[0,N]])
check('zero command', solve([N], 0), [N,[0]])
check('constant stream', solve([N,N], N), [N,[N,N]])
check('long queue', solve([N,0,-N], 2*N), [N,[0,-N,2*N]])
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 |
|---|---|---|---|
| single delay | [0, [1]] | [0, [1]] | Passed |
| two delay | [1, [2, 3]] | [1, [2, 3]] | Passed |
| negative history | [-1, [0, 1]] | [-1, [0, 1]] | Passed |
| zero command | [1, [0]] | [1, [0]] | Passed |
| constant stream | [1, [1, 1]] | [1, [1, 1]] | Passed |
| long queue | [1, [0, -1, 2]] | [1, [0, -1, 2]] | Passed |
SHA-256 / 9617650965f5938d1a2af7b6897df0fa2a1856a78161dc88c1687f841d6f80ae
Verification & scope
Integer-valued controlled examples only; no physical plant, stability guarantee, timing jitter, or hardware behavior is modeled. 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:52.824223+00:00.
Case digest / 69d3ee04014bf2d05a1925f402ab345c7f0c844619ae182158bc4ceb9e903cf3