Repository navigation
test: clear TEND_ISSUE_NUMBER before each test so triage sessions see a green suite - #1703
Merged
Merged
Conversation
A triage matrix job sets it, the sandbox inherits it, and subject_number() reads it before the event payload, so 37 shared/steps tests failed inside triage sessions while passing in CI.
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
Bumps generator version to 0.3.27 and syncs lockfile. 8 commits since 0.3.26: nightly restarts stalled CI causes and weekly restarts other unfinished issues (#1688), review-runs drains outage trackers the bot closed (#1700), nightly files unfixed reachable defects as issues (#1699), the sandbox gets its own XDG_RUNTIME_DIR (#1697), comment and test fixes (#1701, #1702, #1703), and the 0.3.26 regeneration (#1695).
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.
Inside a
tend-triagesession, 37 tests inshared/stepsfail on a clean checkout. The triage matrix job setsTEND_ISSUE_NUMBER, the sandbox inherits it, andsubject_number()reads it before the event payload. So every test that builds an event and checks which thread a step acts on gets the session's issue number instead, e.g.assert 1696 is Noneandassert 1696 == 851. This PR adds an autouse fixture to the rootconftest.pythat removes the variable before each test. The tests that exercise the matrix path set it themselves withmonkeypatch.setenv, so they keep their coverage.CI never sets the variable, so it stays green either way. The cost is in triage sessions, which run these suites while repairing an issue. AGENTS.md tells them that a failure beyond the two network-bound
test_refresh_consumers.pytests is real, so every triage run that touches the runtime either chases 37 false failures or has to work out for itself that they're spurious. Triage run 43829170062 (#1696 → #1697) did the second: it reran without its change, saw the same 37, and moved on.Verification: with
TEND_ISSUE_NUMBER=1696set,pytest shared/steps proxygives 37 failed / 289 passed before the change and 326 passed after. The full suite with the variable set fails only the two network tests (those need DNS, which the sandbox doesn't have). The pre-commit hooks pass onconftest.py.Failing tests before the change, with the variable set
shared/steps/test_common.pyshared/steps/test_issue.pyshared/steps/test_mark_notification_read.pyshared/steps/test_token_usage.py