Skip to content

cmux-tui pin: the PR probe waits for main's merge-tree publisher (cx-73f2) - #19616

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
fix/same-tree-pr-publisher
Oct 12, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
fix/same-tree-pr-publisher

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is the feat-cmux-next half of #19615, which adds main's merge-tree publisher (cx-73f2).

A same-repository PR's token can't create the cmux-tui-pin-* ref or dispatch the artifacts run; it gets a 403. So pin-cmux-tui.sh probe failed same-tree cmux-tui immediately, 55 times on 33 PRs in a day.

Once #19615 is on main, the same push also starts its pull_request_target publisher. Now, when the probe can't start a publisher itself, await_outside_publisher waits for one:

  • It waits up to 90 s by default (CMUX_TUI_TREE_PUBLISHER_WAIT_SECONDS; path routing has 5 minutes).
  • It looks for an artifacts run for the merge commit, or for one with the same tree, and defers to it. Deferring is the existing deferred path: that run's publish starts the tree jobs.
  • If no publisher shows up, the check fails exactly as before.
  • It applies to pull requests only. Other callers keep their own waits.

Testing

scripts/cmux-next/tests/pin-cmux-tui-probe.test.sh gets a new case (d): every write is refused, and a publisher run appears 2 s later.

  • Red at 50f5892: the probe printed the production error and failed.
  • Green after: the probe defers to the run.
  • With no publisher it still fails, within the bounded wait.

pin-cmux-tui, -run-check, -resolve-newest and -host-target tests are green, and shellcheck is clean.

Changelog

none

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes the cmux-tui pin probe failing immediately on same-repository pull requests, whose token gets a 403 when creating the pin ref or dispatching the artifacts run.

When the probe can't start a publisher itself, it now waits for main's pull_request_target merge-tree publisher (started by the same push):

  • Waits up to 90s by default (CMUX_TUI_TREE_PUBLISHER_WAIT_SECONDS; path routing gets 5 minutes) for an artifacts run for the merge commit or one with the same tree, and defers to it.
  • Applies to pull requests only; other callers keep their own waits.
  • If no publisher appears, the check fails exactly as before.
  • The second same-tree probe sets CMUX_TUI_TREE_PUBLISHER_WAIT_SECONDS to 0, since the first already waited.

Adds test case (d): every write is refused, with a publisher run appearing 2s later; the probe defers to it, and fails bounded without one.

Written for commit 8057c76. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 11, 2026 16:29
A same-repository PR's token gets 403 on the pin ref and the dispatch,
so the probe failed same-tree at once (55 reds on 33 PRs in a day).
Red: with every write refused, the probe fails even though a publish
starts two seconds later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (cx-73f2)

A same-repository pull request's token cannot create the pin ref or
dispatch the artifacts run (403), so the probe failed same-tree at once.
main's cmux-next-pr-merge-tree.yml (pull_request_target, the same push)
now starts that publish; when the probe cannot start one itself it
waits up to 90 s (CMUX_TUI_TREE_PUBLISHER_WAIT_SECONDS) for an artifacts
run for the merge commit or the same tree and defers to it. Pull
requests only: other callers keep their own waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d969d130-ca2b-48b5-bc45-dcdbea7c4c3a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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

Comment @coderabbitai help to get the list of available commands.

The first probe already waited up to 90 s for main's merge-tree
publisher; a second wait only lengthened path_route on every miss.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit e722c68 into feat-cmux-next Oct 12, 2026
77 checks passed
@teamleaderleo
teamleaderleo deleted the fix/same-tree-pr-publisher branch October 12, 2026 05:53
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