Phase 3.5 extraction & assembly
Replace applyDirectiveInjection with contextclient.Assemble in the proxy hot path, with IBEX_CONTEXT_ENABLED=false falling back to exact Phase 2 static-directive behavior.
Milestone 3.5.D.2 — Wire Assemble into dispatchProviderCompletion
Status: Completed
Goal: Track D — Proxy Integration
Phase: 3.5 — Extraction & Context Assembly
Estimated effort: 2 days
Track: Track D — Proxy Integration
Depends on: Milestone 3.5.D.1 (Go gRPC context client)
Why This Milestone Exists
This is the exact seam where context assembly replaces/extends directive injection in the proxy hot path. h.contextClient == nil should be a legitimate, fully-supported runtime mode falling back to Phase 2 static-directive behavior — making Phase 3.5 additive, not a hard fork.
What shipped
IBEX_CONTEXT_ENABLED(defaultfalse) + nilContextClientare independent gates to Phase 2applyDirectiveInjection(no Assemble gRPC).dispatchProviderCompletioncallsapplyContextOrDirectiveInjectionbeforeComplete; Assemble Fallback still applies Phase 2 directive injection.X-IBEX-Skip-Memoryskips Assemble entirely (directive injection still runs).- Response headers
X-IBEX-Memories-Injected,X-IBEX-Context-Tokens,X-IBEX-Context-Fallbackon non-stream and SSE paths when Assemble was attempted; omitted on Phase 2 (disabled/nil/Skip-Memory) for bit-identical headers. - Embedded
ibexJSON /IBEX_CONTEXT_EMBED_METADATAremains 3.5.D.3.
Success signals
-
dispatchProviderCompletionwired with context assembly -
IBEX_CONTEXT_ENABLED=falsereproduces exact Phase 2 behavior (regression fixture) -
X-IBEX-Skip-Memoryheader skips the gRPC call entirely (not just discards result) - Response headers
X-IBEX-Memories-Injected,X-IBEX-Context-Tokens,X-IBEX-Context-Fallbackset correctly (D.2 owns plain headers; D.3 owns embedded metadata) - Repo guards / CI checks still pass
Prerequisites
- Milestone 3.5.D.1 (Go gRPC context client)
Edit on GitHub
Last updated on