Skip to content

fix(consumers): vendor config into the consumer LLM-client workflows - #2861

Merged
stranske merged 3 commits into
mainfrom
closer/followup-consumer-template-llm-config
Jul 31, 2026
Merged

fix(consumers): vendor config into the consumer LLM-client workflows#2861
stranske merged 3 commits into
mainfrom
closer/followup-consumer-template-llm-config

Conversation

@stranske

@stranske stranske commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Why

Bounded closer follow-up to merged #2850, opened from its verifier disposition.

#2850's verifier returned unanimous PASS but anthropic flagged a recurrence risk: "if any other workflow vendors tools from stranske/Workflows without config (not covered here), the same bug could recur elsewhere — the added test appears designed to catch this going forward." Auditing that claim against main showed it is real, and the gap is in the exact surface #2850 touched.

#2850 fixed three root workflows and hand-fixed templates/consumer-repo/.github/workflows/agents-verify-to-new-pr.yml. But the guard it added, _discover_llm_client_workflows(), scans only Path(".github/workflows"). The consumer template directory it had just repaired was left unguarded, so that hand-fix has no test protecting it and two sibling templates still carried the original defect:

Template workflow LangChain entry point it runs
agents-issue-optimizer.yml scripts/langchain/issue_optimizer.py
agents-80-pr-event-hub.yml scripts/langchain/followup_issue_generator.py

Both vendored scripts/langchain + tools without config.

Why it matters

Both entry points reach tools/langchain_client.py, which imports load_slot_config and configured_model_for_provider from tools/llm_registry.py. Those resolve via Path(__file__).resolve().parent.parent / "config" / ..., i.e. relative to the vendored tree — the same resolution #2850 diagnosed. With config absent, load_model_registry() logs a warning and returns [], so this degrades silently to no configured model rather than failing loudly. agents-80-pr-event-hub.yml is the consumer-side verifier follow-up-issue path, so this ran unmodelled in every consumer repo.

These workflows exist only in the template directory (the root repo runs the same scripts in-tree, where config/ is already present), which is why root-only discovery could not see them.

Changes

  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml — add config to the stranske/Workflows sparse-checkout.
  • templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml — same.
  • tests/workflows/test_workflow_llm_installs.py — extend _discover_llm_client_workflows() over templates/consumer-repo/.github/workflows as well, add both templates plus the already-fixed agents-verify-to-new-pr.yml template to KNOWN_LLM_CLIENT_WORKFLOWS, and switch the parametrize ids and assertion messages from path.name to path.as_posix() now that a root workflow and a template workflow can share a basename.

No behavior change to the root workflows and no change to config/ itself.

Validation

  • The extended guard found the second defect on its own. After adding template discovery and fixing only agents-issue-optimizer.yml, the suite failed on templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml — which a hand-maintained list would have missed, since a manual pass over the template directory had not flagged it.
  • Deliberate break demonstrated: removing config from the issue-optimizer template again fails test_llm_workflows_vendor_the_model_registry_config[templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml]; restoring it returns the gate to green.
  • pytest tests/workflows/test_workflow_llm_installs.py — 29 passed, 2 skipped (both pre-existing agent-high-privilege skips). Discovery now yields 6 workflows, up from 3.
  • pytest tests/workflows — 651 passed, 6 skipped.
  • ruff check and black --check clean on the modified test file.

Follow-on note

The template change reaches consumer repos through the normal maint-68-sync-consumer-repos.yml sync; no consumer-side action is needed here.

Summary by CodeRabbit

  • Bug Fixes

    • Improved workflow configuration loading for verification and issue-optimization processes.
    • Ensured required configuration files are available during workflow execution.
    • Ensured consumer workflow files are correctly recognized during workflow validation.
  • Tests

    • Expanded workflow discovery checks to cover consumer repositories and both supported workflow file formats.
    • Improved test coverage and reporting for workflow path validation.
    • Updated template validation baselines to reflect the latest workflow configuration requirements.

PR #2850 fixed the `tools`-without-`config` sparse-checkout in the three
root verifier workflows and hand-fixed one consumer template, but the guard
it added only scanned `.github/workflows`. The consumer template directory
it had just repaired was left unguarded, and two template workflows still
vendored `tools` without `config`:

- agents-issue-optimizer.yml runs scripts/langchain/issue_optimizer.py
- agents-80-pr-event-hub.yml runs scripts/langchain/followup_issue_generator.py

Both reach tools/langchain_client.py, which imports load_slot_config and
configured_model_for_provider from tools/llm_registry.py. Those resolve
config/llm_slots.json and config/model_registry.json relative to the
vendored tree, and load_model_registry() returns [] when the file is absent,
so the failure is a silent degradation to no configured model rather than an
error.

Extend the guard's discovery over templates/consumer-repo/.github/workflows
so the consumer surface is covered the same way, and disambiguate the
parametrize ids and assertion messages by full path now that a root workflow
and a template workflow can share a basename.
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

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

@stranske
stranske temporarily deployed to agent-standard July 31, 2026 19:55 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 30 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 39a8ba19-569a-4e57-a25c-ebbc96b8ed5a

📥 Commits

Reviewing files that changed from the base of the PR and between 9deff32 and 19c1c01.

📒 Files selected for processing (1)
  • tests/workflows/test_workflow_llm_installs.py
📝 Walkthrough

Walkthrough

Consumer workflow sparse checkouts now include config. Workflow tests discover LLM client workflows in repository and consumer directories, including both YAML extensions, and use full paths in coverage diagnostics. Template drift metadata records the updated issue-optimizer template.

Changes

Consumer workflow coverage

Layer / File(s) Summary
Include config in consumer checkouts
templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml, templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
Both sparse-checkout configurations now include the config directory.
Expand workflow discovery and drift validation
tests/workflows/test_workflow_llm_installs.py, config/template-drift-allowlist.txt
Discovery scans repository and consumer workflow directories for .yml and .yaml files. Coverage diagnostics use full workflow paths. The issue-optimizer template fingerprint and re-baseline reason are updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: sync, github:actions, verify:compare

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding config to consumer LLM-client workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch closer/followup-consumer-template-llm-config

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

@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: 56dacfc53b

ℹ️ 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".

Comment thread tests/workflows/test_workflow_llm_installs.py

@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: 2

🤖 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 `@templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml`:
- Line 322: Add the required config entries in the manifest-managed source
workflow, then run synchronization to regenerate both templates:
templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml:322-322 and
templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml:129-129. Do
not edit either generated consumer workflow directly.

In `@tests/workflows/test_workflow_llm_installs.py`:
- Around line 34-44: Add the agents-80-pr-event-hub.yml workflow path to
KNOWN_LLM_CLIENT_WORKFLOWS, using the existing workflow-directory symbols, so
discovery includes it and runs the config test.
🪄 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

Run ID: 4dfcde89-d845-45dd-aaa1-0d7a02c8f0a5

📥 Commits

Reviewing files that changed from the base of the PR and between 0ed299f and 56dacfc.

📒 Files selected for processing (3)
  • templates/consumer-repo/.github/workflows/agents-80-pr-event-hub.yml
  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
  • tests/workflows/test_workflow_llm_installs.py

Comment thread tests/workflows/test_workflow_llm_installs.py
Adding `config` to the consumer issue-optimizer sparse-checkout changes the
template fingerprint the Health 74 Template Drift gate pins, so the pair
became unallowlisted drift. Refresh template_sha256 and record why the
divergence is deliberate: the root workflow runs in-tree where config/ is
already present, so only the consumer template needs the extra entry.
@agents-workflows-bot

agents-workflows-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 368d520
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 75.91%
Baseline 85.00%
Delta -9.09%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

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
stranske temporarily deployed to agent-standard July 31, 2026 20:01 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 31, 2026 20:24 — with GitHub Actions Inactive
@stranske
stranske merged commit a87536c into main Jul 31, 2026
50 checks passed
@stranske
stranske deleted the closer/followup-consumer-template-llm-config branch July 31, 2026 21:23
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.

2 participants