Commit e79e607
committed
feat(#351): implement daily-only CFFDRS detection — GREEN
Follows b32ccfd (RED) to green. Implements the two pure functions whose
contracts and tests were committed there.
hasDailyOnlyCffdrs — true only when some rows carry codes and others do
not. All-codes is a conforming firestarr_csv; no-codes is a different
failure with nothing to recover.
findStartingCodeCandidate — the latest row that carries all three codes,
sits at local hour 12 or 13 in the supplied zone, and falls strictly
before ignition. Minutes are ignored; stations poll at :00, :05, :06 or
:10 and all are the same daily reading.
Corrected one test. 'excludes a daily reading exactly at ignition' passed
the full row set, where Aug 1 and Aug 2 also carry readings strictly
before the boundary — so the correct answer was 76.3, not null, and no
rule could return null there without breaking two other tests. Narrowed
to a single row so it isolates the boundary it names.
Invalid-timezone handling returns null rather than failing fast. Filed as
353, not fixed here — untested behaviour does not belong mid-cycle.
15 tests green. Backend suite 646 passed (was 631). tsc --noEmit exit 0.1 parent b32ccfd commit e79e607
2 files changed
Lines changed: 42 additions & 12 deletions
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | | - | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| |||
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | | - | |
87 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments