Repository navigation
feat(dispatch): report group E repository settings to the owner - #1094
Conversation
Owner answer on #1080 (2026-11-14): the 4 repository-settings recipes (scorecard-branch-protection, scorecard-code-review, scorecard-webhooks, scorecard-signed-releases) no longer auto-execute. A commit cannot fix a repository setting, so Hypatia reports the finding to the owner. - fix-ownership-policy.json gains a report_to_owner list (group E). - TriangleRouter.ownership_cap/1 returns :report_to_owner for them, so recipe_strategy/1 is report_only whatever the confidence. - FleetDispatcher's advisory says "report to owner: a repository setting no commit can fix". - test/fix_ownership_cap_test.exs moves group E from the uncapped list to the capped list. Group F stays uncapped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7Zo6VBPrBWYUmDJZR1H
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb3ffae2d0
ℹ️ 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".
| "recipe-scorecard-branch-protection", | ||
| "recipe-scorecard-code-review", |
There was a problem hiding this comment.
Apply the owner cap to Scorecard reconciliation
When mix hypatia.reconcile owner/repo runs without --conservative (the documented default), ScorecardReconciler still classifies BranchProtectionID and CodeReviewID as :fix_settings and calls do_fix_settings/3, which updates branch protection through the GitHub API (lib/scorecard_reconciler.ex:71,106-112,141-172,326-365). This new cap is consulted only by TriangleRouter using recipe IDs, so those two group-E findings can still auto-mutate repository settings instead of being reported to the owner; the reconciler path must also honor this policy.
Useful? React with 👍 / 👎.
Owner answer on #1080 group E (2026-11-14), after a Codex P1 on #1094: mix hypatia.reconcile changed branch protection and required reviews (BranchProtectionID, CodeReviewID) through the GitHub settings API unless --conservative was given. It now escalates them to the owner by default. - ScorecardReconciler.reconcile/3 defaults to policy :conservative (policy/1). :full_auto applies settings only when asked for. - The mix task applies settings only on the new --apply-settings flag; --conservative is still accepted and wins if both are given. - Tests pin both defaults; with the old :full_auto default restored, the reconcile/3 test fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7Zo6VBPrBWYUmDJZR1H
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7425d68a0b
ℹ️ 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".
| # :conservative (default, owner answer on hypatia#1080 group E, 2026-11-14) | ||
| # escalates settings findings for the owner; :full_auto auto-applies | ||
| # :fix_settings via the settings API only when the caller asks for it. (#265) | ||
| def policy(opts), do: Keyword.get(opts, :policy, :conservative) |
There was a problem hiding this comment.
Include default settings escalations in the summary
When the default reconciliation encounters BranchProtectionID or CodeReviewID, this policy now records each result as acted: :escalated_conservative, but the returned escalated total still counts only action == :open_escalate. Consequently, the documented default can escalate settings findings while reporting escalated: 0, giving callers and operators an inaccurate reconciliation summary; count :escalated_conservative results there as well.
Useful? React with 👍 / 👎.
| "recipe-scorecard-webhooks", | ||
| "recipe-scorecard-signed-releases" |
There was a problem hiding this comment.
Align the new caps with routed Scorecard patterns
For actual Signed-Releases and Webhooks results, ScorecardIngestor emits categories ReleaseSigning and WebhookSecurity, while these recipes target SignedReleases and Webhooks; their dynamic pattern IDs also do not equal the recipes' IDs, and fuzzy matching compares SC017/SC020 against SC-017-*/SC-020-*. Thus RecipeMatcher.best_recipe_for_pattern/2 never selects either newly capped recipe, so those findings take the generic control route without the report_to_owner cap or its owner-specific advisory. Align the recipe categories or matching identifiers and add an end-to-end routing assertion for both entries.
Useful? React with 👍 / 👎.
Codex P2 on #1094: with :conservative as the default, BranchProtectionID and CodeReviewID results are recorded as acted :escalated_conservative, but the summary's escalated total counted only :open_escalate, so a default run reported escalated: 0. escalated?/1 now counts both. The taxonomy comment now states the new default. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7Zo6VBPrBWYUmDJZR1H
|



Summary
Follow-up to #1088, from the owner's answer on #1080 (2026-11-14): group E is reported to the owner.
The 4 repository-settings recipes (
scorecard-branch-protection,scorecard-code-review,scorecard-webhooks,scorecard-signed-releases) no longer auto-execute. A commit cannot fix a repository setting, so a bot should not try one. Hypatia now sends the finding to the owner as an advisory..machine_readable/fix-ownership-policy.jsongains areport_to_ownerlist (group E).TriangleRouter.ownership_cap/1returns:report_to_ownerfor these recipes, sorecipe_strategy/1isreport_onlywhatever the confidence. The manifest entries carryownership_cap: "report_to_owner".FleetDispatcheradvisory text says "report to owner: a repository setting no commit can fix".Group F (seeds and Hypatia operations) still keeps its confidence tier.
Manual reconciler (Codex P1, owner answer 2026-11-14):
mix hypatia.reconcilechanged branch protection and required reviews (BranchProtectionID,CodeReviewID) through the GitHub settings API by default. It now escalates them to the owner by default.ScorecardReconciler.reconcile/3defaults to:conservative, and the mix task changes settings only with the new--apply-settingsflag.--conservativeis still accepted, and it wins if both flags are given. Settings findings escalated this way now count in the summary'sescalatedtotal.Known, not changed here:
recipe-scorecard-signed-releasesandrecipe-scorecard-webhookstarget the categoriesSignedReleasesandWebhooks, butScorecardIngestoremitsReleaseSigningandWebhookSecurity. SoRecipeMatchernever selects these 2 recipes (this is already so onmain). Their findings take the generic control route, which is a report-only advisory, so the owner's "report, no fix" result already holds. Aligning the categories would only change the advisory text.Test plan
test/fix_ownership_cap_test.exs: group E moves from the uncapped list to the capped list, and must bereport_onlyeven at confidence 0.99. Group F is still checked as uncapped.test/scorecard_reconciler_test.exs: new tests pin the reconcile/3 default and the mix task flags. With the old:full_autodefault restored, the reconcile/3 test fails.escalated?/1test: a default-escalated settings finding counts as escalated; it fails when that clause is removed.mix compile --warnings-as-errorsis clean; changed files are formatted.Generated by Claude Code