Skip to content

add E-needs-test walkthrough - #2996

Open
jyn514 wants to merge 2 commits into
rust-lang:mainfrom
jyn514:needs-test-walkthrough
Open

add E-needs-test walkthrough#2996
jyn514 wants to merge 2 commits into
rust-lang:mainfrom
jyn514:needs-test-walkthrough

Conversation

@jyn514

@jyn514 jyn514 commented Aug 29, 2026

Copy link
Copy Markdown
Member

per #2979 (comment):

"write an RFC" is not a good first contribution; it condenses multiple months of work into what looks like a few days; and most people are working on docs, tools, or the standard library, not new language features.

add a much smaller example that serves as a good blueprint for people just getting started.

r? rustc-dev-guide

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Aug 29, 2026
@jyn514
jyn514 force-pushed the needs-test-walkthrough branch from 564b59a to 5d2e4cf Compare August 29, 2026 14:24
Comment thread src/walkthroughs/test.md
This is an especially good fit because it has an example
[directly in the issue](https://github.com/rust-lang/rust/issues/59333#issuecomment-555973113),
without needing additional work from you to minimize the bug.
Of course, it's always very helpful for you to take `E-needs-test` that *doesn't* have a minimal example and create one.

@fmease fmease Aug 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC #t-compiler > Label for "issue fixed but analysis still needed"? @ 💬

TL;DR: Q: How much work/thoroughness do we expect from authors+reviewers of PRs that try to address E-needs-test issues? Ideally ideally, they'd scour the test suite first (to avoid needless duplication), even perform a fail->pass bisection if needed, reconstruct the original root cause and add a meaningful description to the added tests. But realistically+practically speaking, the standards are much lower, and that's okay, maybe..

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they'd scour the test suite first (to avoid needless duplication), even perform a fail->pass bisection if needed, reconstruct the original root cause

do we actually expect people to do this? we have something like 19000 tests ... i think in practice if that's the bar, then people will just close their PR. (of course, LLMs are really good at this, but people have repeatedly said that they don't want beginner issues to be done by an LLM.)

anyway, i don't think we should block this walkthrough on that decision; if we want to have higher standards for E-needs-test we should document it elsewhere.

@fmease fmease Aug 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's unclear what the majority of the r-l/r people thinks. Some people have vaguely answered in the linked Zulip thread but I don't think there's official consensus.

do we actually expect people to do this? we have something like 19000 tests ..

That's why a bisection to the original PR can be super helpful as you'd only need to look at the tests added/modified in the patch to see if it's potentially duplicating (well, you might need domain knowledge to determine that correctly...). And you're not really looking at all the tests, you're most likely narrowing down the set of files by grepping for diagnostic messages, feature names, CLI flags, keywords etc. [editors note: added more things after "diagnostic messages"].

However that might be too much to expect from a complete newcomer 🤷 Fortunately, we still have a reviewer that could double-check things in a rough manner but not too thoroughly, of course, otherwise there'd be a drastic imbalance in work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're most likely narrowing down the set of files by grepping for diagnostic messages etc.

that doesn't work for check-pass tests, like the one here.

in general i think this is a very hard problem and not one we should be expecting new contributors to solve: rust-lang/rust#104939

@fmease fmease Aug 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, if the goal is to provide something that beginners can do as a first contribution, that's acceptable. I guess my other take is too idealistic.

At the bare minimum, I expect all new tests to have a description (I guess that's not too controversial): At least once sentence that's not superficial (so no "this once used to ICE, see this issue"). Otherwise, it makes it harder and harder to understand a test's intention in the future (as you alluded to by linking to rust-lang/rust#104939).

The reviewer could / should help the author here in providing such a description.

With a description, it's a lot easier for someone with limited~okay domain knowledge to re-triage the issue in the future and decide if we should yeet it or not.

By not having "any" standards, this just compounds problems like rust-lang/rust#104939 as we'd allow quantity over quality. Hmm, I guess I'm hyperbolizing.

@jyn514 jyn514 Aug 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that 104939 was not caused by a test change, it was caused by an implementation change in rustdoc. note also that the linked test already had a description, it was just wrong after the implementation change.

With a description, it's a lot easier for someone with limited~okay domain knowledge to re-triage the issue in the future and decide if we should yeet it or not.

👍 i'm happy to add "add a description" to the walkthrough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants