A model fuzzer: random action, key and resize sequences through update and render
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- testing-qa
Research direction
Start with cursor_never_escapes_the_listing in app/state/tests/navigation.rs and keymap::every_action() to see how actions are enumerated and driven through AppState::apply. Then read App::update, App::handle_key and App::test_app to learn how effects are returned and rendered on a TestBackend. Done means a test-only module under src/app/ that runs random action, key and resize sequences, checks the listed invariants after each step, and shrinks failures to a short replayable sequence.
Written by the indexing model from the issue text.
Description
Problem
spyc's bugs cluster where states combine: a split closed while a pager is mounted, a resize to a tiny terminal mid-prompt, a project switch with a filter on. Example tests cover the combinations someone thought of. MVU makes a broader check cheap: any sequence of inputs should leave a valid model that renders.
Where spyc stands
proptestis a dev-dependency, used in 12proptest!blocks. The nearest to a model fuzzer iscursor_never_escapes_the_listing(app/state/tests/navigation.rs): eight motions throughAppState::apply, asserting the cursor stays in range.keymap::every_action()enumerates everyAction(test-only, viastrum::EnumIter).App::updateandApp::handle_keyreturn their effects as data, andApp::test_apprenders into aTestBackendin-process.- Nothing drives arbitrary actions, keys and resizes together, or renders after each step.
Proposal
A test-only module under src/app/:
- Alphabet: any
Actionfromevery_action()with payloads drawn by proptest (counts, mark letters, project indices); aKeyEventthroughApp::handle_key, so prompts and confirms get typed into; a resize tow×h, each in1..=200. - Driver:
App::test_appon a temp dir with seeded rows. Effects are recorded and dropped, never run, so nothing touches the OS. A handler that touches the OS on its own is left out of the alphabet and listed, as a finding. - Invariants after every step: no panic; each column's cursor is in range, or 0 when empty; focus names something that exists (a mounted pager for
Focus::Pager, a pane forFocus::Pane, the right column only while it's open);prepare_*andApp::rendersucceed at the current size, 1×1 included. - Shrinking: proptest's own. A failure prints the minimal sequence as action names, and its
proptest-regressions/file is committed so it replays. - Budget: a fixed case count in
make check, a largerPROPTEST_CASESin the weeklyfuzz.ymlrun.
Acceptance
- Removing the clamp from one motion fails the fuzzer with a sequence of a few steps (watched).
- Its
make checkshare stays within about 10 seconds.
Prior art: tuios — https://tuios.dev/docs/architecture (internal/fuzz: an action alphabet, a driver and a shrinker over the real update)
- Dominant language
- Rust
- Stars
- 17
- Forks
- 2
- Avg merge
- 39m
- Merged PRs (30d)
- 413
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tripstack-Corp/spyc
-
area:agent type:fix
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Tripstack-Corp/spyc#1000 ·
Maintainers usually reply within 1 day
-
area:fs area:ui type:feat
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Tripstack-Corp/spyc#970 ·
Maintainers usually reply within 1 day
-
area:build-ci type:chore
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Tripstack-Corp/spyc#933 ·
Maintainers usually reply within 1 day
-
area:ui type:feat
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Tripstack-Corp/spyc#932 ·
Maintainers usually reply within 1 day
-
area:build-ci area:pane type:chore
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Tripstack-Corp/spyc#929 ·
Maintainers usually reply within 1 day
All issues in Tripstack-Corp/spyc
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
higress-group/HiRoute#405 ·
Maintainers usually reply within 1 day
-
rust_analyzer flycheck: no CLI way to enable clippy from `check.overrideCommand`Possibly taken @TrapsterDK claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bazelbuild/rules_rust#4392 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
🐞 bug 🧩 bevy_gantz_egui
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nannou-org/gantz#500 ·
Maintainers usually reply within 1 day