docs/quickstart-guide
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1b515d529c |
fix(tests): align LLM trace test session factory with flush-based save
CI / lint (pull_request) Successful in 1m22s
CI / typecheck (pull_request) Successful in 1m35s
CI / quality (pull_request) Successful in 1m39s
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 27s
CI / build (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m46s
CI / integration_tests (pull_request) Successful in 4m42s
CI / e2e_tests (pull_request) Successful in 4m26s
CI / unit_tests (pull_request) Successful in 6m3s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 12m11s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 55s
CI / build (push) Successful in 50s
CI / helm (push) Successful in 27s
CI / push-validation (push) Successful in 20s
CI / quality (push) Successful in 1m13s
CI / typecheck (push) Successful in 1m18s
CI / security (push) Successful in 1m31s
CI / integration_tests (push) Successful in 3m55s
CI / e2e_tests (push) Successful in 4m5s
CI / unit_tests (push) Successful in 5m28s
CI / docker (push) Successful in 1m45s
CI / coverage (push) Successful in 13m14s
CI / benchmark-publish (pull_request) Has been skipped
CI / status-check (push) Successful in 4s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has started running
CI / benchmark-regression (pull_request) Failing after 1h5m16s
Use a shared session in test setup so that data flushed (but not committed) by LLMTraceRepository.save() remains visible to subsequent read operations within the same test scenario. This matches the production UnitOfWork pattern where a single session is shared across repository calls. Also fixes ruff format violations (single quotes, string concatenation) that caused the CI lint gate to fail. ISSUES CLOSED: #10034 |
||
|
|
2a5a37d774 |
fix: remove type: ignore comments and use proper method assignment
Removed type: ignore[method-assign] comments from spy function assignments in test code. Replaced direct method assignment with object.__setattr__ to properly handle method replacement without type suppression, maintaining code quality standards. |
||
|
|
b4b6fe6484 |
fix: replace session.commit() with session.flush() in LLMTraceRepository.save()
Refactor: replace session.commit() with session.flush() in LLMTraceRepository.save() to ensure changes are persisted within the UnitOfWork without prematurely committing the database transaction. - Updated LLMTraceRepository.save() to call session.flush() instead of session.commit() in src/cleveragents/infrastructure/database/llm_trace_repository.py. - Added two new BDD scenarios to features/llm_trace.feature: - 'Repository save() calls flush not commit' to verify save() uses flush not commit. - 'LLM trace rolled back when UnitOfWork transaction rolls back' to verify rollback. - Added corresponding step definitions to features/steps/llm_trace_steps.py. ISSUES CLOSED: #10034 |
||
|
|
3f14cbbf7e
|
feat(observability): add LLMTrace model and operational metrics
CI / lint (pull_request) Successful in 40s
CI / security (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 1m1s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 14s
CI / unit_tests (pull_request) Successful in 3m58s
CI / integration_tests (pull_request) Successful in 4m34s
CI / docker (pull_request) Successful in 1m6s
CI / coverage (pull_request) Successful in 6m21s
CI / quality (push) Successful in 16s
CI / lint (push) Successful in 21s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 39s
CI / unit_tests (push) Successful in 2m38s
CI / integration_tests (push) Successful in 3m2s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 4m9s
CI / benchmark-publish (push) Successful in 14m42s
CI / benchmark-regression (pull_request) Successful in 26m29s
Add LLMTrace Pydantic v2 domain model with all required fields (trace_id, plan_id, decision_id, actor, provider, model, prompt_tokens, completion_tokens, cost_usd, latency_ms, tool_calls, context_hash, streaming, retry_count, error). Define 14 OperationalMetricKey values (PLAN_DURATION_MS, PLAN_TOTAL_COST_USD, PLAN_DECISION_COUNT, ACTOR_INVOCATION_COUNT, ACTOR_LATENCY_MS, TOOL_INVOCATION_COUNT, TOOL_ERROR_RATE, CONTEXT_BUILD_TIME_MS, CONTEXT_TOKEN_COUNT, LLM_CALL_COUNT, LLM_TOTAL_TOKENS, LLM_TOTAL_COST_USD, LLM_AVG_LATENCY_MS, SUBPLAN_COUNT) with MetricEntry model and MetricCollector. Add llm_traces database table (LLMTraceModel) with LLMTraceRepository for persistence. TraceService provides recording, querying, metric computation, plan lifecycle hooks, and optional LangSmith forwarding when LANGCHAIN_TRACING_V2=true. Wired into DI container as trace_service. Includes 28 Behave BDD scenarios, 6 Robot Framework smoke tests, 3 ASV benchmark suites, and reference documentation. Fix pre-existing cli_core server_mode test flake by mocking resolve_server_mode in test steps to avoid stale config file interference. Closes #500 |