Skip to content

pgokf 0.4.0

Choose a tag to compare

@LogicOcean LogicOcean released this 11 Nov 03:47
· 30 commits to main since this release

pgokf 0.4.0

pgokf 0.4.0 is the first stable release of the 0.4 line. It brings the MCP server up to the 2026-07-28 protocol revision with structured results, Resources and Skills. It also completes the catalog reconciliation upgrade chain from 0.3.1, clears the open RustSec advisories, and hardens packaging and release verification. Stable artifacts cover PostgreSQL 15–18 on amd64 and arm64. PostgreSQL 19 RC 1 is tested for compatibility only.

Coming from 0.2.0? 0.2.0 is the last release published as packages. 0.3.0 was an unpublished candidate, and 0.3.1 was finalized in source but never published as a release. This release therefore also carries the 0.3 feature set (catalog generations, freshness, a durable change-event outbox, generation-bound typed relationships, and freshness-aware workspace plugins). See the 0.3.1 changelog entry. ALTER EXTENSION pgokf UPDATE takes you from 0.2.0 straight to 0.4.0.

Highlights

  • MCP 0.4. The server implements MCP 2026-07-28 and still accepts the legacy 2024-11-05, 2025-03-26 and 2025-06-18 initialization revisions. It adds a Tools registry with strict input/output schemas and validated structuredContent, stable URI-addressed Resources, and the optional io.modelcontextprotocol/skills extension.
  • Catalog reconciliation upgrade chain. The ordinary update path is 0.3.1 → 0.4.0-dev1 → 0.4.0-dev2 → 0.4.0-dev3 → 0.4.0. It repairs search-function and web-identity drift on catalogs that followed an early 0.3.0-dev build, and leaves factory catalogs unchanged.
  • Security. The current RustSec advisory set is cleared, including the critical zip advisory GHSA-m665-v7pm-7grj and four rustls advisories.
  • Packaging. Debian packages and multi-architecture server and companion images for PostgreSQL 15–18 on amd64 and arm64. Debian metadata rendering is hardened, and every package ships a deterministic third-party notices file.
  • PostgreSQL 19 RC 1. Compatibility testing moves from Beta 3 to RC 1. This is non-production, and no PG19 image or .deb is published.
  • Release verification. Release gates now run in the Rust pgokf-verifier with contained process supervision. Publication happens only through an explicit dispatch.

Upgrading

ALTER EXTENSION pgokf UPDATE;   -- from 0.3.1, 0.3.0, 0.2.0 or any earlier 0.1.x / dev point version
SELECT extversion FROM pg_extension WHERE extname = 'pgokf';   -- 0.4.0

Every earlier version, including all 0.1.x releases and the 0.3.0-dev and 0.4.0-dev point versions, has an ordinary update path to 0.4.0. Take a backup first (pg_dump, or pgokf-backup in the images). The steps are:

Step What it does
0.3.1 → 0.4.0-dev1 Additive. Adds and backfills the exact SKILL.md SHA-256 and byte-size columns, then registers dump relations.
0.4.0-dev1 → 0.4.0-dev2 Reconciles search-function drift on catalogs that followed an early unpublished 0.3.0-dev build. It drops the superseded 0.2.0 concept_search_semantic / concept_search_hybrid overloads, whose overlapping defaults made defaulted calls ambiguous. It also replaces the 11-argument bm25_hits helper with the 12-argument one and restores fresh-install ACLs, comments and initial privileges. Each retired object is dropped only in its exact published shape, RESTRICT. Any other shape or custom grant aborts the update with a named diagnostic and changes nothing.
0.4.0-dev2 → 0.4.0-dev3 Restores the seven superseded pgokf_web comments (the schema, pgokf_web.users and five of its columns) verbatim from the fresh-install source, and nothing else.
0.4.0-dev3 → 0.4.0 Receipt-only finalization. Changes no objects or data beyond the standing dump-relation registration.

Declared catalog exception. A catalog that followed an early 0.3.0-dev build keeps display_name/provider at the end of pgokf_web.users, and provider at the end of pgokf_web.sessions. The physical column order is not rebuilt. Shipped code reads and writes both tables by named columns only, and the upgrade gate replays the product's statements against both orders. See "Declared catalog exceptions" in docs/api-stability.md.

