Policy naming¶
This page is generated from the PhiSQL spec artifacts for v1.0. Do not edit it by hand; change the artifact and rebuild.
The Phileas JSON policy schema has no top-level name or description field; policy identity comes from the filename. These rules bridge that convention with PhiSQL's optional POLICY declaration.
Policy name¶
The policy name is the file basename (with the .phisql or .json extension stripped). This matches the existing convention in philterd/pii-redaction-policies and how Phileas resolves policies by name today.
The POLICY declaration¶
The POLICY
Consistency rule¶
When the filename is known and a POLICY name is declared, the declared name must match the file basename after normalization (hyphens and underscores are treated as equivalent). A mismatch is a compile error.
Catches the common bug where someone copies a .phisql file to a new name and forgets to update the POLICY declaration inside.
Compiling from a string¶
When PhiSQL is compiled from a string with no associated filename (e.g., embedded in a tool's UI, included in another configuration format), the POLICY declaration is the only source of the name. If absent, the policy name is null and the caller must provide one.
The DESCRIPTION clause¶
The DESCRIPTION '