Skip to content

Snapshot - #831

Open
OluRemiFour wants to merge 2 commits into
Centurylong:mainfrom
OluRemiFour:snapshot
Open

Snapshot#831
OluRemiFour wants to merge 2 commits into
Centurylong:mainfrom
OluRemiFour:snapshot

Conversation

@OluRemiFour

Copy link
Copy Markdown

Close: #761

Summary of the change

I've created comprehensive tooling for reviewing and approving insta snapshot diffs to ensure detector changes are transparent.

Created Components

  1. PowerShell Review Script
    review-snapshots.ps1 - A streamlined review tool with:

-TestOnly - Run snapshot tests to detect changes
-ListPending - List all pending snapshot files with size comparisons
-Review - Interactive review with diff display for each change
-AcceptAll/-RejectAll - Bulk operations (with confirmation)
-DetectorsOnly - Filter to detector snapshots only
2. Comprehensive Documentation
SNAPSHOT_REVIEW_WORKFLOW.md - Complete guide covering:

Quick start for both script and cargo-insta workflows
Understanding what triggers snapshot changes
How to read and interpret snapshot diffs
Step-by-step review process with best practices
CI integration details
Troubleshooting common scenarios
Guidelines for adding new detectors
3. Enhanced CI Integration
Updated ci.yml to:

Add clearer comments explaining snapshot testing purpose
Reference the new review script and documentation
Add a failure step that provides actionable guidance when snapshot tests fail
4. Updated Existing Documentation
Enhanced README.md to:

Reference the new review script as the recommended approach
Link to the comprehensive workflow documentation
Maintain cargo-insta direct usage as an alternative
Usage Example

PowerShell

Detect changes

.\scripts\review-snapshots.ps1 -TestOnly

Review interactively

.\scripts\review-snapshots.ps1 -Review

Review only detectors

.\scripts\review-snapshots.ps1 -Review -DetectorsOnly
The tooling ensures detector changes are transparent by requiring human review of snapshot diffs before they can be merged, with clear documentation and CI enforcement.

Fixes / Closes

Fixes #761

Motivation and context

Dependencies

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Test A

Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code area: ci/cd CI/CD pipeline and GitHub Actions area: core-engine sanctifier-core static analysis engine area: frontend Next.js frontend application area: docs Documentation and guides area: testing Tests, benchmarks, fuzzing area: infra Infrastructure, DevOps, deployment size/xl labels Jul 22, 2026
@OluRemiFour

Copy link
Copy Markdown
Author

Done, Close: #831

@Gbangbolaoluwagbemiga
Gbangbolaoluwagbemiga force-pushed the main branch 3 times, most recently from 32f43f6 to f15d961 Compare July 22, 2026 16:51
@Gbangbolaoluwagbemiga

Gbangbolaoluwagbemiga commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@OluRemiFour , ci pipeline failed, please pull from upstream and resolve the ci, a major fix has been commit to the main branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci/cd CI/CD pipeline and GitHub Actions area: core-engine sanctifier-core static analysis engine area: docs Documentation and guides area: frontend Next.js frontend application area: infra Infrastructure, DevOps, deployment area: testing Tests, benchmarks, fuzzing dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snapshot-review tooling to make detector changes easy to audit

2 participants