fix(review): enforce miner-scoped breakers#5209
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5209 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 473 473
Lines 39965 39970 +5
Branches 14570 14573 +3
=======================================
+ Hits 37704 37709 +5
Misses 1585 1585
Partials 676 676
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 09:30:44 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
:miner, but the live merge/close decision path only checked unsuffixed flags, so miner-authored PRs could still be auto-merged/closed despite a miner-only breaker engaging.minerAuthoredfield, risking overwriting miner-scoped audit rows and losing the miner-scoped signal.Description
minerAuthoredparameter toisHoldOnlyandisCloseHoldOnlyand made those readers also check the suffixed:<repo>:minerflags viaminerBreakerScopewhen the caller indicates a miner-authored PR.runAgentMaintenancePlanAndExecute) resolve whether the PR author is a confirmed miner usinggetCachedOfficialMinerDetection, pass that boolean intoisHoldOnly/isCloseHoldOnly, and use it when evaluating precision breakers so miner-scoped flags actually affect miner-originated actions.minerAuthoredon the actual autonomous disposition audit row by passing the resolved miner scope intorecordNativeGateDecisionso audit/state stays consistent with the evaluation scope.test/unit/outcomes-wire.test.tsthat assert miner-scopedholdonly/closeholdflags only apply for confirmed miner-authored PRs and that existing flag behaviour remains unchanged.Testing
git diff --checkto validate whitespace/conflict hygiene; no issues found.npm run typecheck; it succeeded with no TS errors.npx vitest run test/unit/outcomes-wire.test.ts test/unit/parity-wire.test.ts; both test files passed (all relevant assertions succeeded).Codex Task