fix(forge): show formal reviews and inline feedback in view #310

Open
monsterlag wants to merge 4 commits from monsterlag/Longshot:fix/forge-review-feedback into main
Contributor

Why

Contributors following review feedback with forge.py pr view --comments cannot see formal review summaries or inline comments. A requested-changes verdict can appear in status while its actual explanation is missing from the documented reading command.

What changed

  • scripts/forge.py: include submitted review verdicts, summaries and inline feedback with the existing optional discussion output. Print the review commit and thread links, mark dismissed/stale reviews and resolved threads, and preserve the API's supplied file positions.
  • Page all three feeds, deduplicate by the appropriate review/comment identifiers and URLs, and stop when a page adds no new IDs. The last condition matters on the current server: its issue-comment and inline endpoints repeat the same entries when page changes. Drafts and unanswered review requests are omitted.
  • tests/test_forge_pr.py: eight CLI regression methods cover the output, overlapping APIs and ID namespaces, state filtering, original/resolved locations, server caps of 20/50, ignored page parameters, unchanged default output and explicit API failure. Existing network guards remain active.
  • Four docs/tested/ files record the current CPU-only regression runs.
  • docs/forge.md: document the added feedback and pagination behavior. Issue view and review posting are unchanged.

Flags and settings

None. The existing --comments option includes the additional feedback; default view output is unchanged.

Measurements

main: 9c9d69ed09 (2026-11-14)
this PR: fix/forge-review-feedback @ 4aa011a1e6
Hardware: Ryzen 7 9800X3D, 96 GiB RAM, Windows 11 build 26300, native Python 3.14.7. No GPU used by this check.
Scene: authored, network-guarded CLI cases and live metadata from PR277. No game scene.
Method: focused check as warm-up; two sequential interleaved main/PR runs of the same eight new regression methods, then two interleaved live CLI pairs. Live calls now use ordinary Windows piped output without -X utf8: main includes the separate stream fix from PR120. No performance improvement is claimed.
How to reproduce: run the eight PR.test_review_view_* methods in tests/test_forge_pr.py; for main, load main's scripts/forge.py with the same new tests. Run python -I -B scripts/forge.py pr view 277 --comments on both checkouts. All live calls are read-only API metadata requests; displayed HTML/attachment URLs are never opened.

Check main @ 9c9d69ed this PR @ 4aa011a1
Regression methods run, each run 8 8
Assertion/subtest failures, run 1 / run 2 9 / 9 0 / 0
Median assertion/subtest failures 9 0
Live formal review summaries, run 1 / run 2 0 / 0 2 / 2
Median formal review summaries 0 2
Live inline comments, run 1 / run 2 0 / 0 2 / 2
Median inline comments 0 2
main, each regression run: methods 8, failures 9, errors 0, skipped 0
this PR, each regression run: methods 8, failures 0, errors 0, skipped 0
main live CLI, each run: exit 0, review summaries 0, inline comments 0
this PR live CLI, each run: exit 0, review summaries 2, inline comments 2

--- review by monsterlag, 2026-11-13 19:18 (request changes, dismissed, stale), commit 1fce28d5
--- inline scripts/oot_saves.py:439
--- inline scripts/oot_saves.py:444
--- review by monsterlag, 2026-11-13 20:47 (approved), commit 6ea909e4

The live summaries/positions were observed on 2026-11-14. The failing-assertion count includes pagination subtests, so it can exceed the number of methods.

Testing

Tested: native Windows focused CLI check; two fresh interleaved eight-method regression pairs on main9c9d69ed and the carried PR (9 assertion/subtest failures on main, zero here, errors/skips0); two live metadata-only PR277 pairs (main0/0 formal/inline, here2/2, all exits0); independent read-only review. Full python -I -B tests/run_all.py --jobs 8 on d00ff970: 533 passed, 3 failed, 34 skipped in 257s. The same three groups fail on untouched main9c9d69ed in fresh focused checks: test_oot_state_tap.py (Windows bridge connection race, issue481), test_tested_configurations.py (authored stream newline assumption, issue482), and test_walk_key.py (missing stand-in after the Skip-title merge, already claimed by mooki). No assertion was weakened and no skip was added.

The final head 4aa011a1 adds only the four measured-run records after that suite; production/test files match the measured tree. The repository-fragment validation passes after those records, and git diff --check passes. History was preserved by merging the frozen main rather than rewriting published commits.

Not tested: live CLI on Linux/macOS, unpublished drafts on the server, concurrent API mutations or every Forgejo version. State/overlap fixtures remain guarded; live verification used submitted reviews. File positions are supplied by the API, not an inferred diff-side mapping. This change does not run in the game.

