Skip to content

Confirm sync and closeout CI dispatch without holding runners for completion - #246

Open
unbraind wants to merge 9 commits into
mainfrom
fix/no-ci-polling-on-runners
Open

unbraind wants to merge 9 commits into
mainfrom
fix/no-ci-polling-on-runners

Conversation

@unbraind

@unbraind unbraind commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

The reusable sync and closeout jobs must release their runner while caller CI runs. Historical fleet runs averaged about 85 runner-minutes; one measured sync finished its real work in 44 seconds and then polled for two hours. #229 already removed that completion loop; this completes the bounded dispatch receipt and reporting contract.

Built on #245's head (a69388d2d93ba15fd8f22840f3b9c8780c78f36a) while it was open. Merge #245 first; callers only need the workflow pin bump from the #238 sweep.

  • Keep caller-head dispatch and existing protected, SHA-guarded native squash auto-merge. Add a separate appearance-only receipt step: one shared 60-second budget across selected workflows, at most 12 discovery rounds, ten-second hard-killed API calls. Queued runs count immediately; no conclusion or completion is polled.
  • Match workflow, branch, head SHA, dispatch event and creation time. Registration timeout or lookup failure reports timed_out without failing sync or revoking auto-merge. Genuine dispatch failures still fail before arming.
  • Export the PR URL, registered run URLs, already parked run URLs and registration status through job/reusable outputs and the job summary. The existing hourly approval sweep or a maintainer handles parked native runs; required checks decide auto-merge and the next scheduled rebuild handles blocked landing/base advances.
  • Retain gated import, idempotency, redaction, sync holds, Gated sync treats a gh:<repo>#N reference tag as import identity, so it overwrites curated local items or refuses when two items mention the same PR #230 ownership and closeout attribution/revocation. Held closeout PRs now retain reporting without arming. Other reusable workflows have no completion wait. The non-reusable release continuation is separately tracked by pm-github-sgyr.

Expected ordinary duration: under two minutes for the measured 44-second workload plus at most 60 seconds of registration discovery. This is a budget/expectation, not a new live fleet timing measurement.

Validation:

  • node --test --test-concurrency=2 test/ci-handoff-workflow.test.ts test/bot-pr-workflow.test.ts test/self-versioned-workflows.test.ts test/workflow-rule-names.test.ts test/daily-sync-alert.test.ts: 199/199 passed.
  • NPM_CONFIG_USERCONFIG=/dev/null node --test --test-concurrency=2 --test-name-pattern="workflow credentials|earlier armed auto-merge|informational parked-run failure|previous auto-merge is revoked on workflow exit: maintenance" test/import-gate.test.ts test/closeout-workflow.test.ts: 4/4 passed after build.
  • bun test --timeout 120000 test/ci-handoff-workflow.test.ts: 21/21 passed; the full updated Node workflow group also passed through pinned pm test --run --progress.
  • npm run build, npm run typecheck, npm run build:test, npm run lint, npm run privacy, npm run docstring, npm run verify:release-publish-attestation, npm run changelog:full and npm run changelog:check: passed. actionlint is unavailable.
  • Revert proof: in disposable copies, restore each historical dispatch completion-wait shell from the parent of 6ccb293; the new every-reusable-step contract fails independently for sync and closeout (one failure each). Restore the fixed workflows and the contract passes. Missing, denied, timed-out and partial registration all return success and an informational timeout receipt.
  • No authored production TypeScript/JavaScript source changed. Coverage thresholds remain 100/100/100/100; CI certifies the full npm/Bun release gates under the targeted task scope.

Tracker: pm-github-fxhd, reused for #228 and left in progress for orchestrator verification. README and migration notes document the handoff and pin-only adoption.

Additional review evidence at 8090147f1716883c9f35ac0de904517a0c22d6f4: controlled-clock cases exhaust the shared deadline across workflow lookups and forbid a late third lookup while retaining partial URLs. Real GNU timeout cases kill a genuinely stuck lookup after ten seconds and report successful informational timeout receipts. Removing the admission guard or shortening the real timeout independently fails the corresponding behavioral tests (four expected failures across sync/closeout).

