Skip to content

fix(poteto-mode): wait for GitHub readiness to settle - #18

Draft
cdupuis wants to merge 2 commits into
backnotprop:mainfrom
cdupuis:fix/watch-pr-readiness-pending
Draft

cdupuis wants to merge 2 commits into
backnotprop:mainfrom
cdupuis:fix/watch-pr-readiness-pending

Conversation

@cdupuis

@cdupuis cdupuis commented Nov 11, 2026

Copy link
Copy Markdown

Why

Keep watch-pr from reporting READY before a pushed head's checks have appeared. GitHub can briefly report an UNKNOWN merge state with a successful rollup containing only DCO or a skipped hook. The watcher currently treats that as readiness.

What changed

  • Represent unfinished merge calculations and pending rollups as a normal wait across single, stack, and queued-stack modes.
  • Keep UNKNOWN out of the type that proves readiness. Preserve blocker precedence and timeout behavior.
  • Show the pending state in JSON and human-readable output.

Scope

  • Covers UNKNOWN merge state or mergeability and PENDING or EXPECTED head rollups.
  • Uses GitHub's reported state. Workflow-specific requirements and jobs GitHub has not reported remain outside this check.

Tradeoffs

Polling resumes when GitHub supplies the missing evidence. No fixed settling delay or fabricated pending check is needed.

Blast Radius

Consumers of watcher JSON can now receive github-pending as a wait or timeout reason and ci-github-pending in status rows. Known conflicts, review blockers, failed checks, and completed PRs retain their existing decisions.

Verification

  • Replayed the DCO-only and skipped-hook-only transitions through the CLI in single and stack modes. The five initial regression cases fail against the original code and pass with the fix.
  • bun test watch-pr check-plan.test.ts passes all 74 tests, including timeout, queue, blocker precedence, status rendering, and pending-rollup coverage.
  • bun run typecheck and git diff --check pass.

cdupuis and others added 2 commits November 11, 2026 06:22
Signed-off-by: Christian Dupuis <cd@docker.com>
Co-authored-by: sbx docker/cdupuis/ab75af7b <sbx-ab75af7b@users.noreply.docker.com>
Signed-off-by: Christian Dupuis <cd@docker.com>
Sandbox-Id: spiffe://sbx.docker.com/org/57b45934-74c0-11e4-bea4-0242ac11001b/user/1580b874-0d59-41d8-bd81-82a10abc4100/sandbox/ab75af7b-5fa6-4709-9a90-93a6e885f932
Sandbox-Kit: sha256:856c306eb2ccdff13c9439fd2d560b217b17800f49f0ab24046f4637d3528623
Signed-off-by: Christian Dupuis <cd@docker.com>
Sandbox-Id: spiffe://sbx.docker.com/org/57b45934-74c0-11e4-bea4-0242ac11001b/user/1580b874-0d59-41d8-bd81-82a10abc4100/sandbox/ab75af7b-5fa6-4709-9a90-93a6e885f932
Sandbox-Kit: sha256:856c306eb2ccdff13c9439fd2d560b217b17800f49f0ab24046f4637d3528623
Co-authored-by: sbx docker/cdupuis/ab75af7b <sbx-ab75af7b@users.noreply.docker.com>
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