Skip to content

Fix GitHub issue mirror dispatch#25

Merged
khaliqgant merged 1 commit into
mainfrom
fix/run-once-remote-progress
Jun 22, 2026
Merged

Fix GitHub issue mirror dispatch#25
khaliqgant merged 1 commit into
mainfrom
fix/run-once-remote-progress

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • scan configured compact GitHub issue roots (/github/repos/OWNER__REPO/issues/by-id) so factory-labeled issues are discovered even when /github/repos is shallow
  • include configured Linear teamIds on GitHub mirror create drafts so the Linear adapter can materialize them as real issues
  • route label-less GitHub mirror issues from their Source: https://github.com/OWNER/REPO/issues/N metadata before falling back to repos.default
  • keep the global/local factory binary executable when installed from a checkout
  • also includes the PR babysitter body-reference match fix already present in this working tree

Verification

  • npx vitest run src/config/schema.test.ts src/orchestrator/factory.test.ts
  • npm run build
  • live verification against AgentWorkforce/relayfile-adapters#224:
    • GitHub issue was mirrored to Linear as AR-311
    • factory canary /linear/issues/AR-311__436c3c9f-a938-46d8-9de1-63dd829f813b.json --config /tmp/factory-config-relayfile-adapters-only.json returned { "ok": true, "issue": "AR-311", "status": "dispatched" }

Notes

This keeps compatibility with the current Linear adapter create contract by adding linear.teamIds config support. The local AgentWorkforce root config now pins AR -> 50cf92f3-f53c-4ab6-bf05-ea76ebd21692, but that root config is outside this repo.

Follow-ups filed

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@miyaontherelay, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 18 minutes and 31 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: aabf21e3-0381-41b0-9cfe-e2210c79277d

📥 Commits

Reviewing files that changed from the base of the PR and between 90398b2 and d450974.

📒 Files selected for processing (5)
  • bin/factory.mjs
  • src/config/schema.test.ts
  • src/config/schema.ts
  • src/orchestrator/factory.test.ts
  • src/orchestrator/factory.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/run-once-remote-progress

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 and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several enhancements to the orchestrator and CLI, including routing factory progress logs to stderr to keep stdout as clean JSON, adding team ID support to the Linear configuration, implementing progress tracking and warnings for slow remote relayfile operations, and supporting label-less GitHub mirror routing based on source URLs. The review feedback suggests safely handling potentially null or undefined issue descriptions to prevent runtime crashes and simplifying the regex matching logic for GitHub repository URLs.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +4134 to +4135
const sourceUrlLine = issue.description
.split(/\r?\n/u)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If issue.description is null or undefined at runtime, calling .split() directly on it will throw a TypeError and crash the process. Enforce defensive programming by safely defaulting it to an empty string before splitting.

Suggested change
const sourceUrlLine = issue.description
.split(/\r?\n/u)
const sourceUrlLine = (issue.description ?? '')
.split(/\r?\n/u)


function githubRepoFromUrl(url: string | undefined): string | undefined {
const match = url?.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/issues\/\d+(?:[/?#].*)?$/iu)
return match?.[1] && match[2] ? `${match[1]}/${match[2]}` : undefined

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the regular expression /^https:\/\/github\.com\/([^/]+)\/([^/]+)\/issues\/\d+(?:[/?#].*)?$/iu uses + quantifiers for both capture groups, match[1] and match[2] are guaranteed to be non-empty strings if a match is found. The check match?.[1] && match[2] is redundant and can be simplified to just checking if match is truthy.

Suggested change
return match?.[1] && match[2] ? `${match[1]}/${match[2]}` : undefined
return match ? match[1] + '/' + match[2] : undefined

@miyaontherelay miyaontherelay force-pushed the fix/run-once-remote-progress branch from 5d4254e to d450974 Compare June 22, 2026 12:29
@khaliqgant khaliqgant merged commit 34930b8 into main Jun 22, 2026
2 checks passed
@khaliqgant khaliqgant deleted the fix/run-once-remote-progress branch June 22, 2026 12:30
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.

2 participants