Skip to content

v1.1.3

Choose a tag to compare

@github-actions github-actions released this 25 Jul 17:08
· 578 commits to main since this release

Release Notes v1.1.3

Released: 2026-07-25

This release is a security-hardening pass on Sibyl's memory authorization surface. A single scope rule now decides who may read every graph row across search, graph navigation, synthesis, resolution, and websocket surfaces, replacing the private per-route copies that had drifted apart. Alongside the memory work, sibyld gains non-destructive schema repair, compose deployments gate health on readiness, and the CLI now exits non-zero when writes actually fail.

🌟 Highlights

🔒 One read rule for every memory surface

Memory read authorization is consolidated into memory_metadata_read_allowed in sibyl_core/auth/memory_policy.py, and every surface that hands graph rows back to a caller now runs it. Search, graph navigation, entity resolution, related-entities panels, bi-temporal edge history, cluster and visualization graphs, and duplicate detection were each converged onto the shared rule, so a private memory stays reachable only by its owner no matter which tool walked to it. Redundant per-route copies of the scope check in entities.py, graph.py, resolve.py, and the entity route were retired.

🐛 Stop broadcasting memory content over the websocket

Entity events previously published the full EntityResponse (name, description, content, and metadata) to every connection in an organization. Because a websocket connection authenticates as an org and carries no principal, there was no reader to run the scope rule against. Broadcasts now carry only the changed entity's id and type via entity_change_payload; clients refetch through /entities, which authorizes each caller individually. The web app already consumed these events by id and type, so its contract is unchanged.

✨ Non-destructive schema repair with sibyld db init

New db init command applies pending auth and content migrations for both planes and prints each plane's version before and after against the target. It never drops tables or deletes rows, skips migrations already recorded in schema_version, and is safe to run repeatedly. This gives operators a recovery path for a deadlocked or half-migrated store instead of hand-written SurrealQL.

🔧 Compose health gated on readiness

The three Docker Compose files now probe /api/health/ready instead of the liveness endpoint, matching the Helm chart, and add raise_for_status so a readiness 503 turns into a non-zero exit. A container serving a half-migrated store no longer reports healthy. Bootstrap failures now log at error level with the failing plane, its target version, and the sibyld db init remediation command.

⚡ CLI exits non-zero when writes fail

Commands across the org, auth, project, and task paths now exit non-zero on failure rather than reporting success they cannot substantiate. Buffered writes the server may have applied are no longer discarded, and db duplicates reports the rows it actually removed instead of collapsing distinct rows.

Memory Authorization

  • Owner metadata (memory_scope, principal_id, scope_key) is treated as the sole authorization input for graph rows, and none of it may come from a request body. Owner metadata is rebuilt at the shared write choke point and when a capture is promoted.
  • Graph navigation is gated on the same scope rule as search, and subgraph edges naming a hidden neighbour or an endpoint the reader cannot see are dropped so a readable row cannot pivot onto its private neighbours.
  • The API-key memory grant is threaded through every read surface, including two seams that had dropped it, and read directly so credential drift cannot grant private access. A restricted API key narrowed to a project no longer reads the principal's own private rows.
  • Owner channels are taken from the caller rather than the payload, and an operational capture can no longer name its own owner. An API-key grant no longer stands in for the owner check.
  • Project membership is now required to read project metrics; a named project no longer stands in for membership in search, and task access no longer auto-grants on a scope-only row.
  • Unstamped work items (tasks, epics) are authorized by their project channel, closing the gap that let callers read other projects' tasks by name.
  • Synthesis (plan, verify, draft) and the manage-action analysis surface now filter to the reader's scope, and manage writes against another principal's private row are refused.

Schema and Migrations

  • Added schema_invariants.py to verify schema invariants (relation metadata, SCHEMAFULL mode, unique indexes) independently of the recorded version, so a store at the right version number but wrong shape is still detected.
  • SCHEMAFULL DEFINE statements are paired with ALTER so migrations actually convert existing tables, and relation metadata is repaired rather than only the schema mode.
  • The unique-index parser now recognizes every spelling of a UNIQUE index definition.
  • Archive restore sheds undeclared fields instead of losing the row, and normalizes owner metadata a restore cannot authorize.

CLI and Operations

  • db init reports a failing plane with its error and a non-zero exit instead of silently swallowing it, and no longer reports success it cannot substantiate.
  • Pending-write metric names are now a checked type; the retired expired metric folds into discarded on read.
  • db duplicates no longer collapses rows that are not duplicates and reports the count actually removed.

Tests

  • New wire-level suites (test_wire_scope.py, expanded websocket and route tests) drive the RAG, metrics, and synthesis surfaces over the wire to confirm nothing private renders for a narrowed key.
  • Added a shared auth test harness (tests/harness/auth.py) and route-test contexts built from the real dataclasses.
  • New coverage for schema-drift detection (test_archive_schema_drift.py, test_surreal_schema_invariants.py) and capture-scope stamping failure modes.

Documentation

  • Added the v1.2 "Retrieve It" implementation plan and adjudicated the v1.2 trust-debt list against 1.1.2 under docs/architecture/.
  • Updated Docker, Ansible, Helm, Kubernetes, and monitoring deployment docs to reflect the readiness-based healthcheck.

Breaking Changes

  • memory_metadata_read_allowed now requires private_scope_granted and accessible_projects. Both previously defaulted open, so a caller that omitted either got a permissive answer. A caller that cannot resolve memberships must now pass None (which denies) and a key with no private grant must pass False. Update any direct caller of this helper to supply both keywords explicitly.
  • Synthesis functions require allowed_memory_scope_keys. The three public synthesis functions (plan, verify, draft) and materialize_synthesis_section_packs no longer default the grant to None, since None meant unrestricted session semantics. Callers must pass the API key's memory scope keys (or write out the unrestricted case explicitly).
  • Websocket entity events no longer carry entity content. Consumers that read fields beyond id and entity_type off ENTITY_CREATED/ENTITY_PENDING events must refetch through /entities.

Upgrade Notes

  • Run sibyld db init after upgrading to apply pending auth and content migrations and to repair a store left at an older schema. It is non-destructive and safe to re-run.
  • Compose deployments now probe /api/health/ready; confirm your orchestration treats a readiness 503 as unhealthy during migration windows.
  • If you call memory_metadata_read_allowed or the synthesis functions directly, add the now-required scope arguments before upgrading.
  • Review any websocket clients for dependence on entity content in change events and switch them to refetch by id.