Repository navigation
epic: architecture deepening, round 2 (audit 2026-10-22) #1523
Description
Round 2 of the architecture deepening (round 1 is #1345, all items done except the typed dispatch of #1344). Source: the 2026-10-22 audit with the codebase-design vocabulary, hot spots taken from the last six weeks of commits (core lib.rs, mcp lib.rs, server handlers, operations.rs). Findings were re-checked against the code before filing; two were corrected (the room forwarders are a facade, not dead weight; the clock sites are ~50, not ~130).
One PR per item, ~400 lines each, in this order. Items marked behaviour change what users can observe and need a CORE note for uteke-cloud before they merge (AGENTS.md); the others are pure refactors.
Order
- [~] refactor(core,server): classify errors once, add a NotFound error #1517 classify errors once, add NotFound: part 1 merged (refactor: classify errors once and add NotFound (#1517) #1524, no status change); the status corrections and the 500 body policy: uteke-cloud#244 answered (agreed), part 2 next (behaviour)
- refactor(core): lift the redaction flag policy out of update_memory_detailed #1520 redaction flag policy out of update (pure): refactor(core): redaction flag policy as its own module (#1520) #1525
- [~] refactor(core): one write path for remember, contradiction, import and consolidation insert #1514 one write path: part 1 merged (refactor(core): one commit step and one embedding step for remember and contradiction (#1514, part 1) #1526: shared commit and embedding step, contradiction path fixed); import and consolidation: uteke-cloud#242 answered (follows OSS; a
Createdevent needs a contract text amendment by the owner) (behaviour: import gains edges, events and cache invalidation; fixes stale recall after import) - refactor: apply engine configuration in one place (the MCP binary applies none) #1515 engine configuration in one place: refactor: read [tier], [dream] and [lifecycle] into the core types (#1515, part 1) #1528, refactor: read [recall] into one core type with its env overrides (#1515, part 2) #1529, refactor: one EngineSettings and one apply step for the CLI and the server (#1515, part 3) #1530, feat(mcp): read and apply the engine settings like the CLI and the server (#1515, part 4) #1533 (MCP applies the settings, closes refactor: unify the mirrored config schema structs (CLI Config vs server ServerFileConfig) #1355; uteke-cloud#248 answered, no objection)
- refactor: let the typed remember request carry its provenance and one failure policy #1516 typed remember request carries provenance (behaviour: one failure policy; decide with decide the HTTP/MCP/CLI behaviour differences found by the typed-request work (#1343 follow-up) #1439)
- refactor(core): split the eight concerns of operations.rs and give embedder construction its own module #1519 split operations.rs, embedder construction module (pure)
- refactor(core): rename the two rooms modules and stop transports reaching into store() #1521 rename the two rooms modules, stop
store()leaks (pure; removes two public accessors): refactor(core): transports use Uteke accessors, not the store (#1521) #1527 - perf(core): quick wins on the read and write hot paths (measure first) #1522 performance quick wins (measure first; item 1 needs an owner decision)
- perf(server): do not serialize the embedder behind the global request lock #1518 embedder outside the global request lock (measure first)
Not filed yet (speculative, need a decision first)
- Relationships are stored in three places (metadata,
memory_edges,graph_nodes/graph_edges) merged by an adapter. Decide whether the table-backed graph stays before any work. - A clock and id seam (~50
Utc::now(), ~8Uuid::now_v7()sites). Only worth it bundled with refactor(core): one write path for remember, contradiction, import and consolidation insert #1514, where it would have two adapters.
Related
#1355 (absorbed by #1515), #1439 (policy decisions behind #1516), #1344 (typed dispatch), #1468 (benchmark receipts, required for the perf items).
Activity