Review thread PRRT_kwDOTbN4pM63g99s / comment 4574827470 is addressed by test commit 8090147f1716883c9f35ac0de904517a0c22d6f4; it is left open for orchestrator response, with no thread reply, resolution or reaction.

Final-head CI: CI, CodeQL. Both are queued at handoff preparation. The original bounded CI cutoff is retained; pending checks are not certification.

Summary by Sourcery

Release sync and closeout runners after dispatch by replacing completion polling with bounded CI registration receipts and safer workflow-version resolution.

New Features:

  • Add bounded, appearance-only caller CI registration receipts and reusable outputs for sync and closeout workflows.
  • Default reusable workflows to the release version declared by their immutable workflow commit while retaining explicit version holds with warnings.

Bug Fixes:

  • Prevent sync and closeout jobs from holding runners while waiting for caller CI completion.
  • Ensure registration failures and timeouts remain informational without disrupting successful sync or closeout handling, while genuine dispatch failures still fail.

Enhancements:

  • Preserve protected native auto-merge and closeout attribution safeguards while reporting parked and registered run URLs.
  • Validate the selected extension release before tracker writes and document the workflow-version and CI-handoff migration contracts.

Documentation:

  • Document bounded CI handoff behavior, reusable outputs, caller migration, and fleet version-hold inventory.

Tests:

  • Add workflow-level coverage for registration timing, partial and failed discovery, timeout handling, output wiring, and prevention of completion polling.
  • Update version-resolution tests for manifest-based release selection and registry preflight validation.

Chores:

  • Update the unreleased changelog and project tracking records.

Summary by cubic

Stops the gated sync and closeout workflows from holding a runner while caller CI runs. They now confirm that caller runs appeared within one 60-second budget, then report their URLs and status without polling for completion.

  • Replaces the completion-wait loop with an appearance-only receipt step: one shared 60-second budget, at most 12 discovery rounds, ten-second hard-killed API calls. Queued runs count immediately; no conclusion or completion is polled.
  • Missing, denied, timed-out, or partial registration reports timed_out without failing sync, closeout, or arming auto-merge.
  • Exports the PR URL, registered run URLs, parked run URLs, and registration status through job and reusable outputs and the job summary. Held closeout PRs keep reporting without arming.
  • Defaults reusable workflow installation to the workflow's package release so callers can drop pm-github-version; explicit version holds still install the requested version but warn when it differs.

Migration: Callers must move the workflow pin to a release containing #238 and remove pm-github-version in the same change, since a pin update alone keeps stale inputs as explicit holds. docs/no-ci-polling-migration.md and docs/workflow-version-callers.md cover adoption.

Written for commit a713004. Summary will update on new commits.

View guided diff Turn on auto-fix

…ne change

A pin update alone keeps a stale pm-github-version as an explicit hold, so the
caller would keep installing the older extension (now with a warning). The
caller inventory and the README migration note now say to make both edits
atomically. (CodeRabbit, docs/workflow-version-callers.md:6)
@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Sorry @unbraind, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 19 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e5901d7b-2a8c-4638-8dbe-6fb209c21240
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Expose PR, registered CI run, parked-run, and confirmation outputs from both reusable workflows as the handoff contract.

  • .github/workflows/pm-github-closeout.yml L50-63, L89-93
  • .github/workflows/pm-github-sync.yml L67-80, L107-110

Change extension-version resolution so the reusable workflow manifest selects the default, explicit inputs remain warned holds, and registry preflight blocks writes for unavailable packages.

  • .github/workflows/pm-github-closeout.yml L15, L154-160, L181-194
  • .github/workflows/pm-github-sync.yml L32, L153-159, L180-193

Implementation

Dispatch caller CI while recording dispatch context and parked-run snapshots, then confirm run appearance under a bounded shared deadline without waiting for completion.

  • .github/workflows/pm-github-closeout.yml L774-777, L804-863 (+3 small edits)
  • .github/workflows/pm-github-sync.yml L798-799, L809-810, L824-883

