Skip to content

feat(reconciler): :fix_settings action class — natsci-studio calibration (#265)#271

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/scorecard-fix-settings-265
May 18, 2026
Merged

feat(reconciler): :fix_settings action class — natsci-studio calibration (#265)#271
hyperpolymath merged 1 commit into
mainfrom
feat/scorecard-fix-settings-265

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Refs #260 / #263 / #265do not auto-close.

Follow-up increment to merged #264 (which explicitly deferred this).

Problem (natsci-studio live calibration)

BranchProtectionID / CodeReviewID were :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 :policy opt (default :full_auto); do_fix_settings/3 is an idempotent branch-protection PUT requiring ≥1 PR review on the default branch (satisfies both checks). :conservative escalates instead.
  • mix hypatia.reconcile … --conservative; summary gains settings_remediated/settings_actionable.

Verification

mix compile clean. Full suite 809/809 (+3 new tests).

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 13 issues detected

Severity Count
🔴 Critical 2
🟠 High 3
🟡 Medium 8

⚠️ Action Required: Critical security issues found!

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

@hyperpolymath hyperpolymath merged commit 19fb955 into main May 18, 2026
29 of 31 checks passed
@hyperpolymath hyperpolymath deleted the feat/scorecard-fix-settings-265 branch May 18, 2026 09:41
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.

1 participant