refactor(ci): simplify crapload workflow using gaze native baseline comparison#340
Open
gxmiranda wants to merge 2 commits into
Open
refactor(ci): simplify crapload workflow using gaze native baseline comparison#340gxmiranda wants to merge 2 commits into
gxmiranda wants to merge 2 commits into
Conversation
…omparison Replace custom scripts/compare-crapload.sh (315 lines) with gaze's native `gaze crap --baseline` comparison. The workflow now: - Runs `gaze crap --baseline` for per-function regression detection - Writes a temporary .gaze.yaml from workflow inputs when the consumer repo has no config file (backward compatibility for epsilon/threshold) - Generates PR comment markdown inline via jq + heredoc - Keeps `gaze report` for supplementary quality/quadrant data Removes TestCompareCrapload test class (5 tests, 203 lines) since the comparison logic is now covered by 34 upstream tests in gaze itself. Closes #328 Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Gustavo Miranda <[email protected]>
CRAP Load AnalysisNo Go code changes detected in this PR. No CRAP impact. |
trevor-vaughan
requested changes
Jun 15, 2026
| GAZE_VERSION: ${{ inputs.gaze-version }} | ||
| STATUS: ${{ steps.compare.outputs.status }} | ||
| run: | | ||
| CRAP_JSON="/tmp/crapload-current.json" |
Member
There was a problem hiding this comment.
This should be moved into a separate script. At a certain length/complexity actionlint will start randomly dying when attempting to review this file.
Move the inline PR comment generation (~170 lines) from reusable_crapload_analysis.yml into scripts/generate-crapload-comment.sh to prevent actionlint from hanging on large inline bash blocks. The workflow now calls the external script via the existing sparse checkout, matching the pattern used by the original compare-crapload.sh. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Gustavo Miranda <[email protected]>
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
Replaces custom
scripts/compare-crapload.sh(315 lines of bash) with gaze's nativegaze crap --baselinecomparison, removing ~293 net lines of code.Closes #328
Changes
Deleted
scripts/compare-crapload.sh(315 lines) — all comparison logic (baseline lookup, regression detection, numeric validation, pass/fail) is now native togaze crap --baselineModified
reusable_crapload_analysis.yml— replaced two-step pipeline (gaze report+compare-crapload.sh) with:.gaze.yamlfrom workflow inputs when consumer repo lacks one (backward compatibility fornew-function-thresholdandregression-epsilon)gaze crap --baselineinvocation for comparison with output extraction viajqjq+ heredoc (preserving<!-- crapload-analysis-marker -->)gaze reportfor supplementary quality metrics and quadrant datajqpath normalization (gaze emits relative paths natively)tests/test_crapload_package_resolution.py— removedTestCompareCraploadclass (5 tests, 203 lines); comparison logic now covered by 34 upstream tests in gaze (compare_test.go,compare_report_test.go)ci_test_crapload.yml— removedscripts/compare-crapload.shfrom path triggersspecs/001-crapload-workflow/quickstart.md— updated baseline generation to usegaze crap --format=json; removed stalepost-commentinput referencespecs/001-crapload-workflow/data-model.md— removedbaseline-lookup.tsvartifact; removed stalepost-commentinput; updated descriptionsAdded
CHANGELOG.md— unreleased entry documenting the refactoringopenspec/changes/simplify-crapload-gaze-native/— proposal, design, and tasks artifactsDesign Decisions
gaze reportgaze craplacks quality/quadrant data.gaze.yamlci_crapload.ymlresolve-go-packages.shMigration
--baselinesupport. Thegaze-versioninput should specify a minimum version during transition..gaze.yamladoption: Consumer repos can optionally commit their own.gaze.yamlto configure epsilon/threshold directly. The workflow respects existing configs.Validation
yamllintpasses on changed YAML filesruffpasses cleanTestCompareCraploadtests removed)