Commit graph

1 commit

Author SHA1 Message Date
b1977c27ac feat(tools): a re-measurable grid-table reach instrument for K3 [skip-docs]
`tools/okf_table_measure.py` answers how far Arm E's join reaches and what it
costs, and it imports `find_candidates`, `_GRID_RULE`, `_TABLE_ROW` and both
rule names from the shipped module rather than carrying a copy.
`tests/test_table_measure.py` pins that with `is`, not `==`: `re.compile`
returns a distinct object for an equal pattern, so equality would be satisfied
by a pasted literal and only identity catches it. `draw_sample` is imported
from `okf_outline_measure` for the same reason -- one K3 draw in the
repository, not two that can disagree.

The column this round actually needs is the `|`-row count, for EVERY file
including the ones the door refuses. It is the ceiling: a document with no
table row cannot be moved by this arm. Asserting the ceiling from entry counts
instead would assume the orphan check kept every table candidate, which nobody
measured -- and one of the K3 sample documents produces no plan at all, so its
zero would be an absence with no denominator.

Constants split the way `okf_outline_measure.py` splits them. 38 grid-rule
lines across 3 documents is a DECLARED expectation measured before the rule was
written; a different value means the shipped grammar is not the measured one
and no figure below it may be read. The Arm D entry totals are REFERENCE
values, printed beside the measured ones and gating nothing.

A file the door refuses becomes a `Row` with its reason named rather than a
missing row, because `extractable / len(rows)` is the door count this round
reports as 39/43 and a silent drop would make it unmeasurable.

Tests first: 7 red (the module did not exist), then green. 1251 -> 1258.
[skip-docs] on the same measured precedent as the flag commit: `grep -c` for
"okf_outline_measure" and "okf_cid_measure" in README.md returns 0. A
measurement instrument is documented by its own docstring and by the round's
report, and it never enters the wheel.
ruff check: exit 0. ruff format --check: exit 0. mypy --strict src/ tools/:
28 files, Success. pytest -q: exit 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 10:56:12 +02:00