Add rstest-bdd-harness-bevy as a workspace member (0.5.1.1) - #51
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Reviewer's GuideAdds a detailed execution plan document for roadmap task 0.5.1.1 to introduce a new Sequence diagram for planned headless Bevy BDD test flowsequenceDiagram
actor Developer
participant Cargo as cargo_test
participant Rbdd as rstest_bdd
participant Harness as HarnessAdapter
participant App as bevy_app::App
Developer->>Cargo: cargo test -p rstest-bdd-harness-bevy
Cargo->>Rbdd: run minimal_app_advances_one_tick
Rbdd->>Harness: run(ScenarioRunRequest)
Harness->>App: minimal_app()
Harness-->>Rbdd: Context(App)
Rbdd->>App: App.update()
Rbdd->>App: read FrameCount
Rbdd-->>Cargo: scenario passed
Cargo-->>Developer: tests ok (headless Bevy tick proved)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
8a5f4ce to
0286437
Compare
Add `docs/execplans/0-5-1-1-add-rstest-bdd-harness-bevy-workspace-member.md`,
the approval-gated execution plan for roadmap task 0.5.1.1.
The plan is grounded in four executable probes run during planning rather
than in documentation alone:
- `rstest-bdd` 0.6.0-beta3 is published, so the roadmap's conditional
instruction to use git dependencies against `main` no longer applies;
the crate uses published caret requirements instead.
- `bevy = { version = "0.17.3", default-features = false }` compiles and
ticks a headless `MinimalPlugins` application, resolving 98 crates
against 428 for Bevy's defaults.
- The design's harness contract, including the reserved
`rstest_bdd_harness_context` fixture key, works against published
beta3.
- The planned crate shape passes `cargo clippy` and `cargo doc` under
`-D warnings` on the pinned `nightly-2026-03-26`.
Three estate-specific traps surfaced and are recorded in the plan:
`allow-expect-in-tests` does not cover `rstest-bdd` step functions in
`tests/*.rs`; `googletest`'s `expect_that!` requires `#[gtest]`; and a
single-expression `#[fixture]` body trips `unused_braces`.
The plan is DRAFT and must be approved before implementation begins.
Revise the 0.5.1.1 execplan against a six-lens design review, with each reviewer claim checked by executable probe rather than accepted. Corrected defects: - Licence was `MIT OR Apache-2.0`, copied from the validator crate; the repository `LICENSE` and every published sibling are ISC. The crate is also marked unpublishable so the incubating copy cannot claim the upstream-documented name. - The specified red state could not occur. Without the module declaration, rustc never compiles the sibling test file, so the run passed vacuously with zero tests. - The two constructors could not become `BevyProfile::configure` bodies as claimed, because `configure` mutates a borrowed application. Reshaped to `add_minimal_plugins` plus a `minimal_app` wrapper, so the carry-forward is real. - A caret on a pre-release is not a pin: it admits 0.6.0-beta4, which the plan itself documents as source-breaking. - Omitting Bevy's standard-library feature substitutes a clock that reinterprets timestamp counter ticks as nanoseconds, which would have been a trap for the fixed-tick profile at 0.5.1.4. - Feature unification is workspace-wide, so disabling default features bounds what the crate requests, not what a workspace build resolves. - The `Outcomes & retrospective` section the document's own opening paragraph requires was missing. Corrected figures: the graph is 139 crates, not 98; build cost is now measured rather than asserted; coverage is met by the unit tests, since the CI coverage action uses nextest, which does not run doctests. Two decisions the review could not settle from the repository are raised for the approval gate: the Bevy version, and whether to deviate from the caret mandate for pre-releases.
Withdraw the local `let`-binding workaround for the `rstest` fixture expansion lint in favour of `#[allow_fixture_expansion_lints]` from `skyjoust-test-macros`, added by the layer beneath this one in the stack. The workaround would have spread a bespoke idiom across every fixture the project writes rather than fixing the cause once. Renumber the harness ADR from 006 to 007; the lower layer takes 006 for the test-macro decision. Restate the extraction contract to distinguish game code, which is forbidden, from test-only tooling, which is not, and add `skyjoust-test-macros` as a development dependency. Make the boundary guard match dependency names exactly rather than by substring, and anchor the `cargo tree` acceptance pattern on the trailing space. Both changes exist because `skyjoust-test-macros` contains the substring `skyjoust`, so the guard as previously specified would have rejected a dependency the contract allows. A fourth boundary test pins that behaviour; verified against a probe where the unanchored pattern does match and the anchored one does not.
0286437 to
554ed90
Compare
Target Bevy `0.19.1`, retain exact `rstest-bdd` beta pins, and record implicit caret syntax for stable dependencies. Require fallible BDD steps to propagate errors and make the PR #6 automerge and stack rebase prerequisites explicit. Add the missing conformance and verification sections so the living plan records traceability, external assumptions, and non-vacuity checks.
Summary
Implements roadmap task
0.5.1.1: addscrates/rstest-bdd-harness-bevyas aworkspace member — a reusable, headless Bevy harness adapter for
rstest-bddbehavioural tests that stays free of Skyjoust and Lille code so it can move to
its own repository later.
What is delivered
0.19.1withdefault-features = falseand
features = ["std"], and therstest-bddfamily exactly pinned to=0.6.0-beta3.add_minimal_pluginsandminimal_app, withworked doctests; both stay public after
0.5.1.2builds the harness types.headless update tick, a 32-case frame-count property test, an
extraction-contract manifest tripwire, and an A/B-proven
include_str!rebuild guard.
dependency decisions; the design document, repository layout, developer's
guide, roadmap, and contents index are aligned with it.
All six commit gates pass (
check-fmt,check-state-graphs,markdownlint,lint,test,nixie), and a CodeRabbit--agentpass completed with zerofindings.
The five maintainer decisions executed here
0.19.1for both the harness and the future runtime, written withimplicit caret syntax.
rstest-bddfamily exactly pinned to=0.6.0-beta3until a deliberatecompatibility pass validates a later release.
StepResultand propagateRefCellborrow failures;the scenario binding contains no
.expect().rstestat0.26, matchingthe merged root after PR Bump rstest from 0.18.2 to 0.26.1 #6).
mainonce PR Bump rstest from 0.18.2 to 0.26.1 #6 automerged; this branch carriesno second
rstestline.References
docs/execplans/0-5-1-1-add-rstest-bdd-harness-bevy-workspace-member.mddocs/adr/007-in-tree-incubation-of-the-bevy-bdd-harness-crate.mddocs/rstest-bdd-harness-bevy-design.md🤖 Generated with Claude Code