# Fictional diagnostic sequence contract, revision 1

This is an original, nonvehicle teaching contract. It is not an ISO 26262
requirement, an allocated vehicle safety requirement, or an AUTOSAR Dem design.

TREQ-DB-01: Each independent trace begins with no accumulated fault samples and
the diagnostic flag false. Inputs are lists over FAULT, HEALTHY and UNKNOWN.
FAULT is an eligible fault sample. HEALTHY is a nonfault sample. UNKNOWN is an
ineligible sample with unavailable quality. Each call consumes one logical
sample. Output is the flag after that sample.

TREQ-DB-02: The output flag is true if and only if the latest three samples in
this trace are all FAULT. Thus the third consecutive FAULT raises the flag,
and further consecutive FAULT samples keep it true. The threshold is fixed at
three for this fixture.

TREQ-DB-03: HEALTHY or UNKNOWN breaks the consecutive sequence and immediately
clears the flag. UNKNOWN does not pause a partly accumulated sequence. The
flag is not latched. A new trace begins from fresh state; traces are not joined.

No sample timestamps, sample period, maximum sample gap, scheduler, jitter,
sensor, physical fault onset, actuator, diagnostic communication, vehicle,
hazard, ASIL, fault-tolerant time interval or real-time deadline is modeled.
Three sample observations do not establish any wall-clock response duration.
Missing input calls are not the UNKNOWN symbol and are not simulated.

The oracle uses trailing windows of three symbols. The corrected implementation
uses a saturating consecutive counter. Their agreement over declared inputs
supports this fictional rule only. The input validation branch is outside the
executed alphabet campaign; malformed-input behavior is not a tested claim.

The baseline and two named alternatives deliberately violate this contract.
No Proof audit, MC/DC measurement, theorem prover, target integration, safety
classification, tool-confidence determination or qualification is run here.
