⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
This is a type-hygiene-only fix — no runtime behavior changes.
attempt-cli.ts's exported AttemptCliResult type (~lines 98-121) is a union of specific
outcomes. Line 836 has an explicit acknowledging comment for one real gap:
// blocked_max_concurrent_claims is a real runtime outcome omitted from AttemptCliResult (.d.ts drift).
options.onResult?.(blockedResult as AttemptCliResult);
blocked_own_open_pr (built and cast the same way, ~line 512, added later by #8808's idempotency
guard) has no equivalent field in AttemptCliResult's union either, but — unlike
blocked_max_concurrent_claims — carries no acknowledging comment at its own cast site. Since
loop-cli.ts re-exposes AttemptCliResult["outcome"] in its own type, this is real .d.ts drift
consistent with the codebase's own established convention of flagging such drift inline wherever
it's cast past the type system (as blocked_max_concurrent_claims already does) — this one case
was just missed.
Requirements
- Add a
blocked_own_open_pr member to AttemptCliResult's union, matching the shape of the
actual duplicateResult object built at ~line 511 (outcome: "blocked_own_open_pr", reason: string, repoFullName, issueNumber, plus whatever other fields CommonAttemptResultFields
already covers — read the full duplicateResult object at its construction site to get the
exact shape right, don't guess).
- This issue does not require also fixing
blocked_max_concurrent_claims's already-acknowledged
drift — that one already has its own tracking comment and is explicitly out of scope here unless
you choose to fix both in the same PR (optional, not required); if you do only
blocked_own_open_pr, that fully satisfies this issue.
- Do not change any runtime logic — this is purely a type definition addition. The
as AttemptCliResult cast at the blocked_own_open_pr call site should become unnecessary once the
type is correct (remove the cast if it becomes a type error or a no-op, but only if doing so
doesn't require any other change).
Deliverables
All deliverables are required in this single PR.
Test Coverage Requirements
This is a type-only change with no new runtime branch — no new test is required. State explicitly
in the PR description that no test changes are needed because no runtime behavior changed, and
confirm the repo's type-check command (e.g. tsc --noEmit or the project's equivalent) passes
with the cast removed.
Expected Outcome
AttemptCliResult's union accurately includes blocked_own_open_pr, matching the real runtime
outcome the function can produce — closing the same class of .d.ts drift already acknowledged
(but not yet fixed) for blocked_max_concurrent_claims.
Links & Resources
Context
This is a type-hygiene-only fix — no runtime behavior changes.
attempt-cli.ts's exportedAttemptCliResulttype (~lines 98-121) is a union of specificoutcomes. Line 836 has an explicit acknowledging comment for one real gap:
blocked_own_open_pr(built and cast the same way, ~line 512, added later by #8808's idempotencyguard) has no equivalent field in
AttemptCliResult's union either, but — unlikeblocked_max_concurrent_claims— carries no acknowledging comment at its own cast site. Sinceloop-cli.tsre-exposesAttemptCliResult["outcome"]in its own type, this is real.d.tsdriftconsistent with the codebase's own established convention of flagging such drift inline wherever
it's cast past the type system (as
blocked_max_concurrent_claimsalready does) — this one casewas just missed.
Requirements
blocked_own_open_prmember toAttemptCliResult's union, matching the shape of theactual
duplicateResultobject built at ~line 511 (outcome: "blocked_own_open_pr",reason: string,repoFullName,issueNumber, plus whatever other fieldsCommonAttemptResultFieldsalready covers — read the full
duplicateResultobject at its construction site to get theexact shape right, don't guess).
blocked_max_concurrent_claims's already-acknowledgeddrift — that one already has its own tracking comment and is explicitly out of scope here unless
you choose to fix both in the same PR (optional, not required); if you do only
blocked_own_open_pr, that fully satisfies this issue.as AttemptCliResultcast at theblocked_own_open_prcall site should become unnecessary once thetype is correct (remove the cast if it becomes a type error or a no-op, but only if doing so
doesn't require any other change).
Deliverables
AttemptCliResult's union gains ablocked_own_open_prmember with the exact field shapeof the real
duplicateResultobject built inrunAttempt.as AttemptCliResultcast at theblocked_own_open_prresult'soptions.onResult?.(...)call site is removed if the corrected type makes it unnecessary (verify via
tsc/therepo's type-check command — don't leave a now-redundant cast in place if it no longer
resolves to anything).
attempt-cli.ts's type definition only.All deliverables are required in this single PR.
Test Coverage Requirements
This is a type-only change with no new runtime branch — no new test is required. State explicitly
in the PR description that no test changes are needed because no runtime behavior changed, and
confirm the repo's type-check command (e.g.
tsc --noEmitor the project's equivalent) passeswith the cast removed.
Expected Outcome
AttemptCliResult's union accurately includesblocked_own_open_pr, matching the real runtimeoutcome the function can produce — closing the same class of
.d.tsdrift already acknowledged(but not yet fixed) for
blocked_max_concurrent_claims.Links & Resources
packages/loopover-miner/lib/attempt-cli.ts(AttemptCliResulttype ~lines 98-121;duplicateResultconstruction ~line 511; the acknowledging comment for the sibling drift case,~line 836)
blocked_own_open_pridempotency guard this outcome comes from)