WIP: feat(test): pin test requests and results to commits #71

Draft
mooki wants to merge 2 commits from mooki/Longshot:feat/test-requests-pin-commit into main
First-time contributor

Why

A test result must identify the commit tested, rather than silently appearing to cover a later version of the pull request. This is a new adaptation of https://github.com/NotRexed/Hookshot/issues/2830 to Longshot's Forgejo test-request client, not a replay of its GitHub implementation. It remains a draft until signed-in room posting and the Discord copy are verified.

What changed

  • New requests pin a full commit SHA. Prefixes resolve through Forgejo's public commit endpoint; a non-head pin must have positive forward and zero reverse comparison counts. Divergent, malformed, unknown and unequal zero/zero answers refuse.
  • Terminal Commit: / Head: footers retain the pin and observed head. Earlier metadata-looking note lines stay notes. Claims keep their own commit/head snapshots; release, expiry, done and cancel clear them.
  • A moved head refuses an ordinary claim. Explicit --commit confirms the same existing pin; it cannot substitute a different one. Only the requester may update an open card.
  • Historical raw results remain available. current_results filters by the card's pin and drives JSON, ordering, display and already-tested refusals.
  • done records the claimed commit, refusing a different one. After expiry/release it requires an explicit full tested SHA. Its Head: is the saved claim/request observation, not a fresh reporting-time lookup.
  • Footerless cards keep the legacy behavior. Their unsupported --commit options refuse rather than silently doing nothing.
  • Existing Forgejo sign-in, room, collaborator/label approval and comment-link rules remain unchanged. No new package or game code.
  • Tester instructions retain the original review's safety requirements: verify the fetched head and pin ancestry, review the exact pinned diff, and release/stop if those checks fail. These are manual tester steps, not the original GitHub client's automatic verify command. The old GitHub full-SHA outage fallback is not carried: new request/update pin validation needs a successful Forgejo lookup.

The main client was checked again at this move's start. Its latest change is 8f7d0d37b, the Forgejo-specific client migration; the source at current main d4a69456 is byte-identical to the earlier adaptation base's client. The adaptation therefore includes today's forge tool, rather than replacing it with the old GitHub script.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
request --commit New: Resolve an explicit pin as the head or a verified ancestor Omitted: observed PR head Off by default: explicit override Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
claim --commit New: Confirm the existing pin when the head moved; cannot replace it Omitted: moved head refuses Off by default: deliberate confirmation Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
done --commit New: Record the actual tested commit; must match an active claim Active claim pin; required full SHA without one Off by default: never guess a missing build Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
update --commit New command and required flag: Requester selects a verified new pin, retaining history No update unless requested Off by default: preserve chosen pin Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
claim --again Changed meaning: Repeat a result for the same current pin, not a stale result False Off by default: only deliberate retests Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
list --json Changed output: Expose current_results separately from raw results Human-readable output without --json Off by default: machine-readable opt-in Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
show --json Changed output: Expose pin, observed head and current_results Human-readable output without --json Off by default: machine-readable opt-in Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)
request --notes Changed parsing context: Preserve note-like metadata before the reserved terminal footer No notes Off by default: optional explanatory text Linux offline checks Unrelated game/rendering behavior Live services and Windows (should help on: Same protocol on Windows)

Measurements

Branch state: on main d725b3631982ed0035ea3ac9cbe1677e9fad260c; head e673c7dddb144cb0bbad75aeae7342299c6db419; whole game-free suite on this head: 510 passed, 2 failed, 20 skipped (main d725b3631982ed0035ea3ac9cbe1677e9fad260c: 510 passed, 1 failed, 20 skipped); the commits are unchanged by rebases apart from the results table.

Known local failure in the measured suites and both suites in the branch-state block: tests/test_updater_asset_digest.py; local SDK 10.0.113 cannot resolve Microsoft.AspNetCore.App.Ref (= 10.0.13), error NU1100. This was the measured branch's only failure.

The refreshed branch suite additionally retained tests/test_display_pointer.py: FAIL line 509: reads > 0. The identical-input fixture then passed alone on both main and this branch. This is a timing-dependent observation under shared load, not a persistent baseline failure or an erased suite failure; the complete new main suite did not reproduce it. This PR remains WIP, with the suite box unticked as well as the already disclosed room/Discord integration gap.

main: d4a69456c9 (2026-11-12)
this PR: feat/test-requests-pin-commit @ 938ab23317bb301f9d0120c5a8d6d0f7af113c13

Measurement provenance: main @ d4a69456c9. 938ab23317bb301f9d0120c5a8d6d0f7af113c13, including final documentation/evidence rows.
Hardware: Core i9-13900K, 96 GB RAM, Arch Linux 7.2.15, pinned Python 3.12. No GPU or game needed.
Scene: offline request, moved-head claim and done cases using the actual main/branch client functions; authentication, room and HTTP operations are mocked and unexpected live calls fail closed.
Method: both complete queue test programs as warm-up, then the same three cases before/after/before/after, fresh HOME each time. Median passing-case count is reported, not execution speed. Full suite afterward on the exact final commit. Three separate unauthenticated public GETs check the current commit/comparison response shape; they are not a room trial.

How to reproduce: Run python -I -B tests/run_all.py test_test_requests. For the same paired negatives, load the three named PinTests cases (request_footer_and_note_lines_round_trip, claim_default_refuses_head_drift_explicit_confirms_same_pin, done_defaults_claimed_pin_and_clears_snapshots) with their production module bound to main and then this PR, retaining the fixtures' fail-closed mocks; repeat in that order. Do not invoke the live room commands for this offline check.

Main d725b3631 adds only scripts, docs and tests, with no game-code change; the measured d4a69456 comparisons and pinned game evidence remain valid and were not repeated. Original results below retain their measured commits; the new suite is recorded in the branch-state block.

Baseline: main @ d4a69456

main @ d4a69456 this PR @ 938ab233
Pair 1: central pin cases 0 passed / 3 failed / 0 errors 3 passed / 0 failed / 0 errors
Pair 2: central pin cases 0 passed / 3 failed / 0 errors 3 passed / 0 failed / 0 errors
Median passing cases 0 3
Whole game-free suite 507 passed / 2 failed / 20 skipped 509 passed / 1 failed / 20 skipped
Complete queue test programs Existing main behavior is the comparison 2 passed / 0 failed / 0 skipped
Before 1:
pin cases: 0 passed, 3 failed, 0 errors
After 1:
pin cases: 3 passed, 0 failed, 0 errors
Before 2:
pin cases: 0 passed, 3 failed, 0 errors
After 2:
pin cases: 3 passed, 0 failed, 0 errors
Focused complete programs:
2 passed, 0 failed, 0 skipped in 0 s (linux, 6 at once)
Final whole suite:
509 passed, 1 failed, 20 skipped in 216 s (linux, 6 at once)

The three baseline failures are ordinary assertions, not missing imports: main omits the request footer, accepts the moved-head claim instead of refusing it (0 != 3), and omits the done footer. The branch passes those same cases twice. tests/test_test_requests.py and tests/test_test_requests_pin.py also pass in full.

The full suite used tests/run_all.py --jobs 6 --strict, repository-default compiler and fresh HOME, on 938ab233 after the last commit. Main's suite is the shared baseline run once for this day's moved pull requests on d4a69456. These checks have not yet been run on a forge runner.

Main additionally failed two tests/test_appimage_package_retry.py timeout/sequence cases under heavy load; its requested isolated rerun passed all 9 tests. It fails only under heavy load on this PC; timing-dependent. This branch passed it. The full suites are not called all green.

The current unauthenticated API read resolved main's full d4a69456 SHA and returned total_commits: 1 for its parent→head comparison and total_commits: 0 in reverse. The offline suite separately uses retained real ancestor, identical and divergent responses plus clearly labelled synthetic error cases. Public API reads do not exercise signed-in collaborator lookup, token refresh, room events or Discord rendering.

