*Continent · 2 territory*
## Summary
A governance spec and its README describe how a query's row count and destructive-SQL flag are derived facts computed by the integrator's functions, and expectations.md states that lines 3 and 4 must report a 1000-row limit and that line 4's executor must receive it.
## Explanation
- In README.md, a row count is a derived fact taken from the SQL's LIMIT clause, and a query whose requested row count is within 1000 gets ALLOW with its limits reported on line 3; in expectations.md, claude's expectations say lines 3 and 4 must report a limit of 1000 rows and that line 4's executor must receive them.
- `requested_rows` is a derived fact taken from the SQL's `LIMIT` clause.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
- In SPEC.md, the /1 request example's facts are a destructive-SQL flag of false, 500 requested rows, and an approvedBy value.
- The /1 request example's facts are { sql_is_destructive: false, requested_rows: 500, approvedBy: … }.
- README.md says the requested row count is a derived fact taken from the SQL's LIMIT clause.
- `requested_rows` is a derived fact taken from the SQL's `LIMIT` clause.
- README.md says a query whose requested row count is within 1000 gets ALLOW with its limits reported, on line 3.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- In expectations.md, claude's expectations say lines 3 and 4 must report a limit of 1000 rows, and that line 4's executor must receive them.
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
- In SPEC.md, derived facts such as whether SQL is destructive are not bound: they are facts the tool requires, computed by functions the integrator declares to the harness, never by the requester and never by a model, and a missing one is refused as a required fact.
- Derived facts (sql_is_destructive from sql) are NOT bound: they are facts the tool requires, computed by functions the integrator declares to the harness, neve…
- Nothing in these records says whether lines 3 and 4 were run or what they returned.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
## Threads
- The requested row count taken from a query's LIMIT clause and the 1000-row limit reported on ALLOW
- `requested_rows` is a derived fact taken from the SQL's `LIMIT` clause.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- Lines 3 and 4 reporting a 1000-row limit and line 4's executor receiving it
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
- Derived facts such as the destructive-SQL flag computed by the integrator's functions, never by the requester or a model
- Derived facts (sql_is_destructive from sql) are NOT bound: they are facts the tool requires, computed by functions the integrator declares to the harness, neve…
- The /1 request example with a false destructive-SQL flag, 500 requested rows and an approvedBy value
- The /1 request example's facts are { sql_is_destructive: false, requested_rows: 500, approvedBy: … }.
## How it formed
On Oct 18, README.md and expectations.md set out the row-count fact, the 1000-row limit and the line 3 and line 4 requirements; on Oct 19, SPEC.md added the /1 request example and the rule that derived facts are computed by the integrator's functions.
- `requested_rows` is a derived fact taken from the SQL's `LIMIT` clause.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- The /1 request example's facts are { sql_is_destructive: false, requested_rows: 500, approvedBy: … }.
- Derived facts (sql_is_destructive from sql) are NOT bound: they are facts the tool requires, computed by functions the integrator declares to the harness, neve…
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
## What's still open
Whether lines 3 and 4 were run, and what they returned, is not stated.
- A query whose `requested_rows` is within 1000 gets `ALLOW` with `limits` reported (line 3).
- Lines 3 and 4 must report `limits` `{ max_rows: 1000 }`, and line 4's executor must receive them.
## Consultant
**Where it shows up** — The 1000-row limit keeps coming up: README.md says a query within 1000 rows gets ALLOW with its limits reported on line 3, and expectations.md requires lines 3 and 4 to report a limit of 1000 rows with line 4's executor receiving it.
**A question to sit with** — When a query's requested row count is derived from its LIMIT clause, what should happen to a query that states no LIMIT at all?
**A way forward** — Keep the derived-fact route: write down, next to the 1000-row limit, which function computes requested rows and which computes the destructive-SQL flag, so the harness and the integrator's declarations line up.
## Ideas
- Facts a tool needs should be computed by functions the integrator declares to the harness, never by the requester or a model.
- A decision should refuse, naming the fact, when a needed fact is absent rather than assume a value.
## Territories
- [[Bevia/World/Territories/Row limit reported and passed to the executor|Row limit reported and passed to the executor]]
- [[Bevia/World/Territories/Derived facts computed by integrator-declared functions|Derived facts computed by integrator-declared functions]]