Phase 3.5 extraction & assembly

Proxy TestMemoryIntegration_* via bufconn ContextAssembly, enqueue active-status gap fill, Assemble-on overhead bench, middleware docs, and proxy-auth-smoke CI gate.

Milestone 3.5.D.6 — Integration Tests

Status: Completed Goal: Track D — Proxy Integration
Phase: 3.5 — Extraction & Context Assembly
Estimated effort: 2 days
Track: Track D — Proxy Integration
Depends on: Milestones 3.5.D.1–3.5.D.5


Outcome

Track D closeout: prove proxy-observed Assemble success and fail-open through a live contextclient dial (bufconn fake ContextAssemblyService), close remaining enqueue/bench gaps, refresh middleware docs, and gate the suite on proxy-auth-smoke. SEC* fixtures stay context-off.

Ownership split (not re-proven here):

LayerOwnerWhat it proves
L0–L3 ladder units3.5.C.6Context server degradation contract
Client fail-open3.5.D.1contextclient maps gRPC errors → Fallback
Proxy-observed path3.5.D.6Headers + injection / Phase 2 fail-open via real dial
Extraction enqueue3.5.D.4 / ADR-0072HTTP enqueue (not Celery Redis LPUSH from proxy)

Coverage

  • TestMemoryIntegration_AssembleSuccess — valid Assemble response → injected provider messages; X-IBEX-Memories-Injected / X-IBEX-Context-Tokens / X-IBEX-Context-Fallback=false; chat 200
  • TestMemoryIntegration_DeadlineExceeded_FailOpen — server returns codes.DeadlineExceeded → Phase 2 messages; Fallback=true; chat 200
  • TestMemoryIntegration_TimeoutDelay_FailOpen — server sleeps past contextclient assemble timeout → same fail-open via real context.WithTimeout
  • Unit: status=active terminate never hits enqueue (hits==0)
  • Bench: BenchmarkProxyChatOverheadWithAssemble (fast fake; report ns/op vs Assemble-off; no hard p99 gate)
  • Docs: proxy README middleware (Assemble in-handler; terminate→enqueue separate); request-routing Mermaid
  • CI: explicit proxy-auth-smoke step for ^TestMemoryIntegration_ with a minimum list-count gate (security-integration unchanged)

Success signals

  • TestMemoryIntegration_* covers success + DeadlineExceeded + delay-timeout fail-open via bufconn
  • Enqueue never fires on status=active (asserted hits)
  • Assemble-on chat overhead bench compiles and runs (no hard threshold)
  • Middleware / routing docs match Phase 3.5 (Assemble in-handler; ADR-0072 enqueue)
  • proxy-auth-smoke gates TestMemoryIntegration_*; SEC* remain context-off
  • Repo guards / CI checks still pass

Prerequisites

  • Milestones 3.5.D.1–3.5.D.5
Edit on GitHub

Last updated on