Skip to content

Test SARIF Artefact wire format through public builders #399

Closed

Description

@coderabbitai

Summary

Add behavioural tests through the public SARIF builders and JSON boundary for the renamed Rust API.

Rationale

The externally consumed SARIF contract requires physicalLocation.artifactLocation and artifacts. Existing tests primarily inspect Rust fields or round-trip values. Those tests do not prove that populated output uses canonical SARIF property names.

Affected areas

  • crates/whitaker_sarif/src/builders/location_builder.rs
  • crates/whitaker_sarif/src/builders/run_builder.rs
  • crates/whitaker_sarif/src/model/location.rs
  • crates/whitaker_sarif/src/model/run.rs
  • Public SARIF integration or behavioural tests

Required changes

  • Build a non-empty location and run through public builder APIs.
  • Serialize the result at the JSON boundary.
  • Assert that physicalLocation.artifactLocation and artifacts exist.
  • Assert that artefactLocation and artefacts do not exist.
  • Deserialize canonical SARIF JSON containing the canonical names and assert that Rust model values are populated.
  • Add direct behavioural coverage for RunBuilder::with_artefact.

Acceptance criteria

  • The test exercises public builders and serialized JSON.
  • The test fails if the canonical property names change.
  • The test verifies both serialization and deserialization of populated values.

Backlinks

Activity

  1. added
    bugSomething isn't working
    testingTest coverage, test infrastructure, and verification tooling work.
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestingTest coverage, test infrastructure, and verification tooling work.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions