Repository navigation
Conversation
Reuse PR approval responses to pin requests and show moved heads. Keep each claim on its chosen commit, retain results across requester updates, and record results even when GitHub cannot be reached. An explicit full commit also lets a request be posted without a head lookup. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <noreply@openai.com>
mooki000
marked this pull request as ready for review
November 12, 2026 15:38
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.
What this is for: testers and authors should be able to tell which commit a test request asks for, and whether a result covers the current pull request. This extends the queue from #2734 and #2746 without replacing its room-message format. What is measured: offline queue tests on Linux, including the old client reading new messages: 225 checks passed. The complete game-free rerun had 474 passed, 1 failed, 20 skipped; the failure is the unchanged release-script concurrency case described below. Three central tests fail against main for the missing commit tracking. The project's whole check set, both
windows-2022parts included, passed on a run on my fork before this was opened. Not measured: a live claim and result (the trial card waits for a maintainer's label), or how the Discord relay treats the added lines beyond what the trial below shows. No game or GPU is needed for this change.Refs #2797.
Problem
A request names a PR, but a PR can change while someone is building it.
On November 12, #2731's defect report named
bce3d17e. The author fixed it in309e6c35at 13:52 UTC. A test result posted at 14:43 UTC correctly named its build ofbce3d17e, but the queue had no way to distinguish that result from a test of the new head. The test remains useful evidence for its build; it is not evidence for the later fix.In
scripts/test_requests.py,cmd_requestrecorded the PR number, andreplayrecorded each result and comment link, but neither stored a commit. The existing GitHub approval response already contains the head SHA.What changed
requestreuses its one GitHub response to store the head.request --commit <sha>deliberately chooses another commit of that PR. Values must be 7–40 hexadecimal characters. A head abbreviation expands to the full head; another value is kept and called out as an explicit non-head choice. The script checks the spelling, not membership in the PR or abbreviation uniqueness. If GitHub cannot be reached, an explicit full 40-character SHA still posts, with approval and head unknown; without it, the error explains that remedy.done --commit <sha>records the actual build. Without it, the default is the commit recorded for that tester at claim time, even if the requester updated the card during the test. A result differing from the head observed at reporting time says “tested an earlier commit”. GitHub being unreachable or rate-limited never blocks recording a finished test: it writes the commit without a head and explains that the comparison was unavailable.update T-XXXX --commit <sha>is restricted to the requester and an open card. It keeps the ID, claims, results and room history. Older results stay visible with their commits, but do not satisfy the new pin or block another claim. Existing testers retain the commit they started with.listcalls the same annotation path as main, once per distinct open PR. That same answer supplies the head at no extra API cost. Waiting requests still say they need a maintainer and appear last.showchecks its one PR, andclaimalways checks approval again.done. The comment still startsTest request T-XXXX: pass|fail|mixed, followed by hardware and the commit built.No new package, shell command or platform-specific code is used by the client.
GITHUB_TOKEN, thenGH_TOKEN, remain optional. The script does not retrieve a token fromgh.Message compatibility
The original first line stays unchanged.
Commit:andHead:lines are appended after all existing lines, including request notes. For example:Old requests without these fields render exactly as before. The old client treats added request lines as notes and ignores added claim/result lines; its result URL is unchanged. The new client's per-tester commit map is separate from the old numeric claim-expiry map. An old client's result without a commit still appears, but is not credited to a known commit. Old clients ignore
updateand cannot enforce pins.The Discord relay is separate software. This repository does not build its embeds, and the relay's unknown-field handling is not documented. Loading the old client in tests proves client compatibility, not server compatibility. hckrman101, as the relay owner, should confirm that appended lines preserve the card, and that its commit display and update handling agree with the client. The guide keeps the old Discord layout and adds a separate CLI example; it does not claim the live relay already shows the new fields.
GitHub calls
For successful commands on open cards, with
Ndistinct PRs in a listing:requestlistshowclaimdonerenew,release,cancelupdateThe existing rate-limit warning remains; there are no retries. Reads still show the room record when GitHub is unavailable.
donestill posts withCommit:but noHead:and a note.requestcan also post without a successful lookup when--commitis a full 40-character SHA; otherwise it explains that a known full commit or a later retry is required. Such a card's approval stays unknown until the next successful lookup. Claiming still requires approval; the new update command requires a head check.How to try it
After the PR is pushed and approved for testing:
Build the commit printed by
claim, not whichever head a later fetch returns. Report the actual build:The requester can move the card after a fix:
Use
show T-XXXXfor a fresh single-card view orlistto refresh the queue's approval, PR state and heads together.How it was tested
Arch Linux, kernel
7.2.15-1-omarchy, Intel Core i9-13900K, Python 3.12, November 12. Base51da0464; headd22aec74. No game, GPU or window. The whole-suite receipt records load average 7.58 → 46.27; this was a correctness run, not a performance measurement. Tests used fake room/session/GitHub responses, and command tests reject unexpected HTTP calls.Focused tests and compatibility
python -I -B tests/test_test_requests.py --old-source <main-client-copy>:The old-client copy is the actual
scripts/test_requests.pyfrom main51da0464, loaded alongside the new client. It accepts the new request, claim and done, retains the exact result URL, treats the request's extra fields as notes, and ignores the unknown update action. The stored old-format card test compares its complete rendering byte-for-byte.The remaining cases cover approval and merged-PR refusals, claim renewal/expiry, explicit and default commits, malformed hex/lengths, upper-case and abbreviated commits, a requester update during an active test, old results without commit metadata, no extra request API call, equal list-call counts against the actual main client, optional-token precedence, and GitHub outages/rate limits. Both claimed/default and explicit done commits still post without Head; requests without a known full SHA fail with the remedy, while an explicit full SHA posts and remains approval-unknown until a later lookup succeeds.
The three central tests against main
The same test file with
--source <main-client-copy> --test request_head --test moved_head --test done_commitexits 1, with ordinary assertion failures rather than a missing option or import failure:All three pass in the branch run above.
Whole game-free suite
python -I -B tests/run_all.py --jobs 8, through the local idle/core-dump wrappers, with the project's pinned dependencies:Exit 1. The queue tests and tracked-Python source compilation check passed. The one failure is
tests/test_release_scripts.py::test_nightly_two_runs_at_once_end_at_the_newer_commit, subcasefirst='A':The case name and message match the known release-script race signature. That test and
scripts/release_files.share unchanged from pinned main; this is not a current-main rerun or a green-suite claim. The failure was retained, not retried away. The pre-review revision had passed475/0/20in 158 s; that earlier result is not a substitute for this rerun. The 20 skips are the runner's existing Windows/game/GPU-only declarations; none was added here.Real-room trial
One real request, made with this branch's client (
d22aec74) for this pull request: T-6BH3.The card as this branch's client shows it (
show T-6BH3):The same card as main's client (
51da0464) lists it: everything as before, with the two new lines read as notes:The Discord relay accepted the new message. The card appeared in the test-request channel like every other one (title, "Waiting for a maintainer to add the testing wanted label", the Needs line, "Pull request: #2830", T-6BH3). It does not show the commit, as expected: the relay would need its own small change for that.
Not shown yet: a live
claim,doneandupdate. The card cannot be claimed until a maintainer adds the label, so those three ran against the test room only. @hckrman101, as the relay's owner: could you confirm the relay is happy with the extraCommit:/Head:lines on claim and result messages and with the newupdateaction before this is relied on? If it is not, the fallback in Risks (the same data in the event's content, the visible text unchanged) is what I would do.Not tested
windows-2022and passed on the fork run above); the client was not used against the live room from Windows.Risks
The behaviour changes from main are limited to:
--commit. No approval rule is relaxed.updateaction moves the pin without deleting history.doneasks GitHub once to compare heads when it can; a failed lookup is only a note and never blocks the result.Plain
listkeeps main's approval display and API-call count. The relay's owner should confirm the card rendering before rollout.update. A mixed-version queue can therefore still contain results with unknown commits; these are shown as unknown, not silently assigned a SHA.Overlaps
The overlap check found three open PRs sharing an edited file; their shared hunks were read:
docs/test-requests.md:25–40on this branch (main's line 25). It adds the hardware-runner link to “You can take part…”, immediately after this change's new CLI example. Keep both; whichever lands second rebases. Its label-gated automation enforces the exact labelled commit and checks it is still the PR head before running the test: that is the automated workflow that needs an unambiguous requested/tested commit in this queue. The conflicting hunk does not implement the queue fields.AGENTS.md; merges cleanly with the request instructions.AGENTS.md; merges cleanly with the request section.Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra noreply@openai.com