Skip to content

[Good First Issue / Easy] Add --format markdown output mode to xtce diff for CI Pull Request summaries #14

Open

Description

@mysma-9403

Context & Background

xtce-rs includes a semantic schema evolution tool — xtce diff <OLD.xml> <NEW.xml> (crates/xtce-cli/src/diff.rs) — that compares two spacecraft XTCE 1.2 mission databases at the canonical IR and bit-layout level, classifying changes as BREAKING (e.g., bit-offset shifts, narrowed bit widths, removed enum labels), WARNING, or COMPATIBLE (live demo: https://altanix.dev/mission-demo/).

Many flight and ground-segment engineering teams run xtce diff --fail-on-breaking in GitHub Actions CI and want to pipe the output directly into $GITHUB_STEP_SUMMARY or a PR comment as a clean Markdown table.

1. What the ask is (Difficulty: Easy)

  1. Add a --format <text|markdown|json> flag (defaulting to text) to the Command::Diff subcommand in crates/xtce-cli/src/main.rs and crates/xtce-cli/src/diff.rs.
  2. When --format markdown is passed, render the diff findings as a GitHub Flavored Markdown table (| Severity | Category | Item | Details |) with a summary header showing total BREAKING, WARNING, and COMPATIBLE counts.
  3. Add a unit test in crates/xtce-cli/src/diff.rs verifying the Markdown table output.

2. Expected Outcome

  • Running xtce diff old.xml new.xml --format markdown outputs a clean Markdown table suitable for $GITHUB_STEP_SUMMARY.
  • cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass with zero warnings.

3. Implementation Guidance

  • All diff logic lives in a single self-contained file: crates/xtce-cli/src/diff.rs (~240 lines).
  • Look at crates/xtce-cli/src/decode.rs (Format enum with #[derive(clap::ValueEnum)]) for how CLI output format flags are structured in this repository.
  • Contribution and dual-licensing guidelines (MIT / Apache-2.0) are in README.md.

4. Mentorship

Mentorship is available! Feel free to claim this issue in the comments and ask any questions.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions