⚠️ 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
attempt-runner.ts's AttemptResult union includes a verification_failed outcome (added by
#8807's target-repo verification gate):
| { outcome: "verification_failed"; verification: unknown; loopResult: IterateLoopResult }
attempt-cli.ts's runAttempt builds its finalResult object (~lines 991-1024) by conditionally
spreading several sibling optional fields from result — reason, decision, spec,
execResult — via ...("field" in result ? { field: result.field } : {}). There is no equivalent
...("verification" in result ? { verification: result.verification } : {}).
The exported AttemptCliResult type (~lines 98-121) also has no verification field anywhere in
its union.
So on a real verification failure, finalResult.outcome is "attempt_verification_failed" but
finalResult carries zero diagnostic detail about which build/test/lint command failed or why —
both the CLI's JSON output (console.log(JSON.stringify(...))) and options.onResult's payload
lose the verification value entirely, even though it was computed and is sitting right there on
result.
Requirements
finalResult's construction must include verification via the same conditional-spread pattern
already used for reason/decision/spec/execResult:
...("verification" in result ? { verification: result.verification } : {}).
AttemptCliResult's attempt_${...} union member (~lines 109-121) must add an optional
verification?: unknown field, matching the type of the other optional fields already there.
- Do not change
attempt-runner.ts's AttemptResult union or verification_failed outcome
itself — only attempt-cli.ts's consumption of it.
- Do not change any other outcome's fields.
Deliverables
All three deliverables are required in this single PR.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted, on all changed lines/branches
(applies to packages/loopover-miner/lib/**). The new spread and its test above must be covered.
Expected Outcome
A verification_failed attempt outcome's CLI JSON output and onResult payload now include the
actual verification diagnostic detail (which build/test/lint command failed and why), instead of
silently dropping it.
Links & Resources
Context
attempt-runner.ts'sAttemptResultunion includes averification_failedoutcome (added by#8807's target-repo verification gate):
attempt-cli.ts'srunAttemptbuilds itsfinalResultobject (~lines 991-1024) by conditionallyspreading several sibling optional fields from
result—reason,decision,spec,execResult— via...("field" in result ? { field: result.field } : {}). There is no equivalent...("verification" in result ? { verification: result.verification } : {}).The exported
AttemptCliResulttype (~lines 98-121) also has noverificationfield anywhere inits union.
So on a real verification failure,
finalResult.outcomeis"attempt_verification_failed"butfinalResultcarries zero diagnostic detail about which build/test/lint command failed or why —both the CLI's JSON output (
console.log(JSON.stringify(...))) andoptions.onResult's payloadlose the
verificationvalue entirely, even though it was computed and is sitting right there onresult.Requirements
finalResult's construction must includeverificationvia the same conditional-spread patternalready used for
reason/decision/spec/execResult:...("verification" in result ? { verification: result.verification } : {}).AttemptCliResult'sattempt_${...}union member (~lines 109-121) must add an optionalverification?: unknownfield, matching the type of the other optional fields already there.attempt-runner.ts'sAttemptResultunion orverification_failedoutcomeitself — only
attempt-cli.ts's consumption of it.Deliverables
finalResultinrunAttempt(attempt-cli.ts) includes the conditionalverificationspread alongside its existing conditional spreads.
AttemptCliResult'sattempt_${RunMinerAttemptResult["outcome"]}member gains an optionalverification?: unknownfield.outcome: "verification_failed",runAttempt's CLI JSON output (oroptions.onResultpayload, whichever the existing test suite already asserts against for this function)
includes the
verificationvalue from the underlying result.All three deliverables are required in this single PR.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted, on all changed lines/branches
(applies to
packages/loopover-miner/lib/**). The new spread and its test above must be covered.Expected Outcome
A
verification_failedattempt outcome's CLI JSON output andonResultpayload now include theactual
verificationdiagnostic detail (which build/test/lint command failed and why), instead ofsilently dropping it.
Links & Resources
packages/loopover-miner/lib/attempt-cli.ts(runAttempt'sfinalResult, ~lines 991-1024;AttemptCliResulttype, ~lines 98-121)packages/loopover-miner/lib/attempt-runner.ts(AttemptResultunion,verification_failedoutcome, ~line 92)