feat(miner): capture feasibility-verdict rule-fired signals in attempt-cli (#8543) - #8557
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…t-cli (JSONbored#8543) AMS's calibration capture was one-sided: eligibility-exclusion reasons were already recorded as rule-fired signals on discovery, but the other deterministic gate an attempt passes through -- the feasibility verdict -- recorded nothing. Wires attempt-cli's existing infeasible branch (ready: false) to record one RuleFiredEvent per avoid/raise reason through createSignalTrackingStore, mirroring discover-cli's recordEligibilityExclusionSignals exactly: same targetKey format, same best-effort discipline (a store-open failure or a single write failure never changes console output, JSON result shape, or exit code), same initSignalTrackingStore seam shape. No pure-module changes, no metadata, no output-format changes -- attempt-cli.ts and its tests only.
9dad802 to
8fcbdd1
Compare
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #8557 +/- ##
==========================================
- Coverage 89.58% 88.56% -1.03%
==========================================
Files 97 98 +1
Lines 22706 22968 +262
Branches 3872 3956 +84
==========================================
Hits 20341 20341
- Misses 2187 2449 +262
Partials 178 178
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-24 20:43:00 UTC
Review summary Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch); No linked issue detected). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
AMS's calibration capture was one-sided: the four eligibility-exclusion reasons are recorded as rule-fired signals on discovery (
recordEligibilityExclusionSignals,discover-cli.ts), but the feasibility verdict — the other deterministic gate an attempt passes through — recorded nothing. Inattempt-cli.ts, whenbuildCodingTaskSpecreturnsready: false, the verdict's reasons (codingTaskSpec.feasibility.avoidReasons/raiseReasons) were printed and dropped.This PR wires capture into that existing infeasible branch only, mirroring
discover-cli.ts'srecordEligibilityExclusionSignalsexactly:RuleFiredEventperavoidReasonsentry (outcome: "avoid") and perraiseReasonsentry (outcome: "raise"), withruleId= the reason string verbatim andtargetKey=`${repoFullName}#issue-${issueNumber}`— byte-identical to the eligibility-exclusion format.metadata(raw-context capture is a separate issue, per the linked issue's own scope note).discover-cli.ts: an optionalinitSignalTrackingStore?: () => SignalStoreseam, defaulting tocreateSignalTrackingStore({ appendEvent, readEvents })over the shared local event ledger.try/catcharound init,.catch(() => undefined)per write) and never change the CLI's console output, JSON result shape, or exit code.ready: falseoccurrence records — no dedup across repeated attempts at the same issue.Only
attempt-cli.ts+ its tests are touched. No pure-module changes (coding-task-spec.ts/packages/loopover-engine/src/feasibility.tsstay untouched), no override capture, no output-format changes.Scope
packages/loopover-miner/lib/attempt-cli.ts+test/unit/miner-attempt-cli.test.tsonly.Validation
npm --workspace @loopover/miner run build:tsc— cleannpm run typecheck— cleannpx vitest run test/unit/miner-attempt-cli.test.ts— all green except 2 pre-existing, unrelated Windows-local-onlyEBUSY: resource busy or lockedtemp-dir cleanup races — reproduced identically on agit stash'd clean baseline before this change (same failures, same tests, before any of this PR's code existed), so confirmed environment noise, not a regression.git diff --check upstream/main HEAD— clean, no trailing whitespace.ui:*checks — skipped (backend/CLI-only change, noapps/gittensory-uifiles touched).New coverage
ready: falsewith both avoid and raise reasons present → exactruleId/outcome/targetKeyasserted per event (3 reasons → 3 calls), nometadata, well-formed ISOoccurredAt.ready: true→ zero fired events recorded.initSignalTrackingStorethrowing → exit code, console output, and JSON result identical to a normal infeasible run.recordRuleFiredrejects → same identity check, plus confirms the call was actually attempted (not silently skipped).ready: falsetests not otherwise asserting on signal capture now inject a no-opSignalStoredouble, keeping them off the real on-disk event-ledger fallback under~/.config(the same leak classdiscover-cli.ts's owninitDefaultSignalTrackingStorecomment documents).Safety
Notes
Linked issue: #8543 (parent epic: #8107)