Skip to content

[RefImpl] Read the trace exporter's names from the mapping, and close its test gaps #284

Open

Description

@rocklambros

Target runtime or language

AGT reference Guardian: packages/guardian/src/otel-trace-exporter.ts, audit-to-otlp.ts, and their tests

What this proves

This is part of issue #274, the third of three slices.

PR #275 has merged, so the exporter and the converter can now read their names from otel-mapping.json. This slice also closes test gaps, so a wrong attribute or a wrong path fails a test.

Scope:

  1. Read the failure event name and step_span_attributes from the mapping, and delete the comments that say the mapping lacks them (otel-trace-exporter.ts, around line 111).
  2. Delete DECISION_DETAIL_NAMES, because the mapping now covers those names.
  3. Take the FailureClass list from the mapping. It has 8 classes, including signature_invalid and handshake_failure.
  4. Converter input checks:
    • Treat failure kinds as plain keys, so a kind named like a prototype property (toString, for example) does not match.
    • Clamp oversized error codes.
  5. The converter reads seq. It reports gaps, duplicates, and recorded_at going backwards, and it exits non-zero. A deleted line must not disappear without a report.
  6. Tests:
    • the "empty array is absent" rule;
    • make the off-by-default test able to fail (otel-trace-exporter.test.ts, around line 1045);
    • an end-to-end join test across the Guardian and converter files;
    • the converter's posture and parsing paths;
    • give the slow converter test (about 19 s locally) a timeout or make it faster;
    • check whether a wrong acs.exit_status field is caught by test/sample-trace.test.ts. If it is not, add a test that catches it.
  7. Make the status sentence the same in both writers for every failure kind.

Not in this slice: handshake failures in the converter, and the host-side -32005 entry. Both wait for PR #229 and a Spec ruling, and they are in the fourth slice.

Acceptance: each item above has a test that fails before the change and passes after it.

Do you intend to implement this yourself

Yes. @sabasiddique1 is implementing it. The reviewer is @bar-capsule.

Current Priority Scope

Feeds the runnable Guardian reference implementation

Activity

  1. added
    type:refimplReference implementation or adapter work
    scope:in-focusFeeds the ninety-day committed outcome. Maintainers only
    status:acceptedIn the backlog. Maintainers only
    on Oct 15, 2026
  2. moved this from Needs triage to Accepted in ACS Project Trackeron Oct 15, 2026
  3. sabasiddique1 commented on Oct 15, 2026

    @sabasiddique1
    Contributor

    I’ll take this after #283.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2Maintainers onlyscope:in-focusFeeds the ninety-day committed outcome. Maintainers onlystatus:acceptedIn the backlog. Maintainers onlytype:refimplReference implementation or adapter workworkstream:refimplOwning workstream. Maintainers only

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions