Repository navigation
fix(quality): keep the gate verdict if the summary write fails - #237
Open
tbhb-agent wants to merge 3 commits into
Open
tbhb-agent wants to merge 3 commits into
tbhb-agent wants to merge 3 commits into
Conversation
A GITHUB_STEP_SUMMARY that cannot be written no longer ends the gate under set -e before the verdict and survivor listing; it warns on stderr. The gate test rule now inherits GITHUB_STEP_SUMMARY, which Bazel's test sandbox otherwise drops, and the stale timeout figures leave the cap comment. Generated-by: LLM effort=medium;harness=claude-code:2.1.318;model=anthropic:claude-sonnet-5-5;session=sha-256-64:f1227f050617f845;surface=sdk-cli
Generated-by: LLM effort=medium;harness=claude-code:2.1.318;model=anthropic:claude-sonnet-5-5;session=sha-256-64:f1227f050617f845;surface=sdk-cli
The summary warning's own write to stderr could end the gate before its verdict when stderr was closed. Ignore that failure, require the FAIL line in the failing summary test, say no mutant failed when none was checked, and reword the header. Generated-by: LLM effort=medium;harness=claude-code:2.1.318;model=anthropic:claude-sonnet-5-5;session=sha-256-64:06dc52093e5d8aba;surface=sdk-cli
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.
Why
mutation_gate_testappends its timeout line to$GITHUB_STEP_SUMMARY. After #233, a summary path that failed to write ended the gate before its verdict. Bazel's test sandbox also dropped the variable, so the summary got nothing.Behavior change
A failed write to the summary now prints
mutation_gate: could not write to GITHUB_STEP_SUMMARYon stderr. The gate still prints its timeout line and survivor listing, and it exits with the verdict the report deserves.mutation_gate_testnow inheritsGITHUB_STEP_SUMMARYfrom the environment. The timeout line lands in the job summary when CI sets the variable. The change also drops a comment that quoted one run's timeout figures.Decisions
RunEnvironmentInfo(inherited_environment = ...).env_inheritbelongs to native test rules, and this rule is custom.Risk
Low. The change touches the append and the environment list. Bazel keys the test's cache on the inherited value, so a new summary path reruns the gate test.
Verification
A scratch file as
GITHUB_STEP_SUMMARY, one gate test, no--test_env: before the change the file was empty, and afterward it heldmutation_gate: 5 timed out of 100 (5.0%), counted as killed.With the stderr guard removed, both new tests fail. The passing-report test exits 1 instead of 0, and the failing-report test doesn't find the stderr note.
The tests cover a missing directory only, with no read-only file. CI doesn't show whether a gate inside a real job receives the variable.
Opened-by: LLM effort=medium;harness=claude-code:2.1.322;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli
Generated-by: LLM effort=medium;harness=claude-code:2.1.318;model=anthropic:claude-sonnet-5-5;session=sha-256-64:f1227f050617f845;surface=sdk-cli
Assisted-by: LLM effort=medium;harness=claude-code:2.1.322;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli