Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .agent/HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# PR 1 handoff — reproducible source baseline

## Scope and baseline

- Branch: `feat/reproducible-source-baseline`
- Base: `974459caca0ef6daf9151f417dc9bc76ffaec46a`
- Invariant: restore a reviewable, buildable v1 launcher/core-host/core source baseline without vendoring the unchanged Kenji tree or claiming decompiled source is byte-identical original source.
- Out of scope: native Linux release packaging, Android, gameplay qualification, device testing, deployment and release publication.

## Verified observations and decisions

- The release source manifest SHA-256 is `27dc579656ce0ae36fa1dce95b0406e04a93ff0f81d8f815818a60b27dabeee3`.
- Core coverage: 3,930 files exact at Kenji `7d1fd99d3dc1c230ef7f823e96f187b3de619e4a`; 75 exact Kenji-history sources bound to 11 commit/path/blob tuples; 13 exact files at later Ryujinx `20888e6d1f96bcf1a59f415c745c684e38529503`; 62 managed-IL reconstructions; one unavailable test-only source; five decompiler-split helper files.
- The launcher and core host are checked-in managed-IL source reconstructions. Their observed release informational versions are preserved.
- Hello Kitty artwork is not redistributed. The existing URL catalog is used on demand. The zero-byte brand placeholder is omitted. The public NX logo and GPL-covered timing module are retained with their existing provenance/source.
- The core host uses non-building project references to recover the transitive dependency graph, then copies the already built core assemblies into build/publish output.

## Changed paths

- Recovered products: `src/app/NxInfinity/`, `src/core/NxInfinity.Core/`
- Core reconstruction overlays: `src/core/overlays/`
- Deterministic restoration and smoke checks: `build/source-baseline/`, including the host publish inventory
- Build/CI: `src/NxInfinity.slnx`, `.github/workflows/checks.yml`, `.gitattributes`, `.gitignore`
- Documentation/bookkeeping: `README.md`, `src/README.md`, `CONTRIBUTING.md`, `CHANGELOG.md`, `specs/security/EXCEPTIONS.md`, `specs/verifications/AUDIT-pr1-source-baseline.md`
- Licensing: `LICENSING.md`, `THIRD-PARTY-NOTICES.md`, `licenses/Ryujinx-Team-MIT.txt`, `third_party/totk-dfps/NX-NOTICE.md`

## Verification evidence

All scratch/build logs are under `/home/garyb/Mounts/NVME/OpenChamber/NX-Infinity/`; no device or adb was used.

- Restorer, Python 3: PASS. Fresh round-2 output `review2-core-20261026/` and post-review provenance output `review3-core-20261026/`; both receipts report 3,930 + 75 + 13 + 62, one unavailable test source and five helpers. The latter used a fresh shallow repository containing only the explicitly fetched base plus 11 history commits.
- Restored `Ryujinx.HLE`, .NET SDK 9.0.100: PASS, inherited NuGet audit warnings, 0 errors.
- Restored `Ryujinx.Graphics.Vulkan`, .NET SDK 9.0.100: PASS, 100 inherited warnings, 0 errors.
- Restored OpenAL backend, .NET SDK 9.0.100: PASS, inherited NuGet audit warnings, 0 errors.
- Launcher/runtime/test solution, .NET SDK 10.0.402: PASS, 0 warnings, 0 errors.
- Core-host framework-dependent publish, .NET SDK 10.0.402: PASS (`review2-host-20261026/`).
- `smoke_worker.py`: PASS; exact 107-library and 135-asset inventory, every declared asset present, protocol hello, exact backend revision and clean disposed event.
- Runtime contract executable: 63 passed, 0 failed.
- Runtime services executable: 73 passed, 1 explicitly unavailable Windows journal integration.
- Source-baseline tool tests: 15 passed, including commit/path/blob binding. The original round-2 first invocation named a nonexistent scratch directory and failed its explicit precondition; its rerun used the existing mounted NVMe project directory.
- `actionlint`: PASS.
- Python/JSON/XML syntax parsing: PASS.
- Rebuilt vs shipped non-compiler-generated type inventories: launcher 122/122 exact; core host 37/37 exact (ILSpy 11.1.0).
- Launcher package inventory: shipped package set retained; Linux/macOS Skia/HarfBuzz native assets are the only build-host additions.
- Core-host package inventory: portable package graph matches v1; the released Windows FFmpeg package is replaced only by build-host Skia native assets in the no-RID Linux publish. RID-native packaging remains PR 2.

## Limits and known issues

- No Windows execution, launcher GUI smoke, game, firmware, key, audio, Vulkan/gameplay or physical-device test was run.
- `System.Private.Uri` 4.3.0 and `System.Text.Json` 8.0.0 retain known NuGet advisories from the pinned baseline. The source-baseline README records them; dependency upgrades require separate qualification.
- Reconstructed OCR models and avatar content are mutable, size-bounded network inputs without pinned hashes. `specs/security/EXCEPTIONS.md` blocks release until they are pinned and verified.
- Vulkan warnings are inherited obsolete Silk.NET enum names plus CS0675/CS9193 in reconstructed source; builds have zero errors.
- The canonical Kenji host is an external restoration input; CI availability depends on that public service.
- `src/Ryujinx.Graphics.Gpu/NXI/TestAccess.cs` is unavailable, not present in shipped IL and not required by production builds.

## Review, commit and push

- Review round 1: both blind reviewers returned `NEEDS CHANGES` at 90/100 for frozen snapshot `cae90807cd5124fe5fc989f7d4b707468c4f8edcf85a80b414d23a783ca57c0a` (`hashes.sha256`). Reviewer sessions: `ses_e84f2974cffeRMz5dV7RTFZpDL` and `ses_e84f29711ffeWFrWqDNVH3uVm7`.
- Round 1 findings resolved before this record: external exact sources now come from pinned Git objects; local hash-sensitive text is LF-normalized; Windows/path/symlink escapes are rejected; the host gate checks the exact 107-library/135-asset inventory and every file; protocol output is schema-strict; inherited mutable network content is release-blocking; the stale timing-module path is corrected.
- Review round 2: one blind reviewer returned `PASS` at 97/100 for snapshot `e07e44b1c487c9674bd8899e5a5e3e913cfebae43f76fb15a63a97948dec1f07`. The replacement for an interrupted second review returned `NEEDS CHANGES` at 96/100: only 2/75 history blobs were reachable from the declared base, while the other objects relied on mutable branch refs.
- Round 2 finding resolved: all 75 history entries now identify their source commit, path and blob; restoration verifies that tuple before SHA-256/byte count; `--print-kenji-revisions` emits the immutable 12-commit closure; CI explicitly shallow-fetches it. All 12 commits were fetched directly by SHA from the canonical Kenji remote, and a fresh restoration passed from that closure. The first local workflow reproduction used zsh for the Bash-only `mapfile` command and failed before setup; the Bash rerun fetched all commits, then a mistyped later-source scratch path failed before output creation; the corrected restore passed.
- Pre-round-3 snapshot audit found that the prior packet's path/hash list covered 211 files but omitted two in-scope files present in the tree: `build/source-baseline/host-publish-inventory.json` and `third_party/totk-dfps/NX-NOTICE.md`. Round 3 must enumerate and hash the complete 213-path status-derived set; the prior packet cannot approve those two paths.
- Review round 3: freeze the post-provenance-fix tree and obtain a focused delta re-review. Any resulting content change requires another snapshot.
- Commit: none.
- Push: not performed.
- Next action: obtain `PASS` for the exact round-3 snapshot, then explicitly stage, commit and push only that reviewed snapshot.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
* text=auto
*.sh text eol=lf

