research: lettering behind the art in the field — harness checks, an unprompted experiment (X12b), the production design #205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "research/typeset-behind-the-art-field"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After #194 the owner asked: "What tools do we need to provide to allow AI models 'in the field' in our harness to handle such a situation well?" The situation is zh-06's wall of inner monologue running behind a head that breaks into its panel. In Orihon the model is whatever the user configured (ADR 0015). It works through bound tools in ADR 0030's plain words, and nobody tells it that a wall runs behind a head; the X12 agents had been told twice. This PR builds the harness-side checks, tests what an untold agent does, and refreshes the production design against current main (#192–#203). It changes no production code.
What's in
X12f: two checks that need no model's eye (
findings/x12f-field-checks.md+.json;tslab/occlude.py,source.py,session.py,cli.py,auto.py)inspect_sourcesays when a region's lettering stops on an edge of art in front, and offers a readymeasure_occluderrequest, now just a box and a clip.past_box(a mask reaching its box's side) is recorded as not to port. It never fired on the boxes that cut the head.--no-occlusion-hint, turns the hint off for experiments;--fromkeeps the source session's setting.measure_occluder's tool text loses its example, "(a head over a wall of text)".X12b: what an untold agent does, one lever at a time (
findings/x12b-field.md+.json)The runs used zh-06n: zh-06's scan and plate, with every cue removed from the notes and the
[hidden]markers removed from the source. Six arms ran two sessions each. The sessions were made beforehand, so no arm saw the switch. The typesetters ran from a neutral git branch, so their context named nothing. An audit of all 12 transcripts found no file opened outside each run's lane.inspect_source+ region line)behindbehindas protection and kept every word clear of the art. In 3 of 4 runs it was the hidden-words warning that moved the wall above the head.The production design (
findings/field-behind-the-art.md) is refreshed against main and the evidence above. Everything in it is a proposal:SYNTHESIS.mdgains "In the field (2026-10-16)". The report's "Behind the art" section gains an "In the field" part with a compare of all arms.README.mdlists X12f, X12b and the design.findings/briefs/task-messages.mdnow uses #203's stage-labelled note lines.Tests
past_boxand the switch. They pass forwards and with the test files in reverse order.cut.py checkis ok (429 images, 10.72 MB of 15 MB).Honest notes
finish;inspect_sourcemisreads r3 as one horizontal line.🤖 Generated with Claude Code
Summary
Summary
Coverage
Orihon.BlazorAdapter - 96.6%
Orihon.Domain - 100%
Orihon.Infrastructure - 98.4%
n
ration
n
one
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 95.2%
Orihon.UseCases - 94.6%
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__BalloonWords_7
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__Capital_0
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__CoordinateWords_1
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__JustBefore_4
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__KindWords_5
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__OutlineWords_6
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__PositionalProse_2
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__SideOfTheBox_3
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A whole harness that teaches any model to see the wall behind the head — evidence checks, a grabcut that finally knows lettering is ground, a six-arm blind experiment, and a design doc that admits its own blind spots? I read every line of the tslab diff twice, ran the new tests, and mutated your babies to see if their guardians were awake~ ♡
Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
tslab/source.py:543(line_ends) — a reachableIndexErrorcrash ininspect_source, reproduced mechanically. The grey step is read atpin, but onlyfaris bounds-checked (2 < far < h-3).pinsits one px inside from the line's end, and when a band column's first ink within the reach is the window's last row,pinlands one row past the window — and pastgboxwhenever the window is flush with the page edge (win[3] == H, which is any region whose bbox lies withinSEARCH(6 px) of the page bottom — bottom-panel text). Repro (page 320×380, one 30 px glyph block at x 60–89 / y 349–378, plate keeps the 1 px strip at x 75 uncleaned, one ink speck at (75, 379), region bbox[50, 340, 100, 380]):inspect_sourceruns on every region in every path (Session.inspect,auto.pyfacts,english_lines) — one such region kills the whole call. The same unclampedpinalso silently wraps via negative indexing whenpin[0] == -1at a window flush with the top. The same geometry exists for horizontal rows at the page's right edge.Fix: guard
pinexactly as you guardfar—if not (gbox[1] <= pin[0] < gbox[3] and gbox[0] <= pin[1] < gbox[2]): continuebefore theg[...]reads (or clampgboxto provably containpin ± (CUT_PAST + 1)), and add an edge-of-page test totest_source_occlusion.pyso this path is never unguarded again.tslab/source.py:610(occlusion) — the "two or more cut lines" trigger has no test. Mutation probe:len(cut) >= 2→len(cut) >= 3and all 6 tests intest_source_occlusion.pystill pass. Every fixture either cuts ≥ 3 columns (the wall) or a single line belowCUT_SHARE— the designed rule "two lines cut on one side, each underCUT_ONE(75 %), is art in front" (SPEC's words, the PR's words!) is a branch no test exercises. fufu~ you wrote the rule down twice but never once made it prove itself? A mutant that deletes your exact threshold survives~ ♡Fix: one test with exactly two columns cut at share 0.5–0.75 (no high-share line) asserting the hint fires, and its mirror (one such column alone → quiet).
💡 Little ideas (non-blocking)~
tslab/check.py:599— the[info] … hides none of this block's letteringbranch ofevidence_lintsis never asserted anywhere; only the warn branch is (I mutated the near-bandbto 0 andtest_the_tools_check_the_mask_and_the_pagecaught it — the counting is well guarded, only the info string itself is unwatched). One block placed behind the mask but away from the places would pin it.ci.ymlis dotnet-only), so "CI green" says nothing about this PR's real surface. If a python-capable runner ever becomes available, a lab job would let reviewers cite CI instead of reinstallingskia-pythonby hand~ (I verified locally: 397 collected, the 39 in the five touched files all pass.)✅ What I liked~
GC_PR_BGDfrom the scan's lettering, erodedGROUND_ERODEfirst, explicit bg seeds still win — andtest_grabcut_starts_the_scan_s_lettering_as_groundproves it with IoU < 0.8 vs > 0.95 on both arms. That's how you make an 0.13 → 0.98 claim believable~Session.inspectas the single gate for the hint —auto.pyandcli.pyboth routed through it, so the switch can't leak. DRY done right, andtest_occlusion_switch.pycovers on/off/--frominheritance/flag override exhaustively.past_boxwith its on-clip and on-page-edge negatives, theDEMOTEladder tested at every step,Occluder.evidenceround-tripping throughasdict— the state machine holds together.EVIDENCE_BAND,CUT_*,PAST_*), and an honest-notes section that names its own one-page tuning bias. Knowledge recorded this carefully makes me giddy~ ♪Automated review by Jibril · 2026-10-16
CI: green for head SHA (dotnet build+test; the Python lab suite is not in CI) · Mutation probes: 3 run, 1 survived (occlusion 2-line rule), 1 killed (evidence near-band), 1 crash repro confirmed · Local suite: 39 targeted tests pass (all five touched files), 397 collected
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.