Repository navigation
Lasso: no faint marks where ink was erased, the selection's halo follows only the ink that shows (#187) - #203
Merged
Merged
Conversation
display.dark.X.Y.W.H is how many pixels of that screen rect the simulated panel shows darker than mid-gray, the colors as drawn: what a person sees there, the page's ink and what is drawn over it. The lasso scenarios for issue #187 use it to check that nothing shows at a place where ink was erased, with a selection over it and without. A row in docs/SIM.md. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…ver erased ink (#187) Erased ink stays in the page file under the erase strokes that cover it (FORMAT.md), and the lasso selects it with the rest of its stroke, or by its whole spine when nothing of it shows (LASSO-DESIGN.md 6.2). The halo of the live preview and of a selection was drawn along every point of every selected stroke, so a lasso drew a dithered ghost of each word erased wholly and bridged each erased gap: the faint marks of issue #187, on the page copied from (ink erased there before the copy) and on the page pasted to (the erasing that travelled with the ink, and erasing done there after). They were never on the page drawn: each selection drew them again from the erased ink, after a page turn or a restart too, until the selection ended. lasso.rs: stroke_visible_runs gives the runs of a stroke's spine that show under the erase strokes after it in scope, by the estimate the enclosure already judges by (hides); judged_samples and it share one walk (Seen), so the enclosure is unchanged. The preview keeps them for the strokes it judges (lasso_live.rs Track.visible) and hands them to the selection at the lift; the selection finds the rest once and keeps them while the page stays as it is (SelMode.visible). sel_draw_halo draws a stroke nothing erases as before, a partly erased one along its runs, an exact-area piece by its stroke's erasing, and ink erased wholly not at all; the preview refreshes nothing for such ink when it flips. editor.halo counts the strokes with a halo drawn. Nothing in any page file changes: notebooks that already hold erased ink show no marks in a selection. Tests. test_lasso: halo_follows_what_shows (a gap gives two runs with paper between them on the page drawn and ink at their ends, ink erased wholly none, an eraser before the ink or scoped to a floor after it none at all, a piece at its stroke's place the same erasing). test_lasso_live: visible_runs_are_the_selections (what the preview keeps is stroke_visible_runs, on random pages with erased ink and a scoped floor). z_lasso_23_erased_marks (the reported steps with the precise eraser) and z_lasso_24_erased_marks_whole (with the Whole strokes eraser on the page pasted to, the page copied from erased with white ink): at every erased place display.dark is 0 with the selection and without it, on both pages, and the counts of strokes, erase strokes, selected and haloed strokes are pinned. With the three source files put back as they were, z_lasso_23 fails 12 of its 48 checks (its first lasso shows 4,497 dark pixels over the word erased wholly, 135 in the line's gap) and z_lasso_24 fails 3 of 36 (72 dark pixels in the white gap). Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…s nothing for it (#187) z_lasso_23_erased_marks draws a lasso round the erased word alone before it lassoes the page: while the lasso is drawn no halo is counted, no preview refresh is sent and the panel shows nothing dark where the word was (between two of the paper's rules, which the lasso's own fast refreshes show dark until the lift); lifted, the word is selected alone with no halo. With the three source files of the fix put back, the scenario now fails 17 of its 57 checks (the preview: halo 1, one refresh, 2,819 dark pixels). Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…checks, and the changelog (#187) DESIGN.md (the live preview's paragraph) says how the halo finds what shows of a stroke and where that is kept; LASSO-DESIGN.md 6.2 and PIXEL-LASSO.md 2.1 say what a selection shows of erased ink, and why it showed faint marks before. TESTING.md gets "2.2, lasso and erased ink (issue #187): device checks": the reported steps with both erasers, a restart, a move, and what to look for if a lasso over many erased marks still breaks off. One line under 2.2.0 (unreleased). Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…ng to draw (#187) sel_draw_halo kept what it found of the selected strokes (stroke_visible_runs) only at its end, after an early return taken when every stroke in the redrawn rect shows nothing. A selection of ink erased wholly that the preview did not hand over (after a move or a resize, the mode button, a paste) so found it again at every compose for as long as it lasted: 67 ms a redraw against 2.3 ms on main for 460 such strokes moved (release build, Mac), about 0.35 to 0.55 s on the Kindle with the pen unread. It is kept before that return now (keep_found). editor.halo_found counts how many times the halo found what shows of a stroke itself since the lasso began. z_lasso_23 selects the erased word alone, moves it and draws it again: 0 after the lift (the preview handed it over), 1 after the drop and still 1 after the next redraw. With the keep before the return taken out it reads 2, then 3. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…near it, each dab measured once (#187) The live preview judges each stroke the lasso reaches, on the pen's path. hides held every sample to every segment of every erase stroke near it, measuring that segment's dab (brush_dab) again each time, so a lasso over much erased ink spent about 5 times as long a batch as over a like region. On the review's page (1,160 words, the middle rows erased wholly by 300-point zigzag passes) the worst batch round the erased rows took 18.4 ms and round the whole page 28.3 ms (release build, Mac), about 92 to 147 and 142 to 226 ms on the Kindle at the 5 to 8 times PIXEL-LASSO.md gives: at or past the 120 to 175 ms after which the kernel drops pen events (pensync.rs), when a lasso's tail is joined straight across. That is the lasso "cutting off" over a region dense with erased marks, the second report on the issue. Erasers (lasso.rs) holds a page's erase strokes, each one's cores measured once, the first time a stroke near it is judged, and its segments in chunks of 16 with the box of their ends and their largest core: a sample far from a chunk's box skips its segments at once. The answers are hides' own (the same expression to the bit, a pixel of slack on the boxes). page_erasers gives one; judged_samples, stroke_visible_runs and the rest take it. stroke_visible (Copy's pruning) is stroke_visible_runs now, not a third copy of the rule. On the same page, measured the same way: the worst batch round the erased rows 1.6 ms (8 to 13 ms on the Kindle), the mean 0.35 ms against 3.68; round the whole page 7.2 ms against 28.3. The log's "lasso: preview" line counts the segment tests (erased=). test_lasso_live judging_erased_ink_is_indexed: judged_samples and stroke_visible_runs give the same answers indexed and written out (Erasers::plain, the rule as it was) on 12 random pages with erased ink and a scoped floor and on a page of erased rows built as the review's; a lasso round those rows folded as the pen draws it makes at most 120,000 segment tests in a batch (68,459 now). With the index taken out (every Erasers plain) the worst batch makes 355,451 and the check fails. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…asses, a small eraser or a resize too (#187) The halo went by the enclosure's estimate of what shows (hides): a sample counted as erased only when one erase stroke's hard core covered the whole width of its ink there. Ink erased by the union of several passes, none wide enough alone, counted as showing, and its halo was drawn over plain paper: a 2.8 mm marker line erased by 7 passes of a 2 mm eraser drew 3,900 dark pixels where the page shows none (as main), a ballpoint line scrubbed out by 1 mm passes 822 and by 2 mm passes 242, a 1 mm gap was bridged, and a word erased by passes that a resize moved apart (the points scale, the widths stay in mm) got its halo back: editor.halo 4 instead of 3, 122 dark pixels. lasso.rs stroke_shown_runs decides it from the page as drawn (Drawn: the page canvas and the page's paper alone), one truth with the page's own erasing, layers and floors included. For a stroke that an erase stroke after it in scope reaches (near_erasers, as the enclosure picks them), a sample shows where no dab of those reaches its ink; where one hides it by the estimate it does not; anywhere else it shows when the pixels within its ink's radius are darker than the paper by as much as one black pixel in all (INK_SHOWS levels each counted off: a faint pixel or two an eraser's soft rim leaves is not ink), leaving out pixels one of those erase strokes covers with its hard core, where none of its own ink is left (ink drawn over the erased place after, or under a scoped floor, is another stroke's). A run beside a hidden stretch ends where its ink stops, less the ink's radius, as a stroke's own end does, so the band stays out of a narrow gap. Erasers::reaches tells where an erase stroke's dabs can draw. select.rs: one cache for the preview and the selection (SelMode.visible, now in a RefCell), filled as the halo draws (halo_shown) and as the preview folds; found once per stroke while the page stays as it is, and what the preview found is handed over at the lift. halo_items is the list of what has a halo, shared by sel_draw_halo and the editor.halo probe (no second copy of it). The page's paper is made when a halo may need it (halo_paper). The exact-area preview draws only the judged samples the page shows, and never joins two across a place it does not (they skip the erased samples, and were joined when 1.6 mm or less apart). Without the page drawn to go by (the canvas holds another page), the estimate stands in, not kept. The preview no longer keeps runs of its own (lasso_live.rs Track.visible and judged_and_visible went). Cost on the review's dense page (release build, Mac): the worst preview batch round the erased rows 3.5 ms (18.4 before this lane's index, 1.6 with it alone), round the whole page 8.6 ms (28.3); the first redraw after moving the 460 erased strokes 6.0 ms, the next ones 0.2 ms (67 ms each before). Tests: test_lasso halo_follows_the_page (the marker under 7 passes, a line scrubbed by 1 mm passes, a 1 mm gap whose run ends keep the band out of its middle, ink drawn over an erased place after the erasing, a word put down 1.15 times as large whose page shows nothing while the estimate has 6 samples showing, a floor after the ink). New scenarios z_lasso_25_erased_passes (the marker, while the lasso is drawn and after, and a ballpoint scrubbed by 2 mm passes 18 px apart) and z_lasso_26_erased_small_eraser (1 mm passes 9 px apart, a 1 mm gap: whole, exact-area preview and the piece after the lift); z_lasso_23 resizes the page by its corner to 1.05 and expects halo 3 and no dark pixel at the erased word. On the head before this commit: z_lasso_25 fails 3 checks (3,500, 3,900 and 242 dark pixels), z_lasso_26 fails 4 (822, 22, 24, 18), z_lasso_23's resize fails 2 (halo 4, 122). With the halo going by the estimate again (stroke_visible_runs in halo_shown) the same checks fail; with the exact-area join no longer broken at a hidden place, z_lasso_26 fails its preview check (24). Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…ng, the hand-over and a drag of ink showing nothing (#187) The review put back three lines one at a time and no test failed. Each is caught now: - An exact-area piece judged as if nothing erased it (its index the page's end, not its stroke's): z_lasso_23 lassoes the line across its gap in exact area and checks the gap with the selection, inside its box: 135 dark pixels with the revert (z_lasso_26 too, at its 1 mm gap: 18). - The lift's hand-over of what the preview found taken out: z_lasso_23's editor.halo_found reads 1 after the lift (the preview found the erased word, the selection did not again), 2 with the revert. - The halo leaving out ink the page shows none of (the retain in sel_draw_halo) taken out: it changes no pixel, but a drag of the erased word alone then walks the selection every redraw; z_lasso_23 checks editor.drag_inked is 0 after the drag, 1 with the revert. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
… answers -1 and what a fast refresh shows (#187) The probe took a key with junk among its numbers (display.dark.1.x.2.3.4 read as 1.2.3.4). probe_rect now takes exactly four; sim_sdl's display_dark_takes_exactly_four_numbers checks it (with the old parse it fails on 1.x.2.3.4). SIM.md says it answers -1 for anything else and while the panel and the screen differ in size (turned sideways), and that a fast refresh shows the paper's gray rules dark until grays settle them. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…d over erased ink, and the device checks (#187) DESIGN.md's live preview paragraph says what the halo goes along now (stroke_shown_runs: the page canvas held to the page's paper, the estimate only as a sure hidden and a stand-in), the shared cache and the probes editor.halo and editor.halo_found. LASSO-DESIGN.md 6.2 says the halo is not the estimate's, and that the estimate's erase strokes are indexed (Erasers) for its speed while the lasso is drawn; PIXEL-LASSO.md 2.1 gives the halo's rule and the timings before and after (Mac release, and the Kindle at 5 to 8 times). TESTING.md's issue 187 section names the tests as they are, and adds a small eraser scrubbing a word out in many strokes with a narrow gap, a wide marker line erased by narrower passes, and a resize of a selection holding an erased word; step 10 says what the lasso should do now. The changelog line says what the halo follows and that the lasso's work over erased ink is quicker. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…tled, not a fixed time after the eraser (#187) CI failed on two of the pull request's own checks: z_lasso_26 line 65 (display.dark 100 where 0 was wanted) and, on the run before, z_lasso_23 lines 41 and 42 (660 and 15). Both read the panel 300 ms after the precise eraser. The panel shows the eraser's fast refreshes, in which the paper's gray rules are dark, until its grays refresh; here that comes between 150 and 200 ms after the pen leaves, and a loaded runner sends it later. With every wait cut to a third the same lines fail here with CI's numbers. Each of those checks now waits for the panel to settle where it looks (waitfor display.stale.X.Y.W.H is 0, a rect at a time) instead of a fixed wait. The two other checks of this kind, z_lasso_23 after its second round of erasing and z_lasso_25 after its passes, waited a fixed 2000 ms against a settle that comes after 1.0 to 1.5 s there (the pen near, or just tapped); they wait the same way now. With every wait of the four scenarios cut to a third they all pass; cut to a sixth or a twentieth, the only checks that fail are the lasso preview's own while the lasso is drawn (editor.preview_batches, editor.halo), which follow the pen's timing, none of the panel's. z_lasso_24 passes with every wait cut to a twentieth. Each of the four ran 30 times, 15 at once beside 15 busy loops (load average up to 38), and 30 times more so with every wait 400 ms late (GRIMOIRE_SIM_LATE_MS): all 240 runs passed. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
…ower than the ink is not bridged (#187) One pass of the precise eraser across ink wider than the pass still got a halo across the cut, as on main, though the page shows nothing there: a 2.8 mm marker line cut by a 2 mm pass drew 156 dark pixels in the cut with the line selected, the highlighter (5.6 mm) cut by a 2 mm or a 4 mm pass 288. stroke_shown_runs judged a sample by the pixels within its ink's radius, and in the cut that disc reached the ink either side. A sample of the spine now shows only when the page also shows ink across the stroke at it: a pixel darker than the paper by more than INK_SHOWS levels, outside the hard cores of the erasing, in a strip square to the spine (the ink's radius each way, a pixel along), the direction taken over 2 px of spine either side (spine_places). The test near it stays as it was (one black pixel's worth within the ink's radius), so the faint pixels an eraser's rim or a resize leaves still get no halo. The spine's samples can be a millimetre apart; between two that both show, where erasing reaches the stretch, places 2 px apart are judged across too (places_between), so a cut that passes between two samples has one inside it. ink_shows looks near and across in one pass, from the pixel under the place. What stays as it was: an eraser beside ink without touching it hides nothing of any tool at the pressures the head showed whole (the pencil's lightest hairline is broken near erasing as on the head, the same runs on six seeds at pressures 0.1 to 1.0); the verifier's picture page, zoomed page, moves over other ink, resizes and full pages give the same halo counts and display.dark readings as the head, and z_lasso_23, 25 and 26 pass with Invert colors. Finding what shows of every stroke of the review's erased-rows page (1,200 strokes, 570 reached) takes 7.5 ms against the head's 6.9 (medians of 8 alternating runs, release build without LTO, Mac, shared machine); a page without erasing is unchanged. Tests: test_lasso halo_across_a_narrow_cut (the marker and the highlighter cases above, a slant, a line drawn with points as close as a pen's, a 1 mm cut between two samples, and an eraser beside ink of every tool), z_lasso_27_erased_narrow_cut (a marker line and a highlighter line, each cut across by one 2 mm pass, with the page selected). On 852a88b the unit test fails all six cuts (drawn whole across the cut) and the scenario reads 156 and 288 dark pixels. Reverts on this tree: no places between samples fails the 1 mm cut between samples; no strip at the samples fails five cuts and z_lasso_27 (156, 288). DESIGN.md, LASSO-DESIGN.md 6.2 and PIXEL-LASSO.md 2.1 say how the halo is judged now; TESTING.md names the new tests and adds a narrow cut across a wide line and a highlighter line to step 12. Refs #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cause
The issue has two reports: faint marks during a lasso selection where ink was erased, and a lasso that "kept cutting off" over a region dense with such ink.
The faint marks. A lasso selection, and the live preview while the lasso is drawn, draw a dotted halo around the selected ink (
sel_draw_halo). It was drawn along every point of every selected stroke. Erased ink stays in the page file under the erase strokes that cover it until the notebook is compacted (docs/FORMAT.md), and the lasso selects it: a partly erased stroke by what shows of it, a stroke with nothing showing by its whole spine (LASSO-DESIGN.md 6.2). So each lasso drew a dithered outline of every word erased wholly and bridged every erased gap, on the page copied from and on the page pasted to. The marks were on the screen only, but came back with every selection, after a page turn or a restart too.The first fix in this pull request drew the halo by the enclosure's estimate of what shows, which counts a sample as erased only when one erase stroke's hard core covers the whole width of its ink. Ink erased by several passes, none wide enough alone, still got its halo over plain paper: a wide marker line erased by narrower passes, a thin line scrubbed out by a small eraser, a narrow gap, and a word whose passes a resize moved apart (the points scale, the widths stay in mm). The second judged each sample by the page's pixels within its ink's radius; across a cut narrower than the ink is wide that disc reached the ink either side, so one pass of a 2 mm eraser across a 2.8 mm marker line or a highlighter line still got a halo across the cut, as on main.
The lasso cutting off. The live preview judges each stroke the lasso reaches, on the pen's path. Judging held every sample to every segment of every erase stroke near it, measuring that segment's dab again each time, so a batch over much erased ink cost about 5 times a batch over a like region. On a page of 1,160 words with its middle rows erased, the worst batch was 18.4 ms round those rows and 28.3 ms round the whole page (release build, Mac): about 92 to 147 and 142 to 226 ms on the Kindle at the 5 to 8 times PIXEL-LASSO.md gives. The kernel drops pen events when Grimoire's thread is held up for more than about 120 to 175 ms (pensync.rs), and the lasso then joins its tail straight across.
The fixes
stroke_shown_runs, lasso.rs). For a stroke that an erase stroke after it in scope reaches, a place of its spine shows where no dab of those reaches its ink; where one hides it by the estimate it does not; anywhere else it shows when the page shows the stroke's ink across it (a pixel darker than the paper in a strip square to the spine, the ink's radius each way and a pixel along) and, at a sample of the spine, near it (the pixels within its ink's radius as dark as one black pixel in all: a faint pixel or two an eraser's soft rim leaves does not count), leaving out pixels one of those erase strokes covers with its hard core, where none of the stroke's own ink is left (ink drawn there after the erasing is another stroke's). The places are the spine's samples (up to a millimetre apart) and, between two that both show where erasing reaches, places 2 px apart, so a cut that passes between two samples has one inside it. Layers and floors are taken as the enclosure takes them. A run beside a hidden stretch ends where its ink stops, less the ink's radius, so the halo's band stays out of a narrow gap. The exact-area preview draws only the judged samples the page shows and never joins two across a place it does not. Ink the page shows nothing of has no halo, and the preview sends no refresh for it when it flips.halo_shown,SelMode.visible): found once for each stroke while the page stays as it is, and handed over at the lift. What a redraw finds is kept even when it has nothing to draw: before, a selection of ink erased wholly that the preview did not hand over (after a move, a resize, a paste) found it again at every redraw, 67 ms each for 460 such strokes on the Mac against 2.3 ms on main.Erasers, lasso.rs): each erase stroke's cores are measured once, and its segments are grouped in chunks of 16 with their boxes, so a sample meets only the segments near it. The answers are the same as before, to the bit.stroke_visible(Copy's pruning) and theeditor.haloprobe use the same code as the rest, not copies of it. The probedisplay.darktakes exactly four numbers.The enclosure, what a lasso selects, is unchanged.
Timings
The review's page (1,160 words, the middle rows erased wholly by 300-point zigzag passes), slow lassos with a point every 20 px, per preview batch including its redraws; release build on the Mac with timing lines added for the measurement only, the machine shared (load about 4 to 6). The Kindle is taken as 5 to 8 times slower (PIXEL-LASSO.md).
The index alone took the worst batch round the erased rows to 1.6 ms; the halo's reading of the page adds the rest. Judging each place across the stroke too: finding what shows of every stroke of that page (1,200 strokes, 570 reached by erasing), what the first redraw after a select-all or a move pays once, takes 7.5 ms against 6.9 ms before (medians of 8 alternating runs, release build without LTO, Mac); a page with no erasing takes 0.01 ms either way. Before, the worst batches reached 92 to 147 ms (erased rows) and 142 to 226 ms (whole page) on the Kindle, and each redraw after the move 0.34 to 0.54 s.
Tests, and how each was shown to fail
test_lassohalo_across_a_narrow_cut(new): one pass across ink wider than it, a 2.8 mm marker line cut by a 2 mm pass (also on a slant, and drawn with points as close as a pen's), the highlighter by a 2 mm and a 4 mm pass, and the marker by a 1 mm pass between two samples of its spine: two runs, their band short of the cut's middle and reaching its edge, ink at each run's end. And an eraser beside ink of every tool, light and firm, without touching it, hides nothing (the pencil's lightest hairline is broken near erasing as before, from half pressure). On 852a88b all six cuts are drawn whole across the cut.test_lassohalo_follows_the_page: a 2.8 mm marker line erased by 7 passes of a 2 mm eraser, a line scrubbed by 1 mm passes 9 px apart, a 1 mm gap whose run ends keep the band out of its middle, ink drawn over an erased place after the erasing, a word put down 1.15 times as large whose page shows nothing while the estimate has 6 samples showing, and an erase stroke scoped to a floor after the ink. Each run sample has the stroke's ink near it on the page drawn.test_lasso_livejudging_erased_ink_is_indexed: the indexed judging gives the same answers as the rule written out (Erasers::plain) on 12 random pages with erased ink and a scoped floor and on a page of erased rows; a lasso round those rows makes at most 120,000 segment tests in a batch (68,459 now). With the index taken out the worst batch makes 355,451 and the test fails.z_lasso_25_erased_passes(new): the marker line under 7 passes, while the lasso is drawn and after, and a ballpoint line scrubbed out by 2 mm passes 18 px apart. On 2d7f50e: 3,500, 3,900 and 242 dark pixels where the page shows none.z_lasso_26_erased_small_eraser(new): the eraser at 1 mm, a line scrubbed by passes 9 px apart and a 1 mm gap, with the whole page selected, in the exact-area preview and on the piece after the lift. On 2d7f50e: 822, 22, 24 and 18 dark pixels.z_lasso_27_erased_narrow_cut(new): a 2.8 mm marker line and a highlighter line, each cut across by one 2 mm pass, with the page selected and after Done. On 852a88b: 156 and 288 dark pixels in the cuts, where the page shows none.z_lasso_23_erased_marks(extended): the erased word alone selected and moved (editor.halo_found1 after the lift, 2 after the drop and still 2 after the next redraw;editor.drag_inked0), the page resized by its corner to 1.05 (halo 3, no dark pixel at the erased word; on 2d7f50e halo 4 and 122), and an exact-area lasso across the line's gap.waitfor display.stale.X.Y.W.H is 0) instead of a fixed 300 or 2000 ms: CI failed z_lasso_26 (100 dark pixels) and z_lasso_23 (660 and 15) where the eraser's grays refresh came after the 300 ms; with every wait cut to a third the old lines fail so here, and the new ones pass with every wait cut to a twentieth (then only the lasso preview's own checks, timed by the pen, fail). Each of z_lasso_23 to 27 ran 30 times, 15 at once beside 15 busy loops, and 30 times more so with every wait 400 ms late (GRIMOIRE_SIM_LATE_MS): all 300 runs passed (load average up to 28). At 852a88b, z_lasso_23 to 26 the same way: 240 of 240.halo_found2 and 3 for 1; the exact-area join no longer broken at a hidden place fails z_lasso_26's preview check (24); an exact-area piece judged as if nothing erased it fails z_lasso_23 (135) and z_lasso_26 (18); the lift's hand-over taken out giveshalo_found2 for 1; the halo no longer leaving out ink that shows nothing givesdrag_inked1; the preview's skip of such ink taken out gives one refresh for none.display.darknumbers on this head as on 62ae5ac, and z_lasso_23, 25 and 26 pass with Invert colors.Gate
GRIMOIRE_TEST_PORT=9990 caffeinate -i make -j8 checkon this head (71918fa) passed: make's own last line is "CHECK PASSED" (exit 0), with 564 scenario runs and the 8 late ones, none failed. The Kindle binary is 11,429,136 bytes (guard 13,000,000; 11,425,904 at 62ae5ac) and Grimoire.zip 5,960,772 bytes (guard 7,000,000). No new strings.For the owner
Closes #187
🤖 Generated with Claude Code
https://claude.ai/code/session_01Uoe9ZJNyEZYoc4bsjqbSyQ