feat(config): Add postChecks toggle to disable GitHub Check-run posting - #458
Open
CalebKAston wants to merge 4 commits into
Open
feat(config): Add postChecks toggle to disable GitHub Check-run posting#458CalebKAston wants to merge 4 commits into
CalebKAston wants to merge 4 commits into
Conversation
Check-run creation is entirely write-only (nothing in Warden reads it back, and it doesn't gate dedup or the findings-file build), so it's safe to let it be switched off independently of PR review comments. Defaults to true to preserve existing behavior; a defaults.postChecks in warden.toml can override the post-checks action input. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
initializeWorkflow already treats runnerConcurrency and auxiliaryOptions as enforced by the org base config, with repo config only filling in what the base omits (documented inline right above where postChecks was resolved). postChecks is the same class of workflow-level setting, but was reading the already-merged (repo-wins) config instead, so a repo's own warden.toml could silently defeat an org policy meant to turn checks off fleet-wide. Proved by reverting the fix and watching the new org-base-config test fail exactly as expected. Also drops the dead `options.postChecks ?? true` fallback in finalizeReportWorkflow — its only caller always supplies postChecks, so the fallback could never actually run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CalebKAston
marked this pull request as ready for review
July 28, 2026 22:12
CalebKAston
marked this pull request as draft
July 28, 2026 22:13
fight-me review of this PR caught that post-checks had no docs entry in either the workflow guide or llms.txt, and more importantly that the guide's own Required Status Checks section recommends requiring the warden check — setting post-checks: false on such a repo would silently stop that check from ever running again, permanently blocking merges through the normal GitHub UI. Documents the input in both places and adds an explicit warning against that combination. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CalebKAston
marked this pull request as ready for review
July 28, 2026 22:25
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
postChecksboolean (action inputpost-checks, defaulttrue; overridable per-repo viawarden.toml's[defaults] postChecks) that disables creation/update of GitHub Check runs — the corewardencheck and every per-skillwarden: <skill>check, including their inline annotations — while leaving PR review comment posting untouched.Why
Check-run creation is entirely write-only today: nothing in the codebase reads it back via the API, and it isn't load-bearing for the findings-output file or for comment dedup (which reads back PR review comments instead, a separate mechanism). Some teams want PR review comments as the single review surface without a second, non-threaded, non-dedup'd GitHub Checks UI surface running alongside it — this makes that toggleable without losing the option to fail a required status check via
fail-check/fail-onwhen wanted.Implementation
checkOptionsForPullRequest(context, postChecks)returnsundefinedwhenpostChecksis false. Two call sites that previously bypassed it with inline option objects (setupGitHubState,finalizeWorkflow's core-check update) were refactored to route through it too, so every check-creation path inpr-workflow.tsshares one gate.postChecksresolves with the same enforced-baseline precedence already used forrunnerConcurrency/auxiliary-model settings ininitializeWorkflow: org base config (viabase-config-path) wins over the repo's ownwarden.toml, which wins over thepost-checksaction input default. This matters because it's the same class of workflow-level (not per-trigger) setting, and a repo-level override should not be able to silently defeat an org-wide policy set via the base config.ActionInputs.postChecksis non-optional (unlike the default-falsebooleansrequestChanges/failCheck) because its default istrueand gets resolved at parse time rather than deferred to each call site — the opposite polarity needs the default applied once, explicitly.Verification
Applied this change to a local fork (
babylist/warden) and verified it against real PRs in a downstream consumer repo before opening this PR:post-checksunset (defaulttrue): unchanged existing behavior — checks and comments both post, as today.post-checks: false: confirmed via the GitHub API that nowarden/warden: <skill>check runs were created on the PR, while a PR review comment still posted for a real finding.post-checks: trueset explicitly at the repo level (overriding an org base-config default offalse): confirmed the full check-run set (core + every configured skill) was created again, alongside the review comment.Also added regression tests exercising
postChecks: falseend-to-end throughrunPRWorkflow(both legacy run mode and report mode) assertingchecks.create/checks.updateare never called whilepulls.createReviewstill is, plus config/schema tests for thewarden.tomloverride and its precedence against the org base config.pnpm lint && pnpm build && pnpm testall pass (two unrelated, pre-existing flaky tests incli/files.test.ts/cli/output/jsonl.test.tsfail only under full-suite parallel load and pass in isolation — not touched by this change).