feat(miner): wire deny-hook synthesis to a live consumer and give it an operator CLI#8817
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 07:55:23 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
…an operator CLI (#8806) The synthesis store (#5667) was written and reviewable but NEVER read: refreshProposals had no caller anywhere (not even a CLI), and both driver construction sites passed no houseRulesConfig — so every attempt fell back to DEFAULT_DENY_RULES and a maintainer-approved synthesized guardrail never enforced anything. - Enforce half: buildAttemptDeps threads the target repo and resolves its effective rules (approved proposals merged over defaults) into the driver's PreToolUse hooks via the new exported resolveAttemptHouseRulesConfig. FAIL-OPEN to the pre-#8806 defaults on any store failure — a guardrail read hiccup never blocks an attempt, and the defaults are the historical floor, never nothing. - Operate half: `loopover-miner deny-hooks list|refresh|approve|reject` (strictly local + offline, mirroring `purge`). refresh takes an explicit --history <file.json> — deliberately not auto-sourced: no local ledger carries blockerCodes AND changedPaths together today (prediction-ledger lacks paths); the implicit-source gap is documented at the module header as the tracked follow-up rather than hidden behind an invented source. - End-to-end test pins the previously-severed loop: refresh → approve → the attempt-side resolver includes the approved rule.
9375b80 to
bf35c85
Compare
Summary
AMS audit fix (#8806): deny-hook synthesis stored and displayed maintainer-approved guardrails that no code path ever enforced —
refreshProposalshad zero callers (no CLI either) and both driver-construction sites passed nohouseRulesConfig, soresolveEffectiveRuleswas never consulted and every attempt ran onDEFAULT_DENY_RULESalone.Changes
buildAttemptDepsgains the targetrepoFullName(threaded from the attempt) and resolves the repo's effective rules into the coding-agent driver's PreToolUse hooks via a new exportedresolveAttemptHouseRulesConfig(injectable store seam). Fail-open toundefined→ the pre-fix(miner): deny-hook synthesis has zero live consumers — approved guardrail rules never reach a coding agent #8806 defaults on any store failure: a guardrail read hiccup must never block an attempt, and the defaults remain the floor.loopover-miner deny-hooks list | refresh --history <file.json> | approve | reject, strictly local/offline likepurge.refreshdeliberately requires an explicit history file ({ blockerCodes, changedPaths }[]): no local ledger records both fields today (prediction-ledger has codes, no paths) — the module header documents auto-sourcing as the tracked follow-up instead of inventing an implicit source that hides the gap. (Contrast the correctly-wired min-rank loop (Epic: AMS-side calibration loop over the miner's own event ledger (reusing the #8082 engine primitives) #8172), which this now matches in end-to-end operability.)Test plan
npm run typecheckclean;@loopover/minerbuildsrefresh→approve→ the attempt-side resolver includes the approved rule (+1 over the defaults baseline)Closes #8806