MCP server (pgokf-mcp)

  • Implements MCP 2026-07-28. Legacy stdio clients still initialize before calling tools, and legacy HTTP remains sessionless. Successful legacy text payloads keep their shape, with structured content added beside them.
  • Tools: all 14 legacy tool names plus traverse_concepts, with strict schemas and structured results. Unknown arguments and wrong-typed optional filters now fail closed. Writer tools are hidden when no usable writer connection is configured. Execution errors carry stable domain codes and safe messages, without SQL error chains.
  • Resources: resources/list, resources/templates/list and resources/read over canonical okf://catalog/... URIs, with exact stored-byte reads.
  • Skills: the optional io.modelcontextprotocol/skills extension (skills/list, skills/get, and per-file bytes via resources/read) publishes the canonical pgokf.skills packages. It is modern-only; legacy clients keep get_skill. Skill manifests are served as bare text/markdown, and the exact SKILL.md SHA-256 and byte size now persist through upgrades.
  • Transports: newline-delimited stdio, and authenticated POST JSON over HTTP.
  • Not implemented: subscriptions, list-change notifications, SSE, Tasks, prompts, completions, sampling, elicitation and OAuth discovery. Details are in docs/mcp-0.4-development.md and spec/pgokf-0.4.0-mcp.md.

Web UI sign-in

The pgokf-web sign-in modes (OKF_WEB_AUTH = none, header for a trusted proxy, users for built-in accounts, and oidc for OpenID Connect with PKCE) are unchanged in 0.4.0, and existing configurations keep working. The only 0.4.0 change touching their tables is the 0.4.0-dev3 comment restoration and the declared column-order exception described under Upgrading.

Packaging and distribution

Artifact status: the images below are published to ghcr.io/logicocean (amd64 + arm64) and the eight .deb files are attached to this release, produced by the v0.4.0 tag CI run and the publish dispatch. PostgreSQL 19 RC 1 remains compatibility-testing only.

  • Debian packages: postgresql-<N>-pgokf_0.4.0-1_<arch>.deb for N = 15, 16, 17, 18 and arch = amd64, arm64. Each depends on postgresql-<N> and installs the extension library, control file, install script and full upgrade chain. The license and THIRD-PARTY-NOTICES.txt go under /usr/share/doc/postgresql-<N>-pgokf/.
  • Build hardening: packaging/deb/build-deb.sh now validates the MAINTAINER and DEB_REVISION overrides before any build step. They are rendered as pure data through a fixed-format token renderer, which closes a sed-program injection. A maintained 12-assertion suite (packaging/deb/test-build-deb.sh) must pass before CI runs the production .deb build.
  • Server images: ghcr.io/logicocean/pgokf:0.4.0-pg15 … 0.4.0-pg18 (linux/amd64 + linux/arm64). Each is a drop-in postgres image with pgokf, pgvector and pg_cron, plus the pinned, checksum-verified pg_textsearch 1.4.0 BM25 provider on PostgreSQL 17 and 18.
  • Companions image: ghcr.io/logicocean/pgokf-companions:0.4.0 (pgokf-ingest, pgokf-embed, pgokf-mcp, pgokf-web).
  • Third-party notices: THIRD-PARTY-NOTICES.txt is generated deterministically by a checksum-pinned cargo-about 0.9.2 plus an authenticated inventory of the vendored JavaScript. CI fails on any drift.
  • PostgreSQL 19: RC 1 (postgres:19rc1, pinned by index digest, and PGDG 19~rc1) is a required compatibility leg in CI. It is non-production, and no PG19 image or .deb is published. GA support will need its own reviewed change.
  • Homebrew: the formula stays on 0.2.0 inside this tag by design, because a formula cannot contain the digest of its own archive. The LogicOcean/homebrew-pgokf tap moves to 0.4.0 in a separate step after the tag.

Security

  • RustSec/GHSA updates: zip 9.4.1 (GHSA-m665-v7pm-7grj, critical) and rustls 0.23.46 (GHSA-vp88-798v-h67f, GHSA-c8m5-c952-6cm4, GHSA-w44r-93j7-qv28, GHSA-h2v8-394m-p7vv). Patch-line updates also cover Arrow/Parquet, QUIC, the sanitizer, TLS, async, Markdown, WebPKI and Zstandard.
  • The deprecated serde_yaml/unsafe-libyaml stack is replaced with the maintained yaml_serde/libyaml-rs. Askama's unused external-config feature is disabled, so the unmaintained basic-toml parser is no longer linked.
  • MCP cursor and resource digests use the workspace's HMAC 0.13 and SHA-2 0.11 generations, and the fixed wire and digest vectors are preserved.

Release engineering

  • Images can only be published from an explicit workflow_dispatch of the packages workflow naming the current tag. The resolver proves the checked-out source is that tag's commit before any registry write. Branch and tag pushes only build and smoke-test.
  • Documentation-site (GitHub Pages) deployment is manual-only, through a default-false dispatch input.
  • Release, packaging and compatibility gates run in the Rust pgokf-verifier. This includes source-guard, workflow execution-context digests, deterministic notices, Debian and image smoke tests, and reconciliation mutation campaigns. Child processes are contained with Linux pidfd and macOS launchd supervision, and CI shells are bound to the system Bash without startup hooks.

Full changelog: CHANGELOG.md · Source diff since the last tag: v0.3.0...v0.4.0