edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB4c07cbcTahinli2 months ago3583 commits
| 1 | #!/usr/bin/env bash |
| 2 | # av1-suite-preflight.sh — the gate a server staging must pass BEFORE `=== SUITE`. |
| 3 | # |
| 4 | # WHY (lane-av1stagegaps, measured 2026-09-30). Three hosts, three different |
| 5 | # preflight realities, one identical green suite: |
| 6 | # |
| 7 | # host C host-d the driver printed |
| 8 | # === ORACLE RUNG CHECKER |
| 9 | # rungs_exit=1 ok_count=0 |
| 10 | # === SUITE |
| 11 | # and the suite ran. The real cause, with stderr |
| 12 | # visible, was a MISSING PREREQUISITE: the host has |
| 13 | # `~/.cache/aom-oracle/build` (aomdec/aomenc binaries) |
| 14 | # and no `src/` tree, so the checker asserted nothing. |
| 15 | # host A host-a staged with a bare `cargo test -p ec-av1 --lib`. No |
| 16 | # pin-gate audit, no rung checker, no self-test: not a |
| 17 | # failure, an ABSENT check. |
| 18 | # so "green suite" meant checker-passed, checker-failed and no-checker-ran |
| 19 | # with equal confidence. |
| 20 | # |
| 21 | # WHAT THIS DOES. Runs both preflight pieces, prints one machine-readable state |
| 22 | # per piece, then a single VERDICT. Exit 0 only when every piece is GREEN or an |
| 23 | # explicitly waived NOT-RUN, so a `set -e` staging driver CANNOT reach |
| 24 | # `=== SUITE` on a failed or missing check. |
| 25 | # |
| 26 | # pin_audit = GREEN | FAIL | ABSENT (verify-fixture-library.sh: shape, |
| 27 | # resolve, drift, invariants 1-4 + |
| 28 | # census self-test) |
| 29 | # rung_check = GREEN | FAIL | NOT-RUN | ABSENT |
| 30 | # VERDICT = GREEN | WAIVED | BLOCKED |
| 31 | # |
| 32 | # NOT-RUN vs ABSENT is the distinction that matters. NOT-RUN means the checker |
| 33 | # RAN and reported a missing prerequisite (exit 3 from check-aom-oracle-rungs.sh) |
| 34 | # — a provisioning fact, not a code defect. ABSENT means the checker is not in |
| 35 | # this tree at all, which is exactly the host-A defect and is never waivable. |
| 36 | # |
| 37 | # WAIVER. not-run can be waived, but only with an explicit non-empty reason that |
| 38 | # is recorded in the verdict line, so a later reader can tell a deliberate |
| 39 | # waiver from a check that silently vanished: |
| 40 | # SUITE_RUNG_WAIVER="host host-d carries oracle binaries only; rung |
| 41 | # coverage verified on the build host, see report" |
| 42 | # An empty waiver counts as absent, so a unit's Environment= carrying a bare |
| 43 | # SUITE_RUNG_WAIVER= cannot accidentally authorise a run. |
| 44 | # |
| 45 | # Usage: |
| 46 | # scripts/av1-suite-preflight.sh [--tree DIR] [--self-test] |
| 47 | # |
| 48 | # Env: |
| 49 | # EC_FIXTURES=<dir> fixture root (default <tree>/fixtures) |
| 50 | # EC_REQUIRE_FIXTURES=1 make an absent/empty fixture path fatal |
| 51 | # SUITE_RUNG_WAIVER=<reason> waive rung_check=not-run (see above) |
| 52 | # SUITE_RUNG_CHECKER=<path> override the rung checker (self-test stubs) |
| 53 | # SUITE_PIN_CHECKER=<path> override the pin preflight (self-test stubs) |
| 54 | |
| 55 | |
| 56 | |
| 57 | ROOT_DEFAULT= |
| 58 | TREE= |
| 59 | SELF_TEST=0 |
| 60 | while [; do |
| 61 | case "" in |
| 62 | --tree) TREE=; ;; |
| 63 | --self-test) SELF_TEST=1; ;; |
| 64 | -h|--help) ; ;; |
| 65 | *) ; ;; |
| 66 | esac |
| 67 | done |
| 68 | PIN_CHECKER= |
| 69 | RUNG_CHECKER= |
| 70 | |
| 71 | pin_state=ABSENT |
| 72 | rung_state=ABSENT |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | if [; then |
| 238 | |
| 239 | |
| 240 | fi |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 |