fix(templates): add error_classifier.js to sparse-checkout in 11 consumer workflows - #2398
Conversation
Workflow source neededPR #2398 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely. Please do one of:
Once a valid source is present, this warning will not be reposted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e17661fd9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| .github/scripts/error_classifier.js |
There was a problem hiding this comment.
Remove stray path from github-script blocks
This line is inside the script: | body, so actions/github-script will parse .github/scripts/error_classifier.js as JavaScript rather than checking it out; because a statement cannot start with .github, the step fails with a syntax error before the retry helper is loaded. The same stray script line was added in several other workflow scripts in this commit (agents-auto-label, agents-capability-check, agents-decompose, agents-dedup, agents-issue-optimizer, and dependabot-automerge), so those jobs will fail whenever the affected github-script step runs.
Useful? React with 👍 / 👎.
Automated Status SummaryHead SHA: f0962ae
Coverage Overview
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
…mer workflows
github-api-with-retry.js does a top-level require('./error_classifier'), but 5
consumer-template workflows sparse-checkout the retry client WITHOUT
error_classifier.js -> they fail with "Cannot find module './error_classifier'"
when they load it. Adds the missing sparse-checkout entry to:
agents-81-gate-followups, agents-autofix-dispatcher, agents-weekly-metrics,
maint-76-claude-code-review, maint-coverage-guard.
Surfaced by Template#800's 'Resolve review target' failure during the Renovate
fleet sync (regression vs sync #797). Workflows that reference the client via
require() under a FULL checkout, or sparse-checkout the whole .github/scripts dir
(e.g. pr-00-gate), already resolve error_classifier.js and were NOT touched.
Re-syncs to consumers via maint-68, fixing the latent breakage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e17661f to
13b0c1a
Compare
The allowlist already covers all 8 drifting pairs, but their fingerprints went stale (renovate bumps, #2398 template edits, and this PR's error_classifier sparse-checkout additions), so Health-74 reported them as unallowlisted drift and failed. Recomputed every entry's normalized SHA in place via scripts/check_template_drift.py: the 7 still-valid entries are unchanged; the 8 stale entries (pair.1,5,6,7,8,9,11,15) are refreshed. Checker now reports 0 unallowlisted drift (exit 0). Divergence is the intentional health-74 baseline (root floating tags + concurrency vs. template SHA-pins); re-baselined, not aligned. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… up the two pre-existing CI failures) (#2402) * fix(workflows): add error_classifier.js to sparse-checkout of root workflows github-api-with-retry.js does a top-level `require('./error_classifier')`, but ~20 root workflows sparse-checkout the retry client WITHOUT error_classifier.js. Any step that loads the client (require) throws `Cannot find module './error_classifier'`. Adds `.github/scripts/error_classifier.js` to every sparse-checkout block that pulls github-api-with-retry.js (28 insertions across 20 files, including all three multi-block files). Mirrors the consumer-template fix in PR #2398. Prioritized reusables consumers call: reusable-10-ci-python, reusable-16-agents, reusable-70-orchestrator-{init,main}, reusable-agents-pr-health, reusable-bot-comment-handler. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(sync): stop expecting dependabot.yml in create_only manifest (#2401) #2401 intentionally removed templates/consumer-repo/.github/dependabot.yml and its sync-manifest entry (create_only sync would otherwise resurrect Dependabot on consumers). test_consumer_create_only_files_are_manifested still asserted .github/dependabot.yml was manifested, turning Python Tests and every scenario python-3.12 job (+ the Aggregate/Publish roll-ups) red on every PR. Drops the stale expectation and adds a guard that the entry is NOT re-added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(drift): refresh stale Health-74 template-drift fingerprints The allowlist already covers all 8 drifting pairs, but their fingerprints went stale (renovate bumps, #2398 template edits, and this PR's error_classifier sparse-checkout additions), so Health-74 reported them as unallowlisted drift and failed. Recomputed every entry's normalized SHA in place via scripts/check_template_drift.py: the 7 still-valid entries are unchanged; the 8 stale entries (pair.1,5,6,7,8,9,11,15) are refreshed. Checker now reports 0 unallowlisted drift (exit 0). Divergence is the intentional health-74 baseline (root floating tags + concurrency vs. template SHA-pins); re-baselined, not aligned. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bug
.github/scripts/github-api-with-retry.jsgained a top-levelrequire('./error_classifier')(line 20).autofix.yml's sparse-checkout was updated to includeerror_classifier.js, but 11 other consumer-template workflows that sparse-checkoutgithub-api-with-retry.jsindividually were missed — so when they load the retry client they fail withCannot find module './error_classifier'.How it surfaced:
stranske/Template#800'sResolve review targetjob failed during the Renovate fleet sync (P2b). Triage confirmed it's a regression vs the prior sync #797, and an audit found 10 more workflows with the same gap. These all synced to consumers this generation, so the breakage is latent fleet-wide (manifests when each workflow runs).Fix
Add
.github/scripts/error_classifier.jsto the sparse-checkout of the 11 individually-listing workflows:agents-81-gate-followups,agents-auto-label,agents-autofix-dispatcher,agents-capability-check,agents-decompose,agents-dedup,agents-issue-optimizer,agents-weekly-metrics,dependabot-automerge,maint-76-claude-code-review,maint-coverage-guard.Workflows that sparse-checkout the whole
.github/scriptsdir (e.g.pr-00-gate) already get the file and were not touched — which is why consumer gates kept passing.Impact
Re-syncs to consumers via
maint-68, fixing the latent breakage in the repos that already synced this generation. Unblocks Template#800 (Resolve review target) on the next sync. Each change is+1sparse-checkout line; adding an extra file to a sparse-checkout is inherently safe.🤖 Generated with Claude Code