35. Taste lints (§8 tooling, 2026-11-21)
- The
plan/PORTING.mdtaste checklist is machine-checked as lints L0501–L0506 (search_loop,discarded_result,symmetric_write,loop_reduction,index_only_loop,repeated_literal), read off the syntax tree like the other lints. Reason: ports passed every gate and still read like translated C++; a lint names the construct at the place. Reverse: droprules/taste.rsand the sixLints. - A fix-it only for the exact shape, and never when it could change
meaning: not when the loop holds a
?(it would leave the comprehension, not the fn), when the file declares a fn of the reduction's name, when the accumulator starts from a non-number (sumof strings), or formax/min(empty has no value). The rewrite keeps the declaration's type and edits only its initializer. Applying every fix to the corpus changes 136 files and breaks none that checked before. Reverse: widen the shapes inexact_searchandreduce. repeated_literalcounts lines, not occurrences (-1e9..=1e9is one fact), and fires for a value of at least 1e6 on two lines or at least 1000 on three. Reason: bounds and moduli are big; small numbers repeat honestly. Reverse: change the thresholds inrepeated_literals.- Two friction detectors become lints:
push_after_literalas L0507push_loop(with a fix to a comprehension,head + [..]after a non-empty start) andnone_check_unwrapas L0508 (no fix: the right rewrite,if letor comparing the option, depends on the use). They are taste lints too: the checklist's hand-rolled structures and sentinels. Reverse: drop them fromLINTS. repeated_literalskips the types oflet x: T = read(): equal statement bounds of different inputs are separate facts. The first 30-hit sample had 6 false positives, all such bounds; after the change a second sample of 30 had 1 (a loop with side effects read as a search). Reverse: dropinput_typesinrepeated_literals.cpl lint --tastereports only L05xx, a line per file and a total; the scoreboard counts it per port apart fromlint_warnings, so a taste finding is a review signal and never fails the gate. Reverse: foldtasteintolint_warningsinscripts/scoreboard.py.- The friction detector
negative_slicegets no lint:a[..-k]is already the check error E0309 with the same fix, so the friction script's onewa_trapis stale. Reverse: none needed.