feat(miner): capture feasibility-verdict rule-fired signals in attempt-cli (#8543) - #8565
feat(miner): capture feasibility-verdict rule-fired signals in attempt-cli (#8543)#8565philluiz2323 wants to merge 2 commits into
Conversation
…t-cli (#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.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8565 +/- ##
==========================================
+ Coverage 89.58% 89.69% +0.11%
==========================================
Files 97 98 +1
Lines 22706 22968 +262
Branches 3872 3956 +84
==========================================
+ Hits 20341 20601 +260
- Misses 2187 2188 +1
- Partials 178 179 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-24 21:15:05 UTC
Review summary Nits — 5 non-blocking
CI checks failing
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). 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
Closes #8543 (parent epic: #8107)