Repository navigation
Patch queue on a pinned upstream replaces the anchor-based sync (part of #123) - #124
Merged
Merged
Conversation
v0lumehi
force-pushed
the
patch-queue
branch
2 times, most recently
from
October 28, 2026 13:50
3150476 to
4b5cb02
Compare
Owner
|
Approved — go ahead. The model is right (a real three-way merge instead of text anchors; today's sync needed five integration fixes that a patch series would have surfaced as one conflict). Two conditions for the switch, both already in your plan: keep the anchor-based sync working until the patch queue passes Take the 48h as already served — this is the owner's approval. |
2 tasks done
…ch queue The vendored paths become upstream at the commit in .upstream-ref plus the git format-patch files in patches/, applied with git am -3 in a scratch worktree. bump moves the pin, drops patches that come out empty and stops at a conflict naming the patch, its Reason and its Upstream-Status; export turns commits into patches with the header template; check verifies the headers, rejects patches that touch the shader chain (the paths are read from AGENTS.md) and compares the series applied to the pin with the vendored tree. scripts/tests/test_patches.py covers them on a fixture repository. Part of LNPANDY#123
…xnative 75065df patches/ holds one patch per logical change, each with Upstream-Status, Reason and Issue; the vendored tree is unchanged except for what the migration retires: scripts/sync_upstream.py and its test (the anchor patchers, OURS and MARKERS), dm/games/0100A00019DE0000/game.fork.tsv (a copy the Hades patcher restored; the profile change is a patch now) and the nso_code.py data_blocks(lo=) edit (nothing passes lo). New: the patch fork-patches-stamp, so a build records the patches it carries (DMForkPatches in Info.plist, first line of the log), and dm/fork_patches.txt, which patches.py writes. Part of LNPANDY#123
… queue sync-upstream.yml bumps the pin and opens or updates a PR on sync/upstream (an issue naming the patch on a conflict) instead of pushing to main. daily-health.yml and tests.yml run patches.py check and a dry bump against seedds main. pr-scope runs check. The game and build issue forms ask for the fork patches line of the log. CONTRIBUTING, the PR template, CLAUDE.md and the READMEs describe the model; patches/README.md has the walk-through and the patch policy. Part of LNPANDY#123
…so the patch is fork-only for its default, not declined
, LNPANDY#137, LNPANDY#138) The pin is the one main took in LNPANDY#130. Every patch is re-derived from the diff between that commit's tree and main's vendored tree, one per logical change, 19 patches (was 22). Dropped, because upstream has it at the pin: - ios-entitlements: build_ipa.sh has the ad-hoc entitlement block (32ae3b1); the fork's ENTITLEMENTS.md moves to fork-docs. - nsp-exfat-appledouble: the rmtree hook and the AppleDouble skip are upstream (a0b8bdb); main's remaining difference was Python 3.9 compatibility, below the script's 3.12 floor. - nsp-early-checks: the iOS SDK, Rosetta and glslang checks are upstream (c464cb2); the fork's duplicates (check_glslang, a second Rosetta check) go. - nro-code-start: patch_nso.py has code_start (3e77816). - hle-time-adjustable-clock: hle_time.c has it (4d2dc7d). Carried from main's newer knowledge: the unsigned-IPA test adaptation (LNPANDY#137) joins ios-slim-ipa; the DOTNET_ROOT check and the pruning of intermediate extractions, which the old series did not carry, are patches of their own; romfsarc takes main's handle-shift fix in hle_fs.c. patches.py: apply, bump and check regenerate docs/agents/game-patches.md and symptoms.md on the patched tree (upstream's test_docs.py requires them to equal their tools' output), and check/export keep patches away from them. Tests for it. The vendored tree differs from main's only by what is retired (sync_upstream.py and its test, game.fork.tsv, the dropped duplicates) and by the stamp patch.
LNPANDY
added a commit
that referenced
this pull request
Oct 28, 2026
#124 replaced the anchor-based sync with the patch queue on a pinned upstream: dm/, scripts/ and docs/ are generated from .upstream-ref plus patches/, so a fork document must arrive as a patch. This branch's registration in scripts/sync_upstream.py no longer has a file to change. Two patches, both generated with scripts/patches.py export: 0020-launcher-c-plan.patch docs/launcher-c-plan.md (the M1-M5 plan) 0021-probe-dlopen-result.patch the #139 result: docs/probe-dlopen.md and the WORK-IN-PROGRESS row that names it 0021 also repairs main: #139 edited those two docs directly, so `scripts/patches.py check` failed on main ("differs (content): docs/WORK-IN-PROGRESS.md, docs/probe-dlopen.md") and the next bump would have reverted the probe result. Verified: scripts/patches.py check -> ok, 21 patches on upstream 062cd06; python3 -m unittest discover -s scripts/tests -> 24 tests OK.
This was referenced Oct 28, 2026
Closed
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.
Part of #123. The mechanism, the migration and the workflows are here, and the series is derived from the pin main took in #130 (seedds 062cd06), after #137 and #138; two patches conflict with today's seedds main (below), so this does not say "Fixes".
The model
The vendored paths (
dm/ scripts/ docs/ ref/ AGENTS.md) are no longer synced by text anchors. They are seedds/nxnative at the commit in.upstream-refplus the patches inpatches/, applied in the order ofpatches/serieswithgit am -3: a real three-way merge, as Electron does with its Chromium patches and Debian does withdebian/patches. Each patch is agit format-patchfile withUpstream-Status,ReasonandIssuein its message;scripts/patches.pyhasapply,bump,export,statusandcheck(seepatches/README.mdfor the walk-through, including how to carry a quick fix and send it upstream). A bump drops the patches that come out empty and reports them; a conflict stops it and names the patch, its Reason and its Upstream-Status. Nightly, the sync opens a PR onsync/upstream(or an issue naming the patch) instead of pushing to main.Also in this PR, from the follow-up on #123: a patch policy (
patches/README.md),check/exportreject a patch that touches the shader chain or tool pins (the paths are read from AGENTS.md; no existing fork change touched them), and every build records the patches it carries (dm/fork_patches.txtwritten bypatches.py,DMForkPatchesin Info.plist, first line of the logfork patches: ...on Mac and iOS; the issue forms ask for it).What changed
scripts/patches.pyandscripts/tests/test_patches.py(24 tests on a fixture repository: apply reproduces the tree, an empty patch drops on a bump, a conflict names its patch and changes nothing, export writes the header, a chain-touching patch is rejected, the generated list, the generated indexes).patches/: 19 patches (table below), derived from the diff between seedds 062cd06 and main's vendored tree.patches.py checkpasses: the series on 062cd06 gives the committed vendored tree byte for byte (2142 files). That tree differs from main's only by what the migration retires (next section) and by the stamp patch.sync-upstream.yml(bump, check, PR or issue; optionalSYNC_TOKENsecret so the PR starts tests.yml, because a PR opened withGITHUB_TOKENdoes not),daily-health.ymland the tests.yml jobpatch-queue(check plus a report-only dry bump to seedds main),pr-scope.ymlrunscheck. All use-R ${{ github.repository }}.scripts/sync_upstream.py(14 patchers, OURS, MARKERS, check_unprotected) andscripts/tests/test_sync_patchers.py. CONTRIBUTING.md, the PR template, CLAUDE.md and both READMEs describe the new model. AGENTS.md does not mention the sync, so it is untouched.Generated files
dm/tools/docs_patches.pyanddocs_symptoms.pywritedocs/agents/game-patches.mdandsymptoms.md; upstream'stest_docs.pyrequires them to equal that output, and the patched tree differs from upstream's (c7eca13 is the same fix in the old sync).apply,bumpandchecknow run both tools on the patched tree and commit the result in the scratch worktree;checkandexportkeep patches away from those two files.docs/badges/*.jsonstay static infork-docs(open: they come from the README's table, outside the vendored paths).The patches (19)
runtime-profileromfsarcios-game-data-folderios-slim-ipansp-dotnet-homensp-chain-changed-notensp-work-dirbc-cpu-decodemac-keymapmac-library-folderhades2-update-profileenv-switches-verifytouchpad-geometryios-probefork-docsref-hle-hid-d2rfork-patches-stampnsp-dotnet-root-verifynsp-prune-intermediate-extractsStatuses checked against
ghon seedds/nxnative today: #386, #475, #485, #490, #460 and #492 are open, #488 and #478 are closed.Dropped as upstream has it at the pin (verified)
ios-entitlementsbuild_ipa.shcarries the ad-hoc entitlement block at the pin (32ae3b1); the fork'sdm/ios/ENTITLEMENTS.mdmoves tofork-docsnsp-exfat-appledoublermtreehook and the AppleDouble skip (a0b8bdb, #476); main's only remaining difference was Python 3.9 compatibility, below the script's 3.12 floornsp-early-checkscheck_glslang, a second Rosetta check, thecheck_glslangmock intest_xcode_workflow.py) gonro-code-startcode_startandcode_rangesinpatch_nso.py(3e77816)hle-time-adjustable-clockhle_time.candt_time.c(4d2dc7d, #385)All five commits are ancestors of the pin. Also not carried:
dm/games/0100A00019DE0000/game.fork.tsv(a copy the Hades patcher kept; as in the first version of this PR).New knowledge from main carried into the series
ios-slim-ipa(test_ipa_unsigned.py,test_profile_pack.py).nsp-dotnet-root-verifyandnsp-prune-intermediate-extracts: fork changes in main'sbuild_ipa_from_nsp.pythat the 22-patch series did not carry (the DOTNET_ROOT check was patcher code, the pruning a fork commit); they are patches now.romfsarctakes main's archive-handle fix inhle_fs.c(the handle shift of seedds Tests: render in windows that are on no display #513 that the first version left open).Bump against today's seedds main (7a3a875), dry run
mac-keymap(docs/development.md,docs/env_switches.tsv) andtouchpad-geometry(dm/host/tests/Makefile). Down from 12.Checks run here
patches.py checkok;python3 -m unittest discover scripts/tests(24 tests) anddm/tools/tests/test_docs.pypass;make -C dm/host GAME=010015100B514000builds.What did not fit the model
ios-game-data-folderneedsruntime-profile; the stamp patch needsios-game-data-folderandmac-library-folder) are ordered by the series, not declared.backportpatch does not drop on its own when upstream took the change in another form; there are none left in the series.checkcompares the working tree, so an uncommitted vendored edit fails it too, which is what the fork wants.