WIP: fix(forge): show issue attachments in view #300
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!300
Loading…
Reference in a new issue
No description provided.
Delete branch "monsterlag/Longshot:fix/forge-issue-attachments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Contributors reading an issue through
forge.py issue viewcannot see its attached diagnostic logs. The issue API already returns their names and links, but the CLI drops them, so a report can appear to have no log even when one is attached.What changed
scripts/forge.py,cmd_issue: list the issue's existing attachment metadata after its body and before optional comments. Include the name, byte size and download link; make no additional request.tests/test_forge_pr.py: five game-free cases cover multiple/zero-byte files, unchanged no-attachment output, comments and exact request counts, display-control escaping and Unicode names in a cp1252 pipe. Existing network guards remain active.docs/forge.md: document the output. Names are JSON-quoted, including Unicode escapes, so the added rows stay lossless in Windows pipes; URL control characters are escaped too.Flags and settings
None.
Measurements
main:
514591a30d(2026-11-13)this PR: fix/forge-issue-attachments @
d39f01dd9dHardware: Ryzen 7 9800X3D, 96 GiB RAM, Windows 11 build 26300, native Python 3.14.7. No GPU used by this check.
Scene: five authored CLI cases with a mocked API; live issue 278 for metadata-only verification. No game scene.
Method: two sequential interleaved main/PR runs of the same five new regression cases, then two interleaved live CLI pairs on the same PC. Tests ran against the exact source files committed here. Live calls use
-X utf8for the existing title/body encoding problem covered by PR120; the new rows independently pass a cp1252-pipe case.How to reproduce: run the five
PR.test_issue_view_*methods intests/test_forge_pr.py; for main, use the same new tests with main'sscripts/forge.py. Runpython -X utf8 -I -B scripts/forge.py issue view 278on both checkouts. The command reads issue metadata, never attachment content.514591a3d39f01ddThose live sizes/links were observed on 2026-11-13. No speed improvement is claimed.
The new tests assert one issue GET without comments and the existing second GET when comments are requested;
the network guards reject any attempt to fetch attachment content.
Testing
Tested: native Windows focused CLI group; the two regression and live pairs above; independent read-only review. Full
python -I -B tests/run_all.py --jobs 8: 497 passed, 3 failed, 33 skipped in 137 s. The three failing check groups also fail on untouched main514591a3in a fresh focused run:test_check_third_party.py(ignored-file handling, PR80/255),test_release.py(Windows fixtures, PR119/145/255) andtest_menu_i18n.py(stale Debug-tools help, PR273/255). No assertion was weakened and no skip was added.git diff --checkpasses.Not tested: live CLI on Linux/macOS. This metadata-only CLI change does not run in the game. Attachment content and access permissions were not tested or changed: the separate download route returned HTTP403 during triage, and was stopped. PR/comment attachment listings and the pre-existing title/body encoding defect are outside this diff.
Needs other testers: None for this metadata display fix.
Screenshots
The CLI output is shown in Measurements.
Risk and rollback
The visible change is an extra section on issues with attachments; names use JSON quoting so control characters cannot add terminal rows. No attachment request, upload or execution is introduced. Reverting this commit restores the old display.
Reviewer notes
Coordination: this PR is WIP because PR298 implements the same issue listing and adds comment attachments. Do not merge both unchanged. PR298 has a requested-changes review for reproduced cp1252/control-output gaps; the safe formatter and regression coverage here are available for consolidation. Keep this branch/evidence until an equivalent replacement is verified. The measurements below still describe unchanged commit
d39f01dd.Start at
cmd_issue. The new rows come from the same issue GET already used by this command. The tests assert its exact calls and keep the existing no-network guards. This is separate from PR254's picture uploads and PR120's output-stream setup.Issues
Fixes #289
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.WIP: fix(forge): show issue attachments in viewto fix(forge): show issue attachments in viewfix(forge): show issue attachments in viewto WIP: fix(forge): show issue attachments in viewReturned to WIP to consolidate overlapping issue289 work into broader PR298 once its reproduced Unicode-pipe/control-output gaps are fixed (review15190). My branch
d39f01ddand its regression evidence remain available; do not merge both unchanged. No code or measurements changed.d39f01dd9d8a96a604c9Rebased onto
main@7bacf846. One conflict intests/test_forge_pr.py(mainaddedtest_view_into_a_cp1252_pipewhere this PR adds the issue-attachment tests): kept both. No tests were run here; the test boxes stay yours.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.