Commit ac2b1e6
committed
Contain the engine behind one module
Issue #18 §C1. Eighty-three files named the `tinycortex` crate, in two hundred
and ninety-six places. That made the engine's shape an ambient fact of the whole
crate rather than a dependency anyone had chosen, and made "what would a second
engine have to provide?" a question nobody could answer without reading all of
them.
Every one now goes through `core/src/engine/backend.rs`, which re-exports the
engine's memory surface and is the only file outside the seam that names it.
Outside `core/src/engine/`, references to the crate are zero.
Re-exporting rather than wrapping is deliberate. A wrapper over three hundred
call sites would be a second surface to keep in step with the first, which is
the failure §A1 had just finished deleting. What this buys is not insulation —
the call sites use the engine's API verbatim — but a single enumerable place
that names it.
The seam is `engine`, not `tinycortex`. §C1's text says `core/src/tinycortex/`,
but its own acceptance criterion asks that `grep -rl tinycortex core/src` match
only files under that module, and those two cannot both hold: with the module
named after the engine, every call site reads `crate::tinycortex::…` and matches.
Naming the seam for its role rather than for one engine satisfies the criterion
and is the better name regardless — a seam named after the thing it is meant to
make replaceable is the coupling this section removes. The module was `pub` but
had no consumer outside this crate, so the rename breaks nothing.
The workspace root and the module crate each gain a `[patch]` for the contract's
git dependency. Patch tables apply only from the root being built, and the
module crate is its own root; without its own entry cargo resolves the git copy
alongside the path copy and `MemoryTaint` from one is not the same type as from
the other. Found by the compiler, not predicted.
What is left matching `tinycortex` outside the seam is 82 log-message strings
and a `tinycortex_kv` accessor name. Neither is a crate reference, and renaming
the accessor is cosmetic churn §C1 does not ask for. Two stale doc comments
describing a "thirteen-family `tinycortex_api` contract" are corrected — since
§A1 the contract is `tinymemory-api`, and it has eighteen families.
Acceptance, measured: 83 files naming the engine crate outside the seam, now 0.
Refs #18 (§C1)1 parent 2721f4c commit ac2b1e6
108 files changed
Lines changed: 500 additions & 406 deletions
File tree
- core/src
- conversations
- diff
- engine
- ingestion
- people
- queue
- sources
- readers
- store
- chunks
- content
- namespace_store
- safety
- trees
- sync
- composio
- providers
- clickup
- github
- gmail
- linear
- notion
- slack
- sync_status
- workspace
- tool_memory
- tree
- graph
- health
- retrieval
- score
- extract
- tree_runtime
- tree
- crates/tinymemory-module
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments