Skip to content

fix(templates): add error_classifier.js to sparse-checkout in 11 consumer workflows - #2398

Merged
stranske merged 1 commit into
mainfrom
fix/error-classifier-sparse-checkout
Jun 15, 2026
Merged

fix(templates): add error_classifier.js to sparse-checkout in 11 consumer workflows#2398
stranske merged 1 commit into
mainfrom
fix/error-classifier-sparse-checkout

Conversation

@stranske

Copy link
Copy Markdown
Owner

Bug

.github/scripts/github-api-with-retry.js gained a top-level require('./error_classifier') (line 20). autofix.yml's sparse-checkout was updated to include error_classifier.js, but 11 other consumer-template workflows that sparse-checkout github-api-with-retry.js individually were missed — so when they load the retry client they fail with Cannot find module './error_classifier'.

How it surfaced: stranske/Template#800's Resolve review target job 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.js to 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/scripts dir (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 +1 sparse-checkout line; adding an extra file to a sparse-checkout is inherently safe.

🤖 Generated with Claude Code

@stranske
stranske temporarily deployed to agent-standard June 15, 2026 04:50 — with GitHub Actions Inactive
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #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:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@stranske-keepalive

stranske-keepalive Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: f0962ae
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

…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>
@stranske
stranske force-pushed the fix/error-classifier-sparse-checkout branch from e17661f to 13b0c1a Compare June 15, 2026 04:57
@stranske
stranske temporarily deployed to agent-standard June 15, 2026 04:57 — with GitHub Actions Inactive
@stranske
stranske merged commit 07e521b into main Jun 15, 2026
34 of 36 checks passed
@stranske
stranske deleted the fix/error-classifier-sparse-checkout branch June 15, 2026 04:59
stranske added a commit that referenced this pull request Jun 15, 2026
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>
stranske added a commit that referenced this pull request Jun 15, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant