Lane-hbd r2 charter -- 42 errors to zero, wip checkpoints allowed
Browse files at this commit4ad151bea44a9e61054545643aaf2fe9ee2161dcParent: 31976a1- docs
- lane-hbd r2 charter -- 42 errors to zero, wip checkpoints allowed
1 changed file +47 -0
- lanes/hbd-r2.charter.md +47 -0
lanes/hbd-r2.charter.mdadded+47 -0
| @@ -0,0 +1,47 @@ | ||
| 1 | +# lane-hbd r2 — 42 errors to zero | |
| 2 | + | |
| 3 | +At a86872b. r1 applied the saved diff and widened well past it before its cap; | |
| 4 | +I committed its tree verbatim. **It does not compile: `cargo check -p ec-av1 | |
| 5 | +--lib` reports 42 errors, 41 of them E0308 type mismatches.** There are no | |
| 6 | +conflict markers — I checked. | |
| 7 | + | |
| 8 | +That number is your progress metric. Drive it to zero. | |
| 9 | + | |
| 10 | +## Checkpoint policy for this round — read this, it is different | |
| 11 | +A half-widened crate cannot compile, so "commit only when green" would mean | |
| 12 | +committing nothing until the very end, which is exactly how two rounds have died | |
| 13 | +here. Instead: **commit a `wip(hbd):` checkpoint whenever the error count drops | |
| 14 | +meaningfully** (say every 10 errors), with the count in the message. A | |
| 15 | +non-compiling commit is acceptable ONLY on this branch, ONLY with that prefix, | |
| 16 | +and ONLY while the count is falling — it is never merged in that state. Once the | |
| 17 | +count hits zero, run the full suite and make a real commit. | |
| 18 | + | |
| 19 | +## Order (r10's, still valid) | |
| 20 | +`restoration.rs`'s `apply_loop_restoration_plane` and its 3 `decode.rs` call | |
| 21 | +sites; the debug-dump narrowing closures; `reconstruct_mc`'s clamp; then `mc.rs` | |
| 22 | +LAST — its 6 `&[u8]`/`&mut [u8]` functions unlock ~24 `decode.rs` call sites at | |
| 23 | +once, using the `sample_max()` pattern `intra.rs` already proves. Then | |
| 24 | +`encode.rs`'s 3 call sites into `intra.rs`: decide deliberately whether the | |
| 25 | +encoder's buffers widen too or get a local u8<->u16 box, and say which and why — | |
| 26 | +the encoder shares those predictors and was not in the original inventory. | |
| 27 | + | |
| 28 | +**8-bit output must stay bit-exact.** The 263-test suite is the gate once it | |
| 29 | +compiles; a single pixel of drift there means a clamp bound or a rounding step | |
| 30 | +was widened wrong. | |
| 31 | + | |
| 32 | +Do NOT lift the `bit_depth != 8` refusal and do not build a 10-bit gate — that | |
| 33 | +is the next round, and it needs a second `ffmpeg_decode_sequence` helper emitting | |
| 34 | +`yuv420p10le` with u16 LE parsing. | |
| 35 | + | |
| 36 | +`git checkout` and `git stash` have been blocked in these sessions; use | |
| 37 | +`git apply -R <diff>` if you need to undo something. | |
| 38 | + | |
| 39 | +## Budget discipline | |
| 40 | +75 turns, no reset on resume. At about turn 55, stop starting new work, commit | |
| 41 | +your checkpoint, and write the report with the current error count in it. | |
| 42 | + | |
| 43 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-hbd`; foreground | |
| 44 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms; | |
| 45 | +`EC_AV1_REQUIRE_AOMENC=1`. Do NOT open the user's media in a GUI app. Sibling | |
| 46 | +worktrees have live agents — never build in or edit them. Never push, never merge | |
| 47 | +into main; I handle merges. End with `lanes/hbd-r2.report.md`, VERDICT on line 1. |