Skip to content

refactor(maintenance-reconcile-lost-runs): simplify component-status and infra-failure - #14265

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14112-42530412033-1
Nov 8, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14112-42530412033-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14112

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Two files are shorter (17 lines added, 28 removed) and work exactly as before. infra-failure.mjs had the 24-hour lookback test written out four times; it now lives in one private inLookback helper. firstFailure now reuses reconcilerRetries, which checks the same four conditions. lostRunnerNoted and timeLimitNoted share one private failureNoted matcher. infraCause uses the STOPPED set instead of two separate equality checks, and infraOnly filters once instead of twice. In component-status.mjs, readComponents builds both 'unknown' results with one local helper. No export, flag, output, key order or message changed. No changelog fragment was added because neither file belongs to a plugin.

Not verified

  • component-status.test.mjs, infra-failure.test.mjs and reconcile.test.mjs were not run: this lane cannot run node. They are left to the PR's CI.
  • Tidy skipped: the change is under .github/, which is a listed shared path for tidying.
  • ci-status green is an acceptance criterion the PR's CI checks; it cannot be checked from this run.

Fix

  • .github/scripts/maintenance-reconcile-lost-runs/infra-failure.mjs: new private inLookback helper replaces four copies of the lookback check; firstFailure reuses reconcilerRetries; new private failureNoted helper shared by lostRunnerNoted and timeLimitNoted; infraCause uses STOPPED.has; infraOnly…
  • .github/scripts/maintenance-reconcile-lost-runs/component-status.mjs: readComponents builds both unknown-verdict results with one local helper, and the known-verdict branch returns the status string directly

Verification

The runner ran each check from the base copy against dbaceb4:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

Left out: the items under Not verified.

Related

#14112

Merge-Risk: max=MEDIUM demote=false head=dbaceb4ae6e2f3fc83a60d7ff669db7913744aa7 rubric=8.1.2 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed dbaceb4ae6e2f3fc83a60d7ff669db7913744aa7: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14265 (head dbaceb4)

I found no security issues.

I read the full change to both listed files. .github/scripts/maintenance-reconcile-lost-runs/infra-failure.mjs is on the trusted-path list, so I checked it closely, including what it gates: the reconciler's re-run decisions and pr-unblock's fix-ci wait (reconcilerOwns). This is a refactor, and I confirmed from the code that behaviour does not change:

  • inLookback (infra-failure.mjs#L39): its expression matches all four inline copies it replaces. The run.created_at access is unchanged, and each call site is still guarded in the same order as before.
  • firstFailure: it now calls reconcilerRetries(run, now). That function checks the same four conditions, in the same order, as the old inline prefix, so falsy and short-circuit results are the same.
  • failureNoted: it takes the pattern as an argument. Both regexes have no g or y flag, so .test keeps no state between calls, and the anchored TIME_LIMIT match still requires GitHub's own message at the start.
  • infraCause: STOPPED (L32) is exactly {cancelled, timed_out}, so it matches the two equality checks it replaces.
  • infraOnly: filtering once gives the same set as filtering twice.
  • component-status.mjs readComponents: verdictOf returns a non-unknown verdict only when typeof status === "string" (component-status.mjs#L31-L36). So returning status directly on the known branch matches the old ternary, and the unknown branch still sets status: null.

Neither file is a trust control. The change does not widen any merge hold, token scope, trusted actor or lane input, and it adds no untrusted text or new fetch target. The PR context file contains no embedded instructions aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed dbaceb4ae6e2f3fc83a60d7ff669db7913744aa7: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #14265, refactor of maintenance-reconcile-lost-runs

No findings. I read every hunk of both changed files and the head copy of each file. Each change keeps the old behavior:

infra-failure.mjs (on the trusted-path list, so it got the full read)

  • inLookback: none of its 4 call sites can now hit a null run that the old code didn't.
    • In reconcilerRetries, run?.status === "completed" short-circuits first.
    • The first branch of reconcilerOwns is guarded by IN_FLIGHT.has(run?.status).
    • The LOST branch only runs after Date.parse(run?.updated_at) gives a finite due (a null run returns "" before reaching it), and it checks run.status first, the same as before.
  • firstFailure: reconcilerRetries(run, now) checks exactly the four conditions the old function checked. It returns the same false on a short-circuit, and the && chain is otherwise unchanged.
  • failureNoted: neither LOST_RUNNER (/i) nor TIME_LIMIT has the g or y flag, so .test keeps no lastIndex state between calls. lostRunnerNoted still reads job?.annotations.
  • infraCause: STOPPED.has(job?.conclusion) is the same as the two equality checks it replaces, since STOPPED is {cancelled, timed_out}.
  • infraOnly: the single filter reads job.name only after FAILED.has(job?.conclusion) passes, the same guard as the old two-pass filter.

component-status.mjs

  • When the verdict is not unknown, verdictOf has already confirmed the status is a string, so returning it directly matches the old typeof status === "string" ? status : null.
  • Both unknown branches still return status: null and the same reason text.
  • Key order is still key, host, component, status, verdict, reason.

Closing issue #14112 acceptance criteria

  • Behavior unchanged: met, per the reading above. infra-failure.test.mjs and reconcile.test.mjs exercise these functions, so a regression could fail CI. I did not run them.
  • Edits only the two listed files: met.
  • Within 400 changed lines and 15 hand-edited files: met (2 files, 17 lines added, 28 removed).
  • ci-status green: I can't check this from this lane. It is left to the PR's CI.

The PR body's test-run and fresh-context-review claims are the author's own and I did not verify them. No .claude/rules/ file's paths: glob matches either changed file. No plugin manifest changed. Neither the PR body nor the issue contains embedded instructions aimed at this lane.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head dbaceb4ae6e2f3fc83a60d7ff669db7913744aa7, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for dbaceb4

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14265-dbaceb4ae6e2f3fc83a60d7ff669db7913744aa7, expires on 2026-12-08.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit a64a9b4 Nov 8, 2026
66 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14112-42530412033-1 branch November 8, 2026 23:03
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit a64a9b45763d37a861864e757191a74996532a35; later checks count it verified from this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify .github: maintenance-reconcile-lost-runs

0 participants