Skip to content

Express requirements as carets, and take ps-reclaim 0.1.1 - #85

Closed
pathscale wants to merge 1 commit into
masterfrom
deps/caret-not-locked
Closed

Express requirements as carets, and take ps-reclaim 0.1.1#85
pathscale wants to merge 1 commit into
masterfrom
deps/caret-not-locked

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Every = requirement in Cargo.toml becomes a caret, ps-reclaim moves to the
release that fixes two use-after-free windows, and the version goes to
1.0.0-beta.17.

Requirements

dependency before after
data_bucket "=0.5.5" "0.5.5"
indexset (WorkTablesIndex) "=0.0.9" "0.0.9"
vanilla_indexset (indexset) "=0.15.0" "0.15.0"
worktable_codegen "=1.0.0-beta.15" "1.0.0-beta.15"
ps-reclaim "0.1.0" "0.1.1"

Two of these are worth being precise about.

ps-reclaim was never locked. A bare "0.1.0" is already ^0.1.0, so
>=0.1.0, <0.2.0, and 0.1.1 satisfies it: beta.16 picks up the fix on any
fresh resolve without this change. The bump raises the floor above the version
with the Send guard, so a resolve cannot land on it at all. That is the
reason to change the line, not the caret.

Caret on a 0.0.x version buys nothing. ^0.0.9 means >=0.0.9, <0.0.10,
which is the same set =0.0.9 describes. WorkTablesIndex needs a 0.1.0
release before the requirement can widen. The = is gone either way, so the
file no longer implies a constraint it is not expressing.

worktable_codegen is the one that carries risk. The exact pin was
enforcing lockstep between the macro and the runtime it generates calls into,
and ^1.0.0-beta.15 now admits beta.16, beta.17 and 1.0.0. A mismatched pair
fails at expansion rather than at resolve, so it will be a compile error in a
consumer rather than a resolver conflict here. Changed as asked; noted once.

ps-reclaim 0.1.1

Published, and pathscale/ps-reclaim now has CI (build, test, doctests, fmt,
clippy, Miri under strict provenance, and publish from master) where it
previously had no workflows at all. 0.1.1 fixes:

  • Guard was Send while its own documentation said it was not, so dropping a
    sent guard stored NO_DOMAIN into the originating thread's pin slot and
    decremented the wrong thread's DEPTH. It is now !Send by construction,
    held by a compile_fail doctest.
  • Guard was three words against crossbeam-epoch's one. partition_ref
    returns one per lookup, so it paid the size on every call. It is now one word.

docs/TODO.md

The two items that were listed as blocking beta.16 and did not stop it are
moved to a "Closed, and how" section: the ps-reclaim publish, and CI having
never run on that branch. What remains blocking is re-measuring the partition
regression on a quiet machine, now against 0.1.1 rather than against the guard
size that 0.1.1 removes, and deciding whether to yank ps-reclaim 0.1.0 and
beta.16.

The file also now says explicitly not to use the second set of partition_ref
numbers that circulated during the beta.16 release. They were taken before
673869c showed the benchmark arm labelled pinned_get was calling
partition_ref, they were taken under load, and they disagree with the
interleaved run by roughly a factor of two on beta.15. Neither set has been
reproduced on a quiet box.

Verification

cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace --all-targets all clean locally against
ps-reclaim 0.1.1 resolved from the registry. Cargo.lock is gitignored here,
so CI resolves fresh.

Merging cuts 1.0.0-beta.17, since the publish job releases whatever version
master carries. The perf item above is open at merge time.

Four dependencies carried `=` requirements: `data_bucket`, `WorkTablesIndex`,
`indexset` and `worktable_codegen`. None of them needs to.

`ps-reclaim` is the exception that was never locked. A bare `"0.1.0"` already
means `^0.1.0`, so beta.16 picks up 0.1.1 on any fresh resolve. It moves to
`"0.1.1"` to raise the floor above the version whose `Guard` was `Send`, which
is a soundness bound rather than a lock: a resolve cannot land on the version
with the use-after-free window at all.

Caret on a `0.0.x` version describes the same set as `=`, so widening
`WorkTablesIndex` changes nothing until that crate reaches 0.1.0. Removing the
`=` still matters: the file stops implying a constraint it is not expressing.

`worktable_codegen` is the one that gives something up. The exact pin held the
macro and the runtime it generates calls into in lockstep, and a caret admits
later betas. A mismatched pair fails at expansion in a consumer rather than as
a resolver conflict here.

`docs/TODO.md` moves the two items that were listed as blocking beta.16, and
did not stop it, into a section recording how they closed. Re-measuring the
partition regression stays open, now against 0.1.1 rather than against the
guard size 0.1.1 removes, and the file says plainly which set of `partition_ref`
numbers not to reuse and why.
@pathscale pathscale mentioned this pull request Sep 2, 2026
@pathscale

Copy link
Copy Markdown
Owner Author

Superseded by #87, which carries this commit rebased onto master. One change on top: the two intra-workspace pins (worktable_codegen, and now worktable_dsl) go back to =, for the reason this PR's own description gave. External requirements stay carets.

@pathscale pathscale closed this Sep 2, 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.

1 participant