Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f754af0
docs: file T-MISTER-FDS-RAW-STREAM and the off-die save-state break
doublegate Nov 14, 2026
102d12c
docs: file T-MISTER-SAVE-XFER-ACROSS-LOAD as a v3.7.1 known issue
doublegate Nov 15, 2026
69117b1
docs(roadmap): T-MISTER-SYS-RESYNC, re-vendor sys/ after v3.7.1 ships
doublegate Nov 15, 2026
040d96b
docs(roadmap): three more narrow FDS/save edge cases join T-MISTER-SA…
doublegate Nov 15, 2026
c30eec9
docs(roadmap): T-REUSE-FOLLOWUPS, the licensing PRs' last non-blockin…
doublegate Nov 15, 2026
bbff539
release: cut v3.7.1 "Imprint"
doublegate Nov 15, 2026
b25d887
ci: delete superseded deployments and stale preview environments
doublegate Nov 15, 2026
5ec7ed4
ci: scope the cleanup token to a main-only environment
doublegate Nov 15, 2026
e96cce2
fix(ci): the cleanup scripts fail closed and keep the live deployment
doublegate Nov 15, 2026
76bc338
fix(ci): close the cleanup scripts' listing races
doublegate Nov 15, 2026
995b24b
fix(ci): recheck fork pull requests, survive one failed delete
doublegate Nov 15, 2026
cb38872
fix(ci): read the whole list in the prune scripts' membership tests
doublegate Nov 15, 2026
bff4cd0
docs(release): the v3.7.1 "Imprint" release notes
doublegate Nov 16, 2026
13988dc
docs: README as current state, CHANGELOG and .gitignore tidied
doublegate Nov 16, 2026
acdf36a
docs(mister): the co-simulation boundary as it stands, history archived
doublegate Nov 16, 2026
768f435
docs(adr): ADR 0037 amendment, the identifier grep is built and what …
doublegate Nov 16, 2026
47a2d8d
ci(cleanup): grant the deployments job actions: read for the environm…
doublegate Nov 16, 2026
5087416
ci(cleanup),docs(plan): skip deployments after a cancel; record v3.7.…
doublegate Nov 16, 2026
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
53 changes: 53 additions & 0 deletions .github/release-notes/v3.7.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# RustyNES v3.7.1 — "Imprint"

A patch release on v3.7.0 "Spindle": every file in both repositories now names its copyright holder and licence (REUSE 3.3, checked in CI), the test ROMs whose authors stated no licence are no longer called public domain, and the Android and iOS apps and the web site now carry the licence and the third-party notices the core's licences require. Each hosted match gets its own spectator id. On the MiSTer core, the FDS drive and the disk and battery saves are fixed, the battery-save fix covering a loss present in every MiSTer release so far. **Save states from v3.7.0's off-die MiSTer build are refused** (its save layout changed); the emulator's save states, movies and netplay are unchanged: the emulation epoch stays 10 and netplay protocol 10.

## Licensing, made honest and checkable

