Files
NX2navi/docs/protection-research.md
chrg6 b0d420db3d Land the shader and pipeline stutter pass, and the fixes it needed.
Large compute shaders that no cache holds are built on one background thread after the boot prebuild, smallest first, so their first dispatch no longer compiles them on the replay thread. NX2NAVI_BIG_BUILD_MAX_MB stops that builder once the process has grown by that much: on a 31 GB machine one of these shaders took the process up by 12.8 GB and the game stuttered while Windows paged. The builder takes the queue under its lock and copies each entry out before compiling it, so a shader queued meanwhile cannot free the arrays under it. The same change reports what pipeline-cache.bin gives back, and starts over when the file grows past NX2NAVI_PIPELINE_CACHE_MAX_MB.

A tensor-core program is now tested before its shader is asked for, in both dispatch paths. It runs the stand-in while NX2NAVI_NATIVE_TENSOR is off, and translating it anyway recorded four AI-upscaler shaders of 0.87 to 4.4 million SPIR-V words that this game never dispatches natively. Process memory went from 29.3 GB to 24 GB and the multi-gigabyte builds during play are gone.

The frame-time summary says which part a slow frame went to, and with NX2NAVI_REPLAY_TIME how the replay splits between draws, binds and transfers; NX2NAVI_SVC_SLOW_MS logs the kernel services that block, with the thread they blocked on. prof_report.py reads the map this build writes and adds the image base to a runtime Rip, so a profile resolves to function names instead of question marks.

build_xlate.py applies the patches with GIT_CEILING_DIRECTORIES set to the build folder's parent. Inside a checkout git read 0021-prmt-byte-permute.patch's paths from the repository's top, skipped every file of it and still exited 0, so PRMT was missing from locally built translators and every byte permute was a no-op. A Skipped patch line now fails the build. The note in AmpereLowering.cs that said the translator emits nothing for PRMT is corrected.
2026-11-09 03:34:46 -05:00

6.9 KiB

Can NX2navi be protected from copying, including by AI tools?

Research note, 2026-11-07. Not legal advice.

Short answer. Nothing stops a person with read access from copying code or pasting it into an AI tool. You can limit who gets access, set legal terms, and opt out of cooperative crawlers. Ideas are free to reuse; only patents cover them, and they are impractical here.

Facts in this repo that change the answer

  • LICENSE names Valiantsin Dzerakh, not chrg6. The local clone is shallow; its root commit is by that author, and the remote is valentderah/totk-pc-recomp, which the GitHub page showed as public, MIT, about 5.5k stars and 459 forks. Copies already made under MIT stay MIT. Only the author of a piece of code can relicense it, so chrg6 can relicense their own commits (23 of 24 here), not the base code.
  • AGENTS.md says "This repository is public"; update it once the decision is made.
  • THIRD_PARTY_NOTICES.md lists about 40 components under MIT, BSD, zlib, ISC and Apache-2.0. 44 of 112 runtime/*.c files carry copyright lines.

1. Technical limits

Measure What it does Limit
Private repo Strongest control. GitHub's terms treat private content as confidential, with narrow staff access Anyone invited can clone and paste it anywhere
GitHub AI settings Since 24 Apr 2026, Copilot Free/Pro/Pro+ interaction data trains models unless you opt out at github.com/settings/copilot/features. Private content at rest is reportedly not used; code processed while Copilot is active in it is (GitHub blog; details from secondary reports) Copilot only. For public repos the terms (D.4) license your content to GitHub for AI training, and the opt-out excludes public repo content (J.3)
robots.txt You cannot edit github.com's. GitHub's lets GPTBot, ClaudeBot and Claude-User crawl with path limits such as /copilot/; only Bytespider is blocked. No per-repo opt-out Only for sites you host. Voluntary
Crawler tokens Anthropic: ClaudeBot (training), Claude-SearchBot, Claude-User; OpenAI: GPTBot (training), OAI-SearchBot, ChatGPT-User (robots.txt "may not apply"); Google-Extended: Gemini training and grounding, not Search Forward-looking; each bot named

Cannot be prevented: a clone pasted into an AI tool, a local assistant reading files, a collaborator's own settings, a user-triggered fetch of a public URL, or any scraper that ignores robots.txt. Notices in AGENTS.md or file headers are signals, not controls.

17 U.S.C. 102(b): copyright never extends to "any idea, procedure, process, system, method of operation, concept, principle, or discovery". A clean rewrite of our approach is legal.

Licence Effect Enforceability
MIT (now) Anyone may copy, sell, relicense; must keep the notice Nothing to enforce beyond the notice
GPL / AGPL Copiers must publish derived source under the same terms; AGPL covers network use. Does not stop copying Enforceable by the holder; fits only if you want sharing
PolyForm Noncommercial Source-available; bars commercial use Works as a copyright licence; not open source
BSL 1.1 Limits production use, then converts to GPL-compatible within 4 years; "not an Open Source license" Built for companies; poor fit
All rights reserved Default under copyright; fine while private Strong in law, but no one else may use or contribute
"No AI training" clause Custom wording, no standard text; breaks the Open Source Definition rule against field-of-use limits Untested. US district courts found AI training fair use on the facts in 2025 (Bartz v. Anthropic, Kadrey v. Meta; review), and in Doe v. GitHub (9th Cir., Sept 2026) only the contract claims survive. I found no appeals ruling on fair use

Enforcement means finding a copy, proving copying and paying a lawyer. A DMCA takedown is the cheap tool for copies on GitHub.

Patents are the only protection for ideas. Reported costs: USPTO provisional $65 to $325, software drafting and filing about $8,000 to $15,000, the full path $15,000 to $30,000 or more. They need filing before public disclosure, and published upstream work is prior art. From general knowledge, not checked here: software eligibility after Alice is shaky. Not worth it.

3. What can and cannot be relicensed

Cannot: every row of THIRD_PARTY_NOTICES.md. This covers tools/vendor/ (unmodified), Ryujinx's shader translator, tools/xlate/ (its LICENSE is MIT, jhaizhou) and files adapted from MacNativeGames, LASRecomp and others. They stay MIT, zlib or BSD with their notices. zlib code (runtime/nvn_tex.c) must be marked if altered. Stricter terms can cover only our own additions; anyone can still take the MIT parts from their upstream projects.

Translator: pinned MIT Ryujinx code plus patches. Patch lines we wrote (nine of ten commits touching tools/xlate/patches/ are chrg6's; per-patch authorship is not recorded) can carry our terms. The patched translator still ships under MIT with Ryujinx's notice, and the upstream stays free to everyone.

Can, if the author agrees or it is chrg6's alone: new files such as runtime/widescreen.c and recomp/patches-v111.txt, and the Ocarina port docs.

Gap: the TOTK-Ultrawide row is GPL with no URL or version; keep it data-only and record the source.

4. Recommendations, ranked

  1. Keep the repo private, invite only trusted people, turn off the Copilot training opt-in in your account and ask collaborators to do the same. Free; the only real control.
  2. Settle ownership with Dzerakh in writing: who owns what, and whether a restrictive licence on the additions is acceptable. Without it you can relicense only your own work.
  3. Choose a licence for our additions (all rights reserved while private; PolyForm Noncommercial if shared), via per-file SPDX headers and a LICENSE that states the split. One short lawyer review.
  4. Add a notice in README.md reserving rights and stating that AI training is not permitted. A legal signal, not protection.
  5. Add robots.txt blocks for ClaudeBot, GPTBot and Google-Extended on any site you host.
  6. Skip patents. The practical moat is staying ahead.

Expect deterrence and a clean legal footing, not prevention.