report: state the two general rules the gate-1 deletion turned up
Browse files at this commite100a8ade757b614990a9cf6b06f229eeec87be6Parent: fac47ce1 changed file +36 -0
lanes/av1recipehunt.report.mdmodified+36 -0
| @@ -468,6 +468,42 @@ mutation proof. A second pointer was added at | ||
| 468 | 468 | `cargo test` run-line still naming the deleted test -- a stale instruction left |
| 469 | 469 | by the deletion, caught by grepping for the name after the cut. |
| 470 | 470 | |
| 471 | +### GENERAL RULE -- when a dead gate may be deleted, and when it may not | |
| 472 | + | |
| 473 | +> A gate whose precondition is unreachable is dead weight ONLY when BOTH of its | |
| 474 | +> halves are covered elsewhere. Here the pixel half is covered four times at | |
| 475 | +> the same geometry with the same own-reconstruction compare, and the | |
| 476 | +> precondition is covered by an invariant test that BOUNDS THE DOMAIN (stack | |
| 477 | +> sizes 0..=4) rather than sampling it -- `best_new_mv_syntax` breaks at | |
| 478 | +> `entries.len() <= idx`, so indices 3/4 are unreachable at any stack size. | |
| 479 | +> Had the pixel compare been unique, keeping the test with a fact-stating | |
| 480 | +> ignore string would have been the honest call; a deleted unique assertion is | |
| 481 | +> not recoverable from a report. | |
| 482 | + | |
| 483 | +The asymmetry is the whole rule. `#[ignore]` is nearly free -- a gate that | |
| 484 | +cannot fire is inert, and its doc comment still tells the next lane what was | |
| 485 | +tried. Deletion is not free and is not reversible from prose: once the function | |
| 486 | +is gone, the only surviving record of what it asserted is this report, and | |
| 487 | +nobody re-derives a coverage claim from a report. So the bar for deletion is | |
| 488 | +not "the assert cannot fire"; it is "the assert cannot fire AND everything | |
| 489 | +else the test did is provably done elsewhere". Check every other assertion in | |
| 490 | +the doomed test before cutting it, not just the one that is broken. | |
| 491 | + | |
| 492 | +### GENERAL RULE -- a deletion leaves references behind | |
| 493 | + | |
| 494 | +> Grep the name you removed, after you remove it. | |
| 495 | + | |
| 496 | +Cutting `a_128_superblock_clip_whose_drl_index_the_write_time_stack_cannot_carry_decodes_exact` | |
| 497 | +left a live `cargo test ... --nocapture` run-line in a sibling gate's doc | |
| 498 | +comment (`encode.rs:18619`) pointing at a test that no longer exists -- a | |
| 499 | +reviewer following it would get an empty run and a filter matching nothing, | |
| 500 | +with nothing in the output to say the gate had been retired on purpose. The | |
| 501 | +deletion looked complete because the symbol search came back with only the two | |
| 502 | +doc mentions I had written myself. It took grepping the bare name (not the | |
| 503 | +`fn` signature) to find the stale instruction. Same class as the other | |
| 504 | +doc-drift traps in this repo: a rename or removal is not done until the | |
| 505 | +prose points at what now exists. | |
| 506 | + | |
| 471 | 507 | **What was deliberately NOT removed.** `note_drl_clamp` and `DRL_CLAMP_HITS` |
| 472 | 508 | stay. They are unreachable today, but they are the tripwire for the owning fix |
| 473 | 509 | (`deferred(unblock: the DRL owner widens `best_new_mv_syntax`'s offer set past |