Configuration

Regenerate the identity-ownership inventory anchor after the workflow edits shifted the referenced line.

  • docs/identity-ownership-inventory.md L126

Documentation

Explain the runner-release receipt contract, its migration, version selection, and the caller inventory that must drop explicit holds when updating pins.

  • README.md L987-1017, L1184-1198, L1206-1208
  • docs/bot-pr-automation.md L197-199, L230-231
  • docs/no-ci-polling-migration.md L1-75
  • docs/scheduled-workflow-watch-1106.md L24-29
  • docs/workflow-version-callers.md L1-120

Record the fixes and move the runner-cost item into the unreleased changelog section.

  • CHANGELOG.md L5-9, L23 (removed lines)

Tests

Update workflow behavior checks for closeout attribution holds and exercise the registration receipt’s matching, outputs, timeout, and failure semantics.

  • test/bot-pr-workflow.test.ts L539-543, L582-593 (+2 small edits)
  • test/ci-handoff-workflow.test.ts L1-176
  • test/import-gate.test.ts L1650

Replace tag-based version tests with manifest, explicit-hold, registry-preflight, and tracker-write safety coverage.

  • test/self-versioned-workflows.test.ts L33-113, L119-209, L222-230 (+5 small edits)

Other changes

Files not grouped.

  • .agents/pm/history/pm-github-fxhd.jsonl L100-127
  • .agents/pm/history/pm-github-workflow-own-release.jsonl L1-24
  • .agents/pm/issues/pm-github-fxhd.toon L5-11, L54-64, L223-271 (+3 small edits)
  • .agents/pm/issues/pm-github-workflow-own-release.toon L1-51

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed follow-up appears safe to merge.

Summary

Sync and closeout now report bounded CI registration receipts without waiting for checks to finish. This follow-up refreshes the generated ownership inventory and records validation results.

  • Sync and closeout report caller CI runs without waiting for them to finish.
  • Reusable workflows use their pinned release as the default extension version.
  • The ownership inventory points to the updated workflow locations.

No new actionable issues were found in the changes since the previous review.

Reviews (3) · Last reviewed commit: "fix: merge workflow inventory repair and..." · Reviewed by Greptile

Comment thread test/ci-handoff-workflow.test.ts Resolved

Copy link
Copy Markdown
Owner Author

Independent check on 8090147f1716883c9f35ac0de904517a0c22d6f4: the exact CI-handoff suite passed 21/21 on Node 24.22.1, including both real GNU timeout hard-kill cases and the shared deadline tests preserving the partial URL and preventing a late lookup. The earlier inline coverage concern is addressed on this head. No live GitHub dispatch was performed.

This stack does inherit the ownership inventory failure from #245, but the anchor moves again: pm-github-sync.yml:458 is the current ambiguous-identity report, while the generated inventory still cites :466. The independent inventory suite was 1/5 (four failures). Regenerate against this head after the stack settles and require 5/5, not just the parent’s :440 repair.

Copy link
Copy Markdown
Owner Author

Follow-up on the same 8090147f1716883c9f35ac0de904517a0c22d6f4: hosted Node 26 exited 1 with seven tests, despite the 100% coverage summary. Four are the ownership-anchor failures already noted. The guard step-order assertion also still expects the old list without the new handoff step; I checked that the default-branch guard is still first and unconditional, so this is a stale test expectation, not evidence of a bypass.

The two real stuck-lookup controls also hit the outer ~30-second fixture limit (null !== 0 at 30.039s/30.048s). On the same revision, independent isolated Node 24 reruns of those exact sync/closeout tests passed in 10.112s and 10.106s, including partial URLs and no late lookup. This does not establish why they time out in the hosted coverage suite or that production handoff times out. Before merge, reconcile the order/anchor expectations and require both real hard-kill controls to pass under the actual CI test runner, without weakening the partial-receipt or no-late-lookup assertions.

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.

1 participant