@@ -109,10 +109,10 @@ multiple symbols.
109109}
110110```
111111
112- ** Response 409** — symbol already exists (idempotent write — this is not an
113- error; the existing identity is returned with status 200). The store's
114- idempotent-write property means a 409 never occurs; this entry is here for
115- documentation completeness .
112+ ** Response 409** — symbol already exists. The store's idempotent-write
113+ property means a 409 never occurs in practice; a second POST of the same
114+ symbol returns 200 with the existing identity. This entry is omitted from
115+ the error table below for that reason .
116116
117117** Example (curl)**
118118
@@ -168,9 +168,10 @@ curl -s http://localhost:7777/symbols/sha256:<hash> \
168168Resolve the ** direct** imports of a stored module. Returns the entries in
169169the module's imports table and whether each is present in the store.
170170
171- Note: this endpoint resolves one level only — it does not walk the
172- transitive closure. To resolve the full dependency graph, call this
173- endpoint recursively on each returned identity.
171+ ** Note: one level only.** This endpoint does not walk the transitive closure.
172+ To resolve the full dependency graph, call this endpoint recursively on each
173+ returned identity. The field is named ` imports ` (not ` direct_imports ` ) for
174+ brevity, but the scope is always one level.
174175
175176** Request**
176177
@@ -213,28 +214,60 @@ Liveness check. Returns 200 with `{"status": "ok"}`. No store access.
213214
214215This replaces the CLI-based Program 5 workflow entirely.
215216
217+ ** Important:** The dependency chain for the content-moderation pipeline is:
218+ ` route_message ` → ` moderate ` → ` classify_content ` . All three symbols must
219+ be published and imported individually — the store holds single-symbol units
220+ and does not carry transitive dependencies automatically.
221+
216222``` bash
217223# 1. Start the server (once per session)
218224python3 -m codifide serve &
219225
220- # 2. Publish classify_content
226+ # 2. Publish all three symbols in the dependency chain
221227CLASSIFY_HASH=$( python3 -m codifide canonical --cbor content_classifier.cod | \
222228 curl -s -X POST http://localhost:7777/symbols \
223229 -H ' Content-Type: application/cbor' --data-binary @- | \
224230 jq -r .identity)
225231
226- # 3. Publish route_message
227- ROUTE_HASH=$( python3 -m codifide canonical --cbor escalation_router.cod | \
232+ MODERATE_HASH=$( python3 -m codifide canonical --cbor escalation_router.cod | \
228233 curl -s -X POST http://localhost:7777/symbols \
229234 -H ' Content-Type: application/cbor' --data-binary @- | \
230- jq -r .identity)
235+ jq -r .identity) # publishes moderate (and classify_content again — idempotent)
231236
232- # 4. Write pipeline_composed.cod using the hashes
233- # (no CODIFIDE_RUNTIME=python needed — imports resolve via the server)
237+ ROUTE_HASH=$( python3 -m codifide canonical --cbor escalation_router.cod | \
238+ curl -s -X POST http://localhost:7777/symbols \
239+ -H ' Content-Type: application/cbor' --data-binary @- | \
240+ jq -r .identity) # publishes route_message
241+
242+ # 3. Write pipeline_composed.cod importing all three by hash
243+ cat > pipeline_composed.cod << EOF
244+ module pipeline_composed
245+
246+ import classify_content = $CLASSIFY_HASH
247+ import moderate = $MODERATE_HASH
248+ import route_message = $ROUTE_HASH
249+
250+ def composed_pipeline
251+ intent "run the full moderation pipeline using content-addressed imports"
252+ sig (message: String) -> Decision
253+ effects {}
254+ cand
255+ route_message(message)
256+
257+ def main
258+ intent "test the composed pipeline"
259+ sig () -> Decision
260+ effects {}
261+ cand
262+ composed_pipeline("this message contains spam")
263+ EOF
264+
265+ # 4. Run it — no CODIFIDE_RUNTIME=python needed
266+ python3 -m codifide run pipeline_composed.cod
234267```
235268
236- An agent that speaks HTTP can complete this workflow without touching the
237- CLI store subcommands or the runtime flag .
269+ Note: ` jq ` is required for the hash extraction step. If unavailable, use
270+ ` python3 -c "import sys,json; print(json.load(sys.stdin)['identity'])" ` instead .
238271
239272---
240273
@@ -291,6 +324,5 @@ The `serve` CLI subcommand is added to `codifide/__main__.py`.
291324
292325---
293326
294- * Draft v0.1 — May 2026*
295- * Governed by: GOVERNANCE.md*
296- * Next: V2-1-3 (implement POST /symbols)*
327+ * Implemented v0.1 — May 2026*
328+ * Governed by: GOVERNANCE.md*
0 commit comments