feat(reconciler): :fix_settings action class — natsci-studio calibration (#265)#271
Merged
Merged
Conversation
Surfaced by the natsci-studio live calibration: BranchProtectionID / CodeReviewID were classified :open_escalate — correct (never silently dropped) but suboptimal: they are repository-configuration-actionable via the GitHub settings API, not code fixes and not non-actionable. Adds a third, narrow action class :fix_settings between :fix (code) and :open_escalate: - classify/2: BranchProtectionID / CodeReviewID -> :fix_settings with rationale (deterministic, safe, API-driven). - reconcile/3: new :policy opt (default :full_auto). full_auto applies do_fix_settings/3 (idempotent branch-protection PUT requiring >=1 PR review on the default branch — one change satisfies both checks); :conservative escalates instead of mutating repo config. Summary gains settings_remediated / settings_actionable counts. - mix hypatia.reconcile gains --conservative. - 3 new tests; full suite 809/809. Refs #260 #263 #265 — do not auto-close. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
90e7263 to
19976a8
Compare
This was referenced May 17, 2026
🔍 Hypatia Security ScanFindings: 13 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in mirror.yml",
"type": "missing_workflow",
"file": "mirror.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "believe_me undermines formal verification (2 occurrences, CWE-704)",
"type": "believe_me",
"file": "/home/runner/work/hypatia/hypatia/src/abi/RuleEngine.idr",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "Nickel file missing SPDX-License-Identifier header (1 occurrences, CWE-1104)",
"type": "ncl_missing_spdx",
"file": "/home/runner/work/hypatia/hypatia/configs/config.ncl",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unsafe block -- requires SAFETY comment (22 occurrences, CWE-676)",
"type": "unsafe_block",
"file": "/home/runner/work/hypatia/hypatia/clients/rust/hypatia-client/src/ffi.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "as_ptr exposes raw pointer that may dangle or alias unsafely (10 occurrences, CWE-676)",
"type": "as_ptr",
"file": "/home/runner/work/hypatia/hypatia/clients/rust/hypatia-client/src/ffi.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "expect() in hot path (1 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/hypatia/hypatia/adapters/src/codeberg.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "expect() in hot path (1 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/hypatia/hypatia/adapters/src/radicle.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.
Refs #260 / #263 / #265 — do not auto-close.
Follow-up increment to merged #264 (which explicitly deferred this).
Problem (natsci-studio live calibration)
BranchProtectionID/CodeReviewIDwere:open_escalate— correct (never silently dropped) but suboptimal: they are repository-configuration-actionable via the GitHub settings API, not code fixes and not non-actionable. natsci-studio dry-run: alerts #1 BranchProtection / #3 CodeReview should auto-remediate under full-auto.Change
Third, narrow action class between
:fix(code) and:open_escalate:classify/2:BranchProtectionID/CodeReviewID→:fix_settings.reconcile/3: new:policyopt (default:full_auto);do_fix_settings/3is an idempotent branch-protection PUT requiring ≥1 PR review on the default branch (satisfies both checks).:conservativeescalates instead.mix hypatia.reconcile … --conservative; summary gainssettings_remediated/settings_actionable.Verification
mix compileclean. Full suite 809/809 (+3 new tests).🤖 Generated with Claude Code