0.2.5-dev: a restore-defaults loadout sync is never overwritten by an older in-flight sync (PR #540 by @Xinglan233, ported); importing a loadout with ops is refused before writing when the DIY data is missing (PR #538 by @Xinglan233, ported); the player package's package.json keeps only scripts whose files ship (#531) and its docs link unshipped files to the release tag on GitHub (#530); golden: unchanged

This commit is contained in:
sganggs committed 2026-10-12 14:45:01 +08:00
1 parent 7fd0478dc0
commit 52b70434d0
13 files changed
+610 -5

No files matched your search

+43
View File
@@ -271,3 +271,46 @@ the preceding digest exactly; the changed partner/side also changes preparation
All five already differed from 0.2.4, so the final release-relative total remains 45 scenarios (§30.9 plus these
additional pairing effects). There are no new corpus cases or removals. The other follow-up fixes do not move this
corpus; their dedicated regressions cover the reported and newly found cases.
### 30.17 Loadout sync preparation
PR #540 by @Xinglan233. Restoring defaults while a loadout sync was still waiting on backups.json could put the
previous skill back on the server. `prepare()` assigned its request number only after the await, so the older
payload was treated as the newer one. A stale missing-data result or a failed download could also replace a sync
the reset had already finished.
`installPrefSync` now keeps a preparation revision. An edit of a watched field, including restoring defaults, and
`welcome` increment it before the new flush is scheduled. A preparation that started at an older revision does not
send and does not change sync status when it finishes, whether it built a payload, found the data missing, or
failed. Debounce, the close flush, request ordering and the RATE / lock retry stay as they are. The same engine
covers 干员持有 and 自选编队. Golden unchanged. Tests: `test/ui/loadout-sync-stale.test.js`.
### 30.18 Loadout import with ops while backups are missing
PR #538 by @Xinglan233. Importing a loadout file that includes `ops` checked only that chess.json was loaded.
`cultivationCharIds` then dropped 自选 operators, which only backups.json names, and the import still saved. That
cleared a 练度 the file was not meant to erase. `ops: {}` is the same replacement.
After a successful parse, `loadoutOpsImportRefusal` refuses the whole import with the 自选编队 data check
(`importRefusal('diy')`) before any write. A file with no `ops` still imports skills and modules once chess.json is
ready and leaves the current 练度 in place. Golden unchanged. Tests: `test/ui/loadout-ops-import.test.js` (node, no
browser).
### 30.19 Player package scripts and doc links
GitHub #531 and #530. The player zip copied the repository `package.json`. `npm test` is `node --test`, and `test/`
is not in the zip, so it reported 0 tests and exited 0. Nine other scripts name files or tools the zip does not
contain (`golden`, `golden:update`, `build-data`, `check:imports`, `ci`, `package`, `package:lite`, `lint`,
`typecheck`). README, CHANGELOG, NOTICE, THIRD-PARTY-NOTICES, PLAYING and DEPLOY also keep relative links to
developer docs, pictures and `../../releases/latest`. Twenty-three of those, in README, PLAYING and DEPLOY, point
at developer files.
The stage rewrites `package.json` only. A script stays when every `node <file>` it names is in the zip and it names
at least one (`start`, `dev`, `setup`, `doctor`, `launch`, `postinstall`, `vendor`, `assets`). The others are
removed, so `npm test` is a missing script and exits non-zero. The repository `package.json` is unchanged. The same
stage rewrites those six Markdown files: a relative link whose target ships stays relative; a picture becomes
`https://github.com/sganggs/Stronghold-Protocol/raw/v<tag>/<path>`; another file becomes `.../blob/v<tag>/<path>`;
`../../releases/latest` becomes `.../releases/latest`. The tag is `v` plus the package version with a trailing
`-dev` removed. [ASSUMED] an unreleased `0.2.5-dev` build points those links at `v0.2.5`, the tag that version will
use. Source copies in the git checkout stay relative. Golden unchanged. Tests: `test/package-player.test.js`,
`test/package.test.js`, `test/docs-paths.test.js`.