ci(auto-merge): consume reusable workflow + keep Governance tier local - #186
Conversation
Replaces the local 217-line auto-merge workflow with: - A thin caller delegating common tiers (Dependabot, Renovate, AI Agent, CodeRabbit, Owner) to ANcpLua/renovate-config/.github/workflows/ auto-merge-reusable.yml@main. - A local governance-auto-merge job for the qyl-specific Governance bot tier (PRs from github-actions[bot] on chore/action-governance branches), also using the App token. The reusable workflow uses a GitHub App installation token instead of GITHUB_TOKEN, fixing the cascade-block bug: native auto-merge under GITHUB_TOKEN identity silently drops the resulting push: main event, preventing downstream workflows from triggering. Required secrets in this repo: AUTOMERGE_APP_ID AUTOMERGE_APP_PRIVATE_KEY See https://github.com/ANcpLua/renovate-config#auto-merge-reusable-workflow Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe workflow consolidates auto-merge logic for Dependabot, Renovate, AI Agent, CodeRabbit, and Owner tiers into a single reusable workflow call, removing duplicated job definitions. The 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Claude finished @ANcpLua's task in 1m 57s —— View job Code review
The motivation is correct — Two structural concerns worth resolving before this leaves draft, both compounding each other: 1. Reusable workflow pinned to uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@mainThe repo's 2. secrets: inheritThis is the more material risk. The reusable side only needs auto-merge:
uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@<sha>
secrets:
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
AUTOMERGE_APP_PRIVATE_KEY: ${{ secrets.AUTOMERGE_APP_PRIVATE_KEY }}This requires the upstream workflow to declare matching Why I'm flagging instead of fixing: (a) GitHub Apps don't grant me Everything else in the diff is fine. The Governance tier reads cleanly: App token is wired through all three steps consistently (lines 47, 60, 68), the |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai autofix |
|
Claude finished @ANcpLua's task in 1m 49s —— View job Code review (re-review on synchronize)
Synchronize delta: the only thing new since my 05:42Z review is
1.
|
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
…d refs
- HTTP error-handling section: rewrite to match actual CollectorClient.cs
pattern (EnsureSuccessStatusCode + AOT JsonTypeInfo; structured-DTO
branching reserved for endpoints with documented failure bodies).
- MAF cheat-sheet: replace cargo-culted RcaExecutor.cs / LoomToolFactoryBridge.cs
/ AutofixAgentService.cs:66-77 references with live call-sites
(QylLoomAgentsBuilder.cs:82-85, HypothesisExecutor.cs:38-40,
LoomAutofixRunner.cs:182-188, AutofixContextToolFactories.cs:9-15).
- Drop the two ~/.claude/skills/microsoft-agent-framework{,-qyl}/SKILL.md
references — neither file exists.
- Delete report.md (12h-old audit, recommendations now applied or skipped).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Claude finished @ANcpLua's task in 2m 4s —— View job Claude finished re-reviewing on synchronize Code review (re-review on synchronize)
Synchronize delta —
|
| Line in AGENTS.md | Verified at |
|---|---|
QylLoomAgentsBuilder.cs:82-85 (Agent — standalone) |
.AsAIAgent → .AsBuilder → .UseQylAgentTelemetry → .Build chain present ✓ |
HypothesisExecutor.cs:38-40 (Agent — non-streaming) |
await agent.RunAsync<T>(prompt, ...) shape ✓ |
LoomAutofixRunner.cs:182-188 (Workflow — run / streaming) |
InProcessExecution.RunStreamingAsync + WatchStreamAsync(ct) ✓ |
AutofixContextToolFactories.cs:9-15 (Tools — local) |
Two-arg AIFunctionFactory.Create(method, options) with qyl.autofix.<verb> naming ✓ |
CollectorClient.cs:148-178 (HTTP error handling) |
Exact IsSuccessStatusCode branching documented ✓ |
The HTTP-client section rewrite is a strict improvement — old text described a defensive-pattern that wasn't actually in the code; new text matches CollectorClient.cs and explicitly mentions the AOT-mandatory JsonTypeInfo overload, which is also baked into the repo's CLAUDE.md. Drop of the two ~/.claude/skills/microsoft-agent-framework{,-qyl}/SKILL.md references is correct — those files don't exist on the agent runner. report.md deletion is fine; it was a personal audit artefact that shouldn't have been in tree.
The Spectre.Console 0.55.0 → 0.55.2 bump on Version.props:35 is a clean patch bump — verified no breaking changes in the 0.55.x line.
auto-merge.yml — both prior concerns still stand
The file hasn't changed since 09:03Z, so my two structural blockers carry over verbatim:
@mainpin on the reusable workflow (auto-merge.yml:27) violates.coderabbit.yaml's.github/**SHA-pinning rule — the siblingactions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v2.1.4(line 38) already follows it.secrets: inherit(auto-merge.yml:28) over-shares every repo secret to a cross-repo workflow. Combined withpull_request_target(runs on every PR open) and the@mainpin, any future commit inANcpLua/renovate-configcould read NPM / Railway / NuGet / dashboard-deploy creds on the next PR — without a single commit landing here. Tighten to:auto-merge: uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@<sha> # vX.Y.Z secrets: AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }} AUTOMERGE_APP_PRIVATE_KEY: ${{ secrets.AUTOMERGE_APP_PRIVATE_KEY }}
Both fixes need a human commit — the GitHub App token used for autofixes lacks the workflows permission to write to .github/workflows/**, so I can't push them myself. The upstream secrets: change also depends on ANcpLua/renovate-config#5 declaring matching on.workflow_call.secrets: inputs — worth landing both together.
Net: AGENTS.md / Version.props / report.md changes are clean and ready to merge. auto-merge.yml remains a draft-blocker on the two cross-repo concerns above plus the secret-setup checklist in the PR description.
· branch
There was a problem hiding this comment.
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 @.github/workflows/auto-merge.yml:
- Around line 26-28: The reusable workflow reference under the "auto-merge" job
is pinned to a branch
(ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main); update
that reference to a specific commit SHA instead (replace `@main` with
@<commit-sha>) so the job is SHA-pinned, and keep the existing secrets: inherit
setting; fetch the exact commit SHA from the ANcpLua/renovate-config repo (e.g.,
using git ls-remote or the GitHub UI) and use it in the uses: value to lock the
external workflow to that commit.
🪄 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: db78b4b6-eecc-4f98-86fe-216cd70c4fd9
⛔ Files ignored due to path filters (2)
AGENTS.mdis excluded by none and included by nonereport.mdis excluded by none and included by none
📒 Files selected for processing (2)
.github/workflows/auto-merge.ymlVersion.props
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{csproj,props}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
.NET code must use nullable enabled and central package management via
Directory.Packages.props, withVersion.propsas the single owner of versions — never edit<Version>lines directly
Files:
Version.props
.github/**
⚙️ CodeRabbit configuration file
GitHub Actions workflows. Review for: action version pinning (use SHA not tags), proper secret handling (no secrets in logs), unnecessary workflow triggers, and job dependency correctness. Flag missing concurrency groups on push-triggered workflows.
Files:
.github/workflows/auto-merge.yml
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Sealed by default — non-public classes must be sealed unless a subclass exists in the same assembly. This is enforced by ANcpLua.NET.Sdk analyzers
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Fix all diagnostics at source — do not suppress warnings via `#pragma`, `[SuppressMessage]`, `<NoWarn>`, or `null!`. If a diagnostic fires, the code wants a real change
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: No runtime reflection as control flow — `dynamic`, `ExpandoObject`, `.Result`, `.Wait()` do not appear in qyl. Use `await` for all async operations
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Before claiming a change is complete, run `dotnet build qyl.slnx --nologo /clp:ErrorsOnly` and verify 0 errors are reported
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: UI work requires a Playwright screenshot of the actual feature in a browser to verify rendering — type-checks alone do not verify visual correctness
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Top-level orchestration uses Nuke targets defined in `./eng/build.sh` or the global `nuke` tool. Sub-targets are `.Unlisted()` so `nuke --help` shows only user-facing commands; use `nuke --plan` for the full list
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Source change and regenerated output must ship in the same commit. Codegen sources live in `core/specs/**/*.tsp`, `eng/semconv/model/qyl/*.yaml`, and Roslyn source generators; outputs end in `.g.cs`, `.g.ts`, `.g.sql`, `.g.tsp`
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Add missing semantic convention attributes to `eng/semconv/model/qyl/<namespace>.yaml`, then run `./eng/semconv/run-weaver.sh` and `nuke GenerateSemconv` to regenerate `QylAttr.<Namespace>.<Name>` and `QylAttributes.<PascalName>` constants
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: Do not hand-roll agent observability code — use the GenAiInstrumentation facade and compose via `IChatClient.WithQylTelemetry()` + `AIAgent.AsBuilder().UseQylAgentTelemetry()`. Wrap both layers; wrapping one halves the OTel attributes
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: When working with MAF, reach for `MAF.Advanced.Patterns.*` PackageReference facades rather than hand-rolling patterns in qyl. Audit existing code for `keep-in-qyl` (qyl-domain-specific), `move-to-MAF.Advanced.Patterns` (provider-agnostic, reusable), or `delete` (duplicate). Tracked in qyl `#173` + MAF.Advanced.Patterns `#1`
Learnt from: CR
Repo: Alexander-Nachtmann/qyl
Timestamp: 2026-05-05T16:45:25.291Z
Learning: The `ANcpLua.Agents` → `MAF.Advanced.Patterns` consolidation is 70% complete and blocked pending a user decision on how to wire qyl to consume MAF.Advanced.Patterns. Three options: (1) publish to nuget.org + PackageReference, (2) local NuGet feed + PackageReference, (3) submodule + ProjectReference. When picked, Phases 4-5-8-9-10 must land in order with both `dotnet build qyl.slnx` and `dotnet build MAF.Advanced.Patterns.slnx` green at each step
🔇 Additional comments (2)
Version.props (1)
35-35: Patch bump to Spectre.Console 0.55.2 — no concerns..github/workflows/auto-merge.yml (1)
30-69: Governance job correctly implemented.SHA-pinned action, token passed via environment variable, defensive shell options, proper scope check before auto-approve. No concerns.
| auto-merge: | ||
| uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main | ||
| secrets: inherit |
There was a problem hiding this comment.
Reusable workflow pinned to @main violates SHA-pinning requirement.
External workflow at ANcpLua/renovate-config is referenced by branch, not commit SHA. Combined with secrets: inherit, any upstream change to that workflow immediately receives all repo secrets. The local action on line 38 is correctly SHA-pinned—apply the same discipline here.
Pin to a specific commit:
- uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main
+ uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@<commit-sha> # vX.Y.Z🤖 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 @.github/workflows/auto-merge.yml around lines 26 - 28, The reusable workflow
reference under the "auto-merge" job is pinned to a branch
(ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main); update
that reference to a specific commit SHA instead (replace `@main` with
@<commit-sha>) so the job is SHA-pinned, and keep the existing secrets: inherit
setting; fetch the exact commit SHA from the ANcpLua/renovate-config repo (e.g.,
using git ls-remote or the GitHub UI) and use it in the uses: value to lock the
external workflow to that commit.
|
Both suggestions land on lines that are deleted by this PR — the entire |
Brings the thin-caller migration current with main. Resolves the auto-merge.yml conflict by keeping the PR's intent: replace qyl's standalone tier definitions with a single 'uses:' delegating to ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main, and keep the qyl-specific governance-auto-merge job local. The reusable workflow now carries the hardened ai-agent-auto-merge tier landed in renovate-config#7 (pull_request.user.login + branch prefix + not-draft), so qyl loses nothing functionally by switching from its old standalone block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. ⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission. |
Summary
Replaces the local auto-merge workflow with a thin caller delegating common tiers to ANcpLua/renovate-config (PR #5 there). Keeps the qyl-specific Governance bot tier local since it's not part of the framework-wide pattern.
Why
When the Owner / AI Agent / CodeRabbit tier calls
gh pr merge --autounderGITHUB_TOKENidentity, GitHub records the eventual native-auto-merge as performed bygithub-actions[bot]. Per GitHub docs, events triggered byGITHUB_TOKEN(other thanworkflow_dispatch/repository_dispatch) do NOT trigger new workflow runs — anti-loop protection. So the resultingpush: mainis silently dropped and downstream publish workflows never fire.The fix uses a GitHub App installation token. The App becomes the merge actor; events fire normally.
Required setup
This PR is draft until two repo secrets exist:
AUTOMERGE_APP_ID— the numeric App IDAUTOMERGE_APP_PRIVATE_KEY— full PEM contents of the App's private keySetup is a one-time 5-min manual step:
Once the secrets are in place this PR can be marked ready and merged.
Test plan