Repository navigation
Description
While working on the Mac launcher (#27, #28) I read scripts/sync_upstream.py to make sure my changes survive a sync, and found something that affects engine fixes merged here in general. Sharing it as a suggestion; it's your call how the fork should work.
What the sync does with engine files
The sync takes the vendored paths (dm/, scripts/, docs/, AGENTS.md, ref/) from upstream file by file. Two kinds of files keep the fork's changes:
- the fork's own files (
OURS: the RomFS archive layer, the BC decoder), and - the nine patch carriers (
PATCHED), whose patchers re-apply the fork's changes; the patcher-drift check fails when a carrier was edited without its patcher.
Any other engine file is simply replaced by upstream's version the next time upstream changes it. A fix merged here into such a file is then gone, without a warning.
An example
#26 added CreateWithAdjustableSystemClock to dm/host/hle_time.c (and a test in dm/host/tests/t_time.c). Upstream doesn't have it (seedds/nxnative has no AdjustableSystemClock), and neither file is in OURS or PATCHED. The next time seedds touches hle_time.c, the sync will drop the fix, and what needed it breaks again.
My own #27 had the same problem: it changed settings.py, pack_app.py, build_ipa_from_nsp.py and shader_split.py. Carried here, the last two would have failed the drift check (or been reverted). I took those parts out of #27 and proposed them upstream instead (seedds/nxnative#352). #27 now touches no file under dm/, docs/ or scripts/.
Suggestion
Keep the fork's own layer to what it adds around the engine (the GUIs, the packaging and releases, the RomFS archive), and send engine fixes upstream first, so they come back with the sync. For a fix upstream doesn't take, the existing PATCHED mechanism is the safe place, with a patcher, so the drift check guards it.
A small CI check could make this automatic: fail a PR that edits a vendored file outside OURS and without a patcher entry, with a note to send the change upstream or add a patcher. That would have caught #26 and my #27.
I know upstream closes many PRs, so this isn't always easy. Happy to help, e.g. by porting #26 upstream.
Activity
Protect the adjustable-clock fix from the sync, and check PR scope (i…
LNPANDY commentedon Oct 27, 2026
Confirmed and fixed — and thank you for reading the sync script closely enough to find this. It is the most useful kind of issue report: one that improves the mechanism rather than one instance of it.
The confirmation: you are exactly right.
hle_time.cand its test were in neitherOURSnorPATCHED, so the next time seedds touchedhle_time.c, the sync would have replaced the files and dropped the adjustable-clock entry — and nothing would have warned about it. The patcher-drift check only guards carriers, by design.Both parts of your suggestion are in (
bcb2e0ea):hle_time.candt_time.cjoinedOURS, with a comment saying why they are fork-only and that they leave the list if upstream takes the change. The fix is protected now, and the exit path is explicit.pr-scopeworkflow fails a PR that edits a vendored file outsideOURS/PATCHEDand outside the fork-only paths (frontend/,frontend-qt/,.github/workflows/), with the at-risk file list and the two ways out written into the error. It readsOURSandPATCHEDfromsync_upstream.pyitself rather than a copy, so the check cannot drift from the lists it enforces — the failure mode you found came from exactly that kind of drift between what a contributor assumes and what the sync does.On your framing, one refinement I would push back on gently: "keep the fork's layer to what it adds around the engine" is the right default, but not an absolute rule. Some engine fixes land here first because a game needs them and the upstream queue is long — the iOS-specific pieces (
hle_profile.h's DM_PROFILE, the iOS boot paths) are fork-shaped by nature and may never belong upstream. The rule I would write instead: every engine change needs a home that survives the sync — upstream,OURS, or a carrier patcher — and the PR-scope check now enforces that at the door. Your three categories are exactly the choices.On porting #26 upstream: yes please — that is the cleanest end state, and once seedds merges it I will remove both files from
OURSso the fix comes back with the sync instead of being held here. If it stalls, the OURS entry is the durable home and nothing breaks either way.The workflow will run on the next PR that touches
dm/orscripts/; if it misfires on a legitimate case, I would rather see that here than discover a silent revert.