Needs other testers: None for this read-only CLI fix.

Screenshots

CLI output is shown in Measurements. Nothing in the game changes.

Risk and rollback

--comments makes additional read-only metadata requests and shows grouped review feedback after ordinary discussion. An API error is reported as a failed command rather than silently omitting reviews. Reverting this commit restores the old display. No review posting, authentication, game data or attachment handling changes.

Reviewer notes

Start at api_pages and show_pr_comments. Review IDs are distinct from issue-comment IDs; only inline IDs and supplied URLs suppress overlapping discussion entries. The pagination fixture exercises both real-world server behaviors: clamped page size and ignored page number. Main now includes PR120's output-stream setup; this change remains separate from the attachment listings in PR298/300.

Issues

Fixes #301

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).
  • 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

  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md; no appended row or assembled view).
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • 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.
## Why Contributors following review feedback with `forge.py pr view --comments` cannot see formal review summaries or inline comments. A requested-changes verdict can appear in status while its actual explanation is missing from the documented reading command. ## What changed - `scripts/forge.py`: include submitted review verdicts, summaries and inline feedback with the existing optional discussion output. Print the review commit and thread links, mark dismissed/stale reviews and resolved threads, and preserve the API's supplied file positions. - Page all three feeds, deduplicate by the appropriate review/comment identifiers and URLs, and stop when a page adds no new IDs. The last condition matters on the current server: its issue-comment and inline endpoints repeat the same entries when page changes. Drafts and unanswered review requests are omitted. - `tests/test_forge_pr.py`: eight CLI regression methods cover the output, overlapping APIs and ID namespaces, state filtering, original/resolved locations, server caps of 20/50, ignored page parameters, unchanged default output and explicit API failure. Existing network guards remain active. - Four `docs/tested/` files record the current CPU-only regression runs. - `docs/forge.md`: document the added feedback and pagination behavior. Issue view and review posting are unchanged. ## Flags and settings None. The existing `--comments` option includes the additional feedback; default view output is unchanged. ## Measurements main: 9c9d69ed09e2c24965d35f1696aa5c8dd8fe6e40 (2026-11-14) this PR: fix/forge-review-feedback @ 4aa011a1e6469dcd36cfb46641df79a5071ad28e Hardware: Ryzen 7 9800X3D, 96 GiB RAM, Windows 11 build 26300, native Python 3.14.7. No GPU used by this check. Scene: authored, network-guarded CLI cases and live metadata from PR277. No game scene. Method: focused check as warm-up; two sequential interleaved main/PR runs of the same eight new regression methods, then two interleaved live CLI pairs. Live calls now use ordinary Windows piped output without `-X utf8`: main includes the separate stream fix from PR120. No performance improvement is claimed. How to reproduce: run the eight `PR.test_review_view_*` methods in `tests/test_forge_pr.py`; for main, load main's `scripts/forge.py` with the same new tests. Run `python -I -B scripts/forge.py pr view 277 --comments` on both checkouts. All live calls are read-only API metadata requests; displayed HTML/attachment URLs are never opened. | Check | main @ 9c9d69ed | this PR @ 4aa011a1 | |---|---|---| | Regression methods run, each run | 8 | 8 | | Assertion/subtest failures, run 1 / run 2 | 9 / 9 | 0 / 0 | | Median assertion/subtest failures | 9 | 0 | | Live formal review summaries, run 1 / run 2 | 0 / 0 | 2 / 2 | | Median formal review summaries | 0 | 2 | | Live inline comments, run 1 / run 2 | 0 / 0 | 2 / 2 | | Median inline comments | 0 | 2 | ```text main, each regression run: methods 8, failures 9, errors 0, skipped 0 this PR, each regression run: methods 8, failures 0, errors 0, skipped 0 main live CLI, each run: exit 0, review summaries 0, inline comments 0 this PR live CLI, each run: exit 0, review summaries 2, inline comments 2 --- review by monsterlag, 2026-11-13 19:18 (request changes, dismissed, stale), commit 1fce28d5 --- inline scripts/oot_saves.py:439 --- inline scripts/oot_saves.py:444 --- review by monsterlag, 2026-11-13 20:47 (approved), commit 6ea909e4 ``` The live summaries/positions were observed on 2026-11-14. The failing-assertion count includes pagination subtests, so it can exceed the number of methods. ## Testing **Tested:** native Windows focused CLI check; two fresh interleaved eight-method regression pairs on main9c9d69ed and the carried PR (9 assertion/subtest failures on main, zero here, errors/skips0); two live metadata-only PR277 pairs (main0/0 formal/inline, here2/2, all exits0); independent read-only review. Full `python -I -B tests/run_all.py --jobs 8` on d00ff970: **533 passed, 3 failed, 34 skipped in 257s**. The same three groups fail on untouched main9c9d69ed in fresh focused checks: `test_oot_state_tap.py` (Windows bridge connection race, issue481), `test_tested_configurations.py` (authored stream newline assumption, issue482), and `test_walk_key.py` (missing stand-in after the Skip-title merge, already claimed by mooki). No assertion was weakened and no skip was added. The final head 4aa011a1 adds only the four measured-run records after that suite; production/test files match the measured tree. The repository-fragment validation passes after those records, and `git diff --check` passes. History was preserved by merging the frozen main rather than rewriting published commits. **Not tested:** live CLI on Linux/macOS, unpublished drafts on the server, concurrent API mutations or every Forgejo version. State/overlap fixtures remain guarded; live verification used submitted reviews. File positions are supplied by the API, not an inferred diff-side mapping. This change does not run in the game. **Needs other testers:** None for this read-only CLI fix. ## Screenshots CLI output is shown in Measurements. Nothing in the game changes. ## Risk and rollback `--comments` makes additional read-only metadata requests and shows grouped review feedback after ordinary discussion. An API error is reported as a failed command rather than silently omitting reviews. Reverting this commit restores the old display. No review posting, authentication, game data or attachment handling changes. ## Reviewer notes Start at `api_pages` and `show_pr_comments`. Review IDs are distinct from issue-comment IDs; only inline IDs and supplied URLs suppress overlapping discussion entries. The pagination fixture exercises both real-world server behaviors: clamped page size and ignored page number. Main now includes PR120's output-stream setup; this change remains separate from the attachment listings in PR298/300. ## Issues Fixes #301 ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named 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] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`; no appended row or assembled view). - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [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.
fix(forge): show formal reviews and inline feedback in view
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
afc74a1f89
Read submitted review feedback alongside optional PR discussion, keeping
review and comment IDs separate and default view output unchanged.
Stop pagination on repeated IDs as well as empty responses because some
current server endpoints ignore the page argument.

