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: Planned
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.


Implementation

Replace applyDirectiveInjection with the context assembly call, handling X-IBEX-Skip-Memory header to avoid paying latency for callers who explicitly opt out.


Orientation (indicative)

Named paths, package layouts, libraries, schemas, env vars, and commands anywhere on this page are rough sketches for orientation — inspiration and a baseline, not a required change list.

During implementation, expect to:

  • open the live tree and follow existing patterns before inventing new ones
  • research current constraints (latency, tenancy, deploy shape, libraries) more deeply than this page can
  • advance the design beyond the sketch where measurement or code reality says so
  • land work in different filenames, merged packages, deferred docs, or new surfaces when the situation calls for it

Prefer outcomes over matching any particular file tree or command sequence.

Areas that may be involved (situational — not a checklist):

  • Proxy service (HTTP, bootstrap, config)
  • Context assembly service
  • Workers / task runtime

Success signals

Outcome-oriented signals that the milestone is in good shape. Exact filenames, package layouts, and commands may differ from any sketches above.

  • dispatchProviderCompletion wired with context assembly
  • IBEX_CONTEXT_ENABLED=false reproduces exact Phase 2 behavior (regression fixture)
  • X-IBEX-Skip-Memory header skips the gRPC call entirely (not just discards result)
  • Response headers X-IBEX-Memories-Injected, X-IBEX-Context-Tokens, X-IBEX-Context-Fallback set correctly
  • Repo guards / CI checks still pass

Prerequisites

  • Milestone 3.5.D.1 (Go gRPC context client)
Edit on GitHub

Last updated on

On this page

0%