14 Commits

Author SHA1 Message Date
Mark 35aa2a34a0 fix(showcase): close CrewAI cancellation edge cases
Use AsyncOpenAI so cancellation reaches the in-flight GenerateA2UI request while retaining the thread fallback for synchronous backend tools.

Preserve cancelled versus resolved-null interrupts across pinned ag-ui-crewai 0.3.0 by encoding only resolved null as JSON null and failing loudly on version drift.

Reuse the canonical shared render_a2ui schema so the secondary request remains aligned with the shared tool contract.
2026-08-13 16:46:05 -07:00
Jordan Ritter 50f119b459 fix(showcase): route CVDIAG stdout emission behind CVDIAG_LOG_STDOUT gate (default ON)
Shared cvdiag_bootstrap: gate the per-LLM-call breadcrumb capture handler and the emit_cvdiag stdout write behind CVDIAG_LOG_STDOUT (default ON so every other integration is byte-for-byte unchanged; opt-out per service). Enqueue to the non-blocking PocketBase sink BEFORE the stdout write so a wedged fd1 cannot cost the durable breadcrumb. No sampling; full fidelity to PB. Red-green unit tests incl. a hostile-stdout durability test.
2026-07-15 12:15:09 -07:00
Jordan Ritter e0cb30e7b9 fix(cvdiag): narrow PB binary to concrete str in live-PB test fixture to satisfy Pyright reportArgumentType 2026-06-21 12:50:59 -07:00
Jordan Ritter 2efc99fa5b fix(cvdiag): bundle a concrete writer-role PB writer into TS integration backends (auth-with-password→Bearer fetch) so backend events persist; was a type-only no-op seam 2026-06-21 12:49:05 -07:00
Jordan Ritter aeb94b95b2 fix(cvdiag): Python PB writer authenticates as cvdiag_api_keys writer role (auth-with-password→Bearer) instead of inert X-Cvdiag-Writer-Key header — backend events now persist 2026-06-21 12:49:01 -07:00
github-actions[bot] 691c036789 style: auto-fix formatting 2026-06-19 20:54:20 +00:00
Jordan Ritter 802ffbbcc9 fix(cvdiag): _shared logging setup is inert when disabled — no host root-handler teardown at import; capture-when-enabled preserved + inert lever test (M5 CR R4)
setup() ran logging.basicConfig(force=True) unconditionally at import (module
calls setup() at the bottom), tearing down the host app's root-logger handlers
on every backend even when cvdiag was disabled (CVDIAG_BACKEND_EMITTER off,
canary-safe default) — violating the byte-for-byte-inert contract. Replaced the
root basicConfig(force=True) with a scoped StreamHandler attached to the
"agents" logger, installed ONLY on the ENABLED path (after _ENABLED=True), so a
disabled/degraded setup performs zero logging mutation and the host root
handlers survive. capture-when-enabled (agents.* → stdout) preserved.

Call sites: setup() defined cvdiag_bootstrap.py:133, invoked at import-time
:273 (now no longer touches root). is_enabled() :206 unchanged (gates emit).
basicConfig() call REMOVED from :128; only doc references remain. New scoped
_install_agents_log_capture() runs on the enabled path; reset_for_test() now
detaches the handler.
2026-06-19 12:02:55 -07:00
Jordan Ritter 75e2c53286 fix(cvdiag): _shared emit gate consults _ENABLED so the fail-closed DEBUG degrade actually suppresses emission (M5 CR R3)
emit_cvdiag now early-returns when not is_enabled(), in addition to the
per-integration CVDIAG_BACKEND_EMITTER env check, so a degraded setup()
(_ENABLED=False) emits nothing — the degrade wins over the live env toggle.

Call sites: shared emit_cvdiag (this file, the single chokepoint) now gates on
is_enabled() (the previously-dead _ENABLED flag, set False by setup()'s
fail-closed degrade). Per-integration emitter_enabled() (langgraph-python,
langgraph-fastapi) and cvdiag_backend_enabled() (10 other _cvdiag_backend.py
modules) remain env-only and call into emit_cvdiag — out of scope here; the
shared gate is the defense-in-depth backstop for all of them.
2026-06-19 11:42:52 -07:00
Jordan Ritter 2f2302cb65 fix(cvdiag): _shared pb_writer never-propagate drain + bootstrap degrade-not-crash + idempotent setup (M5 CR R1) 2026-06-19 11:23:31 -07:00
Jordan Ritter ed7e318034 chore(cvdiag): merge L0-F codegen binding into integration 2026-06-18 14:07:44 -07:00
Jordan Ritter 8cc2eb6f65 chore(cvdiag): merge L0-D codegen binding into integration 2026-06-18 14:07:44 -07:00
Jordan Ritter dc72e9cac8 feat(cvdiag): Python _shared bootstrap module + 12-integration reachability wiring (L0-C) 2026-06-18 14:06:57 -07:00
Jordan Ritter d188e27cf5 feat(cvdiag): .NET codegen binding + emitter (L0-D) 2026-06-18 14:04:22 -07:00
Jordan Ritter 9dc3273d87 feat(cvdiag): TS integration emitter binding (L0-F) 2026-06-18 14:01:02 -07:00