NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules
Go modules, #2378 by repository stars
Latest stable
v0.2.13
Last release 28 days ago
25 Oct 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
7 months old
130 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
Template, model, and config edits now invalidate cached summaries on a plain `compile` (#219, the drift path). Since v0.2.12 fixed --force, one gap re
compile (#219, the drift path). Since v0.2.12 fixed --force,
one gap remained: editing prompts/*.md (or the models/embedding
configuration) and running compile WITHOUT --force still served the
cached summary — the compile key drifted, the summary cache did not.
Every summary now carries a context_hash: stamp (a digest of the
template/model/config material that determines its bytes), and reuse
requires the stamp to be present and matching. Existing summaries
self-heal: each document regenerates exactly once, on its next genuine
scheduling, and is stamped from then on. --force is no longer needed
for template edits. Granularity note: a models: or config change also
re-summarizes, deliberately — those change output bytes just as much as
a template edit (reasoning in docs/determinism.md).CI required from
the GitHub Actions app, no red-then-rerun). A green rerun can no longer
publish over a red attempt.Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
Nothing published for this version
BM25-only workspaces no longer deadlock tier-3 compilation (#218). With no embedding provider configured (an officially supported setup — status repor
BM25-only workspaces no longer deadlock tier-3 compilation (#218). With
no embedding provider configured (an officially supported setup — status
reports embed_provider: none (BM25-only)), already-compiled documents
sat in a state no code path advanced: compile --force printed "Nothing
to compile — wiki is up to date.",
template-drift recompiles never fired, and Tier 1 re-claimed the same
documents every run making no progress — silently, with no diagnostic.
Three fixes: tier-3 completion no longer requires the embedding pass
(embedding is an optional enhancement of the LLM tier, not its
prerequisite — applies to both the SQLite and Postgres queues); under a
nil embedder the Tier-1 pass marks embedding done (stops the re-claim
churn; not a vector backfill — see below); and the classification
fall-through now logs the item's pass state at Debug level (run with
-vv to see it — the default log level is WARN). Existing BM25-only
corpora heal on the next compile with no migration.
compile --force now genuinely regenerates summaries (#219). The
summarization pass served any on-disk summary whose source hash matched —
regardless of --force. Since prompt-template hashes enter the compile
key, a forced run after editing prompts/*.md reported the document as
recompiled while writing the cached summary back byte-identical: the new
template never took effect, and the only workaround was deleting
wiki/summaries/ by hand. --force now bypasses the summary cache (the
cache keeps its actual job: cheap resume of interrupted compiles).
Security bumps (GO-2026-6629, GO-2026-6809). golang.org/x/text
v0.40.0 → v0.41.0 (panic parsing crafted input in x/text/secure/precis,
symbol-level, reachable) and Go toolchain 1.26.6 → 1.26.10 (stdlib
crypto/x509: distrust compromised intermediate certificates).
sage-wiki compile --re-embed restores them.compile (not --force)
still serves the cached summary on an unchanged source — the reuse check
is source-hash-keyed only. --force is the supported way to apply
template edits to unchanged documents today.ci/qualification-data. The timing-flake family
hardening (#210) also landed in this window.Nothing published for this version
Nothing published for this version
External read-only source roots (#181). sources[].path now accepts absolute paths to existing document directories — Sage compiles them in place, neve
External read-only source roots (#181). sources[].path now accepts absolute
paths to existing document directories — Sage compiles them in place, never
copying into raw/. Setting read_only: true additionally blocks ingestion
writes to that source; relative source paths remain compatible.
Blocking quality-gate retry — compiler.quality.retry (#144). The
article quality gate was advisory-only: a sub-threshold article was logged
as "low quality" and shipped anyway. With quality.retry: true (default
false), a sub-threshold article gets exactly one rewrite — the on-disk
file is removed first, so the retry is a genuine fresh write rather than
an "improve this bad content" call (#145's prepareArticle gotcha) — and
still-low-after-retry counts as a real compile error. The knob is in the
compile key. First increment of the #144 roadmap; citation verification
is the follow-up design.
max_compile_batch bounds per-run work, not corpus size (#186). The
batch guard compared against the raw manifest diff before skip
classification — and tier<3 sources never enter the manifest, so their
diff is ≈ the whole corpus on every compile. Any workspace larger than
the limit aborted every compile with a compile_batch LimitError,
including fully-compiled ones that could never reach the
nothing-to-compile fast path; MaxDocs-truncated drain runs died the same
way. The guard now runs after classification and compares against the
work the run will actually process (capped by MaxDocs when set).
Fail-fast semantics on genuinely over-limit runs are preserved.
Events bus: Subscribe racing Close no longer trips the race detector
(#177). addSlot released the bus mutex before WaitGroup.Add(1) — a
descheduled Subscribe straggler could fire its Add after Close's Wait had
already returned at zero, the documented sync.WaitGroup data race
(three macOS race-detector sightings, all rerun-clean). The Add now sits
inside the mutex critical section, closing the window by construction.
ci/qualification.json; required jobs
digest/checksum-pinned; parity deduplicated out of the rest shard (it
was triple-tested — 78% of the critical-path pole) and fuzz-short
matrix-ized; a self-tested workflow guard in Lint kills the
comment-in-folded-if class before merge. Measured wall on the required
path: 10.7 min before the final speed pass, ~9 min after (the earlier
21-minute figure predates the whole series, concurrency onward).Nothing published for this version
Nothing published for this version
Global LLM concept curation — `dedup_strategy: "llm"` (#167). The documented-but-missing llm strategy now exists: a single curation pass over the *ful
dedup_strategy: "llm" (#167). The
documented-but-missing llm strategy now exists: a single curation pass
over the full newly-extracted concept set (plus existing manifest names
as fold targets) runs before article writing, on all three compile paths —
the only stage with global view, so a corpus-wide selectivity bar can
finally be enforced. Per concept it decides keep / fold / drop: folds
auto-apply (additive — sources union into the target and the name is
recorded as an alias), drops are gated behind llm_dedup.allow_drop
(default false) and stay logged proposals otherwise. Deterministic
never-merge guards (#164) veto any proposed fold between enumerated
identities, unknown actions keep the concept, and a total curation failure
is counted and the compile proceeds uncurated. The judgment prompt is
workspace-overridable (prompts/curate-concepts.md); new knobs
compiler.llm_dedup.allow_drop and compiler.llm_dedup.batch_size
(default 200) enter the compile key. Enabling llm replaces embedding
dedup — running both is incoherent.Configured source types survive binary extraction (#168). A custom
sources[].type (e.g. governance) was silently discarded for every
binary format — PDF, docx, xlsx, pptx, csv, epub, eml/msg — so the
summarize pass always rendered the built-in paper/article/dataset prompt
and wrote the wrong source_type frontmatter, while markdown/text/external
sources honored the type. Detection was already correct (manifest,
--dry-run); extraction now propagates the configured type to the prompt
registry and frontmatter for all formats. image and code stay pinned —
they route to the vision/code pipelines rather than restyle the prompt.
Injective citation relation IDs (#165). sanitizeID collapsed /,
\, ., and space all to -, so two sources whose paths differed only in
punctuation produced the same cites relation ID; the second insert hit
the relations.id primary key and the provenance edge was dropped at WARN
with the compile exiting 0 — invisible to wiki_provenance and graph
traversal. Relation IDs now append an 8-hex hash of the raw path:
injective, deterministic, readable. Existing vaults are unaffected —
recompiles update the same natural edge in place.
Partial concept-extraction failures are counted and named (#166). When
some — but not all — extraction batches failed, the compile reported
errors=0 and exited 0 while silently skipping up to half the corpus. A
typed PartialFailureError now increments the error count on all three
call paths and WARN-logs the skipped source documents by name, while the
surviving concepts still proceed (partial recovery preserved). When a
structured-output parse failure coincides with finish_reason=length, the
error names the token cap (MaxTokens=N) instead of a bare
unexpected end of JSON input.
Deterministic never-merge guards for concept dedup (#164). In
enumerated corpora, names differing by a digit or a draft/final qualifier
embed almost identically to true duplicates — measured, must-merge and
must-not-merge pairs interleave across the whole similarity range and peak
at the same 0.982 — so no cosine threshold separates them, and auto-merge
silently deleted distinct entities (merged concepts cease to exist as
articles/entities). Two deterministic guards now sit inside the dedup
check, regardless of score: digit-containing token sets must be equal
(mw-3/mw-2, a-17-084/a-17-086, task-order-no-44/no-4), and
draft/final + primary/secondary qualifier asymmetry blocks the
merge. Dedup merge logging raised INFO → WARN so merges are discoverable.
Same-number containment and synonym-media pairs remain threshold-governed
(use dedup_strategy: "llm" for those).
Internal: CI waiver test fixture date-rot (#170). A ciproof test fixture's waiver expiry (2026-08-20) turned required CI checks red on every run regardless of the code under test; the valid-case fixture now carries a far-future date.
Nothing published for this version
Go 1.26.6 security toolchain. go.mod now pins Go 1.26.6 for builds, addressing GO-2026-6218 (CVE-2026-56860, quadratic-time URL path resolution) and G…
Go 1.26.6 security toolchain. go.mod now pins Go 1.26.6 for builds,
addressing GO-2026-6218 (CVE-2026-56860, quadratic-time URL path
resolution) and GO-2026-6090 (CVE-2026-56862, TLS KeyUpdate denial of
service).
Bounded source context for high-fanout concepts (#146). buildSourceContext
now caps the total assembled source context to a configurable token budget
(default 100,000 tokens). Sources are prioritized by match density so
high-relevance sources are kept when budget pressure forces truncation. A
visible warning is logged with concept name, sources kept/dropped, and budget.
Previously, a concept cited across many documents could silently exceed the
model's context window, producing a 400 error and no article.
Deterministic document-budget timeout attribution. Summarization and
triple extraction now identify compile_doc_timeout from the exact child
context deadline instead of comparing a separately started elapsed-time
counter. Parent cancellation and provider timeouts remain distinct, and typed
timeout diagnostics no longer report consumed time below the configured
limit.
Project prompt overrides apply to every compilation surface (#143).
Overrides in a workspace's prompts/ directory now take effect for
standard sage-wiki compile, serve background worker cycles, and MCP/REST
on-demand topic compilation.
SQLite writer reservation at transaction begin. A second handle on the
same SQLite path could enter a write transaction while another handle held
a deferred snapshot, commit, and force the paused handle's later snapshot
upgrade to fail with SQLITE_BUSY_SNAPSHOT mid-callback — the
cross-handle contention class behind hosted CI flakes. The writer DSN now
uses _txlock=immediate, so both WriteTx and BeginWrite take the
writer lock at BEGIN, where the existing busy-handler arbitration applies,
instead of at first write.
Deterministic idle-close and worker-cycle tests. The engine manager's
idle-close tests drive the idle evaluator directly with explicit
timestamps instead of real-time sleeps, and the compile worker harness now
mirrors serve backend ownership (one handle, same backend, for every pass
store) — removing the stray second handle that distorted worker-cycle runs
with BUSY_SNAPSHOT flakes. The cross-handle production class stays
covered by the dedicated two-handle storage test.
Opt-in in-memory compile providers for Go embedders. pkg/engine now
exposes WithCompileProvider, allowing Workspace.Compile completions to
use a caller-owned pkg/provider.Provider without storing its credential in
config.yaml. Existing WithProvider behavior remains search-only, and
callers that do not opt in remain config-backed. Injected completion errors
fail closed without config fallback; usage accounting, compile-key mode
separation, structured-output validation, and synchronous-mode enforcement
remain active.
CI responsibility foundation (advisory). Quality responsibility is now
machine-readable: ci/standards.yaml records every standard with owner,
witness, purpose/authority evidence, diagnostics, and qualification state;
ci/package-ownership.yaml partitions all Go packages exactly once;
ci/platform-contracts.yaml inventories platform-sensitive source against
focused Windows/macOS contracts. A fail-closed validator
(tools/civalidate) checks these manifests against the live tree — exact
package partition, aggregate membership, Make targets, determinism roles,
and platform-signal ownership — and a Go-test JSON summarizer
(tools/testsummary) produces actionable annotations while preserving the
source command's exit status. make ci is redefined as the accurate local
fast gate (formatting, module verification, builds, vet, new-issue lint,
responsibility validation, determinism, generated/API/skill drift,
translation checks, non-race tests) and prints the hosted-only evidence it
does not cover; make ci-race is the canonical local race contract. A new
advisory CI job runs the checker self-tests and live validation: it may
turn red but is deliberately outside the CI required aggregate, which is
unchanged. Current required jobs remain required-requalifying; target
jobs are candidates that must earn promotion through the qualification
window.
Hosted CI aggregate check-run (CI required). The main CI workflow
now emits a single stable check-run that explicitly inspects every
required job (build, parity, go-test, fuzz-short, skill-drift, postgres,
minio, lint, frontend, translations) and reports failure unless all
succeed — including on runs where a dependency failed. One stable status
for pre-main merges: make ci stays mandatory local evidence, and a green
CI required on the latest PR SHA is the gate maintainers hold before
merging — a policy gate today, mechanical once branch protection requires
the check on main.
Nothing published for this version
Nothing published for this version
Release v0.2.8. See CHANGELOG.md.
Release v0.2.8. See CHANGELOG.md.
server /data command; crash-test skipped on platforms
without flock.Release v0.2.7. See CHANGELOG.md.
Release v0.2.7. See CHANGELOG.md.
limits: block
in config.yaml now caps every ingestion, compile, query, and serve
surface; zero values resolve to safe defaults (never "disabled"). New
limits: max_doc_bytes (10 MiB), max_docs_per_capture_batch (10),
max_compile_batch (1000), max_query_bytes (32 KiB),
max_graph_traversal_nodes (10000), max_concurrent_provider_calls (20),
max_concurrent_requests_per_conn (8), provider_timeout (120s), and
compile_doc_timeout (15m). Every violation returns a typed LimitError
and emits a limit_exceeded event; a new edge_rejected event (and
edge_rejected_total metric) records LLM edges dropped by span
verification. pkg/engine gains WithLimits for per-open tightening.
Serve mode is hardened: production server timeouts + a 1 MiB header cap,
a per-connection in-flight request guard (429), and a 1 MiB /mcp body
cap. docs/security.md documents the threat model, the limits table, the
prompt-boundary design, and residual risks. Four new native Go fuzz
targets (FuzzFrontmatter per owning package, FuzzWikilink,
FuzzAliasNormalize, FuzzCanonical) run PR-gated (30s) and nightly.max_doc_bytes default 10 MiB lowers the previous 50 MB engine/URL
capture ceiling; operators with larger docs set limits.max_doc_bytes.IngestURL no longer silently truncates oversized downloads — it
errors.compile_doc_timeout
(default 15m) now expires with a typed timeout instead of running
unbounded (new default-on behavior; configurable via limits:).events_dropped_total); events never carry document content, raw query
text (hashed by default), or filesystem paths. The new events: block
(enable, dir, buffer_size, stdout, raw_queries) writes a rotating
JSONL audit trail under events/ (10 MiB/file, 5 generations). Serve mode
adds an HMAC-SHA256-signed webhook fan-out (serve.webhooks, secret via env
or file, at-least-once with retries + a dead-letter file) and an SSE stream
at GET /events/stream. The Prometheus surface at GET /metrics gains the
operational series: compiles_total, compile_duration_seconds,
compile_pass_duration_seconds, llm_tokens_total, llm_retries_total,
llm_rate_limited_total, search_duration_seconds,
search_channel_duration_seconds, query_duration_seconds,
embed_calls_total, vector_cache_hits_total/_misses_total,
workspaces_open, job_queue_depth, events_dropped_total, and
mirror_ship_lag_seconds. The pkg/events package is the supported sink
seam (engine.WithEventSink). Docs: events,
webhooks, metrics.Deterministic artifacts + content-hash dedup (SPEC-04). Identical
inputs now produce byte-identical artifacts — articles, summaries,
manifest, wiki.db, vector index, and exports are reproducible
bit-for-bit (temperature defaults to an explicit 0, map-order iteration
is sorted everywhere, parallel results apply in input order, one
SDE-aware clock, PRAGMA secure_delete, normalized tar headers).
Unchanged docs are never recompiled: every tracked doc carries a
content-addressed compile key (source hash + pipeline version +
template versions/hashes + resolved models + resolved config subset +
embed identity), and compile skips key-matched docs — the first run
after upgrading adopts keys with zero provider calls, so the
"never re-billed" pledge is immediate. sage-wiki compile --force
bypasses; sage-wiki compile --explain DOC prints exactly why a doc
would compile or skip; sage-wiki diff annotates key drift
(pipeline/templates/models/config/embed); skips are reported in
CompileResult, CLI output, and compile_skip engine events.
compiler.temperature (0–2) overrides the deterministic default.
docs/determinism.md documents the rules, the excluded-field family,
and contributor duties; scripts/check-determinism.sh runs in CI.
Per-generation object maps — PITR now covers markdown. Each rotation seals the superseded generation's doc/vector object map into its meta.json, so hydrate --generation N and hydrate --at T (into a rotated generation) restore a CONSISTENT tree (db chain + docs as of that generation) instead of db@TIME with docs@newest. Docs restore at per-generation granularity (a mid-generation delete may persist, a create may be missing); an --at restore report prints both skews (--generation is seal-consistent). Pre-map mirrors fall back to docs at newest with a printed note. mirror verify checks the sealed maps too (invariant (c): a retained generation is FULLY restorable, not just db-restorable).
Mirror follow-ups — SigV4 suite, STS, retain-in-state, budgets. The
mirror's SigV4 signing is now verified against the vendored
aws4_testsuite (botocore, Apache-2.0) with derived S3-shaped
expectations covering session-token signing. STS temporary
credentials work via mirror.session_token_env (default
AWS_SESSION_TOKEN) or session_token in the credentials file
(same-source pairing enforced loudly). mirror verify prefers the
retain_generations recorded in mirror-state.json over local config.
The serve drain shares one budget across rotation wait, final ship,
and quiesce, whose full-db hash is now interruptible. S3 calls get
per-attempt payload-scaled timeouts (30s floor, 15m cap) so large
snapshots complete and stalled servers are still cut. A maintainer-run
live-AWS smoke (SAGE_TEST_AWS=1) exists but never runs in CI.
Remote mirror — S3-compatible backup, WAL shipping, hydrate (SPEC-03).
sage-wiki mirror enable|status|snapshot|verify continuously replicates
a workspace to any S3-compatible bucket (S3, R2, MinIO), and
sage-wiki hydrate s3://<bucket>/<prefix> <DIR> restores it into an
empty dir with point-in-time (--at, segment granularity),
--generation, and ordered --partial (lexical/graph available before
vectors) options. The db ships Litestream-style (snapshot + WAL
segments via the SQLite online backup API, VACUUM INTO fallback);
markdown, sources, prompts, manifests, and vector indexes ship as
content-addressed objects; deletes are tombstones (bucket versioning
honored). Crash safety: the commit pointer is written last, so any
kill -9 leaves the previous committed generation restorable — proven by
a crash-injection loop (kill mid-ship ×N, verify always valid).
Shipping runs in-process under serve (continuous) and after every CLI
command (best-effort pass, never changes exit codes); a single-leader
ship-mutex serializes concurrent shippers. Optional AES-256-GCM
client-side encryption (off by default; mirror verify works without
the key). Hand-rolled stdlib SigV4 client — zero SDK dependency;
klauspost/compress (zstd) is the only new dependency. config.yaml
is never mirrored (it can hold secrets). New mirror: config block
(endpoint, bucket, prefix, region, credential env names or
credentials_file, ship/snapshot/min-rotation intervals, ship-lock and
drain timeouts, retain_generations, max_consecutive_defers,
encryption). Guide: docs/guides/remote-mirror.md. CI runs the
integration suite against a MinIO service; offline tests perform zero
network I/O.
Multi-workspace + bounded vector memory (SPEC-06).
pkg/engine.OpenManager manages many workspaces in one process: a
registry of root subdirectories, lazy open, LRU close beyond
WithMaxOpen, optional WithIdleClose, per-workspace SPEC-01 locks,
traversal-proof name validation, and a WithOnEvict seam for
refcounted consumers. serve --workspace-root <dir> serves every
workspace under a root at /w/{name}/... (REST + MCP) with
/v1/workspaces, one root token guarding all /w/*, and one shared
compile-concurrency gate across stacks. vectors.backend: mmap moves
the vector index to an on-disk mmap-served snapshot (fp32 exact —
golden-parity identical — or int8 at measured recall@10 = 0.994),
rebuilt via sage-wiki index rebuild-vectors; missing/stale snapshots
fall back to the in-memory cache with a warning. Measured on a
50K×384 fixture: search heap ~2% of the in-memory backend, warm
latency within 1.1x, cold search ~6x faster. The memory ceiling is
unix-only; other platforms serve the index from memory and warn.
serve --addr (or bare serve) runs the
engine as a persistent process: REST surface (healthz/readyz, capture,
search, async compile jobs with a persistent .sage/jobs.jsonl
ledger, graph query with as_of, docs, tar export, metrics), all 19
MCP tools over streamable HTTP at /mcp, token-file bearer auth with
non-loopback refusal, a rate-limit middleware hook with a token-bucket
example, and graceful shutdown with --drain-timeout. The HTTP mode
takes the workspace lock (CLI mutations on a served workspace fail
fast — the single-writer invariant); serve --transport stdio|sse and
--ui keep their pre-existing lock-free behavior. Behavior note:
bare serve previously started stdio MCP — pass --transport stdio
for the old behavior.pkg/engine is the supported embedding
surface: Open/Init → *Workspace with Capture, Compile
(per-run tier/model/MaxDocs/MaxCost overrides), Search, Graph
(typed queries incl. AsOf), Export, Stats, Close. Exclusive
workspace lock (flock + lockfile fallback; second read-write Open
fails fast with ErrLocked; WithReadOnly for lock-free reads).
Workspace manifests now carry format_version/engine_version/
created_at; v0.2.x workspaces (no format_version) open read-only
until adopted with WithUpgrade. Companion packages: pkg/provider
(+ deterministic offline providerfake), pkg/events (usage events via
WithEventSink), pkg/mirror (SPEC-03 seam). No internal/ type
appears in exported signatures (lint test), and
examples/embed runs offline in CI. The
compile, search, capture, and query CLI commands route through
pkg/engine — during an active compile, capture/query now fail
fast with "workspace is locked by another process" (the single-writer
invariant; previously they raced lock-free).openai-compatible/qwen endpoints were priced
against the OpenAI table (DeepSeek over-reported ~50x); unmatched models
fell back to a flat guessed default. All pricing now flows through a
provider:model registry with no cross-provider fallback. Cost numbers
produced before this fix by those providers are unreliable.sage-wiki cost commands (SPEC-05). Prices
load from embedded defaults (per-entry as_of dates, marked as
estimates) → ~/.sage-wiki/prices.json → workspace compiler.price_table
(legacy PERF-04 files keep working). Unknown model ⇒ cost: unknown (model not in price registry) — never zero, never a guess. Cached and
cache-write tokens are priced at their own rates (DeepSeek's
prompt_cache_hit/miss_tokens and Anthropic's cache_creation are now
parsed). Every compile, batch, query, and search-expansion call appends
a usage event to .sage/usage.jsonl; sage-wiki cost report [--since]
aggregates it by model and pass/tier, sage-wiki cost models audits the
effective registry with sources.sage-wiki init creates, in all seven locales) and CONTRIBUTING gains a
"Repository layout" tree for contributors — both marked illustrative,
one level deep.wiki_query
documented in the Agent Memory Layer guide (new "Free-form Q&A with
filing" section) and in all seven READMEs' MCP sections; the
team-setup diagram's tool counts corrected (7 read, 9 write,
3 compound = 19 — they were wrong before the tool existed). Root images
moved to assets/ and translations to docs/translations/ with the
MAINT-05 drift check updated to match.wiki_query MCP tool (#125) — the 19th tool. Ask a free-form
question over MCP: the tool runs the exact CLI query pipeline (search →
LLM synthesis → auto-file) and returns the answer, source paths, and the
filed path. Filing follows the CLI's trust semantics: wiki/under_review/
by default (trust output review), wiki/outputs/ only when
trust.include_outputs: "true". Args: question (required), top_k
(1–20, default 5). The server's vector chunk cache is invalidated after
each filing, filing failures surface as a filing_error field (never a
silent empty path), questions are YAML-escaped in filed frontmatter, and
same-day same-slug filings dedup instead of clobbering. Note for
downstream tooling: the registry now has 19 tools (7 read, 9 write,
3 compound by registration; generated skills render behavior kinds —
read/write/async/compound — from the live registry).outputs/ or under_review/ (provider adapters can return
empty content without error — the same defect family the compiler guards
against). query.Query now errors before filing, with the actionable
EmptyContentDetails hint when available. Applies to both the CLI query
command and the new wiki_query tool.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Python client `sagewiki` (`clients/python/`, P4-3). Typed sync (SageWiki) and async (AsyncSageWiki) clients over the /v1 REST API — one shared request
sagewiki (clients/python/, P4-3). Typed sync
(SageWiki) and async (AsyncSageWiki) clients over the /v1 REST API —
one shared request-building implementation, httpx as the only
dependency, stdlib dataclass models, py.typed shipped. One method per
route; the full error-code vocabulary maps to exception classes (branch
on code, never message); compile/lint return a Job whose
wait(timeout) requires an explicit timeout (raises JobTimeout,
JobFailed; returns on cancelled); Conflict.active_job_id exposes
the 409 details; idempotency keys forwarded verbatim and required before
any write is retried. Contract-tested against a live server in CI
(scripts/p4-fixture-server.sh — a keyless fixture seeded through the
write API). Pre-1.0 — pin a version.sagewiki (clients/typescript/, P4-4). Typed,
zero-runtime-dependency client over /v1 using global fetch — runs on
Node ≥18, Deno, Bun, and edge runtimes (no Node built-ins in the main
entry, statically asserted). Dual ESM + CJS output with types.
Compile-submit bodies are discriminated unions: mixing topic with
compile flags is a compile-time error. Same error taxonomy as the Python
client (instanceof and switch (e.code) both work), AbortSignal on
every method including job waits, waitUntilDone({ timeoutMs }) with a
required timeout. Contract-tested against a live server in CI.examples/, P4-6). Two CI-exercised, keyless
examples: examples/langgraph/ — retrieval + capture nodes showing the
uncompiled_sources > 0 → topic-compile-and-wait pattern (stubbed LLM);
examples/vercel-ai-sdk/ — search, graphQuery, provenance as AI
SDK tools, with the edge-deployability note. Both run headlessly in CI
against the fixture server and assert a non-empty result. Exactly two, by
design.publish-python.yml (PyPI Trusted Publisher) and
publish-typescript.yml (npm with provenance), manual-dispatch or
py-v*/ts-v* tag triggered, version-match checked, with a post-publish
pin-resolution verification step. Publishing itself remains maintainer-run./v1/jobs/* were cancelled the instant their 202
was sent. The job goroutine derived its context from the HTTP request,
which net/http cancels when the handler returns — so every job died as
soon as submission completed (invisible to httptest, which never
reproduces request lifecycle cancellation; caught by the Python client's
live contract test). Job contexts now derive from context.Background()
with the existing 2-hour cap, pinned by a regression test that drives a
real server and client./v1/jobs/*, P4-2). Long-running
operations are now job submissions over REST: POST /v1/jobs/compile
(full mode via compile flags, or topic mode via {topic, max_sources?})
and POST /v1/jobs/lint return 202 Accepted with a job_id; poll
GET /v1/jobs/{id} through pending → running → done | failed | cancelled, list recent jobs via GET /v1/jobs (bounded to 100, FIFO
eviction), cancel via DELETE /v1/jobs/{id} (best-effort; the compile
checkpoint stays resumable). Submitting while a compile is active returns
409 conflict with the active job's ID; Idempotency-Key on submit
replays the same job_id without re-dispatching (per-kind scoped,
X-Idempotent-Replay: true); compile jobs mirror the shared progress hub
into the job's progress field. Jobs dispatch to the same compile/lint
functions the MCP tools call — no parallel job system; records are
in-memory (same restart semantics as the idempotency store). MCP tool
behaviour is unchanged.sage-wiki reference + sage-wiki-integrate pipeline
(P4-5). Two installable skills generated from the live MCP tool
registry (go run ./tools/skillgen/): the reference skill documents all
18 MCP tools with REST equivalents, the fixed error-code vocabulary,
opt-in flags with their true defaults, tiers 0/1/3, and async compile
semantics; the pipeline skill wires sage-wiki into an existing repo
(detect language → client or MCP config → smoke test). A CI drift check
regenerates and git diff --exit-codes the skills/ tree, so a tool
change cannot ship with stale skills. Install:
npx skills add https://github.com/xoai/sage-wiki --skill sage-wiki.compiler.min_concept_sources gate (default 1; 0 disables) fully
suppresses concepts with no declared sources — no article, no LLM call,
no manifest entry, on all three compile paths. The extraction prompt also
tells the model not to emit unresolvable acronyms as standalone concepts.init no longer destroys user files (#127). Re-running sage-wiki init
preserves .gitignore (appends .sage/ instead of clobbering) and
.manifest.json (skips when present — previously every re-init wiped
compile history and orphaned the vault). New --force flag rewrites both
intentionally (config.yaml stays preserved unconditionally). Also:
sage-wiki init <dir> now honors the positional directory argument —
previously it was silently ignored and the current directory was
initialized instead, which could scatter (and wipe) the wrong directory.
More than one positional argument is now an explicit error.Backend-neutral reconciler (P3-7). The startup reconcile now honors
storage.backend: on a Postgres vault it heals the Postgres store
(previously it always opened the SQLite file, reconciling nothing real on
PG vaults). wiki.ReconcileBackend is the new primary entry; the legacy
Reconcile path is behavior-identical for SQLite (all existing call
sites unchanged). Completes the graph storage
backend seam — see .sage/docs/design/graph-storage-backend.md for the
cookbook 3-table mapping, traversal rationale, and the Neo4j follow-on.
Note: on Postgres, a contended writer open at startup stalls up to
storage.lock_timeout then skips reconcile with a warning (never blocks
startup).
/v1 REST facade + OpenAPI 3.1 + drift check (P4-1). sage-wiki is
now callable from any language: 16 synchronous routes under /v1
dispatch 1:1 to the existing MCP tool handlers (sage-wiki serve --ui),
with a single JSON error envelope and fixed code vocabulary, structured
/v1/status, edge validation for precise 400s, 412 feature_disabled
pre-checks for as_of/mode=global, a 100 KB cap on capture (413), and
Idempotency-Key replay on every write (in-memory, bounded — keys do not
survive restart, documented). Auth reuses the existing Bearer + Host
allowlist middleware; /api/* and all 18 MCP tool names are provably
unchanged (regression tests). The hand-authored api/openapi.yaml is
enforced against the registered routes and the tool registry by a new
drift test (internal/api), including a self-test that proves it catches
drift. Async job endpoints for compile/lint follow in P4-2. Guide:
docs/guides/http-api.md.
Added the MIT LICENSE file (P4-0). The README has always said MIT but
no license text shipped in the tree, leaving the default legal position at
all-rights-reserved and blocking corporate adoption review. LICENSE is
tracked in git, linked from the README's License section, and is picked up
by the release workflow's existing [ -f LICENSE ] guard, so release
archives include it from the next tag.
make ci now covers the translation-drift check. The documented local
gate claimed to mirror CI but omitted MAINT-05, so a README.md-only change
could pass make ci and still fail CI after merge. New make translations
(same merge-base semantics as the CI job) and make translations-self-test;
CONTRIBUTING documents the translations rule and the maintainer fork-PR
workflow-approval step, and PRs get a checklist template. (#126)
pkg/sagewiki — in-process Go embedding (#112). A supported, non-internal
entry point for embedding sage-wiki in another Go program without spawning
sage-wiki serve as a subprocess. NewServer(projectDir) returns a handle
exposing MCPServer() and Close(); pair it with mcp-go's
client.NewInProcessClient to call the same wiki tools an editor integration
calls over stdio. SetVersion lets an embedder report its own version string
in the initialize response. The package is experimental while sage-wiki is
pre-1.0: the Go signatures are meant to stay put, but tool names, argument
schemas, and config.yaml layout can change in any release.
initialize returned a
hardcoded 0.1.0 in serverInfo.version regardless of the binary's actual
version; it now reports the -ldflags-injected build version (dev from a
plain go build), mirroring internal/pack.Version.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Graph communities + global queries (P3-5). Opt-in GraphRAG-style sensemaking: deterministic pure-Go Louvain detection over the ontology graph (hierarc
wiki_graph_query with mode: "global".
Enable with ontology.communities.enabled: true (default off — indexing
cost is one Louvain run plus roughly members/10 cheap-model calls on first
enable; global queries cost 1 + K calls). Community markdown lands in
wiki/communities/.Bi-temporal graph edges (P3-6). Relations now carry live validity: valid_from (when the fact became true — source frontmatter date, file mtime, or man
valid_from (when the fact became true — source frontmatter date, file
mtime, or manifest added-at) and valid_to (when it stopped). Default
relation reads return only currently-valid edges, so answers are
contradiction-free; wiki_graph_query and ontology query --as-of answer
point-in-time questions ("what did we believe in January?"), and edge
provenance in graph answers carries the validity window. Relations marked
functional: true in config (ontology.relations) are single-valued per
source: a new contradicting edge invalidates the old one (never deletes it)
instead of colliding — auto-applied at or above
ontology.temporal.auto_apply_threshold (default 0.8), surfaced as a
reviewable trust conflict below it, as are entity-level contradicts
edges. Set ontology.temporal.enabled: false to opt out entirely.Knowledge-graph / graph-memory section in all seven READMEs, covering entities, typed relations, evidenced edges, triples, entity resolution and multi
readStateFileRetrying and a test asserts it.ERROR_SHARING_VIOLATION reads "The process cannot access the file
because it is being used by another process" — containing neither "sharing
violation" nor "access is denied", and Go does not map it to
fs.ErrPermission. The predicate checked only those, so the most common
Windows contention error fell through as fatal in both the rename retry and
the new read retry.TestMigrationV3/V4/V5 clone the base database and then simulate a
downgrade, but did so before creating any schema — so they only passed
against a long-lived developer database that had accumulated the schema
from earlier runs, and failed on every fresh CI Postgres with
relation "relations" does not exist. They now create the schema first.CREATE EXTENSION
itself by design, and the image's initdb hook was not reliably creating it,
so every pg test failed with "relation does not exist".writeFileAtomicUnique via
isTransientRenameError), but reads did not — so a concurrent writer
holding the handle surfaced as "The process cannot access the file because
it is being used by another process" and aborted the caller outright. Same
family as the v0.2.2 manifest-lock fix, different code path; present in
v0.2.2 and earlier, not a regression.Nothing published for this version
Memory benchmark harness (eval/benchmarks/) running LOCOMO, LongMemEval, and BEAM against sage-wiki as the system under test, using the datasets, prom
eval/benchmarks/) running LOCOMO,
LongMemEval, and BEAM against sage-wiki as the system under test,
using the datasets, prompts, and judging procedure of
mem0ai/memory-benchmarks
(Apache-2.0, vendored with attribution). Each conversation compiles into
its own sage-wiki project, then retrieval runs through sage-wiki search.
Results with gpt-5 as answerer/judge on scoped samples: LOCOMO 92.0%
@ top-50 (150 q), LongMemEval-S 93.3% @ top-50 (30 q), BEAM 100K
0.691 mean nugget (60 q) — see eval/benchmarks/REPORT.md for the
comparability caveats, which are substantial.Retry-After honored), rate-limited search degrades
get more retries than permanent ones, and sustained limiting aborts the run
cleanly with resume instructions rather than burning the remaining queue
into failures.eval.py could not read any real wiki. It hardcoded _wiki/ while the
scaffold emits output: wiki, so it exited 1 on every project the current
binary produces; it now resolves the output directory from config.yaml.eval.py fact-extraction always scored 0% on real wikis — it counted
only bullet lines under ## Key claims while the summarize pass writes
prose, so a single run reported 0% extraction and 100% "Structural — Key
claims". Counting is now format-agnostic, and the section regex no longer
swallows an empty section into the following heading.ERROR_ACCESS_DENIED on Windows (pending-delete or
sharing violation), which os.IsExist does not match — so a routine lock
race aborted the caller's Mutate and silently dropped its update.
Concurrent manifest writers on Windows could lose data.eval_test.py's synthetic fixture generator. The April 2026 figures
(85.9–86.7%) described the generator's parameters; measured across 10 real
wikis the overall score is 87.4% median with 100% fact extraction.
Updated in all seven READMEs.search now honors the configured hybrid weights (default
0.7 BM25 / 0.3 vector) and the search.ann.enabled setting — it
previously fused with 1.0/1.0 and always brute-forced. The dead
--scope flag (parsed, never read) is removed./api/search now embeds the query and passes the configured
hybrid weights — it previously passed a nil vector, silently running
BM25-only regardless of embedding configuration.search.rerank_min_coverage (default 0.5) of the head the
blend is skipped entirely, keeping RRF order.sage-wiki reindex rebuilds the chunk index from the documents on
disk using the current chunking config — compiled articles
(concepts/, summaries/, outputs/) and chunk-indexed raw sources
alike, replaced per document (delete-then-insert). No LLM article
writing happens. Re-chunking changes chunk IDs, so old chunk vectors
cannot be kept: without an embedding provider the command stops rather
than empty the chunk-vector leg, and --drop-chunk-vectors rebuilds the
text index anyway (chunk-level vector search stays off until the next
compile --re-embed).sage-wiki search --boost-tags a,b and MCP
wiki_search{boost_tags} rank documents carrying those tags +3% each
(capped at 15%) without excluding anything — the complement to
--tags/tags, which filter. The boost was specified and implemented
but had no caller until now.search.chunk_overlap_tokens (default 0, recommended opt-in
80, max half of chunk_size): each chunk after the first repeats the
tail of its predecessor, so a fact straddling a chunk boundary is
retrievable from either side. The default 0 is byte-identical to previous
chunking — upgrading never re-chunks an existing index. Changing the
value takes effect only via sage-wiki reindex; edit the config and
reindex as one step, or the index mixes both chunkings (docs:
search-quality.md § Chunk overlap).Web /api/search score is now the normalized [0,1] fused score, not
the raw RRF score (~0.016 scale) — a client thresholding on it needs new
thresholds. New field: source_date (unix seconds; omitted when the
document has no known origin date).
sage-wiki search --config <path> now fails when that file cannot be
loaded instead of silently searching with default weights and no
vectors; auto-discovered config still degrades with a warning.
--expand/--rerank fail when no LLM client can be built, and
sage-wiki reindex refuses to run against an unloadable config.
Query-term stopwording is corpus-adaptive: above 100 documents, terms
matching more than 20% of documents are dropped from the lexical query,
and both the document and chunk legs prune the same term set (they now
probe the same corpus, which also removed the chunk leg's per-term
COUNT(DISTINCT) join — the single largest cost in unified search).
Every search surface now runs the unified retrieval pipeline
(MCP wiki_search, CLI search, web /api/search, and the TUI —
sage-wiki query moved in M2): chunk-level and document-level hits fuse
with the configured weights, the ontology graph contributes as a third
channel, and dated documents get the recency tie-breaker. Result
ordering changes on all of them. Results gain FinalScore,
GraphRank, SourceDate and AliasOf (web: source_date) alongside
the existing fields, and MCP/CLI gain per-call channels, expand and
rerank options — the LLM stages stay OFF unless asked for. The TUI ran
BM25-only with default weights before; it now uses the configured
weights, vectors and graph like every other surface.
search.pipeline: legacy pins any surface back to the previous
doc-level path if the new ranking is disruptive; the value is validated,
so a typo is rejected rather than silently resolved to unified.
Result hydration is a single batched query (EntryStore.GetMany)
instead of one lookup per result document — it was the unified
pipeline's dominant per-query cost, and removing it puts the unified
path at parity with (slightly under) the legacy doc-level path's
latency on a 1k-entry corpus despite searching both chunks and
documents.
Search entry points now apply the trust.include_outputs rule
(MCP wiki_search, CLI search, web /api/search, TUI, and
hub search): output:
documents — LLM-generated answers auto-filed back into the wiki — are
excluded unless the mode admits them (true always, verified only
once confirmed). The default is false, so by default these surfaces
no longer return outputs. Previously only the Q&A path enforced this,
and an agent searching the wiki could read what a Q&A answer would
refuse to cite. Set trust.include_outputs: true to restore the old
search behavior.
sage-wiki query retrieval was rewritten as a unified weighted
fusion (20260728-search-upgrade M2): document- and chunk-level hits
now both contribute (agreement across granularities ranks higher),
the configured hybrid weights apply on this path for the first time,
multi-query expansion variants sum instead of taking the best rank,
and rankings will shift accordingly.
The ontology graph now joins retrieval ranking as a third fused
channel (sage-wiki query path): query terms seed entities (alias
links included), a depth-2 traversal with per-relation weights
(contradicts 1.1, cites 0.7) ranks their neighborhoods, and the
results fuse at search.hybrid_weight_graph (default 0.2). Articles
reachable only through the graph can now surface; results carry
their graph rank and an alias_of note when reached via an alias.
An empty ontology costs nothing (byte-identical results).
All search surfaces (query, MCP, CLI, web, TUI, hub) inherit two lexical upgrades through the shared query builder: on corpora over 100 documents, query terms matching more than 20% of documents are pruned (corpus-adaptive stopwording), and entry matching now weights the id/article-path columns 3× over body content (title-proxy boost; Postgres schema migration v6 rebuilds the search vector). Result rankings on every surface change accordingly.
README diagrams refreshed (architecture, compiler pipeline, interfaces) — higher-resolution replacements for the three PNGs.
Translated READMEs regenerated to full parity with the restructured English README (zh, ja, ko, vi, fr, ru): same 22 sections, localized internal anchors, translated bash-fence comments with byte-identical commands, verbatim config identifiers and numbers. The temporary restructuring banners are removed; the standing may-lag marker stays.
Nothing published for this version
…4; batch API availability includes Gemini; the deprecated ontology.relations key reference now reads relation_types; benchmark numbers refreshed to ev…
docs/guides/configuration.md (the full annotated config, multi-provider
recipes, the serve-mode compile worker, price-table override) and
docs/guides/customizing-prompts.md (prompt scaffolding — all EIGHT
template files, not the five previously listed — and custom frontmatter
fields). Guide merges preserve README-only content: the block-level
co-occurrence rule for relation extraction (configurable-relations), the
in-memory vector-cache restart caveat and opt-in ANN section
(search-quality), external-parser hardening details (CONTRIBUTING +
team-setup), and webui dist regeneration (CONTRIBUTING).
User-visible corrections riding along: summary_max_tokens default is
4000 (was misdocumented as 2000) and init writes max_parallel: 4;
batch API availability includes Gemini; the deprecated
ontology.relations key reference now reads relation_types; benchmark
numbers refreshed to eval/REPORT.md's current results (85.9–86.7%
overall, 97.5–99.7% recall@1) with fixed eval/ paths; the command table
gains ontology resolve, hub init|compile, compile --fresh,
source, coverage, and version; .bmp added to supported image
formats; the stale "durable workers — do not assume" note in
storage-backends.md now points at the shipped serve.worker. Translated
READMEs carry a parity banner and the corrected 18-tool count (7 read);
full translation parity follows in dedicated commits.ontology.resolve.enabled: true, a new compile pass proposes links between
surface-form variants of one entity — "NASA" and "National Aeronautics and
Space Administration" — so that once applied, the canonical carries the union
of the cluster's edges. Proposals are queued, not applied: see the default
below.
It links; it does not collapse: both entity rows survive and the canonical
gains the alias's edges, so nothing is ever deleted. It is also reversible
— sage-wiki ontology resolve --unlink <alias> removes exactly the edges that
link caused and rejects the pair so a later compile cannot re-apply it.
Defaults to off; and when
enabled, auto_apply_threshold defaults to 0.85 — a proposal at or above
it that passes every guard is applied automatically, and --unlink makes a
mistaken link cost one command, which is what justifies the default. Set an
explicit 1.0 for review-only and it is a hard guarantee: 1.0 means never
auto-apply, exactly, so even a model reporting confidence 1.0 cannot clear
it. The pass warns at the default log level whenever proposals are waiting,
and when an out-of-range threshold falls back to the 0.85 default.
Auto-apply additionally requires a description on at least one side,
and triple extraction is the only compile-path writer of those — though
sage-wiki scribe writes them too, so resolve on with triples off is not
by itself a guarantee. A proposal goes to review when the threshold forbids
auto-apply (an explicit 1.0), when confidence is below it, when the model flags a
member as strictly "broader", or when neither side has a description; decide
them with sage-wiki ontology resolve --review|--apply|--reject|--unlink. Rejection is symmetric,
so re-rolling the direction cannot bypass it. Candidate blocking is seeded only
by entities the compile touched (a new unmatched entity costs zero LLM calls)
and discards name tokens shared by more than 5% of a type, with an absolute
floor so a rare name in a small vault survives. use_embeddings optionally
widens candidates to names sharing no tokens, in memory and globally capped.
sage-wiki ontology resolve --sweep re-applies approved links with no LLM
calls — the remedy for edges added outside a compile. SQLite migration V11 and
Postgres migration v4 add the entity_aliases table on both backends. See
docs/guides/graph-memory.md, including the cost section and the notes on
derived-edge provenance and the partial prune contract.wiki_graph_query ({question, hops?, max_edges?}) answers relational
questions by traversal: seed entities are resolved from the question via
hybrid search (an alias seed lands on its canonical entity), a bounded
subgraph is serialized as numbered triples, and the model must answer ONLY
from those edges — every citation returns with source_doc and
confidence (plus the evidence span when present). Zero matched entities
and zero edges each short-circuit with a distinct answer and no LLM call.
Bounds come from ontology.graph_query (max_hops default 2, max_edges
default 60; out-of-range values fall back rather than clamping),
overridable per call, and truncation is reported in the response. The
serialized subgraph is framed as untrusted content with delimiter-spoof
neutralization (the P1-6 frame). Strictly additive — all 18 tool schemas
are now pinned by a per-name golden. The regular Q&A context also gains
edge provenance: each related-article fallback block names its connecting
edge (via: (a) --[rel]--> (b) {source, confidence}); graph-EXPANDED
articles are deliberately not annotated, because expansion aggregates many
signals and naming one edge would be false provenance.?center= resolves, and the response gains an
additive center field naming the node actually centered on), and
sage-wiki ontology query --entity (which prints a note on stderr; stdout
stays one valid JSON document). MCP behaviour change: wiki_ontology_query
now resolves an alias entity argument to its canonical before traversing —
previously it traversed the alias's own stored view. The payload shape is
unchanged (a bare entity array, no extra fields). Store-level reads are
deliberately untouched — Traverse/GetRelations on an alias still return
only its own stored edges, pinned by a conformance test on both backends —
as are wiki_list (browsing, not seeding) and
--unlink/--apply/--reject, which take the alias by definition.ontology.triples.enabled: true, each Tier-3 document gets one additional
Pass-2 LLM call that extracts typed entities (each with a one-sentence
grounded description) and evidenced (subject, predicate, object) triples,
persisted as P3-1 evidenced relations. Defaults to off: the pass costs one
call per document, and an upgrade should not change anyone's bill. Model
resolution follows ontology.triples.model → models.extract →
models.summarize. Keyword extraction (Pass 3) is unchanged and still runs.
See docs/guides/graph-memory.md, including the cost section — --re-extract
is O(all summaries), and the --batch compile path does not run the pass.
Evidence spans are quoted from a document's compiled summary, not its raw
source; source_doc names the origin document.evidence (the source span supporting the edge), confidence (0–1), and
source_doc (the originating document), plus valid_from, valid_to and
invalidated_by reserved for temporal validity. Schema addition only —
backward compatible: existing rows read back with zero values, and every
caller that does not set the new fields behaves exactly as before. SQLite
migration V10 and Postgres migration v3 are both plain ADD COLUMN, with
upgrade tests from the prior schema on each backend. Re-asserting an edge now
updates its evidence only when the incoming confidence is strictly higher;
created_at always keeps the earliest assertion's value. Evidence spans are
quoted from a document's compiled summary, not its raw source — Pass 2 sees
summaries — so a citation names source_doc as the origin while the summary
is what the span is verifiable against.AddEntity no longer erases a stored value with an empty one. An empty
(or, on Postgres, NULL) incoming name, definition or article_path now
leaves the stored value alone; non-empty values still overwrite. Previously a
re-assert that omitted a field wiped it — most visibly, re-indexing an article
erased its entity definition.type is now correctable on SQLite. The SQLite upsert
previously ignored type entirely, so a wrong type was permanent; it is now
written on every upsert, matching Postgres. Consequently sage-wiki scribe
can retype an existing entity where it previously could not.sage-wiki pack apply no longer resets ontology.triples. The ontology
merge rebuilt the ontology: node from a literal carrying only relation and
entity types, so any other key under it was erased. A pack cannot set
triples itself; the user's value is now preserved.ontology.triples.enabled: true). Keyword extraction gates each pattern
on the stored entity types and skips a pattern whose target entity does not
exist yet. Once triple extraction populates typed entities in Pass 2, some
previously-skipped keyword edges start being created. No code in the keyword
pass changed.reconcile, sage-wiki write and the MCP write_article tool previously
hard-coded type: concept and the raw slug when indexing an already-written
article. With type now writable, that would have demoted a technique on
every run. All three read entity_type: from the article's frontmatter
(falling back to concept, including when the declared type is no longer
configured) and write the formatted display name. Frontmatter is parsed on CRLF
checkouts as well as LF.updated_at over a stored timestamp.
AddEntity defaulted UpdatedAt only when CreatedAt was empty, so a caller
supplying one but not the other bound NULL — and the upsert wrote it. The two
now default independently, matching SQLite.GetRelations with Both and a relation filter returned the wrong edges on
SQLite. The query built WHERE source_id=? OR target_id=? and appended
AND relation=?, which parses as source_id=? OR (target_id=? AND relation=?) — so outbound edges of every type were returned regardless of the
filter. Reachable through wiki_ontology_query and sage-wiki ontology.
Postgres was already correct; both backends are now covered by the shared
conformance suite.