Repository navigation
Conversation
The seven forks in vendor/ were uploaded to crates.io on 2026-11-23, from 06ad5e2: xray-quinn-proto 0.11.1900 xray-quinn 0.11.1200 xray-h3 0.0.800 xray-h3-quinn 0.0.1000 xray-h2 0.4.2000 xray-smoltcp 0.14.0 xray-gotatun 0.9.100 The workspace builds them from vendor/, by path. A crate published from it will take them from crates.io, by version. The two are the same code only while a copy is what was uploaded under the version in its manifest, and a crates.io version cannot be replaced. scripts/check-vendored-published.sh, new in the supply-chain job, holds that: - The version in a copy's manifest must not be yanked, and its archive, downloaded and checked against the SHA-256 recorded in the script, has to equal the copy file for file. Four files at the package root are cargo's: the published Cargo.toml.orig has to equal the copy's Cargo.toml, and .cargo_vcs_info.json, the rewritten Cargo.toml and Cargo.lock are left out. - The script's table is the list of the fork releases made from this repository, and the crates.io index has to list exactly those, with the recorded checksums. `xray-h2 = "0.4.2000"` accepts a later 0.4.x, so an upload nobody recorded would reach whoever depends on the fork; it fails the check. - A version in a manifest that is not on crates.io is a fork release that waits for its upload: reported, with a warning on the CI run, and not a failure, so the change that raises a version can be merged before the upload. The documents now say that the forks are published, how an upload is recorded, and that the files of a published fork change only with a new fork release, Cargo.lock excepted. No file under vendor/ changes.
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 seven forks in
vendor/are on crates.io. This PR records that and adds a CI check that holds each copy invendor/to its published package. No file undervendor/changes.The uploads
All seven were uploaded on 2026-11-23 from
06ad5e23e60da92c7c5e1b12a40baa71de5a05fa, the merge of the PR that named the last three. Each archive records that commit in.cargo_vcs_info.json.xray-quinn-proto9990bffafe7600ffdac6f264ae71b1afbd704a4e778c2a84440abce7d0ec8683xray-quinnfdaab5b088caebdf4ca3bd26496238fa5f15221041dcc431f38132f685d72676xray-h33b887266ea1a0267622118c7ed3ca0a19f4514e90939026f49da2bbab5393fc0xray-h3-quinn6fe202ccf3a931a7c9ac8cc41df30a64c61533bc3cdf619fe27917ee45f4c556xray-h24e75d77c0b94312d27ad422687771ee3724f24785bbc0761a65b82c95799088dxray-smoltcpdae857ff47fec9de345794a15cb1b646c998b9cc1833dc4d8b1b0e2def14d70fxray-gotatunfb11358b0aac5c3c7ecfe3473b8726ff9df0f22dc94015aeba95089d85c4f5daWhy a check
The workspace builds the forks from
vendor/, by path. A crate published from it will take them from crates.io, by version. The two are the same code only while a copy is what was uploaded under the version in its manifest, and a crates.io version cannot be replaced. Before this PR nothing noticed a copy edited without a new fork release.What
scripts/check-vendored-published.shdoesIt runs in the supply-chain job, after the packaging check, and takes about four seconds.
Cargo.toml.orighas to equal the copy'sCargo.toml, and.cargo_vcs_info.json, the rewrittenCargo.tomlandCargo.lockare left out.xray-h2as"0.4.2000"andxray-smoltcpas"0.14.0", requirements that accept a later release, so an upload nobody recorded would reach whoever depends on the fork. Such an upload fails the check.One consequence to know
From an upload until its record is merged, the check fails for every pull request: it cannot tell an upload that is not recorded yet from one nobody made.
docs/vendored-forks.mdsays to record an upload at once and how: the failing run prints the checksum the index lists.Documents
docs/vendored-forks.md: the table shows when and from which commit each fork was uploaded; the checks section describes the new script; "Publishing a fork" ends with the steps that record an upload; a published fork's files change only with a new fork release,Cargo.lockexcepted.docs/cargo-publishing.md: steps 3 and 4 of the path are done as far as publishing goes. What stands in the way of publishing the workspace is now the workspace itself, steps 5 to 7.docs/verification.mdandCHANGELOG.mdname the new check.Verification
Of the uploads, done before this PR:
vendor/apart from the four files above.xray-quinnandxray-h3-quinndiffer from their copies' manifests by the removedpathlines only.shaped-rustlsfrom crates.io by version, with the workspace's features and no paths, passescargo checkwith one copy of each.Of the script:
held 7 vendored forks to their crates.io releases; 0 wait for an upload.vendor/and the script, each changed in one way, it answers as intended. It fails on: a source line added, a manifest field changed, a file added, a file removed, a nestedCargo.tomladded, a record removed, a record with a wrong checksum, a record of a version crates.io does not list, a release in the index that is not recorded, a yanked version, an index that answers 503, an archive that answers 404. It passes on: the unchanged tree, a changedCargo.lock, a raised version (reported as waiting, with the warning whenGITHUB_ACTIONSis set), an index with two recorded releases, an index without a final newline. The states crates.io is not in were served by acurlstand-in.bash -nfor every script; the workflow parses; the script tests that readci.ymlor the changelog pass (check-release-version,check-prerelease-workflow,check-scheduled-interop-workflow,check-v05-host-hardening,test_candidate_ci,test_v07_stable_promotion); gitleaks on the staged change finds nothing.Not run locally, left to CI: everything that builds. This PR changes one script, one workflow step and documents.
The 20 cases are not committed as a test: they need the network and a stand-in for
curl, and the other vendored checks have no tests of their own either.Not in this PR
xray-h2andxray-smoltcp. The other five forks are named with=. Whether these two should be is a question for the stage that publishes the workspace; the check added here covers the gap in the meantime.🤖 Generated with Claude Code