# These working-tree files are hashed by the source restorer.
src/core/overlays/** text eol=lf
src/runtime/NxInfinity.Runtime/** text eol=lf
build/source-baseline/*.py text eol=lf
build/source-baseline/*.json text eol=lf

# Preserve the byte-identical release source manifest used as provenance evidence.
build/source-baseline/NX-BUILD-SOURCES.json -text
55 changes: 55 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,64 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9
with:
dotnet-version: '10.0.402'
- run: dotnet build src/NxInfinity.slnx -c Release
- run: dotnet run --project src/tests/NxInfinity.Runtime.ContractTests -c Release --no-build
- run: dotnet run --project src/tests/NxInfinity.Runtime.Services.Tests -c Release --no-build

source-baseline:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9
with:
dotnet-version: |
9.0.100
10.0.402
- name: Test source-baseline tools
run: NXI_TEST_SCRATCH="$RUNNER_TEMP" python3 -B build/source-baseline/test_tools.py
- name: Restore pinned core source
shell: bash
run: |
set -euo pipefail
mapfile -t kenji_revisions < <(
python3 build/source-baseline/restore.py --print-kenji-revisions
)
test "${#kenji_revisions[@]}" -eq 12
git init --quiet "$RUNNER_TEMP/kenji"
git -C "$RUNNER_TEMP/kenji" remote add origin https://starforgejo.dev/projects/Kenji-NX.git
git -C "$RUNNER_TEMP/kenji" fetch --no-tags --depth=1 origin "${kenji_revisions[@]}"
git -C "$RUNNER_TEMP/kenji" checkout --detach "${kenji_revisions[0]}"
git clone --filter=blob:none --no-checkout https://github.com/ChanseyIsTheBest/ryujinx.git "$RUNNER_TEMP/later-ryujinx"
git -C "$RUNNER_TEMP/later-ryujinx" checkout --detach 20888e6d1f96bcf1a59f415c745c684e38529503
python3 build/source-baseline/restore.py \
--kenji-repo "$RUNNER_TEMP/kenji" \
--later-repo "$RUNNER_TEMP/later-ryujinx" \
--output "$RUNNER_TEMP/nx-v1-source"
- name: Build restored core
shell: bash
run: |
set -euo pipefail
cd "$RUNNER_TEMP/nx-v1-source"
dotnet build src/Ryujinx.HLE/Ryujinx.HLE.csproj -c Release
dotnet build src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj -c Release
dotnet build src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj -c Release
- name: Build and smoke core host
shell: bash
run: |
set -euo pipefail
cd "$GITHUB_WORKSPACE/src"
dotnet publish core/NxInfinity.Core/NxInfinity.Core.csproj -c Release \
-p:CoreSourceRoot="$RUNNER_TEMP/nx-v1-source" \
-o "$RUNNER_TEMP/nx-core-host"
cd "$GITHUB_WORKSPACE"
python3 build/source-baseline/smoke_worker.py \
--dotnet "$(command -v dotnet)" \
--worker "$RUNNER_TEMP/nx-core-host/NxInfinity.Core.dll"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ artifacts/
*.keys
*.xci
*.nsp
__pycache__/
*.py[cod]
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# changelog

## Unreleased

- Restored the public launcher and core-host source and added a hash-checked process for reconstructing the v1 core from pinned Ryujinx and Kenji-NX inputs.
- Added CI coverage for core reconstruction, core builds, host publishing and the protocol hello handshake. This does not add native Linux or Android release artifacts yet.

## Stable Release v1 — 1.0.0 — 26 October 2026

- Backgrounds now use separate HD landscape metadata from Nintendo. Covers stay on game tiles. Missing artwork uses the theme, and downloaded backgrounds work offline.
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Keep games, keys, firmware and personal saves out of reports.
For code changes, keep the fix focused, include the checks you ran and leave the original credits in place.

Run `dotnet build src/NxInfinity.slnx -c Release` with .NET SDK 10.0.402. The included contract and service checks run with `dotnet run --project src/tests/NxInfinity.Runtime.ContractTests -c Release` and `dotnet run --project src/tests/NxInfinity.Runtime.Services.Tests -c Release`.

Changes to the emulator core must use the pinned inputs and verification process in [the source baseline instructions](build/source-baseline/README.md). Do not commit a generated restored tree or replace an exact source file with decompiled output.
2 changes: 1 addition & 1 deletion LICENSING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# licenses

Original NX Infinity code uses the [MIT license](LICENSE), unless a file says otherwise. Ryujinx and Kenji-NX retain their [MIT copyright and license](licenses/Ryujinx-MIT.txt), and Dune retains its [original notice](licenses/Dune-MIT.txt).
Original NX Infinity code uses the [MIT license](LICENSE), unless a file says otherwise. Ryujinx retains its [MIT copyright and license](licenses/Ryujinx-Team-MIT.txt), Kenji-NX retains its [MIT copyright and license](licenses/Ryujinx-MIT.txt), and Dune retains its [original notice](licenses/Dune-MIT.txt).

Dependencies have their own licenses. The download includes their notices alongside the application. The separate TOTK Dynamic FPS module uses GPL-2.0; its corresponding source and build files are in [third_party/totk-dfps](third_party/totk-dfps/).

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Linux users: download the Proton ZIP, extract it and run **Install-NX-Infinity.s

MP4 still has some stutter. Linux gameplay and 3D All-Stars touch controls need more testing. [Test notes](docs/testing.md) have the details.

## build from source

The launcher and core host source are included. The emulator core is restored from pinned public Ryujinx and Kenji-NX inputs, with every exact file checked against the v1 release source manifest. [Source baseline instructions](build/source-baseline/README.md) document the inputs, reconstruction boundary and build commands.

## the people behind it

**COYE / coye2** — development.
Expand Down
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Component | Credit and license |
| --- | --- |
| Ryujinx / Kenji-NX | [Original MIT notice](licenses/Ryujinx-MIT.txt) and [component notices](licenses/Ryujinx-third-party.md) |
| Ryujinx / Kenji-NX | [Ryujinx MIT notice](licenses/Ryujinx-Team-MIT.txt), [Kenji-NX MIT notice](licenses/Ryujinx-MIT.txt), and [component notices](licenses/Ryujinx-third-party.md) |
| Dune by sakasakiking | [MIT notice](licenses/Dune-MIT.txt) |
| Avalonia, SkiaSharp, HarfBuzzSharp, Inter and .NET | Original notices in the download's licenses folder |
| SDL, OpenAL Soft, FFmpeg and Shaderc | Original component notices included in the download; OpenAL and FFmpeg retain their LGPL terms |
Expand Down
Loading