Add guarded CLI regressions for review state, overlap, locations, capped
and ignored pagination, default output and API failures. Document it.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
monsterlag changed title from WIP: fix(forge): show formal reviews and inline feedback in view to fix(forge): show formal reviews and inline feedback in view 2026-11-13 21:18:23 +00:00
Carry the focused review-reader change onto 9c9d69ed and include the
separate UTF-8 output-stream fix merged upstream. Preserve published
history and refresh regression/live evidence on the resulting tree.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
docs(tested): record current game-free regression comparisons
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
4aa011a1e6
Keep each measured native regression run self-contained under docs/tested
using the current contribution format. These are CPU-only tool checks;
they make no gameplay, GPU compatibility or performance claim.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
Author
Contributor

Merged main9c9d69ed without rewriting published history and refreshed two native regression/live pairs. Full suite533pass/3main-baseline-fail/34skip; the three Windows check failures are named with fresh main reproductions. Final record-only commit adds four CPU-only run files; fragment validation passes. Live output now works without the old UTF8 override because PR120 is on main.

Merged main9c9d69ed without rewriting published history and refreshed two native regression/live pairs. Full suite533pass/3main-baseline-fail/34skip; the three Windows check failures are named with fresh main reproductions. Final record-only commit adds four CPU-only run files; fragment validation passes. Live output now works without the old UTF8 override because PR120 is on main.
chore: moved to MagicBeanDev/Tooling (MagicBeanDev/Tooling#5)
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 4s
CI / Conventional Commit title (pull_request) Failing after 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
Third-party parts / As their notes say (pull_request) Successful in 9s
37a2cb0ab0
scripts/forge.py, tests/test_forge_pr.py and docs/forge.md now live in MagicBeanDev/Tooling; this PR's change to them is ported there. Restored to the base this branch was merged from.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner

The change to scripts/forge.py, tests/test_forge_pr.py and docs/forge.md has moved to the team's new shared Tooling repo: MagicBeanDev/Tooling#5 (ported from this PR, credited to monsterlag). forge.py moved there in MagicBeanDev/Tooling#1, and #915 deletes those files from Longshot, so a change here would be lost or conflict.

I added one commit on top of this branch (history untouched) restoring those three files to the base this branch was merged from. What is left here is the four docs/tested/ run records, which describe that forge change and may need rewording or moving.

No tests were run here or for the port.

The change to `scripts/forge.py`, `tests/test_forge_pr.py` and `docs/forge.md` has moved to the team's new shared Tooling repo: https://git.magicbean.dev/MagicBeanDev/Tooling/pulls/5 (ported from this PR, credited to monsterlag). forge.py moved there in https://git.magicbean.dev/MagicBeanDev/Tooling/pulls/1, and https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/915 deletes those files from Longshot, so a change here would be lost or conflict. I added one commit on top of this branch (history untouched) restoring those three files to the base this branch was merged from. What is left here is the four `docs/tested/` run records, which describe that forge change and may need rewording or moving. No tests were run here or for the port.
Owner

Update: #915 has merged, so those three files no longer exist as they were on main (a forwarding scripts/forge.py only). The commit I pushed restored them to the base this branch was merged from (9c9d69ed), so this PR no longer touches them. Please rebase (or merge) onto current main so they resolve as deletions on your side. No tests were run here.

Update: https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/915 has merged, so those three files no longer exist as they were on main (a forwarding scripts/forge.py only). The commit I pushed restored them to the base this branch was merged from (9c9d69ed), so this PR no longer touches them. Please rebase (or merge) onto current main so they resolve as deletions on your side. No tests were run here.
Member

Code-only review of 37a2cb0ab0; informational findings, with final approval left to another reviewer.

No new defect found in the remaining four historical run records. The current diff adds 12 documentation lines and no executable changes; each record identifies its original measured commit, CPU-only scope and distinct run, without claiming gameplay or performance results.

I independently checked the migration noted in the earlier comment: Tooling PR 5 is now merged, and the shared CLI contains the review/inline-feedback display. This Longshot PR therefore preserves evidence only; it does not deliver another CLI fix. The existing decision about retaining or relocating those records remains with the author/maintainer.

Read the complete remaining diff, the run-fragment format, prior discussion and current forwarding/shared CLI paths. The reported Windows fixture results are historical author evidence, not rerun here. No tests, builds or game runs performed.

Code-only review of 37a2cb0ab03ab4a81fd9ea911c9d7c0c3107d353; informational findings, with final approval left to another reviewer. No new defect found in the remaining four historical run records. The current diff adds 12 documentation lines and no executable changes; each record identifies its original measured commit, CPU-only scope and distinct run, without claiming gameplay or performance results. I independently checked the migration noted in [the earlier comment](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/310#issuecomment-29528): [Tooling PR 5](https://git.magicbean.dev/MagicBeanDev/Tooling/pulls/5) is now merged, and the shared CLI contains the review/inline-feedback display. This Longshot PR therefore preserves evidence only; it does not deliver another CLI fix. The existing decision about retaining or relocating those records remains with the author/maintainer. Read the complete remaining diff, the run-fragment format, prior discussion and current forwarding/shared CLI paths. The reported Windows fixture results are historical author evidence, not rerun here. No tests, builds or game runs performed.
TrashPanda left a comment

The review display this pull request describes is already in the shared tooling, and what is left here is four run records. Please do not merge it as it stands.

Head 37a2cb0a adds only docs/tested/ rows. It does not change scripts/forge.py, tests/test_forge_pr.py or docs/forge.md. Those moved with the script, and MagicBeanDev/Tooling#5 is merged with the same fix. #301 is still open.

The description still says this pull request changes scripts/forge.py and that it fixes #301. Merging it would close that issue from a documentation-only diff, and would record a Longshot script change that is no longer in this tree.

Close this pull request, and close #301 against the merged Tooling pull request. If the four run records should stay in Longshot, rewrite the description so it does not claim the script change and does not say Fixes #301.

The review display this pull request describes is already in the shared tooling, and what is left here is four run records. Please do not merge it as it stands. Head `37a2cb0a` adds only `docs/tested/` rows. It does not change `scripts/forge.py`, `tests/test_forge_pr.py` or `docs/forge.md`. Those moved with the script, and https://git.magicbean.dev/MagicBeanDev/Tooling/pulls/5 is merged with the same fix. https://git.magicbean.dev/MagicBeanDev/Longshot/issues/301 is still open. The description still says this pull request changes `scripts/forge.py` and that it fixes #301. Merging it would close that issue from a documentation-only diff, and would record a Longshot script change that is no longer in this tree. Close this pull request, and close #301 against the merged Tooling pull request. If the four run records should stay in Longshot, rewrite the description so it does not claim the script change and does not say `Fixes #301`.
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 4s
CI / Conventional Commit title (pull_request) Failing after 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
Third-party parts / As their notes say (pull_request) Successful in 9s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/forge-review-feedback:monsterlag-fix/forge-review-feedback'
git switch 'monsterlag-fix/forge-review-feedback'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!310
No description provided.