Skip to content

[Chore] Decide fate of Soroban test_snapshots files (gitignore or keep in sync) #372

Description

@collinsezedike

Summary

packages/contracts/*/test_snapshots/tests/*.1.json are auto-generated diagnostic captures written by soroban-sdk testutils after every cargo test run. Nothing in the test suite asserts against them, and they churn on nearly every contract PR, plus generate persistent false "modified" status on Windows checkouts due to line-ending normalization.

Motivation

These files add review noise (large diffs with no behavioral meaning) and have already caused a real problem this project: contributors (including repo maintainers) blanket-discarding "modified" snapshot files without checking whether they reflected real behavior changes, which let genuinely stale snapshots merge undetected across multiple PRs.

Proposed Solution

Either (a) add test_snapshots/ to .gitignore since nothing reads them and they carry no CI signal, or (b) if they have diagnostic value worth keeping in version control, add a CI step that regenerates them and fails the build if they drift from what's committed, so staleness is caught automatically instead of relying on manual diff review.

Scope

Field Value
Area Contracts, CI
Protocol affected Both
Network N/A
Breaking change? No

Alternatives Considered

Keeping the current manual-review approach: already demonstrated to fail in practice.

Acceptance Criteria

  • Decision made and documented: gitignore snapshots, or enforce freshness in CI
  • If gitignored: existing committed snapshot files removed from version control
  • If enforced in CI: a job fails when committed snapshots don't match a fresh cargo test run
  • cargo test and CI both pass

Additional Context

Directly related to the stale-snapshot cleanup done in PR #369, which fixed 7 files that had drifted undetected since PRs #363 and #367.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreBuild, CI, dependency updates, or repository maintenanceciGitHub Actions workflows, CI configuration, or automationcontractsInvolves writing or testing Rust/Soroban contracts in packages/contractstrivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge required

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions