From f0a32ab8adee997e4979a52e83ebb6588c5b5284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:09:39 +0200 Subject: [PATCH 1/8] docs: record v0.5.0 publication in release bookkeeping Mark the CHANGELOG entry, README policy paragraph and Database I/O Execution Policy v1 status as released at tag v0.5.0 (2026-09-07, commit 864e84479f554b8ee250ffed44c4dfb963750d4a) and drop the prepared-scope section from RELEASING. --- CHANGELOG.md | 6 ++++-- README.md | 6 +++--- RELEASING.md | 21 --------------------- docs/database-io-policy-v1.md | 4 ++-- 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d8097..59e4297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog -## Unreleased +## v0.5.0 - 2026-09-07 -### v0.5.0 (prepared; not yet published) +OpenStatSpec `v0.5.0` publishes the optional Database I/O Execution Policy v1 +at immutable specification commit `864e84479f554b8ee250ffed44c4dfb963750d4a`. +The release tag is the immutable specification identity for this release. - Add normative optional `openstatspec-database-io-v1`, explicitly selected by capability field `database_io_policy`. Reads, validation and export perform diff --git a/README.md b/README.md index e18a60a..af79cc7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ remains an explicitly unsupported [future dialect](docs/mssql-dialect-roadmap.md ## Optional database I/O execution policy -Prepared for specification `v0.5.0`, the normative optional +Published in specification `v0.5.0`, the normative optional [Database I/O Execution Policy v1](docs/database-io-policy-v1.md) is explicitly selected with `database_io_policy: "openstatspec-database-io-v1"`. It requires database-read-only reads, validation and exports (including errors @@ -23,8 +23,8 @@ and loss diagnostics), and permits default Dolt writes on packaged exact tested 2.2.2/2.2.3 policy backed by adapter release CI, without user evidence files. External declarations remain an optional advanced override. Unselected adapters retain existing requirements; SAV 1.0 semantics, schemas, fixtures and canonical -Plan/Frontend/Binding contracts are unchanged. Publication and downstream -adapter support remain separately gated. +Plan/Frontend/Binding contracts are unchanged. Downstream adapter support +remains separately gated. ## Core contract diff --git a/RELEASING.md b/RELEASING.md index 3e6fd6d..95df955 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,27 +12,6 @@ Package tags use the `package-vX.Y.Z` convention; specification tags use `vX.Y.Z`. A specification tag MUST NOT publish the package, and a package tag MUST match the version declared in `pyproject.toml`. -## Prepared v0.5.0 scope - -This release prepares the normative optional -[Database I/O Execution Policy v1](docs/database-io-policy-v1.md). It is not -published until the gates below complete. Release notes MUST identify explicit -`database_io_policy` selection, database-read-only export with returned loss -diagnostics, and packaged exact tested Dolt 2.2.2/2.2.3 write policy with optional -external evidence. Existing unselected-profile requirements, SAV 1.0 semantics -and fixtures, schemas, and canonical Plan/Frontend/Binding artifacts are unchanged. -This is a pre-1.0 minor optional addition under [VERSIONING](VERSIONING.md). - -Run `python -m pytest` and `python tools/validate_repository.py` at the selected -commit. Adapter package release CI supplies real exact-version write and -read-only/failure-path evidence under the new policy; neither fabricated -repository declarations nor user-supplied evidence files are release substitutes. -Python `v0.8.0` and PHP `v0.7.0` are downstream adapter release targets, not -conformance claims made by this specification. Their pins and publication are -managed separately. The companion `openstatspec-specification` distribution -remains `0.1.0`: no package API, schema or validator contract change requires a -package release for this documentation policy addition. - ## Before preparing a release - Choose an exact reviewed commit on the appropriate branch and record its diff --git a/docs/database-io-policy-v1.md b/docs/database-io-policy-v1.md index 6b7229e..a478de0 100644 --- a/docs/database-io-policy-v1.md +++ b/docs/database-io-policy-v1.md @@ -1,7 +1,7 @@ # Optional Database I/O Execution Policy v1 -Status: normative optional addition prepared for OpenStatSpec `v0.5.0`; -publication remains subject to [RELEASING](../RELEASING.md). +Status: normative optional addition released in OpenStatSpec `v0.5.0` at +immutable specification commit `864e84479f554b8ee250ffed44c4dfb963750d4a`. Terms **MUST**, **MUST NOT**, **SHOULD**, and **MAY** are normative. ## Explicit selection and precedence From e0f30307b6e05c6c44c0f18e32593166cdc0d657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:11:59 +0200 Subject: [PATCH 2/8] docs: clarify v0.5.1 frontend, binding and manifest wording Document the conformance manifest keys (including expected_plan_case_0_1 and binding cases that give no plan or data) and clarify behaviour on which the published implementations already agree: reversed and mixed RECODE selectors, existing INTO targets, LOWEST/HIGHEST missing-range endpoints, reserved words under full quoting, string create targets, the Dolt completion-check runner note and MySQL-family catalog types. No normative meaning, schema, manifest, case count or hash changes. Found while building an independent Rust implementation (Statscraft). --- CHANGELOG.md | 28 ++++++ conformance/README.md | 96 +++++++++++++++++++++ docs/spss-profile.md | 2 +- docs/spss-sav-zsav-profile-1.0.md | 2 + docs/spss-syntax-frontend-profile-0.1.md | 19 ++-- docs/spss-syntax-frontend-profile-0.2.md | 6 +- docs/spss-syntax-frontend-profile-0.3.md | 8 +- docs/transformation-plan-sql-binding-0.1.md | 5 ++ docs/transformation-plan-sql-binding-0.2.md | 9 ++ sql/dialect-profiles.md | 7 ++ 10 files changed, 172 insertions(+), 10 deletions(-) create mode 100644 conformance/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 59e4297..c0dc4cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## Unreleased + +### v0.5.1 + +OpenStatSpec `v0.5.1` is a documentation patch that clarifies existing +contracts where the published implementations already agree. It changes no +normative meaning and no conformance artifact, schema, manifest, case count or +hash. The questions were found while building an independent Rust +implementation (Statscraft). + +- Documented the conformance manifest keys in `conformance/README.md`, + including `expected_plan_case_0_1` (a Frontend 0.1 case id), binding cases + that give no plan or data, and the generated preflight fixture width. +- Frontend `RECODE`: a reversed numeric range returns `invalid_numeric_range` + under Frontend 0.1 and 0.2 and `invalid_variable_range` under 0.3; + `HIGHEST THRU number` and `number THRU LOWEST` return `spss_syntax_error`; + an existing `INTO` target returns `target_already_exists`; a clause that + mixes a value list with a range or `SYSMIS` returns `spss_syntax_error`. +- SAV/ZSAV 1.0: a `LOWEST` or `HIGHEST` missing-range endpoint leaves the + matching `numeric_lower` or `numeric_upper` NULL. Quoting every identifier + satisfies the reserved-word preflight requirement. +- In-place binding: a Plan 0.1 create carries no string width, a binding may + refuse a string create target with `string_target_requires_declaration`, and + one that creates it documents its width rule. Added a runner note on + evidencing the Dolt completion check from a second session. +- Added an informative note that MySQL, MariaDB and Dolt catalog column types + are implementation-declared. + ## v0.5.0 - 2026-09-07 OpenStatSpec `v0.5.0` publishes the optional Database I/O Execution Policy v1 diff --git a/conformance/README.md b/conformance/README.md new file mode 100644 index 0000000..a503a5b --- /dev/null +++ b/conformance/README.md @@ -0,0 +1,96 @@ +# Conformance manifests + +Each JSON file in this directory is the machine-readable conformance manifest +of one profile. This page describes the manifest keys and how a runner reads +them. It adds no requirement; the profile documents remain normative. + +## Common keys + +- `manifest_version`, `profile` (display name) and `contract` (the exact + contract identifier under test; the SAV/ZSAV manifest has none). +- `schema`, `request_schema`, `plan_schema`, `plan_schemas` and `audit_schema` + are paths relative to the manifest file. +- `cases`: ordered case objects. `id` is unique within the manifest, also after + inherited cases are expanded. `expected_error` is the stable diagnostic code + the case must return, or null (or absent) for a successful case. + +## Transformation Plan manifests + +`transformation-plan-0.1.json` and `transformation-plan-0.2.json`: each case +gives the `plan` object under test and its `expected_plan_hash` (lowercase +SHA-256 of the canonical plan bytes), which is null for a failing case. + +## SPSS syntax frontend manifests + +`spss-syntax-frontend-0.1.json`, `-0.2.json` and `-0.3.json`: each case gives +the complete frontend `request` (`contract`, `input_alias`, `input_schema`, +`source_text`) and the `expected_source_hash`. A successful case declares +exactly one expected plan with one of these keys: + +- `expected_plan`: the expected plan inline. +- `expected_plan_case`: a case `id` in a Transformation Plan manifest + (`transformation-plan-0.1.json` for Frontend 0.1 cases, + `transformation-plan-0.2.json` for Frontend 0.2 cases). The expected plan + and hash are that case's `plan` and `expected_plan_hash`. +- `expected_plan_0_1`: an exact Plan 0.1 object inline, used in the 0.2 and + 0.3 manifests for programs that stay inside the Plan 0.1 subset. +- `expected_plan_case_0_1`: a case `id` in the Frontend 0.1 manifest + `spss-syntax-frontend-0.1.json`, not in a plan manifest. Used only in the + 0.2 and 0.3 manifests. The expected plan is that Frontend 0.1 case's + resolved expected plan (its inline `expected_plan`, or the plan named by its + `expected_plan_case`). + +`expected_plan_contract` optionally names the expected plan's contract. +`expected_plan_hash`, when present, is the hash of the resolved expected plan. +`expected_output_metadata` lists variable metadata expected after the plan is +applied. + +The 0.3 manifest has `inherited_manifests`. Each entry names an older frontend +`manifest` whose cases also run under Frontend 0.3, the +`request_contract_override` written into every inherited request, and +`superseded_cases`, which maps an inherited case id to the declared 0.3 case +that replaces it. Inherited case ids are prefixed with their source version, +for example `0.1/recode-labels-and-value-labels`. + +## In-place binding manifests + +`in-place-transformation-0.1.json` and `in-place-transformation-0.2.json`: +each case names its `database_profile`. A case states its input as +`source_text` (0.1) or as the paired `applied_plan_case` and +`applied_frontend_case` (0.2), which name a Transformation Plan 0.2 case and a +Frontend 0.2 case that lower to the same plan. Dolt context is given by +`expected_context`/`observed_context` (0.1) or `expected_branch`, +`expected_head` and `working_set_clean` (0.2). Other keys describe the stated +state and expectations: `actor`, `target_mode`, `target_preprovisioned`, +`before`, `after`, `before_rows`, `after_rows`, `after_failure`, +`expected_audit`, `required_audit_fields`, `forbidden_artifacts`, +`mutation_started`, `failure_point`, `completion_context` and +`rollback_probe`. + +Some cases give no plan (`source_text` or `applied_plan_case`) and no data, +for example `mysql-create-target-fails-before-mutation`, +`mariadb-create-target-fails-before-mutation`, +`dolt-create-target-fails-before-mutation`, +`dolt-empty-actor-fails-before-mutation` and the 0.1 `reject-dolt-*` cases. +They test a check made before mutation. A runner may run such a case with any +valid plan of the stated `target_mode` (any valid plan when no mode is stated) +against a synthetic dataset; the expected diagnostic and `mutation_started` do +not depend on that choice. For the completion check in +`dolt-context-changed-after-mutation-rolls-back`, see the runner note in +[In-Place Transformation Binding 0.2](../docs/transformation-plan-sql-binding-0.2.md). + +## SPSS SAV/ZSAV manifest + +`spss-sav-zsav-1.0.json` lists `required_capabilities`, the round-trip +`comparison` and `fixtures`. Each fixture gives `id`, `source` (relative to +this directory), `directions`, `expects` and, where given, `expected_catalog`. +The `preflight-failure` source `fixtures/preflight-too-wide.sav` is not +committed: as [`fixtures/README.md`](fixtures/README.md) states, the runner +generates it with one more variable than the target profile permits. + +## SQL Transformation Workflow manifest + +`sql-transformation-workflow-0.1.json` gives the `hash_profile`, input +`fixtures`, workflow `cases`, `recovery_cases` and `canonicalization_cases` +defined by the +[SQL Transformation Workflow Profile 0.1](../docs/sql-transformation-workflow-profile-0.1.md). diff --git a/docs/spss-profile.md b/docs/spss-profile.md index 8aa8081..6305e6a 100644 --- a/docs/spss-profile.md +++ b/docs/spss-profile.md @@ -23,7 +23,7 @@ This profile defines a source-faithful mapping for unencrypted SPSS `.sav` and ` An implementation must retain an exact source variable name in `variable.source_name`. A dialect profile may use that name as the physical column identifier only when it is safe. Otherwise it generates a deterministic unique identifier and records it in `variable.physical_name`. -This is not a loss of fidelity: source identity is represented by the recorded total mapping, not by coincidental identifier equality. Profiles must detect SQL reserved words, case-folding, collisions, identifier-length limits, and the reserved __ technical prefix during preflight. +This is not a loss of fidelity: source identity is represented by the recorded total mapping, not by coincidental identifier equality. Profiles must detect SQL reserved words, case-folding, collisions, identifier-length limits, and the reserved __ technical prefix during preflight. Quoting every physical identifier with the profile's quoting rule satisfies the reserved-word requirement. ## Required preflight diff --git a/docs/spss-sav-zsav-profile-1.0.md b/docs/spss-sav-zsav-profile-1.0.md index 4b5f07c..fcbfeae 100644 --- a/docs/spss-sav-zsav-profile-1.0.md +++ b/docs/spss-sav-zsav-profile-1.0.md @@ -70,6 +70,8 @@ For every supported SAV/ZSAV import/export, the following dictionary semantics M - multiple-response sets, including name, label, MD/MC kind, ordered members, numeric or string MD counted value, category-label behavior, and label source; and - long UTF-8 string values, their declared widths, labels, and supported missing metadata without truncation. +In a `missing_rule` range, an endpoint given as `LOWEST` is recorded in `lower_special` with `numeric_lower` NULL, and an endpoint given as `HIGHEST` is recorded in `upper_special` with `numeric_upper` NULL; the other endpoint holds its finite value. + A reader or writer that cannot preserve one of these items MUST declare the capability absent. An importer MAY retain unknown source extensions in a namespaced extension payload, but it MUST report a fidelity event rather than claim full profile fidelity. ## SAV and ZSAV diff --git a/docs/spss-syntax-frontend-profile-0.1.md b/docs/spss-syntax-frontend-profile-0.1.md index a97f04a..f9d0073 100644 --- a/docs/spss-syntax-frontend-profile-0.1.md +++ b/docs/spss-syntax-frontend-profile-0.1.md @@ -26,13 +26,20 @@ numbers, and dynamic command generation are outside v0.1. ordered source variable list. When `INTO` is present it MUST contain the same number of targets as sources. Targets MUST be fresh, case-insensitively unique, must not collide with any pre-command variable, and are paired positionally -with sources. The command lowers to one ordered `recode` operation per pair. +with sources. A target that already exists case-insensitively, including the +command's own source, a variable created by an earlier command, or a target +repeated in the same `INTO` list, MUST return `target_already_exists`. The +command lowers to one ordered `recode` operation per pair. Every pair reads the pre-command state: no pair can observe a target created by another pair in the same command. A selector is a comma-separated typed literal list, an inclusive numeric -`lower THRU upper` range, or `SYSMIS`. A result is a typed literal, `SYSMIS`, -or `COPY`. `ELSE = result` is permitted once and must be the final clause. +`lower THRU upper` range, or `SYSMIS`. Each clause uses exactly one of these +forms: a comma that joins a literal list with a range or `SYSMIS`, or joins two +ranges, MUST return `spss_syntax_error`. A range whose `lower` is greater than +its `upper` MUST return `invalid_numeric_range`; equal bounds are valid. A +result is a typed literal, `SYSMIS`, or `COPY`. `ELSE = result` is permitted +once and must be the final clause. With `INTO`, each plan operation uses `target_mode=create`; without it each source is also its target and the mode is `replace`. An omitted `ELSE` lowers @@ -65,8 +72,10 @@ are `spss_syntax_error`, `unsupported_spss_command`, `unknown_variable`, `duplicate_else`, `else_not_last`, `mixed_result_types`, `type_mismatch`, `system_missing_for_string`, `string_target_requires_declaration`, `reserved_target_name`, and -`duplicate_value_label`. Diagnostics identify a source span but MUST NOT include -credentials or unrelated data values. +`duplicate_value_label`, plus the Plan 0.1 diagnostics `target_already_exists` +and `invalid_numeric_range` for the `RECODE` rules above. Diagnostics +identify a source span but MUST NOT include credentials or unrelated data +values. The exact source hash is SHA-256 of UTF-8 source after CRLF and CR are converted to LF. Formatting, keyword case, or quoting differences therefore change the diff --git a/docs/spss-syntax-frontend-profile-0.2.md b/docs/spss-syntax-frontend-profile-0.2.md index 2e05cfa..e147c74 100644 --- a/docs/spss-syntax-frontend-profile-0.2.md +++ b/docs/spss-syntax-frontend-profile-0.2.md @@ -16,8 +16,10 @@ in force. The input request conforms to [`../transformation/spss-syntax-frontend-0.2.schema.json`](../transformation/spss-syntax-frontend-0.2.schema.json). The 0.1 commands `RECODE`, `VARIABLE LABELS`, and `VALUE LABELS` are -unchanged. A program containing only that subset MUST emit an exact Plan 0.1 -object. A program containing any command introduced below emits Plan 0.2. +unchanged, including their diagnostics: a reversed numeric `RECODE` range +returns `invalid_numeric_range` and an existing `INTO` target returns +`target_already_exists`. A program containing only that subset MUST emit an +exact Plan 0.1 object. A program containing any command introduced below emits Plan 0.2. ## Numeric expression grammar diff --git a/docs/spss-syntax-frontend-profile-0.3.md b/docs/spss-syntax-frontend-profile-0.3.md index 6ff32d0..d0ab811 100644 --- a/docs/spss-syntax-frontend-profile-0.3.md +++ b/docs/spss-syntax-frontend-profile-0.3.md @@ -111,8 +111,12 @@ is not included in an open range. Open ranges are inclusive and lower to the existing ordered `recode` range representation. Non-finite values, malformed finite numbers, and reverse ranges are rejected with `spss_syntax_error` or `invalid_variable_range` as -applicable. The finite-number token remains the exact ASCII grammar inherited -from Frontend 0.2 and is interpreted as an exact base-ten value before +applicable. Under this profile a reversed numeric range such as `5 THRU 3` +returns `invalid_variable_range` (Frontend 0.1 and 0.2 return +`invalid_numeric_range` for the same input). `HIGHEST THRU number` and +`number THRU LOWEST` are outside the open-range grammar and return +`spss_syntax_error`. The finite-number token remains the exact ASCII grammar +inherited from Frontend 0.2 and is interpreted as an exact base-ten value before ties-to-even binary64 conversion. ## ADD VALUE LABELS diff --git a/docs/transformation-plan-sql-binding-0.1.md b/docs/transformation-plan-sql-binding-0.1.md index 1a2236e..8dc249b 100644 --- a/docs/transformation-plan-sql-binding-0.1.md +++ b/docs/transformation-plan-sql-binding-0.1.md @@ -23,6 +23,11 @@ For every successful apply: created; and - normal completion leaves no temporary physical object. +A Plan 0.1 create operation carries no string width. A binding MAY refuse a +create operation whose determined storage kind is string before mutation with +`string_target_requires_declaration`. A binding that creates a string target +MUST document the rule that sets its declared width. + OpenStatSpec does not version successful data states and does not implement rollback on any engine. A deployment uses its database's own transaction, backup, or version-control facilities. On Dolt, history, branching, diff, merge, diff --git a/docs/transformation-plan-sql-binding-0.2.md b/docs/transformation-plan-sql-binding-0.2.md index 4c8c835..53ce083 100644 --- a/docs/transformation-plan-sql-binding-0.2.md +++ b/docs/transformation-plan-sql-binding-0.2.md @@ -58,6 +58,15 @@ before successful completion. Stable diagnostics are `dolt_context_required`, `dolt_branch_mismatch`, `dolt_head_mismatch`, `dolt_working_set_dirty`, and `dolt_context_changed`. +Conformance runner note (informative): inside an open Dolt transaction, +`HASHOF('HEAD')` and `dolt_branches` read from the applying session show that +transaction's snapshot, so a same-session read does not see a commit made +concurrently. A runner therefore evidences the completion check in +`dolt-context-changed-after-mutation-rolls-back` by fault injection: it makes +the concurrent commit from a second session at the case's `failure_point` and +supplies the resulting branch and HEAD to the adapter's completion check. This +note adds no requirement. + The apply remains on the same branch and MUST NOT commit, switch, merge, reset, tag, or create a persistent recovery object. A successful apply leaves one inspectable Dolt working-set diff. The audit's before and after HEAD identities diff --git a/sql/dialect-profiles.md b/sql/dialect-profiles.md index e74c888..e4707da 100644 --- a/sql/dialect-profiles.md +++ b/sql/dialect-profiles.md @@ -107,6 +107,13 @@ The profile applies only when all OpenStatSpec catalog and data tables use an engine with the declared behavior. An adapter MUST reject a non-transactional or incompatible storage configuration rather than claiming atomic import. +Informative note: the types in [`schema-outline.sql`](schema-outline.sql) are +logical. On MySQL, MariaDB, and Dolt the physical catalog column types are +implementation-declared; on MySQL and MariaDB, for example, a `TEXT` column +cannot be a primary or unique key without a prefix length. An adapter may use +`VARCHAR(255)` for keyed text, `CHAR(36)` for UUID identifiers, and +`DATETIME(6)` for timestamps. This note adds no requirement. + ## Dolt profile The explicitly selected [Database I/O Execution Policy v1](../docs/database-io-policy-v1.md) From f33c1bfe22e86a2a47f9f4a3469385a8db064496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:12:28 +0200 Subject: [PATCH 3/8] docs: leave the string create refusal code to the binding --- docs/transformation-plan-sql-binding-0.1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/transformation-plan-sql-binding-0.1.md b/docs/transformation-plan-sql-binding-0.1.md index 8dc249b..e41de39 100644 --- a/docs/transformation-plan-sql-binding-0.1.md +++ b/docs/transformation-plan-sql-binding-0.1.md @@ -24,8 +24,8 @@ For every successful apply: - normal completion leaves no temporary physical object. A Plan 0.1 create operation carries no string width. A binding MAY refuse a -create operation whose determined storage kind is string before mutation with -`string_target_requires_declaration`. A binding that creates a string target +create operation whose determined storage kind is string, before mutation and +with a stable error code it documents. A binding that creates a string target MUST document the rule that sets its declared width. OpenStatSpec does not version successful data states and does not implement From 8ebb1e97cb0c963a0b64ae21a6c9743213079cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:13:52 +0200 Subject: [PATCH 4/8] docs: keep agreed diagnostics informative in the v0.5.1 patch --- CHANGELOG.md | 22 ++++++++-------- docs/spss-sav-zsav-profile-1.0.md | 2 +- docs/spss-syntax-frontend-profile-0.1.md | 28 ++++++++++----------- docs/spss-syntax-frontend-profile-0.2.md | 6 ++--- docs/spss-syntax-frontend-profile-0.3.md | 10 ++++---- docs/transformation-plan-sql-binding-0.1.md | 8 +++--- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0dc4cb..4713d4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,26 +4,28 @@ ### v0.5.1 -OpenStatSpec `v0.5.1` is a documentation patch that clarifies existing -contracts where the published implementations already agree. It changes no -normative meaning and no conformance artifact, schema, manifest, case count or -hash. The questions were found while building an independent Rust +OpenStatSpec `v0.5.1` is a documentation patch. It clarifies wording and +records, as informative notes, behavior on which the published implementations +already agree. It adds no normative requirement and changes no conformance +artifact, schema, manifest, case count or hash; a later minor release may make +the noted diagnostics normative. The questions were found while building an independent Rust implementation (Statscraft). - Documented the conformance manifest keys in `conformance/README.md`, including `expected_plan_case_0_1` (a Frontend 0.1 case id), binding cases that give no plan or data, and the generated preflight fixture width. -- Frontend `RECODE`: a reversed numeric range returns `invalid_numeric_range` +- Frontend `RECODE` (informative): a reversed numeric range returns `invalid_numeric_range` under Frontend 0.1 and 0.2 and `invalid_variable_range` under 0.3; `HIGHEST THRU number` and `number THRU LOWEST` return `spss_syntax_error`; an existing `INTO` target returns `target_already_exists`; a clause that - mixes a value list with a range or `SYSMIS` returns `spss_syntax_error`. -- SAV/ZSAV 1.0: a `LOWEST` or `HIGHEST` missing-range endpoint leaves the + mixes a value list with a range or `SYSMIS`, or joins two ranges, returns + `spss_syntax_error`. +- SAV/ZSAV 1.0 (informative): a `LOWEST` or `HIGHEST` missing-range endpoint leaves the matching `numeric_lower` or `numeric_upper` NULL. Quoting every identifier satisfies the reserved-word preflight requirement. -- In-place binding: a Plan 0.1 create carries no string width, a binding may - refuse a string create target with `string_target_requires_declaration`, and - one that creates it documents its width rule. Added a runner note on +- In-place binding (informative): a Plan 0.1 create carries no string width; + the published bindings refuse a string create target before mutation, and + one that creates it should document its width rule. Added a runner note on evidencing the Dolt completion check from a second session. - Added an informative note that MySQL, MariaDB and Dolt catalog column types are implementation-declared. diff --git a/docs/spss-sav-zsav-profile-1.0.md b/docs/spss-sav-zsav-profile-1.0.md index fcbfeae..909eaa7 100644 --- a/docs/spss-sav-zsav-profile-1.0.md +++ b/docs/spss-sav-zsav-profile-1.0.md @@ -70,7 +70,7 @@ For every supported SAV/ZSAV import/export, the following dictionary semantics M - multiple-response sets, including name, label, MD/MC kind, ordered members, numeric or string MD counted value, category-label behavior, and label source; and - long UTF-8 string values, their declared widths, labels, and supported missing metadata without truncation. -In a `missing_rule` range, an endpoint given as `LOWEST` is recorded in `lower_special` with `numeric_lower` NULL, and an endpoint given as `HIGHEST` is recorded in `upper_special` with `numeric_upper` NULL; the other endpoint holds its finite value. +Informative note: in a `missing_rule` range, the published implementations record a `LOWEST` endpoint in `lower_special` with `numeric_lower` NULL, and a `HIGHEST` endpoint in `upper_special` with `numeric_upper` NULL; the other endpoint holds its finite value. A reader or writer that cannot preserve one of these items MUST declare the capability absent. An importer MAY retain unknown source extensions in a namespaced extension payload, but it MUST report a fidelity event rather than claim full profile fidelity. diff --git a/docs/spss-syntax-frontend-profile-0.1.md b/docs/spss-syntax-frontend-profile-0.1.md index f9d0073..e7ead11 100644 --- a/docs/spss-syntax-frontend-profile-0.1.md +++ b/docs/spss-syntax-frontend-profile-0.1.md @@ -26,20 +26,22 @@ numbers, and dynamic command generation are outside v0.1. ordered source variable list. When `INTO` is present it MUST contain the same number of targets as sources. Targets MUST be fresh, case-insensitively unique, must not collide with any pre-command variable, and are paired positionally -with sources. A target that already exists case-insensitively, including the -command's own source, a variable created by an earlier command, or a target -repeated in the same `INTO` list, MUST return `target_already_exists`. The -command lowers to one ordered `recode` operation per pair. +with sources. The command lowers to one ordered `recode` operation per pair. Every pair reads the pre-command state: no pair can observe a target created by another pair in the same command. A selector is a comma-separated typed literal list, an inclusive numeric -`lower THRU upper` range, or `SYSMIS`. Each clause uses exactly one of these -forms: a comma that joins a literal list with a range or `SYSMIS`, or joins two -ranges, MUST return `spss_syntax_error`. A range whose `lower` is greater than -its `upper` MUST return `invalid_numeric_range`; equal bounds are valid. A -result is a typed literal, `SYSMIS`, or `COPY`. `ELSE = result` is permitted -once and must be the final clause. +`lower THRU upper` range, or `SYSMIS`. A result is a typed literal, `SYSMIS`, +or `COPY`. `ELSE = result` is permitted once and must be the final clause. + +Informative note: the published implementations agree on these `RECODE` +diagnostics, which a later profile revision may make normative. An `INTO` +target that already exists case-insensitively (the command's own source, a +variable created by an earlier command, or a target repeated in the same +`INTO` list) returns `target_already_exists`. A comma that joins a literal list +with a range or `SYSMIS`, or joins two ranges, returns `spss_syntax_error`. A +range whose `lower` is greater than its `upper` returns `invalid_numeric_range`; +equal bounds are valid. The same diagnostics apply under Frontend 0.2. With `INTO`, each plan operation uses `target_mode=create`; without it each source is also its target and the mode is `replace`. An omitted `ELSE` lowers @@ -72,10 +74,8 @@ are `spss_syntax_error`, `unsupported_spss_command`, `unknown_variable`, `duplicate_else`, `else_not_last`, `mixed_result_types`, `type_mismatch`, `system_missing_for_string`, `string_target_requires_declaration`, `reserved_target_name`, and -`duplicate_value_label`, plus the Plan 0.1 diagnostics `target_already_exists` -and `invalid_numeric_range` for the `RECODE` rules above. Diagnostics -identify a source span but MUST NOT include credentials or unrelated data -values. +`duplicate_value_label`. Diagnostics identify a source span but MUST NOT include +credentials or unrelated data values. The exact source hash is SHA-256 of UTF-8 source after CRLF and CR are converted to LF. Formatting, keyword case, or quoting differences therefore change the diff --git a/docs/spss-syntax-frontend-profile-0.2.md b/docs/spss-syntax-frontend-profile-0.2.md index e147c74..2e05cfa 100644 --- a/docs/spss-syntax-frontend-profile-0.2.md +++ b/docs/spss-syntax-frontend-profile-0.2.md @@ -16,10 +16,8 @@ in force. The input request conforms to [`../transformation/spss-syntax-frontend-0.2.schema.json`](../transformation/spss-syntax-frontend-0.2.schema.json). The 0.1 commands `RECODE`, `VARIABLE LABELS`, and `VALUE LABELS` are -unchanged, including their diagnostics: a reversed numeric `RECODE` range -returns `invalid_numeric_range` and an existing `INTO` target returns -`target_already_exists`. A program containing only that subset MUST emit an -exact Plan 0.1 object. A program containing any command introduced below emits Plan 0.2. +unchanged. A program containing only that subset MUST emit an exact Plan 0.1 +object. A program containing any command introduced below emits Plan 0.2. ## Numeric expression grammar diff --git a/docs/spss-syntax-frontend-profile-0.3.md b/docs/spss-syntax-frontend-profile-0.3.md index d0ab811..6808896 100644 --- a/docs/spss-syntax-frontend-profile-0.3.md +++ b/docs/spss-syntax-frontend-profile-0.3.md @@ -111,11 +111,11 @@ is not included in an open range. Open ranges are inclusive and lower to the existing ordered `recode` range representation. Non-finite values, malformed finite numbers, and reverse ranges are rejected with `spss_syntax_error` or `invalid_variable_range` as -applicable. Under this profile a reversed numeric range such as `5 THRU 3` -returns `invalid_variable_range` (Frontend 0.1 and 0.2 return -`invalid_numeric_range` for the same input). `HIGHEST THRU number` and -`number THRU LOWEST` are outside the open-range grammar and return -`spss_syntax_error`. The finite-number token remains the exact ASCII grammar +applicable. Informative note: under this profile the published +implementations return `invalid_variable_range` for a reversed numeric range +such as `5 THRU 3` (Frontend 0.1 and 0.2 return `invalid_numeric_range` for the +same input), and `spss_syntax_error` for `HIGHEST THRU number` and +`number THRU LOWEST`, which are outside the open-range grammar. The finite-number token remains the exact ASCII grammar inherited from Frontend 0.2 and is interpreted as an exact base-ten value before ties-to-even binary64 conversion. diff --git a/docs/transformation-plan-sql-binding-0.1.md b/docs/transformation-plan-sql-binding-0.1.md index e41de39..1cf48d7 100644 --- a/docs/transformation-plan-sql-binding-0.1.md +++ b/docs/transformation-plan-sql-binding-0.1.md @@ -23,10 +23,10 @@ For every successful apply: created; and - normal completion leaves no temporary physical object. -A Plan 0.1 create operation carries no string width. A binding MAY refuse a -create operation whose determined storage kind is string, before mutation and -with a stable error code it documents. A binding that creates a string target -MUST document the rule that sets its declared width. +Informative note: a Plan 0.1 create operation carries no string width. The +published bindings refuse a create operation whose determined storage kind is +string before mutation, each with its own documented error code. A binding that +creates such a target should document the rule that sets its declared width. OpenStatSpec does not version successful data states and does not implement rollback on any engine. A deployment uses its database's own transaction, From 08c1697eb65180bdd82a823fa502de7a113852bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:14:25 +0200 Subject: [PATCH 5/8] docs: mark the remaining v0.5.1 notes informative --- CHANGELOG.md | 3 +++ docs/spss-profile.md | 2 +- docs/transformation-plan-sql-binding-0.1.md | 3 ++- sql/dialect-profiles.md | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4713d4e..0bfb677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ artifact, schema, manifest, case count or hash; a later minor release may make the noted diagnostics normative. The questions were found while building an independent Rust implementation (Statscraft). +- Recorded `v0.5.0` as published in the README, the Database I/O policy + status and the changelog, and removed its preparation notes from + `RELEASING.md`. - Documented the conformance manifest keys in `conformance/README.md`, including `expected_plan_case_0_1` (a Frontend 0.1 case id), binding cases that give no plan or data, and the generated preflight fixture width. diff --git a/docs/spss-profile.md b/docs/spss-profile.md index 6305e6a..c94f885 100644 --- a/docs/spss-profile.md +++ b/docs/spss-profile.md @@ -23,7 +23,7 @@ This profile defines a source-faithful mapping for unencrypted SPSS `.sav` and ` An implementation must retain an exact source variable name in `variable.source_name`. A dialect profile may use that name as the physical column identifier only when it is safe. Otherwise it generates a deterministic unique identifier and records it in `variable.physical_name`. -This is not a loss of fidelity: source identity is represented by the recorded total mapping, not by coincidental identifier equality. Profiles must detect SQL reserved words, case-folding, collisions, identifier-length limits, and the reserved __ technical prefix during preflight. Quoting every physical identifier with the profile's quoting rule satisfies the reserved-word requirement. +This is not a loss of fidelity: source identity is represented by the recorded total mapping, not by coincidental identifier equality. Profiles must detect SQL reserved words, case-folding, collisions, identifier-length limits, and the reserved __ technical prefix during preflight. Informative note: quoting every physical identifier with the profile's quoting rule is one way to meet the reserved-word requirement. ## Required preflight diff --git a/docs/transformation-plan-sql-binding-0.1.md b/docs/transformation-plan-sql-binding-0.1.md index 1cf48d7..2d5a3bf 100644 --- a/docs/transformation-plan-sql-binding-0.1.md +++ b/docs/transformation-plan-sql-binding-0.1.md @@ -26,7 +26,8 @@ For every successful apply: Informative note: a Plan 0.1 create operation carries no string width. The published bindings refuse a create operation whose determined storage kind is string before mutation, each with its own documented error code. A binding that -creates such a target should document the rule that sets its declared width. +creates such a target documents the rule that sets its declared width. This +note adds no requirement. OpenStatSpec does not version successful data states and does not implement rollback on any engine. A deployment uses its database's own transaction, diff --git a/sql/dialect-profiles.md b/sql/dialect-profiles.md index e4707da..6a42afb 100644 --- a/sql/dialect-profiles.md +++ b/sql/dialect-profiles.md @@ -110,7 +110,7 @@ or incompatible storage configuration rather than claiming atomic import. Informative note: the types in [`schema-outline.sql`](schema-outline.sql) are logical. On MySQL, MariaDB, and Dolt the physical catalog column types are implementation-declared; on MySQL and MariaDB, for example, a `TEXT` column -cannot be a primary or unique key without a prefix length. An adapter may use +cannot be a primary or unique key without a prefix length. For example, an adapter can use `VARCHAR(255)` for keyed text, `CHAR(36)` for UUID identifiers, and `DATETIME(6)` for timestamps. This note adds no requirement. From de57d3d59d9e90a6b84999dbd19c171512fcb405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:19:22 +0200 Subject: [PATCH 6/8] docs: pin the plan mode and scope of the runner notes --- conformance/README.md | 8 +++++--- docs/transformation-plan-sql-binding-0.2.md | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/conformance/README.md b/conformance/README.md index a503a5b..2ff0d2e 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -73,9 +73,11 @@ for example `mysql-create-target-fails-before-mutation`, `dolt-create-target-fails-before-mutation`, `dolt-empty-actor-fails-before-mutation` and the 0.1 `reject-dolt-*` cases. They test a check made before mutation. A runner may run such a case with any -valid plan of the stated `target_mode` (any valid plan when no mode is stated) -against a synthetic dataset; the expected diagnostic and `mutation_started` do -not depend on that choice. For the completion check in +valid plan of the stated `target_mode` against a synthetic dataset; the +expected diagnostic and `mutation_started` do not depend on that choice. When a +case states no `target_mode`, as `dolt-empty-actor-fails-before-mutation` +does, a runner uses a `replace` plan, so that no create-target refusal (such as +`schema_change_not_atomic` on Dolt) can come before the check the case names. For the completion check in `dolt-context-changed-after-mutation-rolls-back`, see the runner note in [In-Place Transformation Binding 0.2](../docs/transformation-plan-sql-binding-0.2.md). diff --git a/docs/transformation-plan-sql-binding-0.2.md b/docs/transformation-plan-sql-binding-0.2.md index 53ce083..f7c7d8d 100644 --- a/docs/transformation-plan-sql-binding-0.2.md +++ b/docs/transformation-plan-sql-binding-0.2.md @@ -64,8 +64,11 @@ transaction's snapshot, so a same-session read does not see a commit made concurrently. A runner therefore evidences the completion check in `dolt-context-changed-after-mutation-rolls-back` by fault injection: it makes the concurrent commit from a second session at the case's `failure_point` and -supplies the resulting branch and HEAD to the adapter's completion check. This -note adds no requirement. +supplies the resulting branch and HEAD to the adapter's completion check. The +case therefore checks the comparison, not how the adapter reads its completion +values: the existing completion check is only meaningful when that read +observes commits made after the apply transaction began, and this case does +not verify that read. This note adds no requirement. The apply remains on the same branch and MUST NOT commit, switch, merge, reset, tag, or create a persistent recovery object. A successful apply leaves one From be1a701ea8ece5f32ebd1c061466042e1facb689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:19:45 +0200 Subject: [PATCH 7/8] docs: make the replace plan a runner suggestion --- conformance/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conformance/README.md b/conformance/README.md index 2ff0d2e..ef534c2 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -76,8 +76,9 @@ They test a check made before mutation. A runner may run such a case with any valid plan of the stated `target_mode` against a synthetic dataset; the expected diagnostic and `mutation_started` do not depend on that choice. When a case states no `target_mode`, as `dolt-empty-actor-fails-before-mutation` -does, a runner uses a `replace` plan, so that no create-target refusal (such as -`schema_change_not_atomic` on Dolt) can come before the check the case names. For the completion check in +does, a runner can use a `replace` plan, so that no create-target refusal +(such as `schema_change_not_atomic` on Dolt) comes before the check the case +names. For the completion check in `dolt-context-changed-after-mutation-rolls-back`, see the runner note in [In-Place Transformation Binding 0.2](../docs/transformation-plan-sql-binding-0.2.md). From d8fe58cce5a529007d8d82218e6e73b6d6995666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Sat, 21 Nov 2026 23:20:10 +0200 Subject: [PATCH 8/8] docs: match the changelog quoting note to the profile text --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bfb677..e295a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,9 @@ implementation (Statscraft). mixes a value list with a range or `SYSMIS`, or joins two ranges, returns `spss_syntax_error`. - SAV/ZSAV 1.0 (informative): a `LOWEST` or `HIGHEST` missing-range endpoint leaves the - matching `numeric_lower` or `numeric_upper` NULL. Quoting every identifier - satisfies the reserved-word preflight requirement. + matching `numeric_lower` or `numeric_upper` NULL. +- SPSS profile (informative): quoting every identifier is one way to meet the + reserved-word preflight requirement. - In-place binding (informative): a Plan 0.1 create carries no string width; the published bindings refuse a string create target before mutation, and one that creates it should document its width rule. Added a runner note on