The original GitHub implementation's 270 checks and fork checks belong to that different client. Its later head daad1350 passed the queue tests on Ubuntu and Windows but had documented unrelated whole-suite failures; the earlier d22aec74 run was green. Neither is presented as testing this Forgejo reimplementation. Its historical request-only trial also does not prove the new forge room or relay.

The complete suite was rerun after every source/documentation commit, with the default compiler and fresh HOME. The earlier measurement rows remain labelled by their actual commits. Main's suite was run once for all branches on this commit. No hosted CI or new game run is claimed.

Testing

Tested: on this PC (Arch Linux, i9-13900K; RTX 4090 with NVIDIA 615.78.08 was not used for this game-free change), both complete queue test programs, the whole game-free suite, and the same three central pin cases against main and this PR twice in interleaved order. Authentication, room and HTTP operations were mocked and unexpected live calls failed closed; three separate unauthenticated public GETs checked commit/comparison response shapes. The pointer fixture was also checked alone on both main and this branch after its retained whole-suite failure. Tested but not measured: Public unauthenticated API response shape and offline correctness were checked, not client speed, signed-in room delivery or Discord rendering.

Not tested: the explicitly listed platforms, integration and runtime cases below remain untested. This move used offline tests and public GETs only; the signed-in trial requires separately approved external writes. No cross-platform coverage is claimed.

  • Signing in, the existing authenticated collaborator lookup, token refresh or credential persistence. No credentials were read or changed.
  • Posting a real request card, claiming/renewing/releasing it, updating its pin or posting a result in the current Matrix room.
  • The Discord copy: accepting the extra footer, retaining/displaying the pinned commit, handling update, or separating old and current results. The label-generated card producer is also unverified.
  • A real PR comment/result link and the full tester checkout/build workflow. The added local head/ancestry/diff instructions are not a new automated verification command or a claimed live trial.
  • Fresh Windows execution. No native C/C++ fixture changed. No game build/run is needed for this tool-only change.

The original review explicitly left claim/result/update relay behavior open before relying on it. That integration requirement is still open here. Open as draft; offline coverage and public GETs are not a substitute for the signed-in trial.

Needs other testers:
None

Screenshots

Nothing on screen changes in this tool; retained historical pictures, if any, are not main/PR rendering comparisons.

Nothing on screen was tested: offline client output only. No Matrix or Discord screenshot is supplied or claimed.

Risk and rollback

An old client or Discord relay may ignore the new footer/update action, and a wrong pin can misdirect a test. Leave this WIP until the signed-in request/claim/update/done trial is approved and observed. Reverting the commit restores the old client; already posted pin/update events remain in room history, so do not treat a rollback as erasing those records. No game setting changes.

Reviewer notes

Start with pr_commit, pin_fields, replay, current_results, cmd_claim and cmd_done in scripts/test_requests.py, then the recorded/synthetic fixture distinction. This is a Forgejo reimplementation, not the old GitHub backend. The original reviewer's live relay requirement remains open; the tester ancestry/diff steps are manual, not an automatic verifier.

Issues

Original pull request and review history: https://github.com/NotRexed/Hookshot/issues/2830.
Original related testing discussion: https://github.com/NotRexed/Hookshot/issues/2797.
On this forge: See #90 (the recorder test that failed on Windows while this was checked; this pull request is where it was noticed, not its fix). No old GitHub number is used as a forge closing reference.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above). The refreshed suite retains the pointer-fixture failure described above.
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Flags noted, and the switch reference updated (docs/development.md, the README). Relevant command/protocol details are in the topic guide; no unrelated menu default is added.
  • A row in docs/tested-configurations.md for each measured run.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.

Moved from NotRexed/Hookshot#2830.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]

