Repository navigation
Publish the maple-proxy crate with Maple releases - #1673
Merged
Merged
Conversation
The proxy crate had no publisher and stopped at 0.3.2 on crates.io. It now goes through the Rust SDK's publish workflow, because crates.io ties a crate's trusted publisher to a workflow file and environment and the SDK's is already registered: sdk-publish-rust.yml takes a `package` choice (maple-sdk by default, maple-proxy), and the publish scripts and builder accept the proxy crate. After a stable release, proxy-publish.yml's new `crate` job starts that publisher for the release's proxy version when crates.io lacks it and master's proxy inputs still match the release. The run still waits for sdk-crates approval, and the job itself holds no registry credential. Co-Authored-By: Claude <noreply@anthropic.com>
The handoff now compares the files the crate is packed from instead of the container inputs, so an in-tree SDK or Dockerfile change after a release no longer blocks a crate it cannot affect. Each crate gets its own concurrency group, so a proxy run waiting for approval does not hold back an SDK publication. The job script is tested case by case with stand-in tools, and the name checks are tested with archives and inventories that differ only in the crate name. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
maple-proxycrate has no publisher: crates.io stopped at 0.3.2 (August, a hand upload), which is Transport V1 and can no longer connect. This gives the crate the SDK's publisher and makes each Maple release queue it.Why the Rust SDK's workflow
crates.io ties a crate's trusted publisher to a repository, a workflow file name and an environment.
maple-sdkalready trustssdk-publish-rust.ymlundersdk-crates, and a token issued to that identity covers every crate that lists it. Keeping the proxy crate in the same file means its crates.io entry is the same three values, and the same reviewer gate and hardened upload path apply.Changes
sdk-publish-rust.ymltakes apackagechoice:maple-sdk(default, so existing dispatches andjust publish-cargobehave as before) ormaple-proxy. The choice is mapped to two fixed values inenv; it never reaches a script as text. Each crate has its own concurrency group.scripts/ci/sdk_publish.pylearns aproxykind:proxy/Cargo.toml, archive prefixmaple-proxy-X.Y.Z,path_in_vcsproxy, its own registry inventory. It must run from the Rust workflow, like the SDK.scripts/ci/sdk_crates_upload.pytakes--package(two allowed names, SDK by default).scripts/ci/build-sdk-publish.sh proxyruns the proxy lane's checks in the proxy's own Nix shell, thencargo package, which verifies the packed crate againstmaple-sdkfrom crates.io.proxy-publish.ymlgets acratejob afterfinalize. It starts the publisher for the release's proxy version when crates.io answers 404 for that version and the code the crate is packed from (proxy/src,examples,tests, manifest, lockfile) is the same onmasteras in the release. It hasactions: writeand nothing else: no environment, no registry credential. crates.io refuses its token exchange to aworkflow_runevent, which is why this job dispatches instead of publishing.test_proxy_crate_handoff.pyruns thecratejob's script with stand-ins forcurl,gitandghin every registry and source state;test-release-gates.shpins the job's shape. Docs:docs/sdk-publishing.md(new "Proxy crate" section), the release and proxy skills, and one sentence inproxy/README.md.Decisions for review
master, not from the release tag. The SDK workflow only runs onmaster, andsdk-cratesonly deploys from it. Thecratejob closes most of the gap by refusing to start the publisher when the crate's source onmasterdiffers from the release; a merge that changes it in the seconds between that check and the dispatched run's checkout would slip through and would be visible at the approval. The in-tree SDK and the Dockerfile are left out of the comparison on purpose: the crate takesmaple-sdkfrom crates.io and has no container.cratejob after a green container. Ifmasterhas moved past the release, the job fails and names the release, so someone chooses the next proxy version.sdk-crates. A proxy run left waiting does not block SDK publication, because the two crates serialize separately. While a version is missing from crates.io, each release starts another run for it.maple-sdkrequirement before that SDK version is published (as Prepare maple-sdk 5.0.0 and maple-proxy 0.5.1 for crates.io #1671 did), socargo packagefor the proxy first runs in the publisher. Adry_run=truedispatch covers it without publishing.One setting outside the repository
maple-proxy's Trusted Publishing settings on crates.io must listMaplePrivacyLabs/Maple, workflowsdk-publish-rust.yml, environmentsdk-crates(the same entrymaple-sdkhas). crates.io shows those settings only to the crate's owner, so I could not check whether the entry exists. Without it the upload is refused and nothing is published.Checks
nix flake check(therepolane): the CI script tests, workflow policy, contracts and release gates pass../scripts/ci/build-sdk-publish.sh proxylocally at58bca759: format, clippy, 41 tests, docs andcargo packagepass. The crate is byte-identical to the one packed by hand for 0.5.1 (SHA-256dc9a47d0…d2807).--validate-only) and the archive and registry checks accept that real crate; the registry check ran read-only against crates.io.Not run: either workflow (they run only from
master). Adry_run=truedispatch formaple-proxyafter merge exercises the build half. Thecratejob first runs for real at the next release.🤖 Generated with Claude Code