Skip to content

Add external compile-contract tests for renamed public Rust APIs #401

Closed

Description

@coderabbitai

Summary

Add external compile-contract tests for public Rust API changes in pull request #363.

Rationale

The pull request renames public APIs and removes rasterise_signal. Existing integration tests and doctests compile selected call sites, but they do not define the complete external API contract or intentional removal of legacy names.

Affected areas

  • crates/whitaker_sarif/src/lib.rs
  • crates/whitaker_sarif/src/model/
  • crates/whitaker_sarif/src/builders/run_builder.rs
  • common/src/lib.rs
  • common/src/i18n/
  • common/src/complexity_signal.rs
  • crates/bumpy_road_function/src/analysis.rs

Required changes

  • Add a Rust compile-time test harness, such as trybuild, that compiles as an external API consumer.
  • Add a pass case that constructs Artefact, ArtefactLocation, PhysicalLocation::artefact_location, and Run::artefacts.
  • Add a pass case that calls RunBuilder::with_artefact.
  • Cover the renamed public normalize_locale, normalize_settings, and rasterize_signal APIs where each crate exposes them.
  • Add compile-fail cases for removed legacy names when the breaking API contract requires explicit rejection.
  • Keep dynamic values out of snapshots or diagnostics.

Acceptance criteria

  • The harness compiles API-consumer pass cases against public crate exports.
  • The harness verifies the renamed APIs named above.
  • Compile-fail tests verify required legacy-name rejection.
  • The tests remain stable across supported toolchains.

Backlinks

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttestingTest coverage, test infrastructure, and verification tooling work.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions