Skip to content

revert(reconcile): drop the late-tick follow-up from #18692 - #18745

Merged
kyle-sexton merged 1 commit into
mainfrom
revert/reconcile-followup-tick
Nov 24, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
revert/reconcile-followup-tick

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #18692

Summary

Reverts #18692. Every reconciler follow-up tick since it merged has crashed with exit code 13, so reviews queued for a follow-up are never re-run. That breaches #18692's stated revert criteria.

Measured: 3 of 3 follow-up ticks failed over 30 min:

Each logged FOLLOWUP: true, then Warning: Detected unsettled top-level await at .../reconcile.mjs:1930 (process.exitCode = await main();) and Process completed with exit code 13. The notices show the path ran: "run 45339209195 left 2 reviews waiting on a checks run; this tick follows them up". #18733's deferred reviews have been waiting since 06:01Z.

Fix

git revert of 7bf2419. It applied with no conflicts and restores the reconciler, its tests and the workflow to their state before #18692. Full passes in each new token window still re-run deferred reviews, as before.

Verification

  • The reconciler suites (reconcile.test.mjs, recent-pass.test.mjs, reset-tick.test.mjs) pass 269 of 269 on the revert.

The follow-up returns as a new PR, with a test that runs the follow-up branch through main() end to end. #18692's tests called the plan functions directly, so the hang in main() went untested.

Related

🤖 Generated with Claude Code

This reverts commit 7bf2419 (#18692).

Every follow-up tick since the merge has crashed with exit code 13
("Detected unsettled top-level await" at reconcile.mjs:1930,
process.exitCode = await main()): runs 45340051187 (06:23Z),
45342736594 (06:44Z) and 45343787969 (06:53Z), 3 of 3. Their notices
show the follow-up path ran ("run 45339209195 left 2 reviews waiting
on a checks run; this tick follows them up"), so the queued reviews
(#18733's since 06:01Z) were never re-run. That breaches #18692's
stated revert criteria, so the change comes out whole and the fix
returns as a new PR with a test that drives the follow-up path through
main() end to end.

Reconciler suites on the revert: 269 of 269 pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T06:58:40.174846Z d0beccb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

This pull request reverts #18692. It removes the late-tick follow-up from the lost-runs reconciler. It deletes followup.mjs and the settled-waiting.json fixture. It also removes the waiting_reviews queue that was written into the settled carry and checked by parseSettled, and drops the FOLLOWUP/FOLLOWUP_PATH wiring from recent-pass.mjs, reconcile.mjs, reset-tick.mjs and the workflow. I read every hunk of all 7 listed files and the two deleted files.

Trust-boundary checks:

  • Kill switch (.github/workflows/maintenance-reconcile-lost-runs.yml, a trusted path). After the revert, Check the kill switch runs on if: steps.reset.outputs.due != 'false'. Find lost runs and Re-run lost runs are back to steps.reset.outputs.due != 'false' && steps.pace.outputs.paced != 'true' && steps.recent.outputs.skip != 'true'. The || steps.recent.outputs.followup == 'true' branch is gone, so the plan and act steps no longer have a second way to start. This narrows when they run. It removes no gate.
  • Artifact trust. The removed queueFollowUp downloaded a prior run's settled artifact and fed its waiting_reviews rows into re-run decisions. That artifact-to-re-run path no longer exists. The settled carry is still read only through the unchanged newestTrustedArtifact/trustedRun path. parseSettled still checks the shape, the version and the repository.
  • Carry upload. Scan the upload for credentials and Carry the settled runs lose only the followup != 'true' condition. That condition is moot now that the follow-up mode is gone. The credential scan still gates the upload.
  • Tokens and permissions. No permissions: block changes, no token request changes, and no new secret reaches a step. The Skip a run right after a full pass step moved back after the pace step with the same GITHUB_TOKEN: ${{ github.token }} env. It has one env var fewer (FOLLOWUP_PATH).
  • Merge holds. No merge hold or trusted-actor file is touched.

The PR context contains no embedded instructions to the lane.

Spend: removing the follow-up tick means fewer late-tick reconciler runs, so GitHub Actions minutes and GITHUB_TOKEN API calls go down slightly. Nothing is billed.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: revert of #18692 (reconciler late-tick follow-up)

No findings. This PR reverts #18692. It deletes followup.mjs and its settled-waiting.json fixture. It removes the waiting_reviews queue from the settled-runs writer and parser in reconcile.mjs, and it inlines stoppedReviews, upstreamGate and reconciledPull back into plan() as private helpers. In reset-tick.mjs, a tick that is not due no longer writes pass-after. In the workflow, the Skip a run right after a full pass step moves back after the pacer and is gated only on due != 'false', and every followup condition is gone.

I read all 7 listed files' hunks in the full diff, including the two whole-file deletions, and checked them against the code at head:

  • Removed exports. Nothing in the repository still imports isRedChecks, newestByWorkflow, onlyAggregateFailed, withAnnotations, DEFERRED, waitingReview, upstreamGate, reconciledPull, ciRecoveryFirst or passRateLimit from reconcile.mjs. admit.test.mjs uses a DEFERRED of its own.
  • Leftover references. No followup, FOLLOWUP, waiting_reviews or settled-waiting reference remains under .github/scripts or the workflow. The remaining tests use none of the removed helpers (AFTER_GRACE, followUpTick, deferredWaiting, queued).
  • Carry compatibility. SETTLED_VERSION stays 4. A settled artifact a fix(reconcile): re-run waiting reviews on a late tick once their checks finish #18692 pass already uploaded, with a waiting_reviews key, still parses, because parseSettled ignores keys it doesn't know. So the first full pass after the revert doesn't drop its carry.
  • Workflow test regexes. The new if: patterns in recent-pass.test.mjs and reconcile.test.mjs match the restored gates on Check the kill switch, Find lost runs and Re-run lost runs.

The PR body says the 269 tests pass. I couldn't run them, so that claim is unverified.

Loosened checks. The deleted tests and the edited expected values (the workflow if: regexes and tickPlan's not-due result) all cover behaviour the revert removes on purpose. No check now accepts more for code that remains, so I judged this not a loosening. There are no loosened_check_verdict: or loosened_check_patterns: lines, so the defaults applied (fail, no consumer entries). There is no loosened_check_decision_record: line either, so I didn't check the citation requirement.
Loosened checks would be marked: fail (default; no settings lines supplied); patterns: 0

Closing issue. The PR closes no issue; it only refers to #18692. There are no acceptance criteria to check.

Spend. The revert removes the late-tick follow-up runs, so it lowers how many lane runs and API calls the reconciler uses. Nothing here is billable.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit e72f7bb Nov 24, 2026
81 of 82 checks passed
@kyle-sexton
kyle-sexton deleted the revert/reconcile-followup-tick branch November 24, 2026 07:37
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
.github/scripts/maintenance-reconcile-lost-runs/recent-pass.mjs 1 0 0 0 0 0
.github/scripts/maintenance-reconcile-lost-runs/reconcile.mjs 3 1 0 0 0 0
.github/scripts/maintenance-reconcile-lost-runs/reset-tick.mjs 2 0 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
.github/scripts/maintenance-reconcile-lost-runs/reconcile.mjs:1645 AOR productive input-gap

The run's summary has the full report.

kyle-sexton added a commit that referenced this pull request Nov 24, 2026
…ndards-sha

Main's #18745 moved the recent-pass step back after the pacer and dropped
its follow-up path; keep that, and keep this branch's standards reads on
the find and reconcile steps. recent-pass.mjs reads no trusted list, so
its step needs no STANDARDS_DIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant