@@ -32,20 +32,42 @@ This builds an `abi3-py312` wheel and installs it into the active Python environ
3232
3333Rusty Red is the productized THG runtime profile: it keeps the THG command model
3434for existing harness flows while adding first-class graph node, edge, adjacency,
35- exact scalar property index, stats, verify, and MCP routes. The code should stay
36- shared through ` thg-core ` rather than being copied into a second implementation:
37- Context Theorem can use the same graph-store components internally, while Rusty
38- Red packages them as a standalone database service. It is not a raw Redis
39- protocol, RedisGraph compatibility layer, FalkorDB replacement, or complete
40- OpenCypher/GQL engine yet. Redis-compatible storage is the current durable
41- backing store; Rusty Red owns the graph API and index semantics above that
42- store.
35+ exact scalar property index, stats, verify, and MCP routes. By default, it runs
36+ in ` RUSTY_RED_MODE=embedded ` with RedCore RAM-first storage and local AOF/snapshot
37+ persistence.
38+
39+ It is not a raw Redis protocol, RedisGraph compatibility layer, FalkorDB
40+ replacement, or complete OpenCypher/GQL engine yet. ` RUSTY_RED_MODE=redis ` keeps
41+ legacy run/context THG state commands.
42+
43+ It is also not release-ready as a full database yet. The current embedded
44+ RedCore path has AOF/snapshot recovery tests, staged ` GraphMutationBatch ` /
45+ ` GraphTransaction ` commits, pre-publish durability guards for AOF, snapshot, and
46+ manifest write failures, per-tenant single-writer execution, committed read
47+ snapshots, an internal read barrier, strict ACID config enforcement,
48+ per-directory ` .redcore.lock ` locking, fsynced temp/rename/dir snapshot and
49+ manifest writes, torn AOF tail truncation, previous-snapshot fallback with
50+ AOF replay, and rebuild-indexes admin tooling over canonical graph records.
51+ Railway restart/no-public-port evidence and the broader query/cache/search gates
52+ remain follow-up release gates.
4353
4454Run the product server locally:
4555
4656``` bash
4757cd theseus_native
48- RUSTY_RED_REDIS_URL=redis://127.0.0.1:6379 cargo run -p thg-product-server
58+ RUSTY_RED_MODE=embedded RUSTY_RED_DATA_DIR=data/rusty-red cargo run -p thg-product-server
59+ ```
60+
61+ Strict local durability mode is explicit:
62+
63+ ``` bash
64+ RUSTY_RED_MODE=embedded \
65+ RUSTY_RED_CONCURRENCY=single_writer \
66+ RUSTY_RED_TXN_ISOLATION=serializable \
67+ RUSTY_RED_STRICT_ACID=true \
68+ RUSTY_RED_DURABILITY=aof_always \
69+ RUSTY_RED_DATA_DIR=data/rusty-red \
70+ cargo run -p thg-product-server
4971```
5072
5173Core routes:
@@ -67,16 +89,18 @@ GET /v1/tenants/{tenant_id}/graph/edges/{edge_id}
6789POST /v1/tenants/{tenant_id}/graph/neighbors
6890GET /v1/tenants/{tenant_id}/graph/stats
6991GET /v1/tenants/{tenant_id}/graph/verify
92+ POST /v1/tenants/{tenant_id}/graph/rebuild-indexes
7093POST /v1/tenants/{tenant_id}/context/pack
7194```
7295
7396The shared THG command API also exposes the Rusty Red graph-store core through
7497` THG.GRAPH.NODE.UPSERT ` , ` THG.GRAPH.EDGE.UPSERT ` ,
75- ` THG.GRAPH.NODES.QUERY ` , ` THG.GRAPH.NEIGHBORS ` , ` THG.GRAPH.STATS ` , and
76- ` THG.GRAPH.VERIFY ` . This lets Context Theorem adopt Rusty Red-grade graph
98+ ` THG.GRAPH.NODES.QUERY ` , ` THG.GRAPH.NEIGHBORS ` , ` THG.GRAPH.STATS ` ,
99+ ` THG.GRAPH.VERIFY ` , and ` THG.GRAPH.REBUILD_INDEXES ` . This lets Context
100+ Theorem adopt Rusty Red-grade graph
77101records, exact scalar property indexes, adjacency traversal, and verification
78102through the existing THG command surface instead of depending on a separate
79- runtime name.
103+ runtime name. In this slice, run/context state commands remain Redis-mode.
80104
81105The OpenAPI document is served at ` /openapi.json ` . It exists because Rusty Red
82106is exposed through HTTP and MCP even though the underlying storage engine is a
@@ -86,10 +110,10 @@ well-known manifests.
86110
87111Railway template readiness follows the public template guidance: use a GitHub
88112source repo, keep the service root minimal, set ` /ready ` as the health check,
89- wire Redis through private networking/reference variables, attach persistent
90- storage to stateful dependencies, generate any public-ingress tokens with
91- Railway template variable functions, and replace the badge placeholder above
92- once Railway assigns the final template URL.
113+ wire Redis only for explicit ` RUSTY_RED_MODE=redis ` deployments through private
114+ networking/reference variables, attach persistent storage to stateful dependencies,
115+ generate any public-ingress tokens with Railway template variable functions, and
116+ replace the badge placeholder above once Railway assigns the final template URL.
93117
94118Railway can deploy this directory directly:
95119
0 commit comments