pr_runtime: group Go subtest failures under parents - #127
Open
punithk-verse wants to merge 2 commits into
Open
punithk-verse wants to merge 2 commits into
punithk-verse wants to merge 2 commits into
Conversation
KNambiarDJsc
left a comment
Contributor
There was a problem hiding this comment.
Reviewed and tested 0b02021:
- Unit tests:
tests/test_pr_runtime_verifier.py: 22 passed.ruff check/ruff format --check: clean. runneris additive and keyword-defaulted (runner: str | None = None), so every existing non-Go call site keeps exactly the olduntracked_failedcomputation — verified by reading through, not just trusting the default.- Ran my own adversarial probes against
grade()directly, beyond what's in the PR:- A same-named-but-unrelated top-level test (
Foo: PASSED) doesn't falsely swallow an unrelatedBar/Foo: FAILED— the ancestor walk is exact-segment, not substring, so no accidental collapsing. - The realistic production shape — a tracked parent (
TestFeatureinfail_to_pass) with untracked failing subtests underneath — correctly suppresses the subtests fromuntracked_failedwhile still scoring the parent normally throughf2p_passed. This is the actual motivating case (subtest names aren't knowable ahead of time to put in F2P/P2P) and it holds up. - Deep nesting where only a grandparent (not the immediate parent) appears in
status_mapstill collapses correctly to the single topmost tracked ancestor. - Non-Go runner path with slash-containing test names is untouched, confirming the
runnergate isn't accidentally broad.
- A same-named-but-unrelated top-level test (
LGTM.
Collaborator
|
Thanks, tested this and found one case to fix before merging: a failed child is dropped whenever its parent exists, even if that parent is PASSED. This can happen when two Go packages use the same test name. Please only group under an ancestor that actually records the failure, and add a regression test. The graded reward is unchanged, but we shouldn't lose the failure from the diagnostics. |
Author
|
Implemented in commit
|
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.
summary
untracked_failed.Test plan
uv run pytest -q tests/test_pr_runtime_verifier.py— 22 passeduv run ruff check src/repo2rlenv/pipelines/_pr_runtime_verifier.py tests/test_pr_runtime_verifier.pygit diff --checkOut of scope