fix(miner): add blocked_own_open_pr to AttemptCliResult union - #9362
fix(miner): add blocked_own_open_pr to AttemptCliResult union#9362nghetien wants to merge 1 commit into
Conversation
The attempt-cli own-open-PR idempotency guard has constructed and emitted this outcome since JSONbored#8808, but AttemptCliResult never declared it, so onResult consumers typed against the union silently lost the shape (existingPullRequestNumber included).
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9362 +/- ##
==========================================
+ Coverage 75.38% 75.50% +0.12%
==========================================
Files 275 276 +1
Lines 58023 58313 +290
Branches 6181 6277 +96
==========================================
+ Hits 43739 44029 +290
Misses 14014 14014
Partials 270 270
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-27 14:20:08 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 (validate, validate-code)). 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. |
The own-open-PR idempotency guard added in #8808 constructs and emits a
blocked_own_open_proutcome (packages/loopover-miner/lib/attempt-cli.ts, around theduplicateResultobject), butAttemptCliResultnever declared that member — a real runtime outcome missing from its own exported type, so anyonResultconsumer typed against the union silently lost the shape (includingexistingPullRequestNumber).This adds the missing union member with the exact shape the call site already constructs (
reason: string,existingPullRequestNumber: number, plus the common fields). I checked whether the existingas AttemptCliResultcast at that call site could now be dropped, per the issue's second requirement — it can't: TypeScript widens the plain object literal'soutcomefield tostring, so the cast is still needed to narrow it back to the literal type. This matches every other sibling call site in the file (e.g.blocked_rejection_signaled,blocked_worktree_preparation_failed), which keep the same cast even though their outcomes are already declared in the union, so I left it as-is rather than removing it.Pure type-definition change, no runtime behavior touched — confirmed by
git diff --stat(1 line, 1 file). No new tests added per the issue's own guidance (type-only change, no runtime modification).Closes #9331
Validation
npx turbo run build --filter=@loopover/engine— passnpx turbo run build --filter=@loopover/mcp— passnpx turbo run build:tsc build:verify --filter=@loopover/miner— passnpx vitest run --changed=upstream/main --passWithNoTests— 186/186 pass (incl. all 107 in test/unit/miner-attempt-cli.test.ts)npm test(full suite) — 6 pre-existing failures unrelated to this change (test/unit/check-ui-kit-package.test.ts, test/unit/salvageability.test.ts, test/unit/selfhost-metrics.test.ts, test/unit/selfhost-pg-retention.test.ts ×2, test/unit/worker-entry-boundary.test.ts), verified to fail identically with this commit stashed out