Skip to content

Close the test gaps in the trace exporter and the audit converter - #657

Merged
bar-capsule merged 1 commit into
GenAI-Security-Project:integrationfrom
sabasiddique1:refimpl/otel-tests-284
Nov 24, 2026
Merged

bar-capsule merged 1 commit into
GenAI-Security-Project:integrationfrom
sabasiddique1:refimpl/otel-tests-284

Conversation

@sabasiddique1

Copy link
Copy Markdown
Contributor

What changed

Item 6 of #284 asks for tests that were missing, so a wrong attribute or a wrong path fails a test. This adds them, and gives the slow converter test a 30 s timeout. No file under src changes.

Scope

Against item 6 of #284:

  • The "empty array is absent" rule. Done.
  • The off-by-default test, able to fail. Done. It catches a default in the factory, and a relative default path in startGuardian. It misses a default endpoint or an absolute path there, because neither writes into the listed directory.
  • End-to-end join test. Done. Both files record the same step, a late decision. The Guardian's bridge is the real deployment bridge, held back until the host has timed out.
  • Converter posture and parsing paths. Done, in five tests.
  • Slow converter test. Done, with 30_000 as the third argument. It can't fail first here, because that test takes about half a second on my machine.
  • acs.exit_status. No work. test/sample-trace.test.ts already catches a wrong field, as rocklambros said on the issue.

Items 1 to 5 and 7 of #284 are not here. rocklambros split the issue on 2026-10-31: item 6 here, the rest in PR #349. The fix to the test emits the decision extras whether the mapping lists them or not is in PR #349 too.

Credit

PR #349 is drk-ram's. The list of what each test should check is rocklambros's, from Ask 6 of his review of it.

Questions for the reviewer

@bar-capsule, no questions, one thing to know. This has merge conflicts with PR #349 in test/audit-to-otlp.test.ts: the imports, the OtlpSpan type, and the end of the file. Taking the union resolves it. I'll rebase if #349 merges first. It also conflicts with my PR #656 for #283 in otel-trace-exporter.test.ts, and I'll rebase mine there too.

Which issue does this implement

Part of #284
Refs #274

  • This is an editorial correction (typo, grammar, link, formatting) with no change in
    meaning, so it needs no issue

Base branch

  • integration, because this touches the specification, schemas, a reference
    implementation, an adapter, tests, or CI
  • main, because every changed path is on the documentation lane allowlist in
    CONTRIBUTING.md

Type of change

  • Specification change (schema, hooks, events, AgBOM)
  • Reference implementation or adapter
  • Documentation
  • Tooling or CI
  • Governance (licensing, security policy, contributor docs)

I tested this

  • I synced my branch with the base branch before opening this
  • uv run pytest -v passes on my machine
  • uv run mkdocs build --strict passes on my machine

How I tested

From reference-implementations/agt, on Bun 1.3.11 and again on Bun 1.3.14:

bun run typecheck
bun test
  • Typecheck is clean.
  • Bun 1.3.11: 1302 pass, 4 skip, 0 fail.
  • Bun 1.3.14: 1305 pass, 1 skip, 0 fail.
  • The two changed test files passed three runs in a row on each version.

From the repo root, uv run pytest -v gives 1251 passed and 1 skipped, and uv run mkdocs build --strict passes. Each new or rewritten test goes red when the source it covers is broken. All of them also pass on top of PR #349 merged with integration.

I ran this on macOS only.

Checklist

  • Commits are signed off with git commit -s (required by the DCO)
  • Prose follows STYLE.md
  • No secrets, tokens, or internal URLs in the diff

Security

  • This change has no security impact

@bar-capsule bar-capsule left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at f720120c. On Bun 1.3.11 (macOS), bun run typecheck is clean and bun test gives 1302 pass, 4 skip, 0 fail, matching yours. I broke the covered source 12 ways, one at a time: the new tests caught 11, and 7 of those only they caught. The 12th, reading non-object JSON as an entry, changes nothing visible, since the outcome and posture check skips those lines anyway. Didn't run Linux or Bun 1.3.14.

#349 was closed on 21 Nov, so that conflict is gone. @rocklambros, items 1 to 5 and 7 of #284 have no PR now. @artmaro FYI, merging.

@bar-capsule
bar-capsule merged commit d455aeb into GenAI-Security-Project:integration Nov 24, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Done in ACS Project Tracker Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants