Skip to content

fix(workflows): error_classifier.js in root sparse-checkouts (+ green up the two pre-existing CI failures) - #2402

Merged
stranske merged 3 commits into
mainfrom
fix/root-workflows-error-classifier-sparse-checkout
Jun 15, 2026
Merged

fix(workflows): error_classifier.js in root sparse-checkouts (+ green up the two pre-existing CI failures)#2402
stranske merged 3 commits into
mainfrom
fix/root-workflows-error-classifier-sparse-checkout

Conversation

@stranske

@stranske stranske commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Problem

.github/scripts/github-api-with-retry.js does a top-level require('./error_classifier') (line 20). ~20 root workflows sparse-checkout the retry client without .github/scripts/error_classifier.js, so any step that loads the client throws Cannot find module './error_classifier'. This is the root-repo equivalent of the consumer-template bug fixed in #2398.

Fix (3 commits)

1. error_classifier.js in root sparse-checkouts (the actual bug)

Added .github/scripts/error_classifier.js to every sparse-checkout block that pulls github-api-with-retry.js28 insertions across 20 files, 0 deletions. Six files have multiple sparse-checkout blocks (agents-autofix-loop ×3, reusable-agents-pr-health ×3, etc.); each block was fixed.

Prioritized reusables: reusable-10-ci-python, reusable-16-agents, reusable-70-orchestrator-{init,main}, reusable-agents-pr-health, reusable-bot-comment-handler. Plus: agents-63-issue-intake, agents-autofix-dispatcher, agents-autofix-loop, agents-bot-comment-handler, agents-capability-check, agents-decompose, agents-dedup, agents-moderate-connector, agents-weekly-metrics, health-codex-auth-check, maint-46-post-ci, maint-62-integration-consumer, maint-72-fix-pr-body-conflicts, maint-coverage-guard.

2. Stale dependabot manifest test (pre-existing red on every PR)

test_consumer_create_only_files_are_manifested still asserted .github/dependabot.yml is manifested, but #2401 intentionally removed it from the template + manifest. This failed Python Tests, all six Scenario - */python 3.12 jobs, and the Aggregate & Verify / Publish Results roll-ups. Dropped the stale expectation; added a guard that it is not re-added.

3. Stale Health-74 template-drift fingerprints (pre-existing red on every PR)

