cap: name the grant row, and drop the lookup that Plan already had #98

Merged
PerishFire merged 1 commit from cap-deed into main 2026-07-21 05:51:12 +00:00
Owner
No description provided.
cap: name the grant row, and drop the lookup that Plan already had
All checks were successful
guard / guard (pull_request) Successful in 33s
765f601025
Deed wraps the @grant Row that check and broad were reading through
cell(deed, "who") and friends. Once the row has a name, the predicates
about it become its methods: verb_hit is does, who_hit is names, bearer
is bears, and held moves onto it too -- which is where its fifth argument
went, since the deed stops being one. broad reads the same way.

pred_hit and anchors were both about the Mark, not about a plan: a mark
either suits a scope predicate or it does not, and the root chain is
walked up from the mark. Both become Mark methods, so the two plan-first
arguments stop being receivers in disguise.

seat(plan, table) was Plan::find spelled again. find already falls back
to comparing ddl::table, and ddl::table is idempotent lowercasing, so for
the table-shaped strings all five call sites pass, the two are the same
function. seat is deleted rather than moved.

Separately, the scanner's take() was tripping the dispatch law: two
sequential ifs comparing the same byte to different constants is a match
written longhand. It is a match now, and `if i >= bytes.len()` folds into
bytes.get(i)?.

That path had no test at all, which is why I only found it by rewriting
it. tests/query/parse::escapes now covers a quoted-and-backslashed value
through parse and through digest's escaping, and it fails if take's
escape arm is broken. Worth recording what it also showed: digest output
is deliberately NOT re-parseable -- it emits "slice live", which the
grammar does not accept -- so digest is a canonical key, not a query.

Debt 34 -> 26: dispatch 1 -> 0, param 3 -> 2, receiver 9 -> 6, word
21 -> 18. cap/ source is clean; what is left there is one test name.

guard clean, 46 tests green on sqlite and on real postgres.
PerishFire deleted branch cap-deed 2026-07-21 05:51:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/keel!98
No description provided.