[codex] Harden observability evaluation validators - #391
Merged
github-actions[bot] merged 3 commits intoJun 10, 2026
Conversation
|
🚅 Deployed to the qyl-pr-391 environment in qyl
|
There was a problem hiding this comment.
Pull request overview
Risk: Low-to-moderate (mostly validator hardening + tests), but there is a compile-breaking issue in the new test project.
This PR hardens the observability evaluation harness by making trace/span identifier problems explicit failures and by switching tool-call argument equality from presentation-based string comparison to semantic JSON equality, backed by new evaluator/runner/loader tests.
Changes:
- Replace
JsonElement.ToString()-based tool-call argument comparisons withJsonElement.DeepEquals. - Harden trace correlation validation to fail on missing
traceId/spanId, duplicate(traceId, spanId)keys, and unresolved parent spans. - Add a new
Qyl.Observability.Evaluation.Testsproject with focused xUnit/MTP coverage for evaluator and runner/loader edge cases.
Blockers
evals/Qyl.Observability.Evaluation.Tests/RunnerAndLoaderTests.cs: missingusing Qyl.Observability.Evaluation;causes unresolved identifiers (ScenarioRunResult,EvaluationRunner,ScenarioLoader) and will fail compilation.
Important issues
- None found.
Minor / optional
- None found.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| qyl.slnx | Adds the new evaluation test project to the solution. |
| evals/Qyl.Observability.Evaluation/Properties/AssemblyInfo.cs | Exposes internals to the new test assembly. |
| evals/Qyl.Observability.Evaluation/Evaluators/TraceCorrelationEvaluator.cs | Makes trace/span ID validation strict and reports duplicates/unresolved parents. |
| evals/Qyl.Observability.Evaluation/Evaluators/ToolCallAccuracyEvaluator.cs | Switches JSON value equality to semantic JsonElement.DeepEquals. |
| evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csproj | Introduces the new test project for the eval harness. |
| evals/Qyl.Observability.Evaluation.Tests/EvaluatorTestData.cs | Adds shared record/tool/telemetry builders for tests. |
| evals/Qyl.Observability.Evaluation.Tests/TraceCorrelationEvaluatorTests.cs | Adds coverage for missing IDs, duplicates, and missing parents. |
| evals/Qyl.Observability.Evaluation.Tests/ToolCallAccuracyEvaluatorTests.cs | Adds coverage for semantic JSON matching + mismatch behavior. |
| evals/Qyl.Observability.Evaluation.Tests/TelemetryEvidenceEvaluatorTests.cs | Adds coverage for evidence existence/citation/forbidden-claim checks. |
| evals/Qyl.Observability.Evaluation.Tests/RunnerAndLoaderTests.cs | Adds coverage for runner/loader mismatch handling (currently missing a namespace import). |
| evals/Qyl.Observability.Evaluation.Tests/CardinalitySafetyEvaluatorTests.cs | Adds coverage for cardinality/sensitive-attribute safety checks. |
Comment on lines
+1
to
+3
| using Microsoft.Extensions.AI.Evaluation; | ||
| using Qyl.Observability.Evaluation.Evaluators; | ||
|
|
Railway is only used in qyl, so it moved out of the global enabledPlugins into the repo's tracked .claude/settings.json (real path .agents/ via the symlink) — portable across machines and immune to untracked-file cleanup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment on lines
+1
to
+5
| { | ||
| "enabledPlugins": { | ||
| "railway@claude-plugins-official": true | ||
| } | ||
| } |
Comment on lines
37
to
40
| <Folder Name="/evals/"> | ||
| <Project Path="evals/Qyl.Observability.Evaluation/Qyl.Observability.Evaluation.csproj" /> | ||
| <Project Path="evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csproj" /> | ||
| </Folder> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JsonElementcomparison with semanticJsonElement.DeepEqualsfor tool-call argument subset matchingtraceId, missingspanId, duplicate(traceId, spanId)keys, and unresolved parent spansRunnerAndLoaderTeststo avoid review/tooling ambiguity around parent-namespace lookupWhy
PR #390 added the first deterministic observability evaluation harness, but two validator paths could hide real mistakes:
JsonElement.ToString(), which is presentation-based rather than semanticA validation engine cannot carry fallbacks that reinterpret malformed telemetry into valid-looking keys. These changes make missing identifiers explicit failures instead of silent correlation inputs.
Validation
dotnet restore evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csprojdotnet build evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csproj --configuration Release --no-restore -v:minimaldotnet test evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csproj --configuration Release --no-restore --no-build -v:minimaldotnet run --project evals/Qyl.Observability.Evaluation/Qyl.Observability.Evaluation.csproj --configuration Release --no-builddotnet restore qyl.slnxdotnet build qyl.slnx --configuration Release --no-restore -v:minimaldotnet test qyl.slnx --configuration Release --no-restore --no-build -v:minimaldotnet-coverage collect "dotnet test evals/Qyl.Observability.Evaluation.Tests/Qyl.Observability.Evaluation.Tests.csproj --configuration Release --no-restore --no-build -v:minimal" -f cobertura -o artifacts/coverage/qyl-observability-evaluation.cobertura.xmlNotes:
dotnet test --collect:"XPlat Code Coverage"is not supported by the current xUnit v3 Microsoft.Testing.Platform runner in this repo; it exits withUnknown option '--collect'.dotnet-coveragealso executes the tests successfully, but reportsNo code coverage data available. Profiler was not initialized.for this net10/xUnit-MTP path. The added tests are branch-focused semantic coverage for the evaluator failure modes; this PR does not claim a formal measured coverage percentage.