Skip to content

Commit 108d5c8

Browse files
mstrathmanclaude
andcommitted
docs: retro-section the changelog by release; fix architecture drift
The changelog had every shipped feature under [Unreleased] despite two tagged releases on four registries, plus an orphaned receipts-era sentence fragment and a false 'before a tagged release' closer. Now: [Unreleased] carries the post-alpha.6 behavioral changes (enforced content-hash verification, distill read-only contract, registration and error-code corrections, predict_version model list) and the teacher benchmark campaigns; [0.0.1-alpha.6] the simplification release with its breaking-change note; [0.0.1-alpha.5] the first working release, with alpha.1-4 noted as shakedown pre-releases; compare links at the bottom per Keep a Changelog. ARCHITECTURE.md: collect_series is backtest-only in the file table too, the tree serving runtime lives in predict-student.c (not 'the same file'), and the shared-helpers list includes the prepare/JSON helpers added by the architecture pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e3a5e78 commit 108d5c8

2 files changed

Lines changed: 63 additions & 6 deletions

File tree

ARCHITECTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Source layout:
1414

1515
| File | Responsibility |
1616
| --- | --- |
17-
| `sqlite-predict.c` | entry point, function registration, shared helpers (timestamp parse/format, ULID, options parsing, normal-quantile) |
18-
| `predict-forecast.c` | the `forecast()` and `detect_anomalies()` aggregates, `backtest()`, the expansion TVFs, the statistical models, the native forecast-student serving path, and the shared `collect_series()` helper |
17+
| `sqlite-predict.c` | entry point, function registration, shared helpers (timestamp parse/format, ULID, options parsing, read-only query prepare, JSON string-array parse, normal-quantile) |
18+
| `predict-forecast.c` | the `forecast()` and `detect_anomalies()` aggregates, `backtest()`, the expansion TVFs, the statistical models, the native forecast-student serving path, and the `collect_series()` helper `backtest()` uses |
1919
| `predict-tabular.c` | `predict()` vtab, the in-context k-NN model, and dispatch to a runtime backend for registered models |
2020
| `predict-registry.c` | the model registry (`_predict_models`) and content hashing |
2121
| `predict-onnx.c` | ONNX runtime backend (opt-in build only); the only file that links onnxruntime |
@@ -126,7 +126,7 @@ deterministic full-batch Adam, for warped boundaries an axis-aligned tree
126126
ensemble cannot render however good the targets are. It also consumes soft
127127
targets, so a smooth student learns a smooth teacher's distribution directly.
128128
`predict()` dispatches
129-
a `tree`-runtime model to the native runtime in the same file, which tells a
129+
a `tree`-runtime model to the native runtime in `predict-student.c`, which tells a
130130
single tree (`PSTREE` blob) from a forest (`PSGBT` blob) from a net (`PSMLP`
131131
blob) by magic and needs
132132
no onnxruntime. The blob formats are little-endian and normatively specified

CHANGELOG.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,42 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- **Model weight integrity is now enforced, not just recorded.** A
12+
registered model's `content_hash` is verified before its weights are
13+
used: inline student blobs at registry load, ONNX weight files when a
14+
session is created. A mismatch fails loudly with
15+
`PREDICT_ERR_MODEL_HASH` everywhere, including `auto` discovery, so a
16+
tampered registry row cannot serve or be silently skipped.
17+
- `distill_predict` and `distill_forecast` now enforce the same inner-
18+
query contract as every other operation: `train_query` must parse, be
19+
a single statement, and be read-only.
20+
- `predict_register` rejects `runtime:'tree'` (tree students carry
21+
inline weights only the distillers write; a URI-registered tree row
22+
could never be served). `predict()` on a model with an unsupported
23+
runtime now raises `PREDICT_ERR_RUNTIME_UNAVAILABLE` instead of
24+
`PREDICT_ERR_MODEL_NOT_FOUND`, and a teacher query that fails to
25+
prepare reports `PREDICT_ERR_SCHEMA`.
26+
- `predict_version()` lists the bundled model ids in `models` (it was an
27+
empty array) and no longer reports an internal spec identifier.
28+
- Error wording unified: student blob rejections all say "malformed",
29+
model lookups all say "no such model".
30+
31+
### Added
32+
33+
- Benchmark campaigns for the permissively licensed tabular teachers:
34+
TabPFN-2 and the latest TabPFN-3 (zero-shot only, per its license),
35+
TabICL v2, and Mitra, with distillation retention measured for every
36+
teacher whose license permits it
37+
(`benchmarks/results/tabpfn.md`, `permissive-teachers.md`).
38+
39+
## [0.0.1-alpha.6] - 2026-07-28
40+
41+
The pre-release simplification: one calling convention per operation,
42+
receipts removed, `auto` by default. Breaking relative to alpha.5
43+
(query-form `forecast('SELECT ...')` calls stop working).
44+
945
### Added
1046

1147
- **`auto` is the forecast default.** A `forecast(ts, value, h)` call with
@@ -51,6 +87,27 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5187
model registry (`_predict_models`) remains:
5288
content-addressed models and distilled students, hashes verified before
5389
deserialization.
90+
- **Documentation site** (Astro Starlight): per-language quickstarts,
91+
guides, reference, and benchmarks, deployed to GitHub Pages. A full
92+
pre-release audit executed every example; the gaps it found were
93+
fixed, including three fail-loud holes (`distill_forecast` silently
94+
ignored unknown option keys, `predict` silently ignored `train_query`
95+
for a student, and the backtest model error omitted `tsb`).
96+
97+
### Fixed
98+
99+
- Package distribution metadata (PyPI/npm/crates descriptions, module
100+
docstrings, `__version__`) scrubbed of stale branding and removed
101+
features; `make sync-version` now stamps every version surface.
102+
103+
## [0.0.1-alpha.5] - 2026-07-27
104+
105+
The first fully working release, live and installable from PyPI, npm,
106+
crates.io, and GitHub Releases. (alpha.1 through alpha.4 were partial
107+
name-claim and release-pipeline shakedown pre-releases, superseded.)
108+
109+
### Added
110+
54111
- **Auto model selection, conformal intervals, and `backtest()`.**
55112
`'{"model":"auto"}'` selects the statistical model with the
56113
lowest rolling-origin MASE per series, deterministically.
@@ -139,7 +196,6 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
139196
NOT close it: a stronger forecaster masks anomalies by predicting them (verified
140197
against a Chronos one-step baseline on TSB-AD-U, which only tied the theta
141198
z-score), so the win comes from the detector family, not a better forecaster.
142-
a recorded call reproduces against its anchored data state.
143199
- Bundled zero-dependency models: `theta-classic`, `stub-seasonal-naive`,
144200
`sub-pca` (time series) and `knn5-incontext` (tabular). Forecast prediction intervals
145201
are calibrated from a per-horizon in-sample backtest of each model, rather
@@ -195,5 +251,6 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
195251
tag; and `examples/quickstart.sql`. CI regenerates and compiles the
196252
amalgamation on every push so it cannot drift.
197253

198-
_This project is pre-alpha; everything above is subject to change before a
199-
tagged release._
254+
[Unreleased]: https://github.com/PureStorage-OpenConnect/sqlite-predict/compare/v0.0.1-alpha.6...HEAD
255+
[0.0.1-alpha.6]: https://github.com/PureStorage-OpenConnect/sqlite-predict/compare/v0.0.1-alpha.5...v0.0.1-alpha.6
256+
[0.0.1-alpha.5]: https://github.com/PureStorage-OpenConnect/sqlite-predict/releases/tag/v0.0.1-alpha.5

0 commit comments

Comments
 (0)