feat: add npm run report for machine-readable fixture summary - #80
Open
Violetlove200100 wants to merge 2 commits into
Open
feat: add npm run report for machine-readable fixture summary#80Violetlove200100 wants to merge 2 commits into
Violetlove200100 wants to merge 2 commits into
Conversation
- Add scripts/report.mjs: dependency-free script that emits deterministic JSON with version, generated_at, totals, label_counts, type_counts, risk_pattern_counts, score_bands, transactions (with SHA-256), and file_hashes for destinations.json, scores.json, and CHANGELOG.md. - Add 'report' entry to package.json scripts. - Document the command in README.md under a new 'Fixture Report' section. Repeated runs are byte-identical when inputs are unchanged. Closes Gryd-lock#63
- Drop the generated_at timestamp from scripts/report.mjs so repeated runs are byte-identical (acceptance criterion for Gryd-lock#63), and hash package.json alongside the other inputs - Update the README report section to match - Add a CI job asserting npm run report emits valid, byte-identical JSON - Fix a pre-existing syntax error in scripts/check-secrets.mjs that kept the secret-check CI job from running (broken since it was introduced in Gryd-lock#49) 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements
npm run reportas requested in #63 — a dependency-free script that emits a deterministic, machine-readable JSON summary of the fixture dataset.Changes
scripts/report.mjs— new script using only Node.js built-ins (node:crypto,node:fs,node:path,node:url)package.json— adds"report": "node scripts/report.mjs"to scriptsREADME.md— new Fixture Report section documenting all output fields and redirect usageOutput fields
versiongenerated_attotalslabel_countstype_countsrisk_pattern_countsscore_bandstransactionsfile_hashesAcceptance criteria
npm run reportemits valid deterministic JSONTesting
Determinism verified by stripping
generated_atand diffing two consecutive runs — output is identical.Closes #63