Reject requests whose only authorization exceeds the delegation-depth limit Original fictional practice · CC BY 4.0 · 2026-11-11 TASK The local policy permits at most one membership hop. At each request day consider exact-resource unexpired allows and all-depth denies. Return request_id,minimum_allow_depth only when some otherwise valid allow exists, no applicable deny exists, but every allow requires more than one hop. Public or direct allow depth is0. Sort request_id. OUTPUT request_id, minimum_allow_depth RULES The local policy permits at most one membership hop. At each request day consider exact-resource unexpired allows and all-depth denies. Return request_id,minimum_allow_depth only when some otherwise valid allow exists, no applicable deny exists, but every allow requires more than one hop. Public or direct allow depth is0. Sort request_id. Return exactly the declared columns and order. Money uses integer cents; time and date units follow the task and field dictionary. NULL is unknown and differs from numeric zero. These are original fictional records and exercise policies. Scenario data may be shared with related tasks, whose decisions and output contracts differ. FIELD DICTIONARY grants: id INTEGER — Stable source record identifier; not a row position. principal TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. effect TEXT — Permission outcome, allow or deny. expires INTEGER — Expiry boundary; the goal declares whether equality is eligible. mask INTEGER — Privacy mask level; higher values require stricter masking. members: member TEXT — Literal business key or category label. Match exactly and retain NULL where present. parent TEXT — Immediate parent identifier, or NULL for a hierarchy root. requests: id INTEGER — Stable source record identifier; not a row position. user TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. day INTEGER — Integer day index, or ISO YYYY-MM-DD date when stored as text; the task declares cutoff semantics. approvals: id INTEGER — Stable source record identifier; not a row position. requester TEXT — Literal business key or category label. Match exactly and retain NULL where present. approver TEXT — Literal business key or category label. Match exactly and retain NULL where present. resource TEXT — Literal business key or category label. Match exactly and retain NULL where present. METHOD The local policy permits at most one membership hop. At each request day consider exact-resource unexpired allows and all-depth denies. Return request_id,minimum_allow_depth only when some otherwise valid allow exists, no applicable deny exists, but every allow requires more than one hop. Public or direct allow depth is0. Sort request_id. For the first output record, request_id = 4; minimum_allow_depth = 2. Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV. COMMON WRONG TURN Unbounded membership reachability alone would authorize deeply delegated resources that the one-hop policy deliberately rejects. RESULT CHECK For the first output record, request_id = 4; minimum_allow_depth = 2. Use setup.sql in a fresh SQLite database and run your own SELECT or WITH. reference.sql and expected.csv contain the full worked answer. All CSVs have UTF-8 headers; empty output fields represent NULL. The browser executes SQLite, not Excel formulas. No spreadsheet function engine is claimed.