AKAZIK-py
fdfddb55cb
fix(moa): carry completed responses through the managed Relay path
...
Under managed Relay execution the provider factory runs lazily inside
provider_stream() on the Relay session's event loop. The MoA facade's
auxiliary call_llm(stream=True) is invoked from that callback, so the
eager final_response check added for the non-managed path never fires:
the inner ManagedLlmStream is returned to the outer stream, which then
synchronously iterates it on the same loop thread and dies with
RuntimeError: Cannot run the event loop while another loop is running
(the completed response effectively trapped one level deeper).
stream_current() now detects a running event loop and returns the raw
factory result instead of nesting a ManagedLlmStream: the outer managed
stream already provides Relay tracking for the enclosing attempt, and
its own completed_response_predicate traps the completed response as
final_response — the same contract the main streaming worker consumes
(chat_completion_helpers reads stream.final_response after the chunk
loop). Nested managed streams remain supported for genuinely streaming
providers via the outer stream's own iteration.
Adds managed-execution regressions using the retained relay_turn
fixture: direct completed-response trapping, and the nested
facade-shaped stream_current call.
2026-07-31 22:30:33 -07:00
AKAZIK-py
ada3663ce7
fix(moa): unwrap completed responses in the auxiliary streaming path
2026-07-31 22:30:33 -07:00
Teknium
6b81590c55
test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions
...
Systematic prune per AGENTS.md test policy, one pass over every major
test tree (gateway, hermes_cli, tools, agent, run_agent, plugins, cli,
cron, tui_gateway, honcho/openviking, root-level):
- DELETE: source-reading tests (read_text/getsource on prod files),
change-detector tests (exact catalog counts, model-name snapshots,
config version literals), mock-echo tests (assert a mock returns what
it was told), assertion-free/trivial tests, near-duplicate
parametrizations (boundaries + one representative kept), async/sync
twin duplicates, cosmetic within-file variations.
- KEEP (mandatory): security/redaction/approval guards, message-role
alternation invariants, prompt-caching/deterministic-call-id
invariants, issue-number regression tests (deduped), E2E tests.
- 6 test files deleted outright (script-style/no-assert or fully
redundant); conftest.py, fakes/, fixtures/ untouched.
- tests/acp/conftest.py added: autouse fixture stubs the live
models.dev/GitHub/Copilot/Anthropic inventory fetches that ACP server
tests performed on every session create — test_server.py 147s → 3.4s,
and the tests are now genuinely hermetic.
- Sleep-based slowness shrunk where safe (codex_ttfb_watchdog,
compression_concurrent_fork, etc.); no wall-clock assertion tightened.
Verification: full hermetic suite via scripts/run_tests.sh —
2439 files, 31,130 tests passed, 0 failed, 0 flaky retries, 315s wall
(baseline: 583s wall, 13,564s subprocess CPU).
2026-07-29 13:10:23 -07:00
Alex Fournier
5e34fa2d5c
fix(relay): preserve provider stream errors
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-28 09:58:43 -07:00
Alex Fournier
b1a5d67e71
Merge upstream main into fix/hermes-relay-anthropic-context
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-28 08:10:58 -07:00
Alex Fournier
eda54775e2
fix(relay): isolate streaming callback contexts
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-27 21:11:04 -07:00
Alex Fournier
14bed44c8c
Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics"
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-27 21:10:51 -07:00
Jeffrey Quesnelle
841a5a744a
Revert "feat(observability): integrate NeMo Relay runtime and shared metrics"
2026-07-27 22:28:08 -04:00
Alex Fournier
3be8a2f5f9
refactor(relay): serialize provider objects by capability
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-27 08:18:41 -07:00
Alex Fournier
bfae9c2572
fix(relay): ignore rewrites after codec baseline failure
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-27 08:17:21 -07:00
Alex Fournier
ec6c881453
fix(relay): preserve buffered provider stream chunks
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-27 08:16:16 -07:00
Alex Fournier
a3ef27ab70
fix(relay): preserve intentional request removals
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 14:22:49 -07:00
Alex Fournier
06ed41aa1f
fix(relay): preserve managed cancellation signals
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 14:21:37 -07:00
Alex Fournier
ad6fb26681
fix(relay): fence bypassed stream chunks
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 14:09:33 -07:00
Alex Fournier
4788994bd2
fix(relay): preserve managed callback context
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:53:59 -07:00
Alex Fournier
1500ce163c
fix(relay): normalize rewritten LLM responses
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:44:27 -07:00
Alex Fournier
e862099dff
fix(relay): merge Anthropic stream usage
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:32:44 -07:00
Alex Fournier
c789bdd38a
fix(relay): close managed provider streams
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:32:03 -07:00
Alex Fournier
9dfe690125
fix(relay): preserve provider request extensions
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:24:19 -07:00
Alex Fournier
1c6a96032c
fix(relay): preserve successful managed results
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:12:50 -07:00
Alex Fournier
1ffeaf226c
test(relay): skip native suites without binding
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-23 13:04:12 -07:00
Alex Fournier
afd0b3ecd4
fix(observability): keep Relay session headers local
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-22 14:35:55 -07:00
Alex Fournier
537425ebe4
fix(runtime): close abandoned Relay streams
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-22 10:32:49 -07:00
Alex Fournier
27c7c877c5
fix(runtime): close failed auxiliary Relay streams
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-21 14:40:19 -07:00
Alex Fournier
6efc5fe0af
fix(runtime): preserve provider payloads through Relay
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-21 09:25:22 -07:00
Alex Fournier
774bcac352
fix(runtime): preserve native streaming responses
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-19 09:23:03 -04:00
Alex Fournier
2c8fd38f2e
fix(observability): defer logical LLM completion until validation
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-19 09:00:27 -04:00
Alex Fournier
55b7903cf7
fix(observability): harden Relay terminal lifecycle metrics
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-19 08:59:42 -04:00
Alex Fournier
4dedaa4237
refactor(runtime): consolidate Relay lifecycle ownership
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-19 08:59:06 -04:00
Alex Fournier
9bc521b138
refactor(runtime): manage Relay LLM tool and subagent execution
...
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-07-19 08:57:38 -04:00