The drift allowlist already covers all 8 drifting pairs, but their SHA fingerprints went stale (renovate bumps, #2398's template edits, and this PR's sparse-checkout additions). Recomputed every entry's normalized SHA in place: 7 still-valid entries unchanged, 8 stale ones refreshed. Divergence is the intentional health-74 baseline (root floating tags + concurrency vs. template SHA-pins) — re-baselined, not aligned.

Verification (local)

  • Audit: 20 → 0 broken sparse-checkouts; every inserted line sits among .github/scripts/*.js entries (no require/run: adjacency); all 20 YAML-parse.
  • scripts/check_template_drift.py0 unallowlisted drift, exit 0.
  • tests/workflows + tests/scripts: 2252 passed, 3 skipped (needs-human), including the previously-failing manifest test and test_template_drift_workflow.py.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated multiple automation workflows to include an error-classification helper during their sparse checkouts, improving consistency of automated error reporting across jobs and pipelines.
    • Refreshed template drift allowlist fingerprints for several workflow template pairs.
  • Tests
    • Updated consumer sync manifest tests to ensure the Dependabot configuration is excluded from generated manifest entries.

…rkflows

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>
@stranske
stranske temporarily deployed to agent-high-privilege June 15, 2026 05:24 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Across 20 GitHub Actions workflow files, .github/scripts/error_classifier.js is added to each job's sparse-checkout path list, touching 28 individual sparse-checkout declarations. Template-drift-allowlist fingerprints are updated to reflect these workflow changes. A test file is modified to explicitly ensure .github/dependabot.yml is excluded from consumer repo manifest generation. No workflow logic, job conditions, or step behavior is modified.

Changes

Error classifier sparse-checkout propagation

Layer / File(s) Summary
Add error_classifier.js to workflow sparse-checkouts
.github/workflows/agents-63-issue-intake.yml, .github/workflows/agents-autofix-dispatcher.yml, .github/workflows/agents-autofix-loop.yml, .github/workflows/agents-bot-comment-handler.yml, .github/workflows/agents-capability-check.yml, .github/workflows/agents-decompose.yml, .github/workflows/agents-dedup.yml, .github/workflows/agents-moderate-connector.yml, .github/workflows/agents-weekly-metrics.yml, .github/workflows/health-codex-auth-check.yml, .github/workflows/maint-46-post-ci.yml, .github/workflows/maint-62-integration-consumer.yml, .github/workflows/maint-72-fix-pr-body-conflicts.yml, .github/workflows/maint-coverage-guard.yml, .github/workflows/reusable-10-ci-python.yml, .github/workflows/reusable-16-agents.yml, .github/workflows/reusable-70-orchestrator-init.yml, .github/workflows/reusable-70-orchestrator-main.yml, .github/workflows/reusable-agents-pr-health.yml, .github/workflows/reusable-bot-comment-handler.yml
One line is added to each relevant sparse-checkout list to include .github/scripts/error_classifier.js, making the script available in runner workspaces for 28 job checkout steps across all affected workflows.
Update template-drift-allowlist fingerprints
config/template-drift-allowlist.txt
Fingerprint hashes for eight workflow template pairs (agents-63-issue-intake, agents-auto-label, agents-autofix-dispatcher, agents-capability-check, agents-decompose, agents-dedup, agents-issue-optimizer, agents-weekly-metrics) are updated to reflect the sparse-checkout modifications.

Manifest generation safeguard

Layer / File(s) Summary
Exclude dependabot.yml from create-only manifest
tests/workflows/test_consumer_sync_create_only_evidence.py
Test expectations are modified to remove .github/dependabot.yml from the create-only manifest sources and a new assertion explicitly verifies that Dependabot config is not present in generated manifest entries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

agent:retry, autofix:patch, agents:keepalive

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding error_classifier.js to sparse-checkout configurations across root workflows, and mentions addressing pre-existing CI failures.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/root-workflows-error-classifier-sparse-checkout

Comment @coderabbitai help to get the list of available commands and usage tips.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2402 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.

@agents-workflows-bot

agents-workflows-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 8b24d58
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: 1

Coverage Trend

Metric Value
Current 70.25%
Baseline 85.00%
Delta -14.75%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_queue_builder.py 0.0% 105
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_queue_builder.py 0.0% 105
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185

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

stranske and others added 2 commits June 15, 2026 00:39
)

#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>
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
stranske temporarily deployed to agent-high-privilege June 15, 2026 05:39 — with GitHub Actions Inactive
@stranske stranske changed the title fix(workflows): add error_classifier.js to root workflow sparse-checkouts fix(workflows): error_classifier.js in root sparse-checkouts (+ green up the two pre-existing CI failures) Jun 15, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/workflows/test_consumer_sync_create_only_evidence.py`:
- Around line 24-27: Consolidate the two duplicate Dependabot exclusion comments
in the test function. Move the detailed explanation about `#2401` and the
create_only resurrection risk to a single comprehensive comment block at the top
of the test function, then replace the second comment block at lines 41-42 with
a brief inline reference like "# Regression guard: ensure dependabot.yml stays
out of manifest" that points back to the main explanation. This eliminates
redundancy while preserving the full context and maintains the regression guard
at the assertion point.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a2e7f996-c4a1-4a06-97fa-ac087865da7a

📥 Commits

Reviewing files that changed from the base of the PR and between 0e8b98d and d618c0a.

📒 Files selected for processing (2)
  • config/template-drift-allowlist.txt
  • tests/workflows/test_consumer_sync_create_only_evidence.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Template (auto-detected)

Comment on lines +24 to +27
# .github/dependabot.yml was intentionally dropped from the template and the
# manifest in #2401 (P3b of the Renovate fleet migration): create_only sync
# would otherwise resurrect Dependabot on every re-sync. It must no longer be
# manifested.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider consolidating the two Dependabot exclusion comments.

Both comment blocks explain the same #2401 context and create_only resurrection risk. You could consolidate them into a single, more detailed comment at the top of the test function, then add a brief inline reference before the assertion (e.g., # Regression guard: ensure dependabot.yml stays out of manifest).

Also applies to: 41-42

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/workflows/test_consumer_sync_create_only_evidence.py` around lines 24 -
27, Consolidate the two duplicate Dependabot exclusion comments in the test
function. Move the detailed explanation about `#2401` and the create_only
resurrection risk to a single comprehensive comment block at the top of the test
function, then replace the second comment block at lines 41-42 with a brief
inline reference like "# Regression guard: ensure dependabot.yml stays out of
manifest" that points back to the main explanation. This eliminates redundancy
while preserving the full context and maintains the regression guard at the
assertion point.

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