## Why A test result must identify the commit tested, rather than silently appearing to cover a later version of the pull request. **This is a new adaptation of https://github.com/NotRexed/Hookshot/issues/2830 to Longshot's Forgejo test-request client, not a replay of its GitHub implementation. It remains a draft until signed-in room posting and the Discord copy are verified.** ## What changed - New requests pin a full commit SHA. Prefixes resolve through Forgejo's public commit endpoint; a non-head pin must have positive forward and zero reverse comparison counts. Divergent, malformed, unknown and unequal zero/zero answers refuse. - Terminal `Commit:` / `Head:` footers retain the pin and observed head. Earlier metadata-looking note lines stay notes. Claims keep their own commit/head snapshots; release, expiry, done and cancel clear them. - A moved head refuses an ordinary claim. Explicit `--commit` confirms the **same** existing pin; it cannot substitute a different one. Only the requester may update an open card. - Historical raw `results` remain available. `current_results` filters by the card's pin and drives JSON, ordering, display and already-tested refusals. - `done` records the claimed commit, refusing a different one. After expiry/release it requires an explicit full tested SHA. Its `Head:` is the saved claim/request observation, **not a fresh reporting-time lookup**. - Footerless cards keep the legacy behavior. Their unsupported `--commit` options refuse rather than silently doing nothing. - Existing Forgejo sign-in, room, collaborator/label approval and comment-link rules remain unchanged. No new package or game code. - Tester instructions retain the original review's safety requirements: verify the fetched head and pin ancestry, review the exact pinned diff, and release/stop if those checks fail. These are manual tester steps, not the original GitHub client's automatic `verify` command. The old GitHub full-SHA outage fallback is not carried: new request/update pin validation needs a successful Forgejo lookup. The main client was checked again at this move's start. Its latest change is 8f7d0d37b, the Forgejo-specific client migration; the source at current main d4a69456 is byte-identical to the earlier adaptation base's client. The adaptation therefore includes today's forge tool, rather than replacing it with the old GitHub script. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | `request --commit` | New: Resolve an explicit pin as the head or a verified ancestor | Omitted: observed PR head | Off by default: explicit override | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `claim --commit` | New: Confirm the existing pin when the head moved; cannot replace it | Omitted: moved head refuses | Off by default: deliberate confirmation | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `done --commit` | New: Record the actual tested commit; must match an active claim | Active claim pin; required full SHA without one | Off by default: never guess a missing build | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `update --commit` | New command and required flag: Requester selects a verified new pin, retaining history | No update unless requested | Off by default: preserve chosen pin | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `claim --again` | Changed meaning: Repeat a result for the same current pin, not a stale result | False | Off by default: only deliberate retests | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `list --json` | Changed output: Expose current_results separately from raw results | Human-readable output without --json | Off by default: machine-readable opt-in | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `show --json` | Changed output: Expose pin, observed head and current_results | Human-readable output without --json | Off by default: machine-readable opt-in | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | | `request --notes` | Changed parsing context: Preserve note-like metadata before the reserved terminal footer | No notes | Off by default: optional explanatory text | Linux offline checks | Unrelated game/rendering behavior | Live services and Windows (should help on: Same protocol on Windows) | ## Measurements <!-- branch-state --> Branch state: on main `d725b3631982ed0035ea3ac9cbe1677e9fad260c`; head `e673c7dddb144cb0bbad75aeae7342299c6db419`; whole game-free suite on this head: `510 passed, 2 failed, 20 skipped` (main `d725b3631982ed0035ea3ac9cbe1677e9fad260c`: `510 passed, 1 failed, 20 skipped`); the commits are unchanged by rebases apart from the results table. <!-- /branch-state --> Known local failure in the measured suites and both suites in the branch-state block: `tests/test_updater_asset_digest.py`; local SDK 10.0.113 cannot resolve `Microsoft.AspNetCore.App.Ref (= 10.0.13)`, error `NU1100`. This was the measured branch's only failure. The refreshed branch suite additionally retained `tests/test_display_pointer.py`: `FAIL line 509: reads > 0`. The identical-input fixture then passed alone on both main and this branch. This is a timing-dependent observation under shared load, not a persistent baseline failure or an erased suite failure; the complete new main suite did not reproduce it. This PR remains WIP, with the suite box unticked as well as the already disclosed room/Discord integration gap. main: d4a69456c9de5131589af1fcf9a09adba4c403d1 (2026-11-12) this PR: feat/test-requests-pin-commit @ 938ab23317bb301f9d0120c5a8d6d0f7af113c13 Measurement provenance: main @ d4a69456c9de5131589af1fcf9a09adba4c403d1. 938ab23317bb301f9d0120c5a8d6d0f7af113c13, including final documentation/evidence rows. Hardware: Core i9-13900K, 96 GB RAM, Arch Linux 7.2.15, pinned Python 3.12. No GPU or game needed. Scene: offline request, moved-head claim and done cases using the actual main/branch client functions; authentication, room and HTTP operations are mocked and unexpected live calls fail closed. Method: both complete queue test programs as warm-up, then the same three cases before/after/before/after, fresh HOME each time. Median passing-case count is reported, not execution speed. Full suite afterward on the exact final commit. Three separate unauthenticated public GETs check the current commit/comparison response shape; they are not a room trial. How to reproduce: Run `python -I -B tests/run_all.py test_test_requests`. For the same paired negatives, load the three named PinTests cases (request_footer_and_note_lines_round_trip, claim_default_refuses_head_drift_explicit_confirms_same_pin, done_defaults_claimed_pin_and_clears_snapshots) with their production module bound to main and then this PR, retaining the fixtures' fail-closed mocks; repeat in that order. Do not invoke the live room commands for this offline check. Main d725b3631 adds only scripts, docs and tests, with no game-code change; the measured d4a69456 comparisons and pinned game evidence remain valid and were not repeated. Original results below retain their measured commits; the new suite is recorded in the branch-state block. Baseline: main @ d4a69456 | | main @ d4a69456 | this PR @ 938ab233 | |---|---|---| | Pair 1: central pin cases | 0 passed / 3 failed / 0 errors | 3 passed / 0 failed / 0 errors | | Pair 2: central pin cases | 0 passed / 3 failed / 0 errors | 3 passed / 0 failed / 0 errors | | Median passing cases | 0 | 3 | | Whole game-free suite | 507 passed / 2 failed / 20 skipped | 509 passed / 1 failed / 20 skipped | | Complete queue test programs | Existing main behavior is the comparison | 2 passed / 0 failed / 0 skipped | ```text Before 1: pin cases: 0 passed, 3 failed, 0 errors After 1: pin cases: 3 passed, 0 failed, 0 errors Before 2: pin cases: 0 passed, 3 failed, 0 errors After 2: pin cases: 3 passed, 0 failed, 0 errors Focused complete programs: 2 passed, 0 failed, 0 skipped in 0 s (linux, 6 at once) Final whole suite: 509 passed, 1 failed, 20 skipped in 216 s (linux, 6 at once) ``` The three baseline failures are ordinary assertions, not missing imports: main omits the request footer, accepts the moved-head claim instead of refusing it (`0 != 3`), and omits the done footer. The branch passes those same cases twice. `tests/test_test_requests.py` and `tests/test_test_requests_pin.py` also pass in full. The full suite used `tests/run_all.py --jobs 6 --strict`, repository-default compiler and fresh HOME, on **938ab233 after the last commit**. Main's suite is the shared baseline run once for this day's moved pull requests on d4a69456. These checks have not yet been run on a forge runner. Main additionally failed two `tests/test_appimage_package_retry.py` timeout/sequence cases under heavy load; its requested isolated rerun passed all 9 tests. It fails only under heavy load on this PC; timing-dependent. This branch passed it. The full suites are not called all green. The current unauthenticated API read resolved main's full d4a69456 SHA and returned `total_commits: 1` for its parent→head comparison and `total_commits: 0` in reverse. The offline suite separately uses retained real ancestor, identical and divergent responses plus clearly labelled synthetic error cases. Public API reads do **not** exercise signed-in collaborator lookup, token refresh, room events or Discord rendering. The original GitHub implementation's 270 checks and fork checks belong to that different client. Its later head daad1350 passed the queue tests on Ubuntu and Windows but had documented unrelated whole-suite failures; the earlier d22aec74 run was green. Neither is presented as testing this Forgejo reimplementation. Its historical request-only trial also does not prove the new forge room or relay. The complete suite was rerun after every source/documentation commit, with the default compiler and fresh HOME. The earlier measurement rows remain labelled by their actual commits. Main's suite was run once for all branches on this commit. No hosted CI or new game run is claimed. ## Testing **Tested:** on this PC (Arch Linux, i9-13900K; RTX 4090 with NVIDIA 615.78.08 was not used for this game-free change), both complete queue test programs, the whole game-free suite, and the same three central pin cases against main and this PR twice in interleaved order. Authentication, room and HTTP operations were mocked and unexpected live calls failed closed; three separate unauthenticated public GETs checked commit/comparison response shapes. The pointer fixture was also checked alone on both main and this branch after its retained whole-suite failure. Tested but not measured: Public unauthenticated API response shape and offline correctness were checked, not client speed, signed-in room delivery or Discord rendering. **Not tested:** the explicitly listed platforms, integration and runtime cases below remain untested. This move used offline tests and public GETs only; the signed-in trial requires separately approved external writes. No cross-platform coverage is claimed. - Signing in, the existing authenticated collaborator lookup, token refresh or credential persistence. No credentials were read or changed. - Posting a real request card, claiming/renewing/releasing it, updating its pin or posting a result in the current Matrix room. - The Discord copy: accepting the extra footer, retaining/displaying the pinned commit, handling `update`, or separating old and current results. The label-generated card producer is also unverified. - A real PR comment/result link and the full tester checkout/build workflow. The added local head/ancestry/diff instructions are not a new automated verification command or a claimed live trial. - Fresh Windows execution. No native C/C++ fixture changed. No game build/run is needed for this tool-only change. The original review explicitly left claim/result/update relay behavior open before relying on it. That integration requirement is still open here. **Open as draft; offline coverage and public GETs are not a substitute for the signed-in trial.** **Needs other testers:** None ## Screenshots Nothing on screen changes in this tool; retained historical pictures, if any, are not main/PR rendering comparisons. Nothing on screen was tested: offline client output only. No Matrix or Discord screenshot is supplied or claimed. ## Risk and rollback An old client or Discord relay may ignore the new footer/update action, and a wrong pin can misdirect a test. Leave this WIP until the signed-in request/claim/update/done trial is approved and observed. Reverting the commit restores the old client; already posted pin/update events remain in room history, so do not treat a rollback as erasing those records. No game setting changes. ## Reviewer notes Start with `pr_commit`, `pin_fields`, `replay`, `current_results`, `cmd_claim` and `cmd_done` in `scripts/test_requests.py`, then the recorded/synthetic fixture distinction. This is a Forgejo reimplementation, not the old GitHub backend. The original reviewer's live relay requirement remains open; the tester ancestry/diff steps are manual, not an automatic verifier. ## Issues Original pull request and review history: https://github.com/NotRexed/Hookshot/issues/2830. Original related testing discussion: https://github.com/NotRexed/Hookshot/issues/2797. On this forge: See #90 (the recorder test that failed on Windows while this was checked; this pull request is where it was noticed, not its fix). No old GitHub number is used as a forge closing reference. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). The refreshed suite retains the pointer-fixture failure described above. - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Flags noted, and the switch reference updated (docs/development.md, the README). Relevant command/protocol details are in the topic guide; no unrelated menu default is added. - [x] A row in `docs/tested-configurations.md` for each measured run. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. --- Moved from NotRexed/Hookshot#2830. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <[email protected]>
Re-implement the GitHub version of this change (NotRexed/Hookshot pull request #2830) for Longshot’s current Forgejo test-request client. Preserve the original author’s pin semantics while leaving the existing sign-in and approval handling untouched.

Resolve full commit IDs through the public commit endpoint and require consistent comparison results in both directions. Keep claim pin/head snapshots, explicit moved-head confirmation, requester-only updates, historical results and footerless-card compatibility. Cover the API contract with recorded public responses and offline room tests; no authenticated or live-room operation was exercised.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
docs(test): verify fetched pins before builds and record checks
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
e673c7dddb
Retain the original review requirement to compare the claimed head, check fetched ancestry and review the exact pinned diff before building. These are tester instructions, not a new automated verify command. Record the offline before/after comparisons without claiming live room or relay coverage.

Assisted-by: GPT-6 Astra

Co-Authored-By: GPT-6 Astra <[email protected]>
Author
First-time contributor

Discussion carried over from NotRexed/Hookshot#2830

Every comment that was readable on the original thread when it was copied on 2026-11-12, in order, unchanged except that issue and pull request numbers are written as links to the old repository and names carry no @. Comments by an account that has since been closed there could no longer be read and are missing; where a reply quotes them, the quote remains.


mooki000, 2026-11-12 18:01 UTC (comment, original):

Thanks for the careful read. All four points are right, and I am taking them as you ordered them:

  1. A current view in the JSON output, with both skills and claim's refusal worded in terms of it, so an agent no longer skips a card because of a result for an older commit.
  2. The pinned commit tied to the pull request: the testing skill checks that it belongs to the pull request before anything is built, reviews that commit's diff, and lets the claim go if it does not belong; and request refuses a commit outside the pull request when GitHub can tell.
  3. A moved head no longer lets an unattended claim through.
  4. The line about GitHub in the request skill, with the git rev-parse for the full hash.

The nits too: the claim's commit dropped on release and expiry, and note lines that start with Commit: or Head:.

The relay: agreed that it should not merge before the claim, result and update messages have gone through the real room. I will run them on the trial card once the fixes are pushed and ask you to look at how the relay shows them. If the card cannot be claimed without the label, I will ask you for the label on this pull request for that one trial.


mooki000, 2026-11-12 18:41 UTC (comment, original):

Thanks; each point is now addressed:

  1. 56661df6: JSON exposes current_results; both skills and claim refusals distinguish the card's pin from a moved PR head.
  2. 8652d4b8: request/update verify non-head commits with GitHub. Before building, verify checks the fetched PR ancestry and prints the pinned diff; an outside commit releases the claim. A real Git fixture covers a fetchable outside commit.
  3. 6849b187: a moved head sends no claim without explicit --commit confirmation; unattended loops must skip it. Verification also stops if the head moves after claiming.
  4. 3a8262d2: the request skill puts git rev-parse --verify "HEAD^{commit}" beside the token/outage instructions.
    Nits: 8db228ee clears commit/head snapshots when claims end; daad1350 preserves metadata-looking note lines and documents the reserved trailing footer.
    Rebased cleanly onto 4cf785a0; head daad1350. No conflicts; all seven patches unchanged in the final rebase.
    Checks: 270 offline checks pass, including the real old client. The whole Linux suite: 501 passed, 1 failed, 20 skipped; only main's known test_readme_menu_rows.py failure (missing “Skip opening”). Pre-push check: PASS.
    A full run of the project's checks on this exact head in my fork, Windows included: tests/test_test_requests.py passes on Ubuntu and Windows. Red there were only tests this branch does not touch: main's two known ones (test_readme_menu_rows.py, and on Windows test_wb_shadow_remake.py, fix in NotRexed/Hookshot#2868), plus one Windows failure of test_recorder_sync.py whose own output shows a timing-dependent negative case ("vkDestroyBuffer made without waiting ... NOT CAUGHT"); I will look at that one separately.
    The live claim/update/result trial is still pending. Could you add testing wanted to NotRexed/Hookshot#2830 for T-6BH3? I will update its old pin to the reviewed head first, then capture each relay step; no game run or unrelated PR is needed.
## Discussion carried over from NotRexed/Hookshot#2830 Every comment that was readable on [the original thread](https://github.com/NotRexed/Hookshot/pull/2830) when it was copied on 2026-11-12, in order, unchanged except that issue and pull request numbers are written as links to the old repository and names carry no @. Comments by an account that has since been closed there could no longer be read and are missing; where a reply quotes them, the quote remains. --- **mooki000**, 2026-11-12 18:01 UTC (comment, [original](https://github.com/NotRexed/Hookshot/pull/2830#issuecomment-6831709706)): Thanks for the careful read. All four points are right, and I am taking them as you ordered them: 1. **A `current` view in the JSON output**, with both skills and `claim`'s refusal worded in terms of it, so an agent no longer skips a card because of a result for an older commit. 2. **The pinned commit tied to the pull request**: the testing skill checks that it belongs to the pull request before anything is built, reviews that commit's diff, and lets the claim go if it does not belong; and `request` refuses a commit outside the pull request when GitHub can tell. 3. **A moved head no longer lets an unattended claim through.** 4. **The line about GitHub** in the request skill, with the `git rev-parse` for the full hash. The nits too: the claim's commit dropped on release and expiry, and note lines that start with `Commit:` or `Head:`. **The relay:** agreed that it should not merge before the claim, result and `update` messages have gone through the real room. I will run them on the trial card once the fixes are pushed and ask you to look at how the relay shows them. If the card cannot be claimed without the label, I will ask you for the label on this pull request for that one trial. --- **mooki000**, 2026-11-12 18:41 UTC (comment, [original](https://github.com/NotRexed/Hookshot/pull/2830#issuecomment-6832639364)): Thanks; each point is now addressed: 1. `56661df6`: JSON exposes `current_results`; both skills and claim refusals distinguish the card's pin from a moved PR head. 2. `8652d4b8`: request/update verify non-head commits with GitHub. Before building, `verify` checks the fetched PR ancestry and prints the pinned diff; an outside commit releases the claim. A real Git fixture covers a fetchable outside commit. 3. `6849b187`: a moved head sends no claim without explicit `--commit` confirmation; unattended loops must skip it. Verification also stops if the head moves after claiming. 4. `3a8262d2`: the request skill puts `git rev-parse --verify "HEAD^{commit}"` beside the token/outage instructions. Nits: `8db228ee` clears commit/head snapshots when claims end; `daad1350` preserves metadata-looking note lines and documents the reserved trailing footer. Rebased cleanly onto `4cf785a0`; head `daad1350`. No conflicts; all seven patches unchanged in the final rebase. Checks: 270 offline checks pass, including the real old client. The whole Linux suite: 501 passed, 1 failed, 20 skipped; only main's known `test_readme_menu_rows.py` failure (missing “Skip opening”). Pre-push check: PASS. A full run of the project's checks on this exact head in my fork, Windows included: `tests/test_test_requests.py` passes on Ubuntu and Windows. Red there were only tests this branch does not touch: main's two known ones (`test_readme_menu_rows.py`, and on Windows `test_wb_shadow_remake.py`, fix in [NotRexed/Hookshot#2868](https://github.com/NotRexed/Hookshot/issues/2868)), plus one Windows failure of `test_recorder_sync.py` whose own output shows a timing-dependent negative case ("vkDestroyBuffer made without waiting ... NOT CAUGHT"); I will look at that one separately. The live claim/update/result trial is still pending. Could you add `testing wanted` to [NotRexed/Hookshot#2830](https://github.com/NotRexed/Hookshot/issues/2830) for T-6BH3? I will update its old pin to the reviewed head first, then capture each relay step; no game run or unrelated PR is needed.
Author
First-time contributor

The description now has the current template's Testing section: what was tested, what was not, and why no other hardware testers are requested. It also has one block for the branch's base and suite; nothing else changed.

The description now has the current template's Testing section: what was tested, what was not, and why no other hardware testers are requested. It also has one block for the branch's base and suite; nothing else changed.
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
This pull request has changes conflicting with the target branch.
  • docs/tested-configurations.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/test-requests-pin-commit:mooki-feat/test-requests-pin-commit'
git switch 'mooki-feat/test-requests-pin-commit'
Sign in to join this conversation.
No description provided.