Context
PR #16862 correctly adds native Ollama admission control, but exact-head producer tracing found that the admitted call still enters observeUnqueuedProviderActivity(). That helper explicitly records queueDisposition: 'not-applicable', makes enqueuedAt === startedAt, and therefore publishes no measured queue wait.
The PR's new getOllamaEmbeddingAdmission() method reports {cap, inFlight, waiting} only to unit tests; an exact-tree caller search at 9bc05dda52 found no production consumer. The queue is enforced, but the existing public observer will describe its admitted work as unqueued.
Live latest-open sweep: checked the latest 20 open issues at 2026-08-10T12:11:21.358Z; no equivalent found. Semantic and exact searches surfaced #16770 and #16780 as adjacent authority, not duplicates; the all-state A2A claim sweep over the latest 30 messages found no overlapping lane claim.
The Problem
Correct control flow can manufacture false operational evidence. A caller that waits behind the Ollama cap will be recorded with a null queue interval and not-applicable, so an operator cannot distinguish provider execution from Neo admission wait or reconcile the declared cap with current {inFlight, waiting} demand.
This is a day-after-merge observability transfer, not a reason to hold the admission repair: cancellation, slot release, dynamic cap reads, and Compose reach are independently safe at the reviewed head.
The Architectural Reality
TextEmbeddingService.#embedOllama() owns admission and dispatch. createProviderActivityLifecycle() in ai/services/shared/providerActivityLedger.mjs already owns truthful enqueuedAt, startedAt, queueDisposition: 'neo-queued', and queueWaitMs semantics. get_memory_core_tool_metrics.providerActivity is the existing cross-process public observer; no new MCP tool is warranted.
The provider ledger is shared by Knowledge Base and Memory Core recorders. Admission facts must be written at the producing process, then projected by the existing observer; a process-local getter alone cannot satisfy deployed operator visibility.
Structure-map V-B-A confirms both owners already exist in ai/services/memory-core and ai/services/shared; this ticket introduces no new service boundary.
The Fix
Bind native Ollama admission to createProviderActivityLifecycle() instead of the unqueued helper:
- stamp enqueue before an admission wait and start only after the slot is acquired;
- record
queueDisposition: 'neo-queued' and measured wait duration for both queued and uncontended calls;
- preserve provider-settlement ownership of completion and slot release; and
- extend the existing provider-activity projection with bounded native-admission state sufficient to report cap, executing/in-flight, and waiting without a new tool.
Retire or production-bind getOllamaEmbeddingAdmission() so it is not a test-only promise.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
| Native Ollama provider-activity row |
TextEmbeddingService admission + createProviderActivityLifecycle |
neo-queued; enqueue precedes wait; start follows acquisition; real queueWaitMs |
fail observation open without changing provider result |
existing lifecycle JSDoc |
blocked/uncontended timing controls |
get_memory_core_tool_metrics.providerActivity admission projection |
shared provider ledger |
bounded native Ollama cap, executing/in-flight, and waiting state through the existing observer |
unknown/partial when recorder or cap provenance is unavailable; never fabricated zero |
OpenAPI schema/description |
cross-recorder projection control |
getOllamaEmbeddingAdmission() |
TextEmbeddingService |
consumed by the production projection or removed as redundant |
no test-only public promise |
JSDoc |
caller census + mutation |
Decision Record impact
none — composes the existing admission and provider-observation authorities; no ADR is amended.
Acceptance Criteria
Out of Scope
- Changing the cap value or admission/cancellation state machine delivered by
#16861 / PR #16862.
- Reopening
#16861; this successor owns only the transferred observability gap.
- Adding a second Ollama limiter or a new diagnostic MCP tool.
Avoided Traps
- Treating an enforced queue as observed. A production writer and a deployed consumer are both required.
- Publishing zero wait. Zero is measured immediacy; unavailable evidence is null/unknown.
- A process-local status getter. It cannot describe other producer processes on the deployed topology.
Related
Related: #16780 · #16770 · #16861 · PR #16862
Origin Session ID: 878f05af-2c4e-4da2-a5c2-9e4af666fcb8
Retrieval Hint: native Ollama admission providerActivity neo-queued queueWaitMs cap inFlight waiting
Authored by Emmy (GPT-5.6 Sol Ultra, Codex).
Context
PR #16862 correctly adds native Ollama admission control, but exact-head producer tracing found that the admitted call still enters
observeUnqueuedProviderActivity(). That helper explicitly recordsqueueDisposition: 'not-applicable', makesenqueuedAt === startedAt, and therefore publishes no measured queue wait.The PR's new
getOllamaEmbeddingAdmission()method reports{cap, inFlight, waiting}only to unit tests; an exact-tree caller search at9bc05dda52found no production consumer. The queue is enforced, but the existing public observer will describe its admitted work as unqueued.Live latest-open sweep: checked the latest 20 open issues at 2026-08-10T12:11:21.358Z; no equivalent found. Semantic and exact searches surfaced #16770 and #16780 as adjacent authority, not duplicates; the all-state A2A claim sweep over the latest 30 messages found no overlapping lane claim.
The Problem
Correct control flow can manufacture false operational evidence. A caller that waits behind the Ollama cap will be recorded with a null queue interval and
not-applicable, so an operator cannot distinguish provider execution from Neo admission wait or reconcile the declared cap with current{inFlight, waiting}demand.This is a day-after-merge observability transfer, not a reason to hold the admission repair: cancellation, slot release, dynamic cap reads, and Compose reach are independently safe at the reviewed head.
The Architectural Reality
TextEmbeddingService.#embedOllama()owns admission and dispatch.createProviderActivityLifecycle()inai/services/shared/providerActivityLedger.mjsalready owns truthfulenqueuedAt,startedAt,queueDisposition: 'neo-queued', andqueueWaitMssemantics.get_memory_core_tool_metrics.providerActivityis the existing cross-process public observer; no new MCP tool is warranted.The provider ledger is shared by Knowledge Base and Memory Core recorders. Admission facts must be written at the producing process, then projected by the existing observer; a process-local getter alone cannot satisfy deployed operator visibility.
Structure-map V-B-A confirms both owners already exist in
ai/services/memory-coreandai/services/shared; this ticket introduces no new service boundary.The Fix
Bind native Ollama admission to
createProviderActivityLifecycle()instead of the unqueued helper:queueDisposition: 'neo-queued'and measured wait duration for both queued and uncontended calls;Retire or production-bind
getOllamaEmbeddingAdmission()so it is not a test-only promise.Contract Ledger Matrix
TextEmbeddingServiceadmission +createProviderActivityLifecycleneo-queued; enqueue precedes wait; start follows acquisition; realqueueWaitMsget_memory_core_tool_metrics.providerActivityadmission projectionunknown/partial when recorder or cap provenance is unavailable; never fabricated zerogetOllamaEmbeddingAdmission()TextEmbeddingServiceDecision Record impact
none— composes the existing admission and provider-observation authorities; no ADR is amended.Acceptance Criteria
queueDisposition: 'neo-queued',startedAt > enqueuedAt, and positivequeueWaitMs.neo-queuedwith a measured zero wait.getOllamaEmbeddingAdmission()is consumed or the redundant method is removed.observeUnqueuedProviderActivity()reddens the queue-disposition and wait-duration witnesses.Out of Scope
#16861/ PR #16862.#16861; this successor owns only the transferred observability gap.Avoided Traps
Related
Related: #16780 · #16770 · #16861 · PR #16862
Origin Session ID: 878f05af-2c4e-4da2-a5c2-9e4af666fcb8
Retrieval Hint:
native Ollama admission providerActivity neo-queued queueWaitMs cap inFlight waitingAuthored by Emmy (GPT-5.6 Sol Ultra, Codex).