Skip to content

Route monorepo TagBot to the registered package#111

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/targeted-monorepo-tagbot
Jul 10, 2026
Merged

Route monorepo TagBot to the registered package#111
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/targeted-monorepo-tagbot

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

  • add a reusable monorepo TagBot dispatcher that resolves JuliaTagBot's General registry PR to one root or lib/* package
  • keep retry comments and untargeted manual runs as serialized full audits
  • deduplicate concurrent runs per package and retain the deprecated lookback input without forwarding it
  • document the new caller and test target resolution

Root cause

The previous monorepo convention started TagBot once for the root and once for every registered subpackage on every JuliaTagBot comment. OrdinaryDiffEq currently expands one registration into 57 jobs. A burst of 18 registry merges expanded into 1,026 jobs, exhausted the shared GitHub API allowance, and caused 403 responses followed by long TagBot backoffs.

Implementation

The resolver extracts the JuliaRegistries/General PR number from the bot comment, reads the standardized New version: Package vX.Y.Z title, and validates the name against the caller's root and lib/*/Project.toml files. The resulting one-element matrix invokes the existing tagbot.yml reusable workflow only for that package.

JuliaTagBot retry comments without a General PR link and manual dispatches without a package intentionally discover every package, but use max-parallel: 1. Manual dispatch can name one package. Runs for the same subdirectory share a non-cancelling concurrency group.

The existing lookback workflow input remains accepted for v1 compatibility but is documented as ignored and is no longer forwarded. TagBot itself deprecated the setting and checks all registered versions.

Validation

  • python3 -m unittest discover -s test -p 'test_resolve_monorepo_tagbot.py' -v — 9 tests passed
  • julia --color=yes test/runtests.jl — all existing testsets passed
  • actionlint -color .github/workflows/*.yml — passed with no output
  • Runic v1.7.0 --check scripts test/runtests.jl — passed with no output
  • live resolver check using General PR 160472 and the OrdinaryDiffEq checkout — resolved only lib/OrdinaryDiffEqBDF, package OrdinaryDiffEqBDF, version 2.3.0

This adds a public reusable workflow and should be released as a backward-compatible minor v1 release before dependent caller PRs merge.

Ignore this PR until reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Plan / scratchpad:

  1. Validate the resolver against root, subpackage, retry, manual, and invalid-package cases.
  2. Keep the existing single-package workflow compatible while adding targeted monorepo routing.
  3. Confirm actionlint, the repository Julia tests, Runic, and a live General PR lookup locally.
  4. Stack an OrdinaryDiffEq caller PR on this workflow; it must wait for this PR to merge and for the moving v1 tag to include the release.
  5. Monitor CI on both drafts and record any follow-up commits here.

The upstream TagBot Action still scans all historical versions for the selected package because it has no exact-version Action input. This PR removes the 57-package fan-out without depending on TagBot internals.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Follow-up d043414 documents and preserves the caller permission block. GitHub reusable workflows can only maintain or reduce the caller token permissions, so the central workflow cannot elevate a read-only caller to contents: write. Local follow-up validation: git diff --check and actionlint both pass.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 10, 2026 10:55
@ChrisRackauckas
ChrisRackauckas merged commit 7722319 into SciML:master Jul 10, 2026
3 checks passed
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

The dependent OrdinaryDiffEq caller draft is now open: SciML/OrdinaryDiffEq.jl#3866. It must remain blocked until this PR merges and the moving v1 tag includes the new workflow/action.

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