Skip to content

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

Merge remote-tracking branch 'origin/main' into pr85

FABIOTESSf91bf32dd4bb
diff --cc CHANGELOG.md
index 58bff6b5,d256cb21..1cc51460
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -5,25 -5,29 +5,48 @@@ All notable changes to Open Ontologies
## [Unreleased]
### Added
+- **CI builds, lints and tests the optional features.** A `features` job adds a
+ breadth leg (`cargo check` + `cargo clippy --all-targets` at `--all-features`)
+ and a depth leg (`cargo test --features postgres,duckdb,embeddings,sql`), with
+ `rust-cache` keyed per feature set. `default = []`, so none of `postgres`,
+ `duckdb`, `sql`, `embeddings` or `causal-pywhy` — nor the `sqlx`, `duckdb`,
+ `tract-onnx`, `tokenizers` and `instant-distance` trees — was compiled by
+ anything in CI before this.
+
+ The first run of the breadth leg found `clippy::large_enum_variant` in
+ `src/embed.rs`, a lint that could not have fired before because nothing
+ compiled `embeddings`.
+
+ `scripts/check-test-collection.sh` fails the run when a test file whose gate
+ is enabled collects zero tests. Eight files under `tests/` had never been
+ collected once, 56 tests in total; a file that collects nothing reports
+ "test result: ok" and is indistinguishable from a passing one. The enabled
+ set is derived from the cargo flags the test step used and expanded through
+ `[features]`, so `--features sql` counts as postgres + duckdb; files whose
+ gate is off in a given leg are skipped, so partial-feature legs stay green.
+ - **Build provenance and checksums on release binaries.** The release job now
+ emits a Sigstore attestation via `actions/attest-build-provenance`, binding
+ each published binary to the workflow run and the commit it was built from,
+ and publishes a `SHASUMS.txt` alongside the assets. The release job gains
+ `id-token: write` and `attestations: write` for the signing identity.
+
+ Verify provenance with:
+
+ ```
+ gh attestation verify <binary> --repo fabio-rovai/open-ontologies
+ ```
+
+ Or check the checksum of the binary you downloaded. `SHASUMS.txt` lists all
+ four platforms, so verify the one you have rather than the whole file:
+
+ ```
+ grep open-ontologies-x86_64-unknown-linux-gnu SHASUMS.txt | sha256sum -c -
+ # macOS: ... | shasum -a 256 -c -
+ ```
+
+ A bare `sha256sum -c SHASUMS.txt` expects all four binaries present and exits
+ non-zero when three are missing, which is the normal case. With GNU coreutils
+ you can also pass `--ignore-missing`; the form above works on macOS too.
- **Opt-in persistent triple store.** A new `[storage]` section selects the
backend for the main graph: `mode = "memory"` (default, unchanged behaviour)
or `mode = "persistent"`, which opens a RocksDB-backed Oxigraph store at