Test Rules
Use the public harness to exercise discovery, compilation, and Rules evaluation:RuleCase.files adds supporting project files. RuleCase.config supplies option values. Include
passing cases, failing cases, near misses, and exact source-position assertions.
Repository pytest files remain outside the SQLBuild project’s SQL tests/ directory.
Helpers
Custom Rules can import repository-owned helpers underrules/ and supported pure Python modules.
Changing an imported helper invalidates the Rules that depend on it.
Only decorated functions register. Ordinary functions, constants, dataclasses, and classes remain
helpers.
Deterministic inputs
Direct filesystem, environment, clock, randomness, network, and subprocess access is rejected. Those inputs cannot be reproduced safely by the Rules cache. Read supported project text and structure throughctx.project.tree:
glob returns no paths, adding a matching
path invalidates the cached result.

