Skip to content

Add OTel GenAI compatibility matrix - #19

Merged
imran-siddique merged 1 commit into
mainfrom
agent/otel-genai-compatibility
Aug 19, 2026
Merged

imran-siddique merged 1 commit into
mainfrom
agent/otel-genai-compatibility

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

What changed

  • add a machine-readable OpenTelemetry GenAI compatibility matrix pinned to upstream commit a685613a207a580163353b8e48a7ad88967e7b42
  • classify every shipped span attribute, metric, event family, and context relationship as exact, extension, complementary, non-equivalent, or deferred
  • add an AST-backed drift gate to CI and causal repository-gate tests
  • document why AgentTrust usage and action signals complement rather than replace OTel GenAI instrumentation
  • include the matrix in source distributions

Why

The upstream GenAI conventions are Development status, have moved to a dedicated repository, and do not yet publish a schema URL. Adopters need a precise, reviewable statement of compatibility that cannot silently drift as either project changes.

Impact

Integrators can keep native OTel GenAI spans and metrics while adding AgentTrust governance facts without duplicate or falsely equivalent signals. CI now rejects unclassified projection changes.

Validation

  • python tools/check_otel_compatibility.py (16 attributes, 8 metrics, 6 event families)
  • python -m unittest discover -s tests -v (87 tests, 20 subtests)
  • python -m pytest -q (87 tests, 20 subtests)
  • version, schema, and conformance gates
  • python -m compileall -q src
  • python -m build
  • isolated wheel import smoke test
  • source archive content assertion for the matrix

@imran-siddique
imran-siddique merged commit 807eff6 into main Aug 19, 2026
7 checks passed
@imran-siddique
imran-siddique deleted the agent/otel-genai-compatibility branch August 19, 2026 04:01
imran-siddique added a commit that referenced this pull request Sep 25, 2026
…lusterFuzzLite (#65)

`finalize_trace` took `runtime.measurement` from `snapshot.chain_digest`
and derived the appraisal from `snapshot.entries`, and never checked
that one still hashes to the other. `EvidenceSnapshot` is a public
dataclass holding mutable dicts. Seal a run holding a deny, set
`entries[0].event["decision"] = "allow"`, and the old code signed an
affirming record under a measurement that commits to the deny.

Fixes:

- `trace_adapter.py` and `trace-finalizer.ts` recompute the chain
(sequence, previous digest, entry digest, event_id, run_id,
chain_digest) and refuse on mismatch. A malformed event in a consistent
chain is now `TraceFinalizationError`, not `KeyError`. TS shares the
digest through a new internal `evidence-digest.ts`, not re-exported.
Four Python tests in `test_trace_adapter_refusals.py`, one TS test.
- `validation.py`: 5,000-deep nesting raised `RecursionError`, a
non-string key raised `AttributeError`, and NaN or Infinity passed. All
three are now `EventValidationError`, with depth capped at 32.
`test_evidence.py` expected NaN to fail at the chain; it now fails one
step earlier, which matches ajv on the TS side.
- `adapters/agt.py`, `agt_audit.py`, `agt_approval.py`, `agt_data.py`: a
list or object where a decision, kind, outcome or classification belongs
raised `TypeError: unhashable type`; `latency_ms=1e303` raised
`OverflowError`. Both are `ValueError` now. The fuzzer found the first
on its first run.

Scorecard FuzzingID (#19): `.clusterfuzzlite/` with three targets (event
validation and every projection plus inbound propagation headers; OPA
and AGT policy adapters; sealed evidence to signed TRACE, including a
post-seal edit that must be refused). Build installs from
`requirements/test.txt` with `--require-hashes`. Actions are pinned to
the SHAs agent-manifest uses, address sanitizer only, 45 minute jobs.

SAST #22: `codeql.yml` already runs on push to main and every pull
request with no path filter, so this clears as new commits are scanned.

Verified: 128 Python tests pass, 2 skipped (was 114); TS `npm run check`
42 pass; schema, version, OTel and TS schema gates pass; wheel and sdist
smoke pass; actionlint clean. Atheris will not build on Windows, so each
target ran 4,000 inputs through a stand-in provider, and each was
bundled with PyInstaller using the `build.sh` flags and run. That bundle
run found the missing `--collect-data=agentrust_trace`. With the chain
check disabled, the TRACE target caught the edited entry on 38 of 38
signed runs.

Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant