Skip to content

feat(core): namespace deprecation signal on writes (#1427, phase 1) - #1434

Merged
ajianaz merged 2 commits into
developfrom
feat/namespace-deprecation-signal-1427
Oct 12, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/namespace-deprecation-signal-1427

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

What

Phase 1 of #1427 (namespace deprecation): the signal only. Routing, storage and reads are unchanged and the namespace parameter keeps working everywhere.

A write to a non-default namespace (omitted and an explicit default are not deprecated; the match is exact, so Default or default are signalled because storage treats them as different namespaces) now carries one sentence, defined once in uteke_core::namespace_deprecation:

Namespaces are deprecated and will be removed in a future 0.x release; use rooms, tags and author instead (see ).

Per surface:

  • HTTP: POST /remember and POST /room/remember put it in the existing warning field (merged after any remember: surface embedding write failure — no silent success when vector insert fails #1273 embedding warning). POST /extract, POST /import, POST /room/create and PUT /memory (namespace move) get an OPTIONAL warning field that is absent for the default namespace, so those responses stay byte-identical. The server logs it at WARN once per distinct namespace per process.
  • MCP: uteke_remember, uteke_update (namespace move) and uteke_room_create append \n⚠ <sentence> to the tool text (nothing for the default namespace). All 12 namespace argument descriptions and the uteke_namespace_rename/delete descriptions say DEPRECATED and point to rooms, tags and author.
  • CLI: uteke remember, uteke import, uteke room create print one Warning: line on stderr (effective namespace: flag, UTEKE_NAMESPACE or config). stdout and --json are unchanged, including via-server remember, where the merged server warning is stripped back out before printing. --namespace help text says deprecated.
  • Steering: uteke guide text, both skill copies (byte-identical, parity test green), docs/multi-agent.md new "Namespaces are deprecated" section with the phase plan, notes in docs/mcp.md and docs/cli-reference.md, CHANGELOG [Unreleased].
  • docgen output is unchanged (docs/api-reference.md and docs/core-contract.json byte-identical).

Not in this PR (later phases): author without a room, the migration tool, single-namespace mode, namespace CRUD removal.

CORE-area change, contract issue needed BEFORE merge

Namespace is a CORE area. This change is additive only (a warning text, an optional warning field, no removal or semantic change), but per the CORE/LAB rules it needs a uteke-cloud contract issue before it merges. The owner has not been asked yet and no uteke-cloud issue exists. Do not merge until that is done.

Why

Namespaces ended up doing four jobs (agent identity, machine, project, topic) and silently hide memories from recalls that omit the parameter. The owner decided on one brain per database organised with rooms, tags and author, phased over 0.x minors. Phase 1 tells every writer, without breaking anyone.

Testing

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, cargo test -p uteke-core --no-default-features --features "onnx,vecq" --lib: all pass.
  • New unit tests: detection rule (omitted/default/other/case/whitespace), once-per-namespace log rate limit, warning merge/strip (core, 8 tests); HTTP /remember warning for non-default, default and omitted keep exactly the keys author_type, embedding_written, id, warning and no deprecation text, /room/create (4 tests); MCP uteke_remember text (suffix present/absent, default byte-identical one line), uteke_room_create, every tools/list namespace argument says DEPRECATED (4 tests); CLI notice for remember/import/room create vs read commands and explicit default (3 tests).
  • Differential end-to-end: uteke-serve built from origin/develop and from this branch, fresh UTEKE_HOME each, fake OpenAI-compatible 768-dim embedder, identical request battery, ids and timestamps normalised, scores rounded to 2 decimals (recency boost makes raw scores drift by about 2e-4 between two runs at different wall-clock times):
    • default namespace (36 cases: remember omitted/explicit default/typed/contradiction/4xx, recall, search, list, stats, tags, rooms create/remember/recall, import, PUT /memory, pin, export, doc create, context): 36/36 identical (status and body).
    • non-default writes (8 cases: remember x4 incl. Default case and a 400, room create, room remember, import, memory move): 8/8 differ only by the new warning (baseline has none, new has the sentence, everything else equal; the 400 is identical).
    • non-default reads (10 cases): 10/10 identical.
    • 54 cases total, 0 failures, run twice.
  • Manual CLI check: --json --namespace work room create prints the warning on stderr only and stdout is unchanged; no line for omitted or explicit default; none for room list.
  • Not verified: the via-server CLI remember path end to end (covered by the strip unit test only), /extract (needs an LLM; covered by the helper unit test).

Refs #1427

🤖 Generated with Claude Code

ajianaz and others added 2 commits October 12, 2026 13:27
Writing to a non-default namespace now carries a one-sentence deprecation
warning on HTTP (/remember, /room/remember, /extract, /import, /room/create,
PUT /memory), MCP (uteke_remember, uteke_update, uteke_room_create) and the
CLI (stderr only). The wording lives once in uteke-core; the server logs it
once per distinct namespace. Routing, storage and reads are unchanged.
Tool descriptions, uteke guide, skill and docs steer to rooms, tags, author.

Refs #1427

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…recation-signal-1427

# Conflicts:
#	crates/uteke-server/src/handlers.rs
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 8aacfee into develop Oct 12, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/namespace-deprecation-signal-1427 branch October 13, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant