Convert to a workspace, and make fault injection opt-in - #3
Merged
Conversation
The repo is a client parity harness now, not a wyrd-specific gate, and the layout
should say so. The M4 gate stops being the whole crate and becomes one suite among
the ones to come; the fixtures it happened to own get split out so a future
differential runner can use them without first agreeing to a MetadataStore.
crates/harness client-agnostic: $PD_ADDRS, PD's region layout as ground
truth, deterministic byte corpora. Nothing here knows what a
MetadataStore is.
crates/wyrd-gate the M4 evaluation gate: the vendored contract, the
TikvMetadataStore mapping, and the 18 gate tests.
Mechanical: git mv throughout so history follows, and the crate rename
(client_rust_test -> wyrd_gate) is the only source change. Behaviour is unchanged
— same tests, same verdict.
FAULT INJECTION IS NOW OPT-IN, and that is not cosmetic.
`fail` was an unconditional dev-dependency carrying features = ["failpoints"]. In a
single package that was untidy. In a workspace it is a hazard: `cargo test
--workspace` unifies `fail/failpoints` into the SAME tikv-client that a differential
runner links, compiling fault-injection machinery into the binary whose entire job
is to observe UNMODIFIED client behaviour. Compiled-in failpoints are inert until
configured, so it is contamination rather than a live bug — which is exactly the
kind of thing that quietly makes a result untrustworthy months later, when nobody
remembers why.
It is now an optional dependency behind a `failpoints` feature, off by default.
A dev-dependency cannot be optional (Cargo features cannot enable dev-deps), so
`fail` moves to [dependencies] — the same shape client-rust itself uses. The
failpoint suite declares `required-features = ["failpoints"]`, so it cannot even
build without it, and gate-verdict.sh builds ONLY that binary with the feature: the
`gate` suite observes an unmodified client.
Verified: `cargo tree -e features -i fail` reports 0 `failpoints` features in the
default build and 4 with the feature on; `cargo check --test failpoint_gate` without
it errors "requires the features: failpoints" rather than silently building. Full
`make verdict` against a real cluster is unchanged — 17 green, d6 XFAIL on its own
assertion, d7 XPASS locally (the sibling carries PR 547's fix). The region-encoding
tests now run as cluster-free lib unit tests, where before they only ran inside the
integration binary.
Also updated for the move: CODEOWNERS, README layout/paths, and the one findings
doc that cited a test path.
Contributor
Author
|
@codex review |
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.
Phase 1 of the parity-harness plan: mechanical restructure, no behaviour change. Unblocks the runners.
Why
The repo is a client parity harness now, not a wyrd-specific gate, and the layout should say so. The M4 gate stops being the whole crate and becomes one suite among the ones to come; the fixtures it happened to own are split out so a future differential runner can use them without first agreeing to a
MetadataStore.git mvthroughout, so history follows (GitHub shows the files as renames). The crate renameclient_rust_test→wyrd_gateis the only source change. Same tests, same verdict.Fault injection is now opt-in — and that is not cosmetic
failwas an unconditional dev-dependency carryingfeatures = ["failpoints"]. In a single package that was merely untidy. In a workspace it is a hazard:cargo test --workspaceunifiesfail/failpointsinto the sametikv-clientthat a differential runner links — compiling fault-injection machinery into the binary whose entire job is to observe unmodified client behaviour.Compiled-in failpoints are inert until configured, so this is contamination rather than a live bug. Which is exactly the kind of thing that quietly makes a result untrustworthy months later, when nobody remembers why it's there.
It's now an optional dependency behind a
failpointsfeature, off by default. (A dev-dependency cannot be optional — Cargo features can't enable dev-deps — sofailmoves to[dependencies], the same shape client-rust itself uses.) The failpoint suite declaresrequired-features = ["failpoints"]so it cannot even build without it, andgate-verdict.shbuilds only that binary with the feature: thegatesuite observes an unmodified client.Evidence
Full
make verdictagainst a real cluster is unchanged: 17 green,d6XFAIL on its own assertion,d7XPASS locally (the sibling checkout carries PR 547's fix; CI runs at the pin, where it XFAILs).Bonus: the region-encoding tests now run as cluster-free lib unit tests, where before they only ran inside the integration binary.
Also updated for the move:
CODEOWNERS, README layout/paths, and the one findings doc that cited a test path.Checklist
make checkgreen (workspace-wide clippy-D warnings)git mv; renames detected)🤖 Generated with Claude Code