Skip to content

Proposal: snapshot update CLI command for targeted golden master replacement #1

Description

@cschanhniem

goldenscript's data-driven golden master approach is compelling for compiler and VM testing. One ergonomic gap I noticed: updating golden masters currently requires manual file replacement after reviewing diffs.

A CLI subcommand like goldenscript update <test-path> that:

  1. Re-runs the test
  2. Compares actual output against the stored golden master
  3. Shows the diff and prompts (or accepts --yes) to overwrite

This mirrors the insta review workflow and would make it faster to bulk-accept expected output changes during development. The prompting could support --accept-all for automated use in scripts.

Happy to draft a more detailed spec if this aligns with the project direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions