Skip to content

Split cargo ci subcommands into packages - #5687

Draft
clockwork-labs-bot wants to merge 36 commits into
masterfrom
bot/split-public-cargo-ci
Draft

Split cargo ci subcommands into packages#5687
clockwork-labs-bot wants to merge 36 commits into
masterfrom
bot/split-public-cargo-ci

Conversation

@clockwork-labs-bot

Copy link
Copy Markdown
Contributor

Description of Changes

Splits the public cargo ci tool into the same trampoline-style layout as SpacetimeDBPrivate#3631.

The root tools/ci package is now a thin dispatcher that shells out to one package per top-level command under tools/ci/commands/:

  • test
  • lint
  • wasm-bindings
  • dlls
  • smoketests
  • keynote-bench
  • update-flow
  • cli-docs
  • self-docs
  • global-json-policy
  • publish-checks
  • typescript-test
  • version-upgrade-check
  • docs
  • other-workflows

This keeps command dependencies scoped to the packages that actually need them while preserving the existing cargo ci <command> entry point.

Also moves the existing smoketest, keynote bench, CLA assistant, and CODEOWNERS code into the corresponding command packages, adds tools/ci/common for shared repo-root helpers, updates CODEOWNERS paths, and regenerates tools/ci/README.md.

API and ABI breaking changes

N/A

Expected complexity level and risk

3

This is mostly mechanical, but it touches CI command routing and workspace membership. The main risk is preserving argument forwarding behavior for existing workflow invocations.

Testing

  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo metadata --no-deps --format-version 1
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo fmt --all -- --check
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo check -p ci -p ci-common -p ci-test -p ci-lint -p ci-wasm-bindings -p ci-dlls -p ci-smoketests -p ci-keynote-bench -p ci-update-flow -p ci-cli-docs -p ci-self-docs -p ci-global-json-policy -p ci-publish-checks -p ci-typescript-test -p ci-version-upgrade-check -p ci-docs-build -p ci-other-workflows
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo run -p ci -- --help
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo run -p ci -- smoketests --help
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo run -p ci -- other-workflows --help
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo run -p ci -- self-docs --check
  • git diff --check

@bfops bfops self-assigned this Aug 7, 2026
@bfops
bfops marked this pull request as draft August 7, 2026 16:18
Comment thread tools/ci/commands/cla-assistant/Cargo.toml
Comment thread tools/ci/README.md
Comment thread tools/ci/src/util.rs
…rgo-ci-merge-5687

# Conflicts:
#	tools/ci/README.md
#	tools/ci/src/main.rs
Comment thread tools/ci/commands/lint/Cargo.toml Outdated
Comment thread tools/ci/commands/lint/Cargo.toml Outdated
Comment thread tools/ci/commands/docs/src/main.rs Outdated
Comment thread tools/ci/commands/publish-checks/src/main.rs Outdated
Comment thread tools/ci/commands/self-docs/src/main.rs Outdated
Comment thread tools/ci/commands/version-upgrade-check/src/main.rs Outdated
Comment thread tools/ci/commands/wasm-bindings/src/main.rs Outdated
Comment thread tools/ci/commands/update-flow/src/main.rs Outdated
Comment thread tools/ci/commands/test/Cargo.toml Outdated
Comment thread tools/ci/commands/dlls/src/main.rs Outdated
Comment thread tools/ci/commands/docs/src/main.rs Outdated
Comment thread tools/ci/commands/typescript-test/Cargo.toml Outdated
Comment thread tools/ci/commands/coordinate-internal-tests/src/main.rs Outdated
Comment thread tools/ci/commands/coordinate-internal-tests/src/main.rs
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Comment thread tools/ci/src/main.rs Outdated
.collect())
fn run_smoketests(args: &[String]) -> Result<()> {
let mut args = args.to_vec();
if args.first().is_some_and(|arg| arg.starts_with("--test-")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why is this special case needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This preserves the existing workflow invocation cargo ci smoketests -- --test-threads=1. Root clap consumes the user-facing --, but the split ci-smoketests binary still needs a child -- before test-runner flags so clap does not treat --test-threads as a smoketest option. I left the forwarding behavior in place and fixed the docs generator in c1e9dbd32 so smoketest help now comes from the actual split binary.

Comment thread tools/ci/src/main.rs Outdated
Comment thread tools/ci/README.md Outdated
Comment thread tools/ci/src/ci_docs.rs Outdated
Comment thread tools/ci/README.md
Comment thread tools/ci/README.md Outdated
Comment thread tools/ci/README.md Outdated
Comment thread tools/ci/commands/smoketests/src/main.rs Outdated
Comment thread tools/ci/commands/smoketests/src/main.rs Outdated
Comment thread tools/ci/commands/global-json-policy/src/main.rs Outdated
Comment thread tools/ci/commands/global-json-policy/src/main.rs Outdated
Comment thread tools/ci/src/main.rs Outdated
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