Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
36ca0a7
chore(syntax-coverage): pin the receipts for the corrected list-item …
kvlonge Nov 14, 2026
496310b
chore(syntax-coverage): record the reviews of the corrected list-item…
kvlonge Nov 14, 2026
b78f907
feat(syntax-coverage): count a refusal after parsing from a statement…
kvlonge Nov 14, 2026
78dce7c
feat(syntax-coverage): audit forms without obligations and settle gen…
kvlonge Nov 14, 2026
bddfe26
feat(syntax): record Snowflake statements as structured trees that ke…
kvlonge Nov 14, 2026
10bf3b1
feat(syntax-coverage): count Snowflake's syntax error from a statemen…
kvlonge Nov 14, 2026
8303f5b
fix(snowflake): reject a bare word in UNDROP IDENTIFIER( ) and stop e…
kvlonge Nov 14, 2026
bc0b450
fix(syntax-receipts): read errno 90105, no current database, as a pos…
kvlonge Nov 14, 2026
e45d798
chore(syntax-coverage): pin the evidence with two more recording batches
kvlonge Nov 14, 2026
d711c06
chore(syntax-coverage): record the reviews of 493 forms read against …
kvlonge Nov 14, 2026
137abdd
chore(syntax-coverage): drop unobservable entries the new receipts se…
kvlonge Nov 14, 2026
7baa333
chore(syntax-coverage): record the reviews of 11 forms judged again a…
kvlonge Nov 14, 2026
a82e6e2
fix(syntax-cases): settle observed cases from probe-role receipts und…
kvlonge Nov 14, 2026
0841e7c
chore(syntax-coverage): pin the evidence whose observed cases settle …
kvlonge Nov 14, 2026
1850510
fix(snowflake): refuse a trailing comma in more lists Snowflake rejects
kvlonge Nov 14, 2026
1bc88e4
fix(snowflake): refuse tags on CREATE OR ALTER SECRET and DEFINE SECRET
kvlonge Nov 14, 2026
182dfe2
fix(snowflake): read DROP ACCOUNT with its grace period and DROP MANA…
kvlonge Nov 14, 2026
11e2459
fix(snowflake): read CREATE OPENFLOW CONNECTOR, DEPLOYMENT and RUNTIM…
kvlonge Nov 14, 2026
03e9f3d
fix(snowflake): refuse a bare word where Snowflake takes only a string
kvlonge Nov 14, 2026
265e981
fix(snowflake): refuse OR REPLACE with IF NOT EXISTS on warehouses
kvlonge Nov 14, 2026
352613f
fix(snowflake): accept an online feature table without a warehouse
kvlonge Nov 14, 2026
7d8c3b5
fix(snowflake): accept one string as a share's SET ACCOUNTS
kvlonge Nov 14, 2026
a4a942d
chore(syntax-coverage): record the re-reviews of forms whose receipts…
kvlonge Nov 15, 2026
b0f2b60
fix(syntax-catalogue): type the committed catalogue file as tables of…
kvlonge Nov 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions coverage/syntax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Families: `query`, `dml`, `ddl`, `transaction_session`, `security_admin`, `utili
```sh
python -m scripts.fetch_syntax_docs_snowflake CACHE CACHE/idx/* # private cache, never committed
python -m scripts.build_syntax_catalogue_snowflake --cache CACHE --out coverage/syntax
python -m scripts.build_syntax_catalogue_snowflake --refresh --cache PAGES --out coverage/syntax
python -m scripts.build_syntax_obligations_snowflake ddl query # obligations, withdrawn, elisions
```

Expand All @@ -51,9 +52,12 @@ whose inputs or generated files changed since `EVIDENCE_BASE`, and passes when n
`SYNTAX_OBLIGATIONS_SINCE=` (empty) it checks every family, as CI's nightly run does.

Pages with no Markdown export (the per-category command hubs) are fetched as HTML and catalogue
no form. A rebuild keeps every existing id whose (page, grammar) is unchanged. A form whose
grammar changed keeps its id when its natural id is unchanged or when all its earlier signatures
are still among its signatures. A form whose grammar no longer appears keeps its id with
no form. `--refresh` rebuilds only the pages its cache holds, such as pages that changed since
the pin, and keeps every other page's sources record and forms as committed. A rebuild keeps
every existing id whose (page, grammar) is unchanged. A form whose grammar changed keeps its id
when its natural id is unchanged, when all its earlier signatures are still among its signatures,
or when its id is its natural id with the heading or number a collision appended. A form whose
grammar no longer appears keeps its id with
`status = "absent_from_source"`; ids are never reused, and splits and renames go through
`aliases.toml`.

Expand Down Expand Up @@ -135,6 +139,9 @@ collision the heading is appended, then a number.
IMPORTS, FROM LISTING), so a receipt decides it. An observed neighbour still settles as a
rejection when its receipt is a syntax error, unless Snowflake refuses every documented positive
of its form: then the form's receipts say nothing about its negatives, which all stay observed.
A generated accept or reject that its agreeing receipts disprove is decided by them the same
way: an accept falls only to a syntax error, a reject to an accepted parse. Cases that quote a
page and boundary cases keep their expectation.
- A rejection that only empties a list (`= ( )`) is observed, not scored: Snowflake parses
`ENCRYPTION = ( )` and accepts `BLOCKED_NETWORK_RULE_LIST = ( )`, and pages document empty
lists such as `BLOCKED_OBJECT_TYPES_FOR_CREATION = ()`.
Expand All @@ -160,7 +167,3 @@ collision the heading is appended, then a number.
(2 forms).
- GRANT OWNERSHIP to a database role keeps `<class_name>` in the object-kind string, case-folded
and without a quoted flag (1 form).
- Six docs pages changed after the catalogue pin (TASK_HISTORY, COMPLETE_TASK_GRAPHS,
CURRENT_TASK_GRAPHS, CREATE SECRET, CREATE NETWORK RULE, ALTER ICEBERG TABLE ... CONVERT TO
MANAGED). Their 16 forms keep the pinned grammar, so the new options have no obligations; 4
of them are rejected on the changed grammar.
11 changes: 0 additions & 11 deletions coverage/syntax/arity/functions.jsonl

Large diffs are not rendered by default.

7,018 changes: 6,316 additions & 702 deletions coverage/syntax/baseline.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions coverage/syntax/catalogue/ddl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2975,9 +2975,9 @@ source = "doc.sql.alter-iceberg-table-convert-to-managed"
anchor = "Syntax"
kind = "statement"
grammar = [
"ALTER ICEBERG TABLE [ IF EXISTS ] <table_name> CONVERT TO MANAGED [ BASE_LOCATION = '<directory_for_table_files>' ] [ STORAGE_SERIALIZATION_POLICY = { COMPATIBLE | OPTIMIZED } ]",
"ALTER ICEBERG TABLE [ IF EXISTS ] <table_name> CONVERT TO MANAGED [ { FILE_PATH | BASE_LOCATION } = '<directory_for_table_files>' ] [ DROP_FROM_SOURCE_CATALOG = { TRUE | FALSE } ] [ STORAGE_SERIALIZATION_POLICY = { COMPATIBLE | OPTIMIZED } ]",
]
grammar_sha256 = "8806be21dd257b49c8b80092e69a03ff5076ed229628c00120d3bc9211fceaf0"
grammar_sha256 = "9a5d15fcfecd63687b7abce854231c7fd42738611f9059d1b65bea794dbf8234"
uses = []
status = "catalogued"

Expand Down
12 changes: 6 additions & 6 deletions coverage/syntax/catalogue/functions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2426,9 +2426,9 @@ source = "doc.functions.complete_task_graphs"
anchor = "Syntax"
kind = "special"
grammar = [
"COMPLETE_TASK_GRAPHS( [ RESULT_LIMIT => <integer> ] [, ROOT_TASK_NAME => '<string>' ] [, GRAPH_NAME => '<string>' ] [, ERROR_ONLY => { TRUE | FALSE } ] )",
"COMPLETE_TASK_GRAPHS( [ RESULT_LIMIT => <integer> ] [, ROOT_TASK_NAME => '<string>' ] [, GRAPH_NAME => '<string>' ] [, ERROR_ONLY => { TRUE | FALSE } ] [, GRAPH_RUN_GROUP_ID => '<string>' ] )",
]
grammar_sha256 = "0c9217ea25f77d3a951a5a99e4025b8b4d991094940c5652be2be52c01b82642"
grammar_sha256 = "b2183b4d8b2f085e3548e617871a3f0c8291398b9c2d5b51325def925ae9eb64"
uses = []
status = "catalogued"

Expand Down Expand Up @@ -3053,9 +3053,9 @@ source = "doc.functions.current_task_graphs"
anchor = "Syntax"
kind = "special"
grammar = [
"CURRENT_TASK_GRAPHS( [ RESULT_LIMIT => <integer> ] [, ROOT_TASK_NAME => '<string>' ] [, GRAPH_NAME => '<string>' ] )",
"CURRENT_TASK_GRAPHS( [ RESULT_LIMIT => <integer> ] [, ROOT_TASK_NAME => '<string>' ] [, GRAPH_NAME => '<string>' ] [, GRAPH_RUN_GROUP_ID => '<string>' ] )",
]
grammar_sha256 = "9157b3c4dde04de6807827b3fe7938bcd46819580a62c9419458b84026fdf71f"
grammar_sha256 = "54771568a74b7eee0ac7f10e90e5dc5534c4c47ebea1235a7d6d35957b82936c"
uses = []
status = "catalogued"

Expand Down Expand Up @@ -17303,9 +17303,9 @@ source = "doc.functions.task_history"
anchor = "Syntax"
kind = "special"
grammar = [
"TASK_HISTORY( [ SCHEDULED_TIME_RANGE_START => <constant_expr> ] [, SCHEDULED_TIME_RANGE_END => <constant_expr> ] [, RESULT_LIMIT => <integer> ] [, TASK_NAME => '<string>' ] [, DATABASE_NAME => '<string>' ] [, SCHEMA_NAME => '<string>' ] [, ERROR_ONLY => { TRUE | FALSE } ] [, ROOT_TASK_ID => '<string>'] [, GRAPH_ID => '<string>'] )",
"TASK_HISTORY( [ SCHEDULED_TIME_RANGE_START => <constant_expr> ] [, SCHEDULED_TIME_RANGE_END => <constant_expr> ] [, RESULT_LIMIT => <integer> ] [, TASK_NAME => '<string>' ] [, DATABASE_NAME => '<string>' ] [, SCHEMA_NAME => '<string>' ] [, ERROR_ONLY => { TRUE | FALSE } ] [, ROOT_TASK_ID => '<string>' ] [, GRAPH_ID => '<string>' ] [, GRAPH_RUN_GROUP_ID => '<string>' ] )",
]
grammar_sha256 = "00472dc502a6995312674266caaea3f3eca362682ba056ad331d6d50d282f5d0"
grammar_sha256 = "4cf2936873c57ac40afa121020f3212387ea9032e2e731712dd71eb1f6e617f6"
uses = []
status = "catalogued"

Expand Down
32 changes: 16 additions & 16 deletions coverage/syntax/catalogue/security_admin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5216,9 +5216,9 @@ source = "doc.sql.create-network-rule"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] NETWORK RULE <name> TYPE = { IPV4 | IPV6 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT | COMPUTE_POOL } VALUE_LIST = ( '<value>' [, '<value>', ... ] ) MODE = { INGRESS | INTERNAL_STAGE | SNOWFLAKE_MANAGED_STORAGE_VOLUME | EGRESS } [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] NETWORK RULE <name> TYPE = { IPV4 | IPV6 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT | COMPUTE_POOL } VALUE_LIST = ( '<value>' [, '<value>', ... ] ) [ MODE = { INGRESS | INTERNAL_STAGE | SNOWFLAKE_MANAGED_STORAGE_VOLUME | EGRESS } ] [ COMMENT = '<string_literal>' ]",
]
grammar_sha256 = "f75a9e6c34b9a4833cdcbcfcba0cbd9567595d799dcdebc1705562d840367978"
grammar_sha256 = "bae169c92d700c7790c3bdc4bb02e15d55115eb295bb10c8ee9f4ec81b899d4f"
uses = []
status = "catalogued"

Expand Down Expand Up @@ -5630,9 +5630,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = CLOUD_PROVIDER_TOKEN API_AUTHENTICATION = '<cloud_provider_security_integration>' ENABLED = { TRUE | FALSE } [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = CLOUD_PROVIDER_TOKEN API_AUTHENTICATION = '<cloud_provider_security_integration>' ENABLED = { TRUE | FALSE } [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "54c1adce4560bc0853b86ad927c01e6e40744c61f0f566e711a6b5fe6e5821ad"
grammar_sha256 = "e89f322b2c44f5898e8a5ece3d58cba84b5ee14b4d9dee8de12121f77abf7119"
uses = []
status = "catalogued"

Expand All @@ -5643,9 +5643,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = GENERIC_STRING SECRET_STRING = '<string_literal>' [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = GENERIC_STRING SECRET_STRING = '<string_literal>' [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "93b8224f12e67a31fe86ee65b822e23b3bbcb0bbdd2da05020d559d37eb93135"
grammar_sha256 = "01cd6d430cc82bd55478b29e27de719730a56a80cad55a7885512d94f38296f6"
uses = []
status = "catalogued"

Expand All @@ -5656,9 +5656,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = OAUTH2 API_AUTHENTICATION = <security_integration_name> OAUTH_SCOPES = ( '<scope_1>' [ , '<scope_2>' ... ] ) [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = OAUTH2 API_AUTHENTICATION = <security_integration_name> OAUTH_SCOPES = ( '<scope_1>' [ , '<scope_2>' ... ] ) [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "05bfa2f9b51f10297998b188167e8e9175666362aa40e116b26384a19cfcd621"
grammar_sha256 = "10a472b51e347b112c1c7eeec7b7a17ee400aff81fbb0adcad1152a1952b1673"
uses = []
status = "catalogued"

Expand All @@ -5669,9 +5669,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = OAUTH2 OAUTH_REFRESH_TOKEN = '<string_literal>' OAUTH_REFRESH_TOKEN_EXPIRY_TIME = '<string_literal>' API_AUTHENTICATION = <security_integration_name> [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = OAUTH2 OAUTH_REFRESH_TOKEN = '<string_literal>' OAUTH_REFRESH_TOKEN_EXPIRY_TIME = '<string_literal>' API_AUTHENTICATION = <security_integration_name> [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "44fdcca5d6b29c1ae6cd99e29805ccbc40dd39b38d77612e00ad082db79927ff"
grammar_sha256 = "14ae99d2167930b35c8bf5521dcc0f6e0205fb0dbe7c600fc149b80ca1c08232"
uses = []
status = "catalogued"

Expand All @@ -5682,9 +5682,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = PASSWORD USERNAME = '<username>' PASSWORD = '<password>' [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = PASSWORD USERNAME = '<username>' PASSWORD = '<password>' [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "bd26c903ba34369404d850887e91c8931879be949028d8d5627a25263408f6f4"
grammar_sha256 = "bc283789b009c607085c12153d1777fb27745b8be7bf3aad6dd714a6af2b794b"
uses = []
status = "catalogued"

Expand All @@ -5695,9 +5695,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = SYMMETRIC_KEY ALGORITHM = GENERIC",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = SYMMETRIC_KEY ALGORITHM = GENERIC [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "ee34c9068e10790330ba2186964bb342e1ea512bc444a3f9631a6a61b1c3b950"
grammar_sha256 = "8dc13c1778b3983057d4aacc24d60be8738615620a406f7ae859ac97d447063a"
uses = []
status = "catalogued"

Expand All @@ -5708,9 +5708,9 @@ source = "doc.sql.create-secret"
anchor = "Syntax"
kind = "statement"
grammar = [
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = WORKLOAD_IDENTITY_FEDERATION [ COMMENT = '<string_literal>' ]",
"CREATE [ OR REPLACE ] SECRET [ IF NOT EXISTS ] <name> TYPE = WORKLOAD_IDENTITY_FEDERATION [ COMMENT = '<string_literal>' ] [ WITH TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]",
]
grammar_sha256 = "bb4dbb0ae71327aad66e0a5ef728badae04b23422ee79e33b1203fd4c328c8e0"
grammar_sha256 = "0abfc9831db85ba50ddd6b5c26b6cb50cb9282590d395988ac10b1b28a93fe77"
uses = []
status = "catalogued"

Expand Down
Loading
Loading