- **Every file names its holder and licence** ([REUSE 3.3](https://reuse.software/spec-3.3/)), in both repositories. A root `REUSE.toml` labels first-party work (`DoubleGate`, GPL-3.0-or-later) and every third-party class with the holder and licence its own evidence gives, and `LICENSES/` holds exactly the licence texts those labels use. Existing SPDX headers win; the 37 files derived from other emulators keep their upstream holders (Mesen2, TriCNES, puNES, FCEUX, Nestopia UE, emu2413, blip_buf, Lua, ares, Bisqwit), as `NOTICE` records them. A `reuse` CI job runs on every push and pull request, and an unlabelled file added to `tests/roms/`, `screenshots/`, `vendor/` or `ref-docs/` fails it. Check locally with `uvx reuse lint`.
- **The test ROMs are no longer called public domain.** The repository said blargg's suites, kevtris's nestest and the ROMs mirrored from `christopherpow/nes-test-roms` were public domain. No source supports that: the suites' readme files state no licence, the NESdev page that was cited has no licence wording, and the mirror has no LICENSE or README. The ROMs stay, labelled `LicenseRef-NoStatedLicense` with their real authors (copyright remains theirs; RustyNES grants no licence to them), and every place that made the claim now says what was checked. Other ROMs carry real licences: AccuracyCoin MIT, Holy Mapperel zlib, Brad Smith's audio tests his own permissive grant. Screenshots of commercial games are labelled as their publishers' work, not covered by the GPL.
- **The notices the apps owe.** The core contains code derived from MIT- and ISC-licensed projects, whose licences require their notices in every copy, and the GPL requires its own text with the binary. The desktop archives always carried `LICENSE` and `NOTICE`; now the Android app (About, "Open-source licenses"), the iOS app (About) and the web site (`LICENSE.txt` and `NOTICE.txt`, linked from the demo, the privacy page and every handbook page) do too, each copied from the repository at build time and checked in its build. The RetroArch core, which the libretro buildbot builds and distributes, does not yet (`T-LIBRETRO-NOTICES`, v3.8.0).
- **Two records corrected:** ares, whose colour integration the generated palette follows, is ISC-licensed, not "BSD-2-Clause / Apache-2.0" (that read the licences of components ares bundles), and its ISC notice is now in `NOTICE`; and the Bisqwit NTSC filter names its author, Joel Yliluoma.

## Fixed

- **Each hosted match gets its own spectator id.** With the relay match id left empty, v3.7.0 minted a random id, saved it and reused it for every later match, so anyone once given it could watch every match the host played afterwards (viewers present no key). Each hosted session now gets a fresh id, shown in the netplay panel and the status bar, and none is saved; an id v3.7.0 saved is cleared the first time this version loads its settings. **If you host from v3.7.0, the id you handed out stops working.** The saved id is recognised by its shape, 32 lowercase hex digits, so an id you typed yourself in exactly that shape is cleared too, with a note on stderr; a typed id of any other shape is kept and reused as before.
- **Spectators see a match to its end when it ends in an error.** The host sent its last, shorter batch of confirmed frames to the relay only when the player left, so a session that ended in an error dropped up to seven frames and relay viewers stopped short of the players.
- **On Android and iOS, a desync whose peer never sends its forensics is given up on after 10 seconds**, as on the desktop, instead of holding the session and its socket until the player left netplay.
- **A hidden window no longer floods the terminal** with `render error: surface unavailable: occluded` (macOS reports a minimised or covered window's surface that way), and frames it never shows are no longer staged.
- From re-reading every bot review on the pull requests closed since v3.4.1: a FIFO or device named as the palette file or as the header editor's target is refused instead of hanging the window; MMC5 save states with impossible scanline-detector values are refused; a splits file with two `game` or `category` lines is an error; the debugger no longer panics on a malformed cc65 `.dbg` or DWARF file; a `.zip` claiming a huge entry reserves at most 4 MiB up front; `cargo full-native` on Windows on ARM overrides a user's own target flags.

## Changed

- **New icons everywhere but Help -> About**: the icon pack's "RN" cartridge art is the window icon, `rustynes.exe`'s icon, a new `RustyNES.app` in the macOS archive, the Linux `.desktop` entry, the browser tab and installable web app, and the Android and iOS app icons.
- **Rust 1.100**, with the libretro buildbot on the same release (its Windows x64 job builds the `synchronization` import library Rust 1.100 links, which the image's MinGW lacks).
- **Every dependency at its newest compatible release**, in one change in place of four Dependabot pull requests.
- CI: the cargo cache keeps dependencies again (it had stored nothing since v1.2.0), Android CI compiles the Rust once per run instead of three times and now compile-checks the baseline-profile module, a closed pull request's caches are deleted, the PR reviewer waits out another repository's review for its shared lock, and a scheduled job deletes superseded deployments and the documentation-preview environments of deleted branches, which GitHub keeps forever (668 deployments and 37 environments had piled up).

## The MiSTer core

- **The FDS drive**, from v3.7.0's known issues and five review rounds, each fix pinned by a claim that failed on the earlier RTL: a side's end stops the head instead of writing into the next side's bytes, and `$4030.D6` reports the end of head, on a real image's zero fill too; a write after a read paused inside a block stores every byte (8 of 19 were dropped); a write after a motor restart waits for ready; the host port is free while the motor is stopped (a `.sav` load and a write-back both hung); a side the image lacks gives no disk, and a download too short for a side is refused.
- **Disk and battery saves.** An unsaved disk write survives a console reset before the OSD opens, and so does an unsaved battery save, which every MiSTer release so far lost that way; a later cartridge can no longer be saved into the previous one's vdisk; no save transfer starts on the clock a download begins.
- **Save states from v3.7.0's off-die build are refused**, with the reason: the save engine's layout changed (fingerprint `D4E792FE` to `6C9E7051`). The Lite build's states load.
- **Known issues, ticketed for v3.7.2** (`T-MISTER-SAVE-XFER-ACROSS-LOAD`): a battery write-back or load already under way when a new cartridge loads keeps going, and could land in the new game's `.sav` (a window of a few milliseconds after the OSD opens). Choosing its fix depends on how the MiSTer framework orders a new `.sav` mount, which only hardware can settle. Three narrower cases, outside any BIOS or game path, ride with it: a write to a side's end followed by a read without a motor restart reads the next side's bytes; an OSD save on the exact clock a mount arrives writes before the load; an FDS save abandoned by a size-0 mount may lose its unsaved flag.
- **The co-simulation ladder runs from a job pool** (`LADDER_JOBS`), giving the serial ladder's verdict for every gate in about a third of the time; and the core's tree is REUSE 3.3 compliant, its MiSTer framework files labelled from their own headers.
- **New bitstreams**, compiled from the MiSTer core's release tree at fitter seed 7 and attached here and to the [MiSTer core's v3.7.1 release](https://github.com/doublegate/RustyNES_MiSTer/releases/tag/v3.7.1): `RustyNES_MiSTer-v3.7.1.rbf` (off-die, md5 `968f18dace1266d64592f633316c6326`) and `RustyNES_MiSTer-v3.7.1-lite.rbf` (on-die, md5 `df781b3291dc7a8f1eeb3e94481f5ed8`). Seed 7 closes timing on both builds, worst of the four corners: on-die setup +0.195 ns and hold +0.117 ns, off-die +0.109 ns and +0.119 ns. **The seed sweep was partial**: seeds 1-16 were started on both builds, but on a heavily loaded host one compile took about 80 minutes, and the full sweep would have pushed the release-day compiles past midnight, where the build date (a constant in the design) changes and the sweep no longer describes the bitstream. Once seed 7 was found to close both builds, the maintainer chose to stop and pin it. Only seeds 1, 7 and 12 were measured on both builds, so seed 7 is a closing seed, not the best of sixteen. Ladders on the release RTL: off-die 428 passed, on-die 356 passed, none failed.
- **Release candidate, not hardware-verified.** No hardware has run any bitstream.

## Verification

- The full suite with the test ROMs and the local commercial corpus: 4,151 passed, 0 failed, 20 ignored, in 206 binaries. No golden, snapshot or epoch fingerprint moved. clippy clean for the workspace, every frontend feature set and the WebAssembly builds; `cargo deny`, the `no_std` core build and the hosted services' tests pass. `reuse lint` passes in both repositories.
- The licensing gates were each shown able to fail: an unlabelled file planted in each guarded directory fails `reuse lint`; the provenance audit, which resolves each derived file's REUSE record the way REUSE does, fails on a dropped upstream holder, a later override and a dead path; the Android test fails with the asset copy unhooked; the iOS build checks the bundle.
- MiSTer: each FDS and save fix red on the earlier RTL and caught again by a mutant; both ladders as above; the release audits pass on the bumped tree.

## Deferred to v3.7.2

- The parallel coverage boot's timing run, which needs a quiet host (the cut day's seed sweep held this one), and the `test-roms` LTO A/B, which needs a CI dispatch input first. Neither changes an assertion.

## Install

- Download the pre-built binaries for Linux, macOS, and Windows below. The macOS archive now holds a `RustyNES.app`, signed ad hoc but not notarized: allow it once in System Settings > Privacy & Security, or run `xattr -dr com.apple.quarantine RustyNES.app`.
- The MiSTer bitstreams, a release candidate and not hardware-verified, are attached below: copy `RustyNES_MiSTer-v3.7.1.rbf` (off-die, needs the SDRAM add-on) or `RustyNES_MiSTer-v3.7.1-lite.rbf` (on-die) to the MiSTer's `_Console` folder.
- The WebAssembly build is live at [doublegate.github.io/RustyNES](https://doublegate.github.io/RustyNES/).
- The RetroArch core is in RetroArch's Online Updater on the platforms the libretro buildbot publishes to.
- Licensed under GPL-3.0-or-later; the third-party notices are in `NOTICE`.
113 changes: 113 additions & 0 deletions .github/workflows/preview-env-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Delete what preview deployments leave behind (2026-11-15).
#
# The Docs7 GitHub App deploys every pull request's branch to an environment
# named "Docs7 Preview: <branch>", and GitHub Pages and the Copilot agent add
# deployments of their own. GitHub never deletes an environment or a
# deployment: a superseded deployment is only marked inactive, and an
# environment, created the first time a deployment names it, stays forever. By
# 2026-11-15 this repository held 668 deployments and 37 environments, 33 of
# them previews of branches long merged and deleted.
#
# Two jobs, because they need different credentials:
#
# - `deployments` deletes every INACTIVE deployment except the newest one of each
# environment that still exists, plus every deployment whose environment is
# gone. It keeps each environment's newest SUCCESS deployment as well (the
# live one, while a newer one is in flight or after it failed) and never
# touches one in a transient state. It needs `deployments: write`, which
# GITHUB_TOKEN has.
# - `environments` deletes a "Docs7 Preview: <branch>" environment once <branch>
# no longer exists and no open pull request has it as its head, and nothing
# else. Deleting an environment needs the repository's Administration
# permission (write), which GITHUB_TOKEN cannot be granted, so it uses
# ENV_CLEANUP_TOKEN: a fine-grained personal access token scoped to this
# repository with Administration: read and write. Without it the job says so
# and changes nothing.
#
# WHERE THE TOKEN LIVES. ENV_CLEANUP_TOKEN is a secret of the `preview-cleanup`
# ENVIRONMENT, not a repository secret, and that environment's deployment branch
# policy allows the default branch only. Then GitHub itself withholds the token
# from a run on any other ref -- a branch whose copy of this file was edited and
# dispatched by hand included -- whatever that copy says. The `if:` on each job
# skips a run on another ref as well, before it starts. (Security review,
# 2026-11-15: workflow_dispatch can run any branch's version of a workflow.) The
# environment adds one deployment per run; the `deployments` job deletes all but
# its newest.
#
# Every trigger runs this workflow as it is on the DEFAULT branch -- a branch
# deletion, the schedule and a dispatch all do -- so no pull request's code ever
# runs with the token. There is deliberately no `pull_request` trigger.
name: Preview environment cleanup

on:
# A merged pull request's branch is deleted, which is when its preview goes
# stale.
delete:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: preview-env-cleanup
cancel-in-progress: false

jobs:
deployments:
name: Delete inactive deployments
# After `environments`, so one run removes a stale preview's environment AND
# its deployments (listed before, the environment still existed and its
# newest deployment was kept until the next run), and so this sees the
# deployment that job's own `environment:` just created. `!cancelled()`: it
# runs when that job is skipped or fails too (Antigravity on #666), but not
# after a run is cancelled, which `always()` would still start it for.
needs: environments
if: >-
!cancelled()
&& github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
&& (github.event_name != 'delete' || github.event.ref_type == 'branch')
runs-on: ubuntu-26.04
timeout-minutes: 30
permissions:
contents: read
deployments: write
# `GET /repos/{repo}/environments` (prune-deployments.sh's list of live
# environments) is an Actions-read endpoint for GITHUB_TOKEN. Without it
# the listing is refused, the script fails closed, and the cleanup
# deletes nothing on every run (CodeRabbit on #666).
actions: read
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Delete inactive deployments
env:
GH_TOKEN: ${{ github.token }}
run: scripts/ci/prune-deployments.sh "$GITHUB_REPOSITORY" --apply

environments:
name: Delete stale preview environments
if: >-
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
&& (github.event_name != 'delete' || github.event.ref_type == 'branch')
# The token is this environment's secret; its branch policy is main only.
environment: preview-cleanup
runs-on: ubuntu-26.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Delete stale preview environments
env:
GH_TOKEN: ${{ secrets.ENV_CLEANUP_TOKEN }}
run: |
if [ -z "$GH_TOKEN" ]; then
msg="ENV_CLEANUP_TOKEN is not set in the preview-cleanup environment: no environment was deleted. Add a fine-grained token scoped to this repository with Administration: read and write as that environment's secret, with the environment limited to the default branch (see this workflow's header)."
echo "::warning::$msg"
echo "$msg" >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
scripts/ci/prune-preview-environments.sh "$GITHUB_REPOSITORY" --apply
Loading
Loading