Skip to content

build!: ship the binary in the structured-proxy package - #113

Merged
polaz merged 4 commits into
mainfrom
build/#112-one-release
Sep 27, 2026
Merged

polaz merged 4 commits into
mainfrom
build/#112-one-release

Conversation

@polaz

@polaz polaz commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

One package, one release. The structured-proxy binary moves back into the structured-proxy package, behind a cli feature that is off by default:

  • cargo add structured-proxy adds the library alone; clap, tracing-subscriber and redis are pulled in only by cli.
  • cargo install structured-proxy --features cli installs the binary the release packages ship: cli carries redis, so shield.sync keeps its shared rate-limit store as it did with the former CLI package (without the feature, cargo names it).
  • The cli/ package and the workspace are removed, so release-plz no longer produces a second release (a whole-history changelog, links to tags that never exist, a second crate on crates.io). It lists the one package with its v{version} tag and the root CHANGELOG.md.

Changes

  • Cargo.toml: cli feature (optional clap / tracing-subscriber, plus redis), the binary and its test targets with required-features = ["cli"].
  • src/main.rs: moved from cli/ unchanged. tests/cli.rs: moved from cli/, plus a test that the installed binary runs shield.sync without the "redis feature is not compiled in" fallback.
  • CI: the default and injected-verifier legs build and test the binary with --features cli (all-features includes it); a check that the default build links none of clap, tracing-subscriber, redis; cargo publish --dry-run --features cli for the one package, so the packaged binary compiles too.
  • Release workflow: builds the binary with --features cli; artefact names, deb and rpm packaging are unchanged.
  • README: install with cargo install structured-proxy --features cli.

Testing

fmt, clippy with -D warnings on every backend leg, the test suite with and without the built-in verifier (including the CLI tests against the built binary), doc tests, rustdoc and cargo publish --dry-run pass; cargo install --path . --features cli installs a working structured-proxy.

Closes #112

BREAKING CHANGE: cargo install structured-proxy installs the binary only with --features cli.

The binary was a second package, structured-proxy-cli, which release-plz
treated as a second release: a changelog of the whole project history,
links to tags that never exist, and a second crate on crates.io. The
project has one package and one release.

- The `structured-proxy` binary is back in the structured-proxy package,
  behind a `cli` feature that is off by default; clap and
  tracing-subscriber are optional dependencies of that feature. A crate
  that adds the library compiles neither.
- `cargo install structured-proxy --features cli` installs the binary;
  without the feature cargo names it.
- The cli/ package and the workspace are gone; release-plz lists the one
  package with its v{version} tag and the root CHANGELOG.md.
- CI builds and tests the binary on the default and injected-verifier
  legs (all-features includes it), checks that the default build links
  no CLI-only crate, and dry-runs the publish of the one package. The
  release workflow builds the binary with `--features cli,redis`; the
  artefacts, deb and rpm packaging are unchanged.

BREAKING CHANGE: `cargo install structured-proxy` installs the binary only with `--features cli`.

Closes #112
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9a8002dd-23ff-46d2-b4bc-e9e3c06ec329

📥 Commits

Reviewing files that changed from the base of the PR and between 1e34884 and b449dab.

📒 Files selected for processing (11)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • Cargo.toml
  • README.md
  • cli/Cargo.toml
  • packaging/rpm/structured-proxy.spec
  • release-plz.toml
  • src/main.rs
  • src/runtime.rs
  • src/runtime/tests.rs
  • tests/cli.rs

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T16:29:50.255074Z b449dab New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae416436e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml Outdated
@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Moves the binary into the main package, restructures the workspace.

No outstanding finding blocks merging.

What we checked:

  • The startup trace showed worker_threads=2 on stdout and produced no errors on stderr. T-Rex
  • Warnings appeared on stdout during startup, corroborating the startup trace. T-Rex
  • Efforts to reproduce the proposed CI-suite failure and the shared-store corroboration did not succeed. T-Rex
  • Artifacts capturing the startup trace and four CI log fragments were prepared and uploaded for review. T-Rex
Summary

The CLI feature now includes Redis support, the publish check builds the packaged binary, and the binary supports a configurable runtime worker count. The previously reported installation and publish-check issues are fixed. No outstanding issues were found.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into build/#112-one-..."

Comment thread README.md
Comment thread .github/workflows/ci.yml Outdated
@greptile-apps

This comment has been minimized.

The former CLI package enabled `redis` by default and the release
packages build with it, but `cli` pulled only the command-line
dependencies. A binary installed with `--features cli` therefore ran
`shield.sync` with a warning and per-instance limits only.

- `cli` now carries `redis`, so `cargo install structured-proxy
  --features cli` builds what the release packages ship; CI and the
  release workflow build with `--features cli` alone.
- A CLI test runs the binary with `shield.sync` and fails on the
  "not compiled in" fallback warning.
- The default-build check also rejects `redis`.
The binary requires the `cli` feature, so a dry-run with default features
compiled only the library of the packaged crate. With `--features cli`
it builds the binary from the package as `cargo install` would.
The runtime worker-thread settings landed in the cli/ package, which this
branch removes: the runtime module moves to src/runtime.rs as a module of
the binary, its CLI tests join tests/cli.rs, and the dependencies it added
to cli/Cargo.toml are already dependencies of the package.
@polaz
polaz merged commit fdfd1ff into main Sep 27, 2026
7 checks passed
@sw-release-bot sw-release-bot Bot mentioned this pull request Sep 27, 2026
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.

build: ship the binary in the structured-proxy package behind a cli feature

1 participant