fix(ci): repair code quality workflow paths#141
Merged
Conversation
The quality-thresholds step grepped for digits before '%' and took the first match, which was '100' from 'width: 100%' in the report's CSS. This false-positive triggered the 20% gate on every run. Scope the grep to the 'Duplicated Lines' stat card so only the real duplication rate is matched, and switch the threshold check from bash integer -gt to awk so decimal percentages (e.g. 2.20%) compare correctly.
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.
What & why
Fixes the nightly Code Quality Analysis workflow, which was hard-failing at setup time. Three bugs, three commits. Tracking issue: #54.
Changes
1. Invalid
main/path prefixes (89da206)main/path prefixes andworking-directory: maindirectives were introduced in 610848b. GitHub Actions checks out the repo at the workspace root — there is nomain/directory, sobackend/andfrontend/live at the checkout root.cache-dependency-glob: "main/backend/uv.lock"→"backend/uv.lock"working-directory: mainsarif_file: main/frontend/fallow-results.sarif→frontend/fallow-results.sarifmain/prefixes from 5 artifact paths2. Wrong jscpd report filename (e50d92f)
The quality-thresholds step looked for
jscpd-report/index.html, but jscpd writesjscpd-report/jscpd-report.html(per the justfileduplicationrecipe). Without the file the step emitted::error::jscpd report not foundand failed.3. jscpd duplication-percentage parse bug (5c077d2)
The thresholds step grepped
\d+(?=%)and took the first match, which was100from the report's CSS (width: 100%) — a false positive that tripped the 20% gate every run. The real duplication rate is 2.20%.-gttoawkso decimal percentages (e.g.2.20%) compare correctly. The previous[ "$DUP_PCT" -gt 20 ]silently errored on non-integer values (suppressed by2>/dev/null), which would have been a false negative above 20%.Scope
Path + parse fixes only — minimal blast radius. Action-version upgrades (
checkout@v5,setup-bun@v2,upload-sarif@v4, etc.) are intentionally excluded (deferred to a later Phase 5 PR).Verification
git grep "main/\|working-directory: main" -- .github/workflows/code-quality.yml→ no matches.workflow_dispatchon this branch → success.Duplication: 2.20%,All quality thresholds passed.Part of the CI triage effort (2026-06-24), Phase 1.