WIP: feat(forge): reuse an owned direct fork with a different name #640
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!640
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:feat/reuse-direct-renamed-fork-20261115"
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?
Type: feat · Risk: low · Tested on: Linux, game-free synthetic API fixtures · Needs: complete game-free suite and native Windows tests
Why
A contributor may already own a direct fork under a different repository name. The helper currently expects
<login>/Longshot; it does not discover and reuse an existing renamed direct fork, even though the rest of the fork/PR flow can use the selected repository's full name.This is a feature for that workflow, not a regression claim about the existing guard. Refusing a fork whose immediate parent is another fork is correct and remains required. An occupied unsuitable homonym does not become permission to create or select an unrelated repository.
What changed
Reuse a uniquely owned direct fork even when its repository has a different name. Incomplete or ambiguous discovery fails closed without selecting or creating a repository.
scripts/forge.py: retain the valid direct homonym fast path. Otherwise complete a bounded, paginated direct-fork listing and reuse the unique coherent fork owned by the signed-in login whose immediate parent is the main repository.tests/test_forge_pr.py: direct/renamed fork, paging, identity, refusal and caller-routing cases. The existing 32 methods are unchanged.docs/forge.md: describe direct renamed-fork reuse and refusal conditions.Selected
full_nameis retained by fork setup and branch lookup. The existing owner/branch PR head syntax is unchanged. Authentication, OAuth renewal and the login/token workflow are untouched.Settings scope: None. Existing commands learn to reuse a uniquely owned direct fork with another name. Discovery is limited to 100 pages of at most 50 rows and requires an empty terminal page; exhausting the bound is an error, not permission to create.
Measurements
Verdict: the synthetic renamed-fork case fails on the original source and passes with the feature. The complete focused test module passes 50 methods: 32 original methods and 18 new methods. The original 32-method compatibility replay is included in those 50 identities, not additional new coverage.
Hardware: Linux game-free fixtures; no GPU/driver used; CPU and RAM not reported in these receipts.
Scene: Synthetic regression/control inputs, not a game scene.
Method: Functional outcomes from the adopted receipts below, not timing benchmarks; no fabricated repetitions or medians.
How to reproduce: Replay the named focused tests described below on the pinned baseline and candidate with identical fixtures.
6c9edffe5ddb2579165fBaseline: main
6c9edffe5da1f5b5383977aeab3f544c0de25d4c. Exact source/test snapshots, before/after hashes, command/environment metadata, complete native stdout/stderr and exit codes were retained. Negative controls on the old implementation remain failures for the intended reason. Independent SPEC found an overly broad initial 404 text check; targeted RED/GREEN tests and a revised patch resolved that finding before independent QUALITY review.The final revision's misleading-HTTP503 and misleading-transport-error tests fail on the previous candidate, then pass with the corrected classifier. The genuine-404/complete-absence positive control still creates through the explicit in-memory fake.
Read-only server qualification is separate: the existing contribution fork is a direct child of the main repository; a complete direct-fork inventory and an already-existing PR's head repository were checked. This was not a new experimental PR POST, nor a claim that the modified CLI was executed live.
No gameplay or speed improvement is claimed: this is a contributor-tool workflow feature.
Flags and settings
None
Testing
Tested: Linux, standard-library game-free fixtures using explicit synthetic API responses. All 50 focused methods pass, including the unchanged original 32. Cases cover homonym fast path, later/short pages, final empty page, case-insensitive owner/parent identity with selected spelling preserved, wrong owner, intermediate parent, malformed identities/pages, repeated IDs, ambiguity, bounds, HTTP errors and selected-name caller routing. Private clean patch application reproduces all three candidate files and modes. Independent static SPEC and QUALITY completed on this exact revised patch; neither reviewer claimed a replay.
Not tested: complete
python -I -B tests/run_all.py, native Windows, a live invocation of the modified helper, or a new fork/PR creation exercise. An original upload fixture emits a retainedResourceWarningunder Python 3.14; the unchanged 32-method compatibility run reproduces it and exits 0. API POSTs appearing in fixture logs are in-memory fakes, not public writes. This remains WIP.Must be tested:
python -I -B tests/run_all.py --jobs 1, naming missing tools and baseline failures (by hand; no farm triggered), expecting the full suite to pass or each shared main failure to be named, without treating focused checks as the full suite (by hand: an equipped contributor/tester inspects diagnostics and the stated outcomes before merge; not executed by this documentation edit).tests/test_forge_pr.pyfixtures in an isolated folder, without login or real API calls, expecting the same selection/refusal and normal PR-flow results (by hand). (by hand: an equipped contributor/tester inspects diagnostics and the stated outcomes before merge; not executed by this documentation edit).Risks
What could break: users with multiple suitable direct forks now get an explicit ambiguity error instead of an arbitrary selection. Discovery needs additional read requests when the valid homonym fast path does not apply; an incomplete listing cannot authorize creation.
Turning it off: revert the commit.
Compatibility: no authentication, identity, visibility, game data, save, configuration, renderer ABI or cache changes. The HTTP status classifier intentionally depends on the current official error formatter; its regression tests should be preserved if that formatter changes.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.Readiness provenance and checklist notes
Current main in the frozen public readback is
aa95d35f3d021b27328b6d68109666a46c340aee; this PR head isdb2579165fb6b44c6aeea7146681038e203785f5. The current-main box is unchecked: historical publication/base checks are not proof of current ancestry. Current-main updating and revalidation are needed before ready, but rebase/force-push/merge are not authorized; no such operation is promised or performed. The full runner box remains unchecked; no full-suite run or Windows/host qualification is claimed by this description edit. The normal project pr ready remains blocked and must not be forced. Manual pre-merge plans are future work, not completed evidence.Historical checklist explanations (not current-main qualification):
type(scope): description) of the status line's type, after the WIP prefix.main(exact unchanged base checked before publication).python -I -B tests/run_all.pypasses (not run; WIP, focused results only).third_party/untouched.db2579165f07004cfd2eRebased onto
main@bbe6fdf: no conflicts. 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.