Compare commits

..
Author SHA1 Message Date
Дмитрий 74473471db fix(companions): reuse offline bot pool before spawning and preserve AutoLogin.MaxCount 2026-11-18 10:38:31 +05:00
ДмитрийandClaude Sonnet 5.5 7cdf854eb0 feat(client): drop built-in client download, point players to the community launcher
The community moved the game client behind its official launcher (account
sign-in, signed manifest, its own CDN), so the public manifest now answers 404
and the Manager must not pose as the launcher. Remove the client download and
update path (clientdl, plan/sync/download/cancel commands, update job and
progress UI, version tracking) and reduce "Set up the game client" to: open
coa-development.org for the launcher, or pick a folder that already has the
game. Linking a folder, realmlist switch, companion addon and the custom-race
patch are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 10:03:13 +05:00
Дмитрий 0f0f9e6fe2 feat(sdk): SDK v0.3.2 hardening, artifact provenance, and realm-bound GitHub analyzer 2026-11-01 16:00:05 +05:00
Дмитрий e97fe52ab3 feat(analyzer): implement Analyzer v0.2.1 and Adapter Generator v0.1 2026-10-31 15:45:43 +05:00
Дмитрий 4e73c28f7b feat(analyzer): implement Module Analyzer v0.2 with evidence-driven rules 2026-10-31 12:53:31 +05:00
Дмитрий 28af9e2907 feat(analyzer): implement Module Compatibility Analyzer v0.1 in coa-core 2026-10-31 12:16:42 +05:00
Дмитрий 68e9d7d0cf fix(csm_plugins): handle password and env_remove properly in reconcile_squid 2026-10-31 11:56:06 +05:00
Дмитрий 873db420c0 feat(csm_plugins): support live mysql query in reconcile_squid command 2026-10-31 11:49:59 +05:00
Дмитрий b2572d4f7c wip(realms): checkpoint work-in-progress files on branch for clean build provenance 2026-10-31 11:47:51 +05:00
Дмитрий aff7659625 fix(plugins): trigger after_config_edit crash injection regardless of enable_key presence 2026-10-31 10:42:11 +05:00
Дмитрий 49d1ae75ab feat(plugins): implement durable transaction journal, crash recovery, and multiworld reference safety 2026-10-31 10:34:37 +05:00
Дмитрий cf94868fd9 feat(plugins): harden FV1 RC with dual-source SQL reconciliation, TxGuard rollback, and multiworld isolation 2026-10-31 09:53:34 +05:00
Дмитрий 90f93074c2 feat(plugins): implement CoA Dynamic Plugin Architecture (FV1) in CSM 2026-10-31 09:23:10 +05:00
Дмитрий c5eac64477 Fix custom races transactions with linked addons on another volume 2026-10-23 08:54:00 +05:00
Дмитрий 039c40da06 Separate SQUID bots from advertised online players 2026-10-23 08:53:52 +05:00
Дмитрий b3bb0fdc19 feat: portable play settings, improved offline messaging, and system tray support 2026-10-23 08:53:48 +05:00
406 changed files with 7503 additions and 46127 deletions

No files matched your search

-1
View File
@@ -25,5 +25,4 @@ jobs:
- run: npm ci
- run: node tools/check-i18n.mjs
- run: npm run build
- run: node --experimental-strip-types --test tools/*.test.mjs
- run: cargo test --workspace --locked
+1 -4
View File
@@ -69,11 +69,8 @@ jobs:
with:
node-version: 22
- run: npm ci
# tauri::generate_context! needs ../dist; without a warm target cache the tests do not compile without it.
- run: npm run build
- name: Tests
run: cargo test --workspace --locked -- --test-threads=1
- run: node --experimental-strip-types --test tools/*.test.mjs
run: cargo test --workspace -- --test-threads=1
- name: Build and sign (publish only when requested)
id: tauri
uses: tauri-apps/tauri-action@v0
@@ -1,72 +0,0 @@
name: sign-local-installer
on:
push:
branches: [release/20261108-manager]
workflow_dispatch:
inputs:
build_run_id:
description: Successful manager-local run in coa-server-build
required: true
permissions:
contents: read
actions: read
jobs:
sign:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Verify local build provenance
env:
GH_TOKEN: ${{ github.token }}
BUILD_RUN: ${{ inputs.build_run_id }}
run: |
python3 - <<'PY'
import json, os, subprocess
run = os.environ['BUILD_RUN']
if not run.isdigit():
raise RuntimeError('Invalid build run')
data = json.loads(subprocess.check_output(['gh', 'api', f'repos/Corfirean/coa-server-build/actions/runs/{run}']))
if data['conclusion'] != 'success' or data['path'] != '.github/workflows/manager-local.yml':
raise RuntimeError('Not a successful local Manager build')
subprocess.run(['gh', 'run', 'download', run, '-R', 'Corfirean/coa-server-build', '-n', 'unsigned-manager-windows', '-D', '_prepared-manager'], check=True)
from pathlib import Path
import hashlib
root = Path('_prepared-manager')
meta = json.loads((root / 'prepared-source.json').read_text())
version = json.loads(Path('package.json').read_text())['version']
name = meta['installer']
if Path(name).name != name or meta['source'] != os.environ['GITHUB_SHA'] or meta['version'] != version or str(meta['run']) != run:
raise RuntimeError('Installer identity differs')
if hashlib.sha256((root / name).read_bytes()).hexdigest() != meta['sha256']:
raise RuntimeError('Installer hash differs')
PY
- run: npm ci
- name: Sign exact locally compiled bytes
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
node --input-type=module <<'JS'
import { readFileSync, writeFileSync } from 'node:fs';
import { execFileSync } from 'node:child_process';
import { createHash } from 'node:crypto';
const root = '_prepared-manager/';
const meta = JSON.parse(readFileSync(root + 'prepared-source.json'));
execFileSync('node_modules/.bin/tauri', ['signer', 'sign', '--app-version', meta.version, root + meta.installer], {stdio: 'inherit'});
if (createHash('sha256').update(readFileSync(root + meta.installer)).digest('hex') !== meta.sha256) throw new Error('Signed bytes changed');
const signature = readFileSync(root + meta.installer + '.sig', 'utf8').trim();
const url = `https://github.com/Corfirean/coa-server-manager/releases/download/v${meta.version}/${encodeURIComponent(meta.installer)}`;
writeFileSync(root + 'latest.json', JSON.stringify({version: meta.version, notes: 'See the release notes.', pub_date: new Date().toISOString(), platforms: {'windows-x86_64': {signature, url}}}, null, 2) + '\n');
meta.signingRun = process.env.GITHUB_RUN_ID;
writeFileSync(root + 'prepared-source.json', JSON.stringify(meta, null, 2) + '\n');
JS
- uses: actions/upload-artifact@v4
with:
name: prepared-manager-windows
path: _prepared-manager/*
retention-days: 14
if-no-files-found: error
-23
View File
@@ -35,16 +35,6 @@ Every published Manager version, including a clearly marked Pre-release, belongs
CHANGELOG.md and changelog/history.json. Its GitHub release notes use the same reviewed record.
Promotion updates that entry without duplicating it; Manager and server histories remain separate.
Translated release notes are a required preparation step before freezing a new Manager source. Follow the
runbook's "Mandatory translated release notes during preparation" checklist: translate every new reviewed
Manager/server note into Russian, German, French, Spanish and Simplified Chinese in
`src/data/latest-note-translations.json`, keyed by exact canonical English text. Preserve existing translations
and released fragments. Refresh the bundled server-history snapshot from a pinned canonical commit and record
its provenance. Run `node --test tools/release-history.test.mjs`, `node tools/check-i18n.mjs` and `npm run build`;
verify each new record, all six viewer languages, English fallback and offline use. Save source/version and checks
in the handoff. Translations ship with Manager: a server-only release must record the carrying Manager version or
pending translation delivery, without forcing another Manager release or changing already signed installers.
Before preparing or publishing a Manager/server release, read the maintained
[release runbook](https://github.com/Corfirean/coa-server-build/blob/main/docs/server-release.md)
and [build agent instructions](https://github.com/Corfirean/coa-server-build/blob/main/AGENTS.md).
@@ -61,16 +51,3 @@ Server promotion uses the persistent Windows PC and the shared workflow's verifi
production databases; run applicable local acceptance in disposable fixtures. Record the actual passed,
failed and unrun checks. Verify both GitHub Latest and the public signed stable pointer before reporting
that users can update. Leave the durable handoff described in the runbook for the next agent.
## Public documentation languages
Maintain the public README and every player/server-owner guide in all six Manager languages:
English, Russian, German, French, Spanish and Simplified Chinese. English stays at `README.md`
and the player-facing `docs/*.md`; translated READMEs use `README.<locale>.md`, with guides in
`docs/<locale>/` (`ru`, `de`, `fr`, `es`, `zh-CN`). Language switches open the same page.
When changing a public guide, update its counterparts in the same change. Write naturally for
players in each language rather than translating word for word. Keep steps, feature limits and
experimental Portable Characters warnings equivalent. Use actual UI labels; retain English labels
where the released UI falls back to English. English screenshots stay in `docs/screenshots/`; localized images use its `ru`, `de`, `fr`, `es` and `zh-CN` subfolders. Keep the interface and annotation language consistent with each guide.
The public guide index is `docs/README.md`; internal protocol specifications and audits are not
player guides. Keep canonical release histories in English and link to them instead of making copies.
-178
View File
@@ -8,184 +8,6 @@ Published releases and previews. Pre-release entries do not change the stable up
Dates follow GitHub publication (UTC); legacy records retain their archived dates. Newest releases first.
## 0.9.14 — 2026-11-16
- Install community addons from the Manager.
- Old item and creature data is cleared before every Play.
- Turning the custom races client patch on or off takes seconds again.
- The database moves to a free port when Windows reserves or another program takes 3307.
- Your own MySQL settings survive restarts and updates.
- Disabled custom races stay disabled after a server update that adds races.
- Rename your realms in the Manager.
- The account for a friend's server is in the login box at every Play.
- Restart the world every day at a chosen time.
- Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu.
- Companion bots on Wildcard and Warcraft Reborn.
- The Custom Races card tells which characters stay out while races are off.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.14) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.13...v0.9.14)
## 0.9.13 — 2026-11-15
- The custom races client is updated to Custom Races V2.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.13) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.12...v0.9.13)
## 0.9.12 — 2026-11-14
- Settings for how much help bots get in dungeons and raids.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.12) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.10...v0.9.12)
## 0.9.10 — 2026-11-08
- Custom Races patch installation recovers from interrupted downloads.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.10) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.9...v0.9.10)
## 0.9.9 — 2026-11-04
- Update and recovery checks use the temporary login port even with a Windows override.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.9) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.8...v0.9.9)
## 0.9.8 — 2026-11-01
- Dungeon Clear can be enabled when SQUID bots are active.
- Diagnostic exports include launcher stages and lock owner records.
- Choose normal logs, errors only or no server logs in maintenance settings.
- Update checks temporarily suspend bot population and restore your configuration.
- Update validation keeps MySQL running between compatible checks.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.8) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.7...v0.9.8)
## 0.9.7 — 2026-10-30
- Show available update notes even when release history is cached.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.7) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.5...v0.9.7)
## 0.9.5 — 2026-10-30
- Account creation verifies a lost console reply against the requested login.
- Abandoned game relay tunnels close their local connection immediately.
- Keep disabled graphics components disabled during client updates.
- Force-stop an unresponsive world after a failed normal shutdown.
- Crash history includes reports from every world and Windows text files.
- Show the online bot count for Playerbots on the overview.
- Disable public server browsing in Settings.
- Keep deliberate stops and update shutdowns from triggering crash restart.
- Server startup waits for a responsive console before reporting success.
- Restore the existing Manager window when launching it again.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.5) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.4...v0.9.5)
## 0.9.4 — 2026-10-29
**Portable Characters are experimental and may contain bugs.**
- Settings group updates, startup and maintenance with translated release history.
- Update and launch without updating share a divided button.
- Maximizing the window keeps text and controls at a comfortable size.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.4) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.3...v0.9.4)
## 0.9.3 — 2026-10-29
**Portable Characters are experimental and may contain bugs.**
- Slow server startup no longer triggers an early update rollback.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.3) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.2...v0.9.3)
## 0.9.2 — 2026-10-28
**Portable Characters are experimental and may contain bugs.**
- New server installation waits for slower database startup.
- Find and edit CoA options in the existing server settings.
- Simultaneous update checks share results or wait their turn.
- Recovery can stop an unfinished world startup after restoring an older launcher.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.1...v0.9.2)
## 0.9.1 — 2026-10-28
**Portable Characters are experimental and may contain bugs.**
- Existing unsupported character records no longer block unrelated server updates.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.0...v0.9.1)
## 0.9.0 — 2026-10-28
**Portable Characters are experimental and may contain bugs.**
- Choose Parallel or Global level scaling in module settings.
- Report Content Scaling problems directly to its repository.
- Send custom race problem reports directly to their maintainer.
- Internet sharing restores the LAN address after server restarts.
- Configure custom race availability for new characters.
- Public listing offers every realm that starts together, not just the main one.
- Public listing is a short list of realms with a window for the details.
- Configure profession and defense skill gains in server settings.
- Starting a server sets the character classes of the realm chosen on Overview.
- Start Wildcard and Warcraft Reborn together with Conquest of Azeroth.
- Control portable characters and keep Manager running in the system tray.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.8.2...v0.9.0)
## 0.8.2 — 2026-10-27
**Portable Characters are experimental and may contain bugs.**
- Installs the verified CoA Custom 1.9.2 client patches and quest safety addon, while recognizing existing 1.9.1 installations.
- Server updates preserve the order of database migrations introduced during merges, preventing older snapshots from overwriting newer progression.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.8.1...v0.8.2)
## 0.8.1 — 2026-10-25
**Portable Characters are experimental and may contain bugs.**
- Install the matching CoA Custom 1.9.1 client files.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.8.0...v0.8.1)
## 0.8.0 — 2026-10-24
**Portable Characters are experimental and may contain bugs.**
- Server owners can allow portable characters per realm.
- Allowing portable characters also prepares the server for portable sessions.
- Managers stay compatible with the public connection service.
- Relay connections recover and use the ports of the installed server.
- Portable progress resumes after reconnecting or restarting the Manager.
- Older copies on another host may require maintenance before returning.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.7.3...v0.8.0)
## 0.7.3 — 2026-10-23
**Portable Characters are experimental and may contain bugs.**
- Portable characters open again after using an experimental Manager.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.3) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.7.2...v0.7.3)
## 0.7.2 — 2026-10-23
- Advanced settings cover creature melee damage, spell damage and health by rank.
- Internet sharing accepts existing port forwards to the same server.
- The Auction House Bot card has a single switch.
- More character and server browser controls now use your selected language.
- Online player counts correctly separate random bots from players.
- Custom races work with shared addon folders on another drive.
- Configure the day and night cycle from the module settings.
- A stalled database inspection no longer blocks server maintenance indefinitely.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.7.1...v0.7.2)
## 0.7.1 — 2026-10-22
Close the game, then open Modules → Custom Races → Repair Client Patch to update existing patches, or Install Client Patch for a new installation. Updating the Manager does not automatically replace game files or update your server.
Generated
+3 -31
View File
@@ -586,7 +586,7 @@ dependencies = [
[[package]]
name = "coa-core"
version = "0.9.14"
version = "0.7.1"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -606,7 +606,6 @@ dependencies = [
"serde_json",
"sha1",
"sha2",
"socket2",
"tar",
"tempfile",
"thiserror 2.0.21",
@@ -619,15 +618,6 @@ dependencies = [
"zstd",
]
[[package]]
name = "coa-launcher"
version = "0.9.14"
dependencies = [
"coa-core",
"serde_json",
"windows-sys 0.60.2",
]
[[package]]
name = "coa-registry-proto"
version = "0.1.0"
@@ -644,7 +634,7 @@ dependencies = [
[[package]]
name = "coa-release"
version = "0.9.14"
version = "0.7.1"
dependencies = [
"chrono",
"coa-core",
@@ -653,7 +643,7 @@ dependencies = [
[[package]]
name = "coa-server-manager"
version = "0.9.14"
version = "0.7.1"
dependencies = [
"coa-control-proto",
"coa-core",
@@ -665,10 +655,8 @@ dependencies = [
"tauri-plugin-dialog",
"tauri-plugin-opener",
"tauri-plugin-process",
"tauri-plugin-single-instance",
"tauri-plugin-updater",
"tracing",
"uuid",
]
[[package]]
@@ -4618,22 +4606,6 @@ dependencies = [
"tauri-plugin",
]
[[package]]
name = "tauri-plugin-single-instance"
version = "2.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "726b6da0dd5bd1344f84f4108a622c07d01923baacb5c803a605189672c5352f"
dependencies = [
"serde",
"serde_json",
"tauri",
"thiserror 2.0.21",
"tokio",
"tracing",
"windows-sys 0.61.2",
"zbus",
]
[[package]]
name = "tauri-plugin-updater"
version = "2.13.1"
+2 -2
View File
@@ -1,10 +1,10 @@
[workspace]
resolver = "2"
members = ["crates/coa-core", "crates/coa-launcher", "crates/coa-release", "crates/coa-registry-proto", "crates/coa-control-proto", "src-tauri"]
members = ["crates/coa-core", "crates/coa-release", "crates/coa-registry-proto", "crates/coa-control-proto", "src-tauri"]
exclude = ["services/coa-registry", "services/coa-registry-e2e", "services/coa-coordinator", "services/coa-relay"]
[workspace.package]
version = "0.9.14"
version = "0.7.1"
edition = "2021"
license = "AGPL-3.0-only"
-228
View File
@@ -1,228 +0,0 @@
# Per-race availability audit
Date: 2026-10-27. This is an internal implementation audit, not a supported-feature guide.
## Frozen sources
Separate `feat/per-race-toggles` branches and checkouts:
| Component | Checkout | Fetched base |
| --- | --- | --- |
| Manager | `C:/games/source/per-race-manager` | `origin/master`, `925a81f` |
| Core | `C:/games/source/per-race-core` | `origin/coa-bots`, `1c658cab46d5057a8972cebd84c840aa6fbc4a91` |
| CoA Companions | `C:/games/source/per-race-companions` | `origin/master`, `6a289fc2230ce9425924ca86dee02d0bb8d3d344` |
| Build | `C:/games/source/per-race-build` | `origin/main`, `89795b6` |
The build runbook explicitly selects `Corfirean/azerothcore-wotlk-coa:coa-bots`, not its `main`.
The old `C:/games/source/server/azerothcore-wotlk-coa` checkout instead tracks jealous-sound upstream
and has local modifications. It must not be used as the feature's release base.
The primary Manager and Companions checkouts also contain unrelated work and remain untouched.
SQUID is a separate repository, `Zyth45/mod-playerbots`, not `Corfirean/mod-coa-playerbots`.
Existing research checkout: `C:/games/source/squid-playerbots`. Its current local branch is
`fix/custom-races-existing-bots`, one commit ahead of `origin/coa`. Build policy selects the highest
stable numeric tag, so that local branch must not silently become the shipped dependency.
## Manager integration points
- `crates/coa-core/src/custom_races.rs`: package version `1.9.2`, release URLs, MPQ/root/addon lists,
hash manifests, client status, install, enable/disable and uninstall.
- `PatchTransaction`, `SavedFile`, `recover_patch_transaction`: shared client-relative journal in
`.coa-races-transaction/journal.json`, saved files and `committed` marker. Uncommitted changes roll back.
Paths use `fsx::safe_join`; file moves handle cross-volume addon locations.
- `patch_lock`: exclusive OS file lock on `.coa-races.lock`. The empty file's existence is normal and
does not prove another operation is active. Do not delete it as a stale-lock workaround.
- Client mutations reject `client::is_running`; reuse this gate and lock for availability changes.
- `patch_files`, `matches_patch`, `preserve_original`: ownership and preservation depend on manifests
and hashes, not just a filename. Availability overlay ownership needs its own verified record.
- `modules/catalog.json`: `custom-races` uses `coa_custom_races.conf` and `CoACustomRaces.Enable`.
Companions use `mod_coa_playerbots.conf` / `CoaBots.Enable`; SQUID uses
`playerbots.conf` / `AiPlayerbot.Enabled`.
- `crates/coa-core/src/modules.rs`: `toggle`, `settings_in`, `save_settings_in` write current module
configuration. Bot switches enforce stopped servers and the existing control lock.
- `src/screens/ModulesPage.tsx`: Custom Races card, master toggle, install/progress/status UI.
- `src/lib/api.ts` and `src-tauri/src/lib.rs`: existing `custom_races_status`,
`custom_races_install`, `custom_races_uninstall`, `custom_races_toggle_client` commands.
There is no per-race command or verified availability status yet.
- `src-tauri/src/lib.rs::play`: local launch reads `realms::state`, calls `client::sync_realm`, then
launches. Remote launch has a separate realmlist override path; it cannot infer a remote race policy.
- `crates/coa-core/src/realms.rs`: modes CoA, Wildcard and Warcraft Reborn; current configs are captured
under `Settings/realm-profiles/<mode>.json`. Use this mechanism rather than a parallel realm store.
Existing bot restrictions for non-CoA modes must remain effective.
- `crates/coa-core/src/clientdl.rs::apply`: manifest-based client updates, `keep_modified`, staging,
preservation of replaced files. No availability-overlay invalidation or rebuild exists today.
### Confirmed reconciliation risk
`custom_races.rs::sync_bot_races_config` writes a replacement `AiPlayerbot.ExcludedBotRaces` value:
recommended full exclusions or experimental `65,72,77,80,81`. It does not preserve arbitrary user
exclusions. `modules.rs` calls it from the master switch and BotsEnable saving; some callers discard
errors. Per-race integration cannot rely on this overwrite behavior.
`playerbots_conf_paths` can also copy a `.dist` file when no active config exists; it is not a purely
read-only discovery API. Status inspection should avoid adding more implicit writes.
## Core gates and bypasses
- `modules/mod-coa-custom-races/src/mod_coa_custom_races.cpp`: `WorldScript` loads the master switch;
`AccountScript::CanAccountCreateCharacter` accepts stock IDs 1–8, 10, 11 or an enabled master switch.
No disabled-ID list is implemented. Stock ID 9 is deliberately not included.
- `modules/mod-coa-custom-races/conf/coa_custom_races.conf.dist`: Enable and BotsEnable exist;
DisabledRaceIds does not.
- `src/server/game/Handlers/CharacterHandler.cpp`: normal character creation invokes
`sScriptMgr->CanAccountCreateCharacter` inside its finalization callback and rejects with
`CHAR_CREATE_DISABLED`. A packet from an unpatched client reaches that gate too.
- `src/server/game/Scripting/ScriptDefines/AccountScript.cpp`: hook aggregation must be preserved.
- `src/server/game/DataStores/DBCStores.cpp::LoadDBCStores`: chooses `DataDir/dbc_races/<file>` if
the master switch is enabled and that file exists, otherwise `DataDir/dbc/<file>`.
Per-race creation policy must not remove DBC rows or change login data.
- `.agents/docs/systems/ascension-character-creation.md`: native client compatibility depends on
`CharBaseInfo.dbc`; race button indices are not RaceIDs. Existing race/class checks must stay intact.
## Both bot systems
### CoA Companions
`module/src/BotSpawnRandom.cpp::GetValidBotRaces` reads the global and bot custom-race switches,
`CoaBots.CustomRaces.Enable`, and both AiPlayerbot/CoaBots exclusion lists. It checks DBC presence.
Its experimental defaults apply only when the combined exclusion set is empty: adding an owner list
to that set would silently remove those defaults. Keep those policies independent.
`CreateBotClone`, `CreateOneRandomBot`, and leveled spawning clone SQL character data directly;
they bypass the account creation hook. Enforce new-character policy at the common clone creation
entry as well as random selection. Preserve existing bots and faction selection via
`Player::TeamIdForRace`.
Additional confirmed callers: `module/src/BotBattlegroundFill.cpp::QueueBotForSide` and
`module/src/BotLfgFill.cpp` call `CreateOneRandomBot` after trying to reuse an existing bot.
The existing-bot reuse path must remain separate from creation restrictions.
`tools/offline_bot_factory.py` is another direct-SQL creation path. Its main loop chooses a
template by class and faction, then copies `template.race` into the new character overrides.
It currently does not read the custom-race creation policy. Reject or filter prohibited
templates before generating new accounts, GUIDs or SQL; do not rewrite their races.
### SQUID Playerbots
`src/PlayerbotAIConfig.cpp` loads `AiPlayerbot.ExcludedBotRaces` and adds
`AiPlayerbot.CrashingBotRaces`; it reads BotsEnable. `src/CoaBotRacePolicy.h` implements
`IsCoaBotRaceAllowed`. `src/Bot/Factory/RandomPlayerbotFactory.cpp::CreateRandomBot` applies
that policy before faction and race/class selection.
The same predicate also appears in `src/Bot/RandomPlayerbotMgr.cpp` and
`src/Bot/PlayerbotMgr.cpp`, including existing-character admission. Do not append owner creation
restrictions globally to this shared exclusion vector: that would also affect existing bots.
The predicate currently does not itself require `CoACustomRaces.Enable`.
`RandomPlayerbotFactory.cpp` calls `Player::Create` directly without the account hook.
Use a creation-only check in this factory, leaving existing-character admission unchanged.
## Portable Characters
Manager import code is under `crates/coa-core/src/portable/realm/`.
`import.rs` validates identity namespaces and race/class start data (`UnknownRaceClass`).
Availability policy must not become an import rejection or an identity rewrite. The inspected
creation hook is in the normal packet handler, not this importer. In the core,
`src/server/coa/CoAPortableImport.cpp` checks `GetPlayerInfo(model.Race, model.Class)` and writes
`model.Race` to the imported character and character cache. It does not invoke the account
creation hook. Preserve this separation. Live compatibility is still untested.
## Client experiment, actual observations
The owner updated `C:/games/Ascension` from 1.9.1 to 1.9.2 during this audit; its manifest now says
`# CoA Custom 1.9.2`. A separate physical client copy is being prepared under
`C:/games/source/per-race-evidence/client`; game assets are outside Git. The copy completed:
25646 files copied, zero failures. The separate server file copy also completed, but has not
been configured or started. No database service has been started for this task.
Read-only MPQ membership probing found ChrRaces in patch-ZZZF, ZZZE, ZZZC, ZZZ, ZZW, ZZV, ZZU,
ZZS, T, M and several locale archives. CharacterCreate.lua has multiple owners too.
The old `mpqprobe.py` precedence model explicitly admits an inference for Ascension multi-letter
archives. Therefore `patch-ZZZF.MPQ` is a candidate source, not runtime-confirmed effective data.
`patch-ZZZZ.MPQ` exists already; no overlay filename has been qualified.
Extracted from `patch-ZZZF.MPQ`:
- WDBC, 95 records, 69 fields, record size 276, string block 2428, total bytes 28668.
- SHA-256 `b78635b08bf0bd63d2898fce97c1fb162c8a9c41632703172eefa88bae79061f`.
- Actual rows: Sethrak 82, Gnoll 83, Saberon 97. Their Flags are 12.
- String block starts with `Hu`, not NUL; imposing an initial empty-string invariant incorrectly
rejects this real table. String boundaries and referenced offsets still need validation.
- Sethrak experiment changes only Flags 12 → 13. All other bytes compare equal.
- One generated MPQ was read back through StormLib; its DBC equals the expected patched bytes.
- The installed `pympq` Python extension crashed during interpreter finalization. The experimental
tool instead uses the installed Unicode StormLib DLL directly. It is not a runtime dependency
proposal for Manager or its users.
`tools/race_availability_poc.py` requires an explicit source archive and creates output only in a new
directory. It does not select an archive order, install an overlay or assert in-game success.
`tools/test_race_availability_poc.py` uses synthetic bytes only.
### Background verification after interactive testing was deferred
The owner requested no screen capture/input and no client/server/MySQL launches while other bot
tests run. These restrictions remain active. The owner reported that the copied client launches;
this does not confirm creation behavior or effective DBC loading.
- 17 DBC/fingerprint tests and 8 synthetic MPQ integration tests pass (25 total, none skipped).
- Native tests use the explicitly selected existing Unicode StormLib DLL, with no new install.
- Output is built and verified in a temporary directory before publishing the offline result folder.
Failures leave no published result; this is not the future client transaction implementation.
- One and fifty disabled races both produce one MPQ. StormLib adds an internal `(listfile)`;
the sole game payload is `DBFilesClient/ChrRaces.dbc`.
- Every referenced localized race-name offset is bounds-checked; invalid UTF-8 is rejected.
- The experimental fingerprint includes original DBC SHA-256, normalized IDs, algorithm version
and explicitly recorded profile. A profile label does not prove client compatibility.
- The real three-race offline experiment is in
`C:/games/source/per-race-evidence/multiple-races-offline/report.json`.
Source MPQ SHA-256: `40eac695cfcafb598b8376f3b9a61ecc037e4d445b87279cfe387a91edad32c3`.
Generated DBC SHA-256: `243fb36837b76ebd6943da574cc095be548b4530be7f06487debea6703db10d3`.
The first copy launch showed a missing-critical-files message and subsequently crashed on exit.
The crash report identifies `AMDXN32.DLL` in the AMD graphics driver at the fault address; this
does not establish the root cause. EXE, Extensions, dinput8, d3d9, dxgi, EsteriaAppearance and
patch-ZZZF hashes matched the primary client during comparison. The experimental overlay was
not installed. No graphics-driver or client-runtime changes were made to work around the crash.
## Reference implementations and update preservation
Inspected read-only reference clones:
- `aspollon/AFK-Realm` at `ea9c5bf691c98cace8cc03c06183c161022946de`.
- `aspollon/mod-custom-races` at `5a8f2ff8a0d494ffadf64e677a438aa7f5a6671b`.
`mod-custom-races/afk-realm.json` declares client patch generation and GlueXML Lua insertion.
`client/CustomRaces.lua` extends and lays out buttons, using race names/files and configured IDs.
This is a reference, not evidence of compatibility with the current CoA/Esteria UI or a reason
to replace CSM's prebuilt-server distribution.
`crates/coa-core/src/config/merge.rs` performs additive `.dist` merging: missing keys are added,
existing user values and unknown keys are retained. A new DisabledRaceIds key should use this
path. Existing realm snapshots already capture module `.conf` files. Neither mechanism currently
coordinates an availability overlay with client update/repair; that remains implementation work.
## Open gates
Update after the owner found the existing Hide Races panel: see
[existing-filter research](docs/PER_RACE_EXISTING_FILTER_RESEARCH.md). The inspected Lua already
supports personal name/index-based hiding, but it is not a realm-scoped RaceID policy. Nine
offline Lua 5.1 probes confirmed key behavior and limitations. Reusing its layout/UI is now a
candidate to investigate before choosing a production DBC implementation. This is not evidence
that the DBC approach failed, and it does not qualify client support.
The owner subsequently confirmed the GlueXML probe: restricted races disappeared from selection
and were grey, unchecked and disabled in Hide Races. The production client integration should
reuse this filter; changing DBC flags is no longer the selected implementation path.
Server controls, strict catalog-bound configuration, the core creation hook and both bot factory
guards are implemented and have passed offline checks and native builds. Existing-bot admission
and user/crashing exclusions remain separate from the new creation policy.
Remaining gates:
1. Integrate automatic client reconciliation, ownership and recovery with realm settings.
2. Qualify client update/repair and shared-client PLAY behavior.
3. Verify live creation rejection/re-enable, existing-character login, imports and both bot systems
when the owner's database test environment becomes available.
Status: **PARTIAL** — server implementation and builds pass; live server acceptance and production
client synchronization remain pending. See docs/PER_RACE_TOGGLES_TESTS.md for exact scope.
No existing character data, production service, release channel, or primary client archive was changed.
-84
View File
@@ -1,84 +0,0 @@
# CoA Server Manager
[English](README.md) · [Русский](README.ru.md) · **Deutsch** · [Français](README.fr.md) · [Español](README.es.md) · [简体中文](README.zh-CN.md)
**Portable Characters sind experimentell.** Die Funktion wird noch entwickelt und kann Fehler enthalten.
Eine Windows-Anwendung, mit der du deinen eigenen **Conquest of Azeroth**-Server auf Basis von AzerothCore mit wenigen Schritten einrichtest und betreibst. Konsole, manuelle Konfigurationsdateien und separate Datenbankprogramme sind dafür nicht nötig. Entwickelt mit Tauri 2, Rust und React.
![Dein Server im Überblick](docs/screenshots/de/overview.jpg)
## Funktionen
- **Portable Characters — experimentell.** Bewahre Charaktere samt gespeicherten Versionen im Manager auf und übernimm vorhandene Charaktere von Realms, auf die du Zugriff hast. [Zur Anleitung](docs/de/PORTABLE-CHARACTERS.md).
- **Realms entdecken.** Vergleiche öffentlich gelistete Realms nach Spielmodus, Höchststufe, Raten, Modulen und Spielerzahl.
- **Einfache Einrichtung.** Der Manager lädt ein signiertes Serverpaket herunter, prüft die Dateien, richtet die Datenbank ein und erstellt dein erstes Konto. Downloads lassen sich fortsetzen; vorhandene Server kannst du ebenfalls einbinden.
- **Starten, stoppen, spielen.** Steuere Datenbank, Auth- und Weltserver gemeinsam. Status, Laufzeit und Spielerzahl siehst du direkt. Beim Spielstart wird die passende Realmlist verwendet.
- **Spielclient verwalten.** Verwende deinen vorhandenen Client oder lade ihn über den Manager herunter: etwa 43 GB, fortsetzbar und dateiweise geprüft. Verwaltete Clients erhalten Update-Hinweise; selbst veränderte Dateien werden nur mit deiner Zustimmung ersetzt.
- **Serverupdates.** Der Manager sucht beim Start und alle fünf Minuten nach Updates. Ed25519-Signaturen schützen die Pakete. Vor dem Update wird eine Sicherung erstellt; eigene Änderungen bleiben erhalten und ein Rollback ist möglich.
- **Sicherungen.** Sichere Charaktere, Konten und Einstellungen bei Bedarf oder automatisch vor Updates. Prüfen und Wiederherstellen geht direkt in der Anwendung.
- **CoA, Wildcard und Warcraft Reborn.** Wähle den Realm unter Übersicht. Die Serverversion muss den gewählten Modus unterstützen. Beim ersten Wechsel entstehen eine eigene Welt und eine leere Charakterdatenbank. Konten werden geteilt, Charaktere und Moduleinstellungen bleiben getrennt. Ein laufender Server speichert die Charaktere und startet beim Wechsel neu. Schließe vorher den Client; bei geöffnetem Client wird die Realm-Auswahl erst beim nächsten Start über den Manager übernommen. Bots sind auf Wildcard und Warcraft Reborn nicht verfügbar; andere Zusatzmodule sind dort experimentell. Sicherungen und Datenbankupdates berücksichtigen alle angelegten Realms. CoA und Wildcard können gemeinsam laufen. [Wildcard](docs/de/WILDCARD.md) · [Warcraft Reborn](docs/de/WARCRAFT-REBORN.md).
- **Begleiter-Bots.** Erstelle Bots mit passender Stufe, verfolge den Fortschritt, pausiere die Erstellung oder melde Bots ab. Entferne bei Bedarf eine bestimmte Anzahl, um den Server zu entlasten, und lege die Zahl beim Serverstart fest.
- **Realmlists wechseln.** Speichere benannte Verbindungen wie Solo oder PTR und wähle sie neben der Spiel-Schaltfläche. Die zuvor verwendete Datei wird gesichert.
- **Konten und Einstellungen.** Verwalte Namen, Passwörter und Zugriffsrechte. Für Server und Bots gibt es verständliche Optionen und Voreinstellungen, außerdem eine Serverkonsole und eine Spielerliste mit Kontoverwaltung.
- **Module.** Aktiviere Zusatzfunktionen, öffne ihre Einstellungen oder die GitHub-Seite des jeweiligen Projekts.
- **Mit Freunden spielen.** Erreichbarkeit prüfen, Firewall und UPnP einrichten und Verbindungen über LAN, direkte Adressen oder private Netze/Tailscale vorbereiten. Anleitungen und ein Paket mit Verbindungsdaten helfen deinen Freunden beim Beitritt.
- **Probleme melden.** Bereite einen GitHub-Fehlerbericht mit automatisch eingetragenen Versionsangaben vor.
- **Managerupdates.** Sie werden im Hintergrund geladen und beim Schließen installiert. Deine Server werden dabei weder angehalten noch verändert.
- **Sprachen:** Englisch, Russisch, Deutsch, Französisch, Spanisch und vereinfachtes Chinesisch.
## Screenshots und Anleitungen
| Portable Characters — experimentell | Öffentliche Realms |
|---|---|
| ![Portable Characters](docs/screenshots/de/portable.jpg) | ![Öffentliche Realms](docs/screenshots/de/realms.jpg) |
| Begleiter | Sicherungen |
|---|---|
| ![Begleiter](docs/screenshots/de/bots.jpg) | ![Sicherungen](docs/screenshots/de/backups.jpg) |
[Zur Galerie](docs/de/SCREENSHOTS.md) · [Alle Anleitungen](docs/de/README.md). Die Galerie zeigt auch Einrichtung, Module, Spielclient, Verbindungen mit Freunden und die Übernahme eines vorhandenen Charakters.
## Installation
Lade das Installationsprogramm von der [Release-Seite](https://github.com/Corfirean/coa-server-manager/releases/latest) herunter und starte es. Für den Server brauchst du etwa 10 GB freien Speicher. Der Spielclient benötigt zusätzlich etwa 43 GB: Wähle einen vorhandenen Client oder lade ihn über den Manager.
## Änderungen
[Manager-Changelog](CHANGELOG.md) · [Server-Changelog](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md). Manager und Server haben getrennte Versionsverläufe. Ein Managerupdate aktualisiert nicht den Server.
## Projektstatus
**In aktiver Entwicklung.** Fehler sind weiterhin möglich. Wenn du ein Problem findest, [erstelle bitte ein Issue](https://github.com/Corfirean/coa-server-manager/issues/new/choose).
### Bekannte Einschränkungen
- Der Ascension-Client 3.3.5 nimmt keine Zugangsdaten über die Kommandozeile an. Gib dein Passwort selbst ein oder verknüpfe ein bestehendes Konto.
- Windows schützt vertrauliche Daten mit DPAPI (`CryptProtectData`) und zusätzlicher Entropie zur Domänentrennung. Linux/macOS verwenden Dateien mit den Zugriffsrechten `0600`.
- Eine bestehende direkte TCP-Verbindung lässt sich nicht während der Sitzung auf einen Relay umstellen. Nach einem Verbindungsabbruch wird beim nächsten Beitritt automatisch auf die Ausweichroute zurückgegriffen.
- Für sichere entfernte Importe portabler Charaktere muss `CharacterDatabase.WorkerThreads = 1` bleiben; das ist der Standardwert.
## Entwicklung
```sh
npm install
cargo test --workspace
npx tsc --noEmit
node tools/check-i18n.mjs
npx vite
cargo build -p coa-server-manager
```
Die Befehle installieren Abhängigkeiten, führen Tests aus, prüfen Typen und Übersetzungen, starten die Browseransicht mit Testdaten und bauen die native Anwendung. Der Debug-Build verwendet `http://localhost:1420`.
Die Programmlogik liegt in `crates/coa-core`, Paket- und Signaturwerkzeuge in `crates/coa-release`, native Befehle in `src-tauri` und die Oberfläche in `src`.
`cargo run -p coa-core --example scan -- <folder>` prüft eine vorhandene Installation nur lesend. Verwende für Start-/Stopp-Tests ausschließlich eine entbehrliche Testkopie: `tools/make-fixture.ps1` erstellt `C:\games\coa-fixture` aus der unveränderten Paketdatenbank mit anderen Ports. Teste niemals an einem genutzten Server. `tests/e2e/cdp.mjs` steuert das echte Fenster über WebView2 mit `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222`.
## Lizenz
Der Manager ist freie Software unter der [GNU AGPL v3.0](LICENSE), Kennung `AGPL-3.0-only`.
- Der installierte Server basiert auf einem öffentlichen [AzerothCore-Fork](https://github.com/Corfirean/azerothcore-wotlk-coa). Für von MaNGOS übernommene Teile gilt GPL-2.0-or-later, für eigene AzerothCore-Teile AGPL-3.0. [mod-coa-playerbots](https://github.com/Corfirean/mod-coa-playerbots) steht unter AGPL-3.0. Die exakten Quellstände stehen im Paketmanifest, damit der passende Quellcode auffindbar bleibt.
- Das mitgelieferte MySQL behält seine GPL-2.0-Lizenz; der Lizenztext liegt im Paket unter `Licenses`.
- Die Spieldaten in `Data` (`dbc`, `maps`, `vmaps`, `mmaps`) stammen aus dem Client des eingestellten Ascension-Realms Conquest of Azeroth. Sie fallen **nicht** unter die Lizenz des Managers.
-84
View File
@@ -1,84 +0,0 @@
# CoA Server Manager
[English](README.md) · [Русский](README.ru.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · **Español** · [简体中文](README.zh-CN.md)
**Los personajes portátiles son una función experimental.** Sigue en desarrollo y puede contener errores.
Una aplicación para Windows con la que instalar y gestionar tu propio servidor de **Conquest of Azeroth**, basado en AzerothCore, en pocos pasos. No necesitas usar la consola, editar archivos de configuración a mano ni manejar programas de bases de datos. Creada con Tauri 2, Rust y React.
![Tu servidor de un vistazo](docs/screenshots/es/overview.jpg)
## Funciones
- **Personajes portátiles — experimental.** Guarda personajes y sus distintas versiones en el Manager, o convierte en portátil un personaje que ya tengas en un reino al que puedas acceder. [Ver la guía](docs/es/PORTABLE-CHARACTERS.md).
- **Buscador de reinos.** Compara reinos públicos por modo de juego, nivel máximo, multiplicadores, módulos y población.
- **Instalación sencilla.** Descarga un paquete de servidor firmado, comprueba los archivos, prepara la base de datos y crea tu primera cuenta. Las descargas se pueden reanudar. También puedes importar un servidor existente.
- **Iniciar, detener y jugar.** Controla conjuntamente la base de datos y los servidores de autenticación y mundo. Consulta su estado, tiempo de actividad y jugadores conectados. Al abrir el juego se utiliza la realmlist correcta.
- **Cliente de juego.** Usa el que ya tengas o descárgalo desde el Manager: unos 43 GB, con descarga reanudable y verificación de archivos. Los clientes gestionados reciben avisos de actualización; los archivos que hayas modificado solo se sustituyen con tu permiso.
- **Actualizaciones del servidor.** Se buscan al iniciar y cada cinco minutos. Los paquetes se verifican mediante firmas Ed25519, se crea una copia antes de actualizar, se conservan tus cambios y es posible volver atrás.
- **Copias de seguridad.** Guarda personajes, cuentas y ajustes cuando quieras o automáticamente antes de una actualización. Comprueba y restaura las copias desde la aplicación.
- **CoA, Wildcard y Warcraft Reborn.** Elige el reino en Resumen. La versión del servidor debe admitir el modo seleccionado. El primer cambio crea un mundo independiente y una base de personajes vacía. Las cuentas son compartidas; los personajes y los ajustes de módulos se mantienen separados. Si el servidor está encendido, guarda los personajes y se reinicia al cambiar. Cierra el cliente antes del cambio; si está abierto, el nuevo reino se aplicará la próxima vez que lo abras desde el Manager. No hay bots en Wildcard ni en Warcraft Reborn; los demás módulos opcionales son experimentales allí. Las copias y las actualizaciones cubren todos los reinos creados. CoA y Wildcard pueden funcionar a la vez. [Wildcard](docs/es/WILDCARD.md) · [Warcraft Reborn](docs/es/WARCRAFT-REBORN.md).
- **Bots compañeros.** Llena el mundo con bots de nivel adecuado, sigue su creación, ponla en pausa o desconecta los bots. Elimina una cantidad concreta para reducir la carga y decide cuántos se conectan al iniciar el servidor.
- **Cambio de realmlist.** Guarda conexiones con nombres como Solo o PTR y selecciónalas junto al botón de jugar. El archivo anterior se guarda antes de sustituirlo.
- **Cuentas y ajustes.** Gestiona nombres, contraseñas y permisos. Configura el servidor y los bots con opciones explicadas y ajustes predefinidos. También tienes una consola de servidor y una lista de jugadores con herramientas de cuentas.
- **Módulos.** Activa funciones adicionales, cambia sus ajustes o abre el repositorio de sus autores desde la misma página.
- **Jugar con amigos.** Comprueba si pueden acceder, configura el cortafuegos y UPnP, y prepara conexiones por LAN, dirección directa o red privada/Tailscale. Incluye guías y un paquete con los datos de conexión para compartir.
- **Informar de problemas.** Prepara un informe para GitHub con las versiones ya rellenadas.
- **Actualizaciones del Manager.** Se descargan en segundo plano y se instalan al cerrar la aplicación. No detienen ni modifican tus servidores.
- **Idiomas:** inglés, ruso, alemán, francés, español y chino simplificado.
## Capturas y guías
| Personajes portátiles — experimental | Reinos públicos |
|---|---|
| ![Personajes portátiles](docs/screenshots/es/portable.jpg) | ![Reinos públicos](docs/screenshots/es/realms.jpg) |
| Compañeros | Copias de seguridad |
|---|---|
| ![Compañeros](docs/screenshots/es/bots.jpg) | ![Copias de seguridad](docs/screenshots/es/backups.jpg) |
[Galería completa](docs/es/SCREENSHOTS.md) · [Todas las guías](docs/es/README.md). También encontrarás la instalación, los módulos, el cliente, las conexiones con amigos y cómo convertir un personaje existente en portátil.
## Instalación
Descarga el instalador desde la [página de versiones](https://github.com/Corfirean/coa-server-manager/releases/latest) y ejecútalo. Necesitas unos 10 GB libres para el servidor. El cliente se instala por separado y ocupa unos 43 GB: indica tu carpeta existente o descárgalo con el Manager.
## Historial de cambios
[Cambios del Manager](CHANGELOG.md) · [Cambios del servidor](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md). Sus versiones se siguen por separado. Actualizar el Manager no actualiza el servidor.
## Estado del proyecto
**En desarrollo activo.** Todavía puede haber errores. Si encuentras un problema, [abre una incidencia](https://github.com/Corfirean/coa-server-manager/issues/new/choose).
### Limitaciones conocidas
- El cliente Ascension 3.3.5 no acepta credenciales por línea de comandos. Introduce la contraseña manualmente o vincula una cuenta existente.
- En Windows, los secretos se protegen con DPAPI (`CryptProtectData`) y entropía para separar dominios. Linux/macOS usan archivos con permisos `0600`.
- Una conexión TCP directa ya establecida no puede pasar a un relé a mitad de sesión. Tras una interrupción, la ruta alternativa se selecciona automáticamente en la siguiente conexión.
- Para importar personajes portátiles de forma remota con seguridad, mantén `CharacterDatabase.WorkerThreads = 1`, su valor predeterminado.
## Desarrollo
```sh
npm install
cargo test --workspace
npx tsc --noEmit
node tools/check-i18n.mjs
npx vite
cargo build -p coa-server-manager
```
Estos comandos instalan dependencias, ejecutan pruebas, comprueban tipos y traducciones, abren la interfaz en el navegador con datos de prueba y compilan la aplicación nativa. La versión de depuración utiliza `http://localhost:1420`.
La lógica está en `crates/coa-core`, las herramientas de empaquetado y firma en `crates/coa-release`, los comandos nativos en `src-tauri` y la interfaz en `src`.
`cargo run -p coa-core --example scan -- <folder>` inspecciona una instalación sin modificarla. Para probar el inicio y la parada, usa solo una copia desechable: `tools/make-fixture.ps1` crea `C:\games\coa-fixture` a partir de la base intacta del paquete y con puertos diferentes. No hagas estas pruebas en un servidor en uso. `tests/e2e/cdp.mjs` controla la ventana real mediante WebView2 con `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222`.
## Licencia
El Manager es software libre bajo [GNU AGPL v3.0](LICENSE), identificador `AGPL-3.0-only`.
- El servidor instalado procede de un [fork público de AzerothCore](https://github.com/Corfirean/azerothcore-wotlk-coa). Las partes heredadas de MaNGOS usan GPL-2.0-or-later y las propias de AzerothCore, AGPL-3.0. [mod-coa-playerbots](https://github.com/Corfirean/mod-coa-playerbots) utiliza AGPL-3.0. El manifiesto de cada paquete indica los commits exactos para localizar el código fuente correspondiente.
- MySQL conserva su licencia GPL-2.0; el texto se incluye en la carpeta `Licenses` del paquete.
- Los datos de juego de `Data` (`dbc`, `maps`, `vmaps`, `mmaps`) se extrajeron del cliente del antiguo reino Ascension Conquest of Azeroth. **No** están cubiertos por la licencia del Manager.
-84
View File
@@ -1,84 +0,0 @@
# CoA Server Manager
[English](README.md) · [Русский](README.ru.md) · [Deutsch](README.de.md) · **Français** · [Español](README.es.md) · [简体中文](README.zh-CN.md)
**Les personnages portables sont une fonctionnalité expérimentale.** Elle est encore en développement et peut présenter des bugs.
Une application Windows pour installer et gérer votre propre serveur **Conquest of Azeroth**, basé sur AzerothCore, en quelques étapes. Pas besoin de console, de modifier les fichiers de configuration à la main ou d'utiliser un outil de base de données. L'application utilise Tauri 2, Rust et React.
![Votre serveur en un coup d'œil](docs/screenshots/fr/overview.jpg)
## Fonctionnalités
- **Personnages portables — expérimental.** Conservez vos personnages et leurs sauvegardes dans le Manager, ou rendez portable un personnage déjà présent sur un royaume auquel vous avez accès. [Voir le guide](docs/fr/PORTABLE-CHARACTERS.md).
- **Découverte des royaumes.** Comparez les royaumes publics selon leur mode de jeu, niveau maximal, taux de progression, modules et population.
- **Installation simplifiée.** Le Manager télécharge un paquet serveur signé, vérifie les fichiers, configure la base de données et crée votre premier compte. Les téléchargements peuvent reprendre après une interruption. Vous pouvez aussi importer un serveur existant.
- **Démarrer, arrêter, jouer.** Une commande suffit pour gérer la base de données et les serveurs d'authentification et de monde. L'état, la durée de fonctionnement et les joueurs connectés restent visibles. Le lancement du jeu utilise la bonne realmlist.
- **Gestion du client de jeu.** Utilisez votre client ou téléchargez-le depuis l'application : environ 43 Go, avec reprise et vérification des fichiers. Un client géré reçoit des mises à jour ; vos fichiers modifiés ne sont remplacés qu'avec votre accord.
- **Mises à jour du serveur.** Recherche au démarrage et toutes les cinq minutes, vérification des signatures Ed25519, sauvegarde préalable, conservation des modifications personnelles et possibilité de revenir en arrière.
- **Sauvegardes.** Enregistrez personnages, comptes et paramètres à la demande ou automatiquement avant les mises à jour. Vérifiez et restaurez les sauvegardes dans l'application.
- **CoA, Wildcard et Warcraft Reborn.** Choisissez le royaume dans Vue d'ensemble. La version du serveur doit prendre en charge le mode choisi. Le premier changement crée un monde distinct et une base de personnages vide. Les comptes sont partagés, mais personnages et réglages des modules restent séparés. Un serveur en cours d'exécution sauvegarde les personnages puis redémarre lors du changement. Fermez le client avant de changer de royaume ; s'il est ouvert, le choix prendra effet au prochain lancement depuis le Manager. Les bots sont indisponibles sur Wildcard et Warcraft Reborn ; les autres modules optionnels y sont expérimentaux. Sauvegardes et mises à jour couvrent tous les royaumes créés. CoA et Wildcard peuvent fonctionner ensemble. [Wildcard](docs/fr/WILDCARD.md) · [Warcraft Reborn](docs/fr/WARCRAFT-REBORN.md).
- **Bots compagnons.** Peuplez le monde avec des bots de niveau adapté, suivez leur création, mettez-la en pause ou déconnectez les bots. Retirez un nombre choisi de bots pour alléger le serveur et réglez combien se connectent au démarrage.
- **Changement de realmlist.** Enregistrez des connexions nommées, comme Solo et PTR, et choisissez-les à côté du bouton de jeu. Le fichier précédent est sauvegardé avant remplacement.
- **Comptes et réglages.** Gérez noms, mots de passe et droits d'accès. Configurez serveur et bots avec des options expliquées et des préréglages. Une console serveur et une liste des joueurs avec gestion des comptes sont également disponibles.
- **Modules.** Activez les fonctions supplémentaires, modifiez leurs réglages ou consultez leur projet GitHub depuis une même page.
- **Jouer avec des amis.** Vérifiez l'accessibilité du serveur, configurez pare-feu et UPnP, préparez une connexion en réseau local, directe ou via un réseau privé/Tailscale. Des guides et un paquet de connexion facilitent l'arrivée des amis.
- **Signalement des problèmes.** Préparez un rapport GitHub avec les versions déjà renseignées.
- **Mises à jour du Manager.** Téléchargées en arrière-plan, elles s'installent à la fermeture. Elles n'arrêtent pas vos serveurs et ne les modifient pas.
- **Langues :** anglais, russe, allemand, français, espagnol et chinois simplifié.
## Captures et guides
| Personnages portables — expérimental | Royaumes publics |
|---|---|
| ![Personnages portables](docs/screenshots/fr/portable.jpg) | ![Royaumes publics](docs/screenshots/fr/realms.jpg) |
| Compagnons | Sauvegardes |
|---|---|
| ![Compagnons](docs/screenshots/fr/bots.jpg) | ![Sauvegardes](docs/screenshots/fr/backups.jpg) |
[Galerie complète](docs/fr/SCREENSHOTS.md) · [Tous les guides](docs/fr/README.md). La galerie présente aussi l'installation, les modules, le client, les connexions entre amis et la création d'un personnage portable.
## Installation
Téléchargez et lancez l'installateur depuis les [publications GitHub](https://github.com/Corfirean/coa-server-manager/releases/latest). Prévoyez environ 10 Go libres pour le serveur. Le client de jeu est séparé et demande environ 43 Go : indiquez un dossier existant ou téléchargez-le avec le Manager.
## Historique des versions
[Changelog du Manager](CHANGELOG.md) · [Changelog du serveur](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md). Leurs versions sont suivies séparément : mettre à jour le Manager ne met pas à jour le serveur.
## État du projet
**En développement actif.** Des bugs restent possibles. Si vous rencontrez un problème, [ouvrez une issue](https://github.com/Corfirean/coa-server-manager/issues/new/choose).
### Limites connues
- Le client Ascension 3.3.5 n'accepte pas les identifiants en ligne de commande. Saisissez votre mot de passe ou associez un compte existant.
- Windows protège les secrets avec DPAPI (`CryptProtectData`) et une entropie de séparation de domaine. Sous Linux/macOS, ils sont conservés dans des fichiers aux permissions `0600`.
- Une connexion TCP directe déjà établie ne peut pas basculer vers un relais en cours de session. Après une coupure, le repli automatique intervient à la connexion suivante.
- Pour importer à distance des personnages portables en sécurité, conservez `CharacterDatabase.WorkerThreads = 1`, la valeur par défaut.
## Développement
```sh
npm install
cargo test --workspace
npx tsc --noEmit
node tools/check-i18n.mjs
npx vite
cargo build -p coa-server-manager
```
Ces commandes installent les dépendances, exécutent les tests, contrôlent les types et les traductions, ouvrent l'interface dans le navigateur avec des données de test, puis compilent l'application native. En mode debug, celle-ci utilise `http://localhost:1420`.
La logique se trouve dans `crates/coa-core`, les outils de paquetage et de signature dans `crates/coa-release`, les commandes natives dans `src-tauri` et l'interface dans `src`.
`cargo run -p coa-core --example scan -- <folder>` inspecte une installation sans la modifier. Pour tester démarrage et arrêt, utilisez uniquement une copie jetable : `tools/make-fixture.ps1` crée `C:\games\coa-fixture` depuis la base intacte du paquet, avec des ports distincts. Ne testez jamais sur un serveur utilisé par des joueurs. `tests/e2e/cdp.mjs` pilote la véritable fenêtre via WebView2 avec `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222`.
## Licence
Le Manager est un logiciel libre sous [GNU AGPL v3.0](LICENSE), identifiant `AGPL-3.0-only`.
- Le serveur installé provient d'un [fork public d'AzerothCore](https://github.com/Corfirean/azerothcore-wotlk-coa). Les parties héritées de MaNGOS relèvent de GPL-2.0-or-later et les parties propres à AzerothCore d'AGPL-3.0. [mod-coa-playerbots](https://github.com/Corfirean/mod-coa-playerbots) utilise AGPL-3.0. Les commits exacts figurent dans le manifeste de chaque paquet pour retrouver les sources correspondantes.
- MySQL conserve sa licence GPL-2.0 ; son texte est fourni dans le dossier `Licenses` du paquet.
- Les données de jeu dans `Data` (`dbc`, `maps`, `vmaps`, `mmaps`) proviennent du client de l'ancien royaume Ascension Conquest of Azeroth. Elles ne sont **pas** couvertes par la licence du Manager.
-2
View File
@@ -1,7 +1,5 @@
# CoA Server Manager
**English** · [Русский](README.ru.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [简体中文](README.zh-CN.md)
**Portable characters are experimental.** This feature is in active development and may contain bugs.
A Windows app that installs and runs your own **Conquest of Azeroth** server (AzerothCore) with a few clicks:
-84
View File
@@ -1,84 +0,0 @@
# CoA Server Manager
[English](README.md) · **Русский** · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [简体中文](README.zh-CN.md)
**Переносимые персонажи — экспериментальная функция.** Она ещё развивается и может работать с ошибками.
Приложение для Windows, с которым можно установить и запустить свой сервер **Conquest of Azeroth** на базе AzerothCore за несколько шагов. Управляйте сервером через интерфейс, без консоли, ручного редактирования конфигов и отдельных программ для базы данных. Менеджер написан на Tauri 2, Rust и React.
![Главное окно менеджера](docs/screenshots/ru/overview.jpg)
## Возможности
- **Переносимые персонажи — экспериментально.** Храните персонажей и историю сохранений в менеджере, делайте переносимыми уже существующих персонажей с доступных вам реалмов. [Как это работает](docs/ru/PORTABLE-CHARACTERS.md).
- **Каталог реалмов.** Сравнивайте публичные серверы по режиму игры, максимальному уровню, рейтам, модулям и числу игроков.
- **Простая установка.** Менеджер скачивает подписанный пакет сервера, проверяет файлы, настраивает базу данных и создаёт первый аккаунт. Прерванную загрузку можно продолжить. Можно также подключить уже установленный сервер.
- **Запуск, остановка и игра.** Управляйте базой данных и обоими серверными процессами одной кнопкой. На главном экране видны состояние, время работы и игроки онлайн. Кнопка запуска игры выбирает нужный realmlist.
- **Игровой клиент.** Подключите свой клиент или скачайте его через менеджер — около 43 ГБ, с продолжением загрузки и проверкой файлов. Для управляемого клиента доступны обновления; ваши изменения заменяются только с вашего согласия.
- **Обновления сервера.** Проверка выполняется при запуске и каждые пять минут. Пакеты защищены подписью Ed25519; перед установкой создаётся резервная копия. Пользовательские изменения сохраняются, предусмотрен откат.
- **Резервные копии.** Сохраняйте персонажей, аккаунты и настройки вручную или автоматически перед обновлениями. Проверка и восстановление доступны в приложении.
- **CoA, Wildcard и Warcraft Reborn.** Выбирайте реалм в разделе «Обзор». Нужна серверная сборка с поддержкой выбранного режима. При первом переключении создаются отдельный мир и пустая база персонажей. Аккаунты общие, персонажи и настройки модулей раздельные. Переключение работающего сервера сохраняет персонажей и перезапускает его. Закройте клиент перед переключением; если он открыт, новый реалм будет выбран при следующем запуске через менеджер. Боты недоступны в Wildcard и Warcraft Reborn, остальные дополнительные модули там экспериментальны. Копии и обновления охватывают все созданные реалмы. Одновременно можно запускать CoA и Wildcard. [Гайд по Wildcard](docs/ru/WILDCARD.md) · [Warcraft Reborn](docs/ru/WARCRAFT-REBORN.md).
- **Компаньоны-боты.** Заселяйте мир ботами подходящего уровня, следите за созданием, приостанавливайте его, отключайте ботов или удаляйте нужное количество для снижения нагрузки. Можно задать число ботов при старте сервера.
- **Список подключений.** Сохраняйте несколько realmlist с понятными названиями, например Solo и PTR, и переключайте их рядом с кнопкой игры. Предыдущий файл сохраняется.
- **Аккаунты и настройки.** Управляйте именами, паролями и уровнями доступа. Настраивайте сервер и ботов через понятные параметры и готовые наборы; доступны консоль сервера и список игроков.
- **Модули.** Включайте дополнительные возможности, меняйте их настройки и переходите в репозитории авторов с одной страницы.
- **Игра с друзьями.** Проверка доступности, настройка брандмауэра и UPnP, подключение по локальной сети, напрямую или через частную сеть/Tailscale. Внутри есть пошаговые инструкции и пакет с данными подключения для друзей.
- **Сообщения об ошибках.** Менеджер помогает подготовить issue на GitHub и подставляет версии программ.
- **Обновление менеджера.** Загружается в фоне и устанавливается при закрытии приложения. Ваши серверы при этом не останавливаются и не изменяются.
- **Языки:** английский, русский, немецкий, французский, испанский и упрощённый китайский.
## Скриншоты и гайды
| Переносимые персонажи — экспериментально | Публичные реалмы |
|---|---|
| ![Переносимые персонажи](docs/screenshots/ru/portable.jpg) | ![Публичные реалмы](docs/screenshots/ru/realms.jpg) |
| Компаньоны | Резервные копии |
|---|---|
| ![Компаньоны](docs/screenshots/ru/bots.jpg) | ![Резервные копии](docs/screenshots/ru/backups.jpg) |
[Все скриншоты](docs/ru/SCREENSHOTS.md) · [Гайды для игроков и владельцев серверов](docs/ru/README.md). В галерее также показаны установка, модули, клиент, подключение друзей и создание переносимого персонажа.
## Установка
Скачайте установщик со страницы [релизов](https://github.com/Corfirean/coa-server-manager/releases/latest) и запустите его. Для сервера нужно около 10 ГБ свободного места. Клиент устанавливается отдельно и занимает около 43 ГБ: укажите существующую папку или скачайте его через менеджер.
## Что изменилось
[Ченджлог менеджера](CHANGELOG.md) · [Ченджлог сервера](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md). Это отдельные продукты с отдельной историей версий: обновление менеджера не обновляет сервер.
## Состояние проекта
**Проект активно развивается.** Ошибки ещё возможны. Если встретили проблему, [создайте issue](https://github.com/Corfirean/coa-server-manager/issues/new/choose).
### Известные ограничения
- Клиент Ascension 3.3.5 не принимает логин и пароль через командную строку. Введите пароль вручную или привяжите существующий аккаунт.
- В Windows секреты защищены DPAPI (`CryptProtectData`) с отдельной энтропией домена. На Linux/macOS используются файлы с правами `0600`.
- Уже открытое прямое TCP-соединение нельзя переключить на ретранслятор без разрыва. Резервный маршрут выбирается при следующем подключении.
- Для безопасного удалённого импорта переносимых персонажей оставьте `CharacterDatabase.WorkerThreads = 1` — это значение по умолчанию.
## Разработка
```sh
npm install
cargo test --workspace
npx tsc --noEmit
node tools/check-i18n.mjs
npx vite
cargo build -p coa-server-manager
```
Команды устанавливают зависимости, запускают тесты, проверяют типы и переводы, открывают браузерный интерфейс с тестовыми данными и собирают нативное приложение. В отладочном режиме оно использует `http://localhost:1420`.
`crates/coa-core` содержит основную логику, `crates/coa-release` — упаковку и подписи, `src-tauri` — команды приложения, `src` — интерфейс.
Проверить существующую сборку без изменений можно командой `cargo run -p coa-core --example scan -- <folder>`. Для проверок запуска и остановки используйте только отдельную тестовую копию: `tools/make-fixture.ps1` создаёт `C:\games\coa-fixture` из чистой базы пакета, с другими портами. Не проводите такие проверки на сервере, которым пользуются игроки. `tests/e2e/cdp.mjs` управляет настоящим окном через WebView2 с `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222`.
## Лицензия
Менеджер — свободное ПО под [GNU AGPL v3.0](LICENSE), идентификатор `AGPL-3.0-only`.
- Устанавливаемый сервер основан на [форке AzerothCore](https://github.com/Corfirean/azerothcore-wotlk-coa): части, унаследованные от MaNGOS, используют GPL-2.0-or-later, собственные части AzerothCore — AGPL-3.0. Модуль [mod-coa-playerbots](https://github.com/Corfirean/mod-coa-playerbots) использует AGPL-3.0. Точные коммиты записываются в манифест пакета, чтобы можно было найти соответствующий исходный код.
- MySQL распространяется по собственной лицензии GPL-2.0; её текст находится в папке `Licenses` пакета.
- Данные игры в `Data` (`dbc`, `maps`, `vmaps`, `mmaps`) извлечены из клиента закрытого реалма Ascension Conquest of Azeroth. Лицензия менеджера на них **не распространяется**.
-84
View File
@@ -1,84 +0,0 @@
# CoA Server Manager
[English](README.md) · [Русский](README.ru.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · **简体中文**
**便携角色是一项实验性功能。** 目前仍在开发中,使用时可能遇到问题。
这是一款 Windows 应用,帮助你用几个简单步骤搭建和管理自己的 **Conquest of Azeroth** 服务器,服务端基于 AzerothCore。日常操作不需要使用控制台、手动修改配置文件或单独操作数据库。应用采用 Tauri 2、Rust 和 React 开发。
![服务器概览](docs/screenshots/zh-CN/overview.jpg)
## 主要功能
- **便携角色(实验性)。** 在管理器中保存角色及其历史存档,也可以将有权访问的服务器上的现有角色转换为便携角色。[查看使用指南](docs/zh-CN/PORTABLE-CHARACTERS.md)。
- **查找服务器。** 浏览公开服务器,对比游戏模式、等级上限、倍率、模块和在线人数。
- **轻松安装。** 下载带签名的服务端安装包,逐一校验文件,配置数据库并创建首个账号。下载支持断点续传,也可以导入已有服务器。
- **启动、停止和进入游戏。** 一处控制数据库、认证服务和世界服务,随时查看运行状态、运行时间和在线玩家。启动游戏时会自动使用对应的 realmlist。
- **管理游戏客户端。** 指定现有客户端,或通过管理器下载约 43 GB 的客户端。下载可以续传,文件会经过校验。受管理的客户端可以检查更新;自行修改的文件只有在你同意后才会被替换。
- **更新服务器。** 应用启动时及之后每五分钟检查一次更新。安装包通过 Ed25519 签名验证,更新前自动备份,保留用户修改,并支持回滚。
- **备份与恢复。** 手动备份角色、账号和设置,或在更新前自动备份。在应用中即可校验和恢复。
- **CoA、Wildcard 和 Warcraft Reborn。** 在概览中选择服务器模式,服务端版本必须支持所选模式。首次切换会创建独立的世界数据库和空的角色数据库。各模式共用账号,角色和模块设置相互独立。运行中切换会先保存角色,再重启服务器。切换前请关闭客户端;如果客户端仍开着,新选择会在下次通过管理器启动游戏时生效。Wildcard 和 Warcraft Reborn 不支持机器人,其他可选模块在这两种模式下也属于实验性支持。备份和数据库更新涵盖所有已创建的模式。目前支持 CoA 与 Wildcard 同时运行。[Wildcard 指南](docs/zh-CN/WILDCARD.md) · [Warcraft Reborn 指南](docs/zh-CN/WARCRAFT-REBORN.md)。
- **伙伴机器人。** 创建等级合适的机器人并查看进度,暂停创建、让机器人下线,或移除指定数量以减轻服务器负担。也可以设置开服时登录的机器人数量。
- **切换 realmlist。** 为不同连接保存名称,例如 Solo 和 PTR,在进入游戏按钮旁直接切换。替换前会保存原文件。
- **账号和设置。** 管理账号名称、密码和权限,通过说明清楚的选项及预设调整服务器和机器人。还提供世界服务器控制台,以及带账号管理功能的玩家列表。
- **模块管理。** 在同一页面启用可选功能、调整设置,或打开相应项目的 GitHub 页面。
- **好友联机。** 检查服务器是否可达,配置防火墙和 UPnP,支持局域网、直接连接及私有网络/Tailscale。应用提供分步说明,还能准备可分享的连接资料包。
- **报告问题。** 帮你准备 GitHub 问题报告,并自动填写版本信息。
- **管理器自身更新。** 在后台下载,关闭应用时安装。更新管理器不会停止或修改你的服务器。
- **支持语言:** 英语、俄语、德语、法语、西班牙语和简体中文。
## 截图与指南
| 便携角色(实验性) | 公开服务器 |
|---|---|
| ![便携角色](docs/screenshots/zh-CN/portable.jpg) | ![公开服务器](docs/screenshots/zh-CN/realms.jpg) |
| 伙伴机器人 | 备份 |
|---|---|
| ![伙伴机器人](docs/screenshots/zh-CN/bots.jpg) | ![备份](docs/screenshots/zh-CN/backups.jpg) |
[查看完整截图](docs/zh-CN/SCREENSHOTS.md) · [玩家与服主指南](docs/zh-CN/README.md)。图库还展示了初始设置、模块、客户端、朋友联机,以及将现有角色转换为便携角色的流程。
## 安装
从 [GitHub 发布页](https://github.com/Corfirean/coa-server-manager/releases/latest)下载安装程序并运行。服务器约需 10 GB 可用空间。游戏客户端单独安装,约占 43 GB;你可以指定已有客户端目录,也可以交给管理器下载。
## 更新记录
[管理器更新记录](CHANGELOG.md) · [服务器更新记录](https://github.com/Corfirean/coa-server-build/blob/main/CHANGELOG.md)。两者的版本和更新记录分别维护。更新管理器不会同时更新服务器。
## 项目状态
**正在积极开发中。** 仍可能存在问题。如果遇到故障,请[提交 issue](https://github.com/Corfirean/coa-server-manager/issues/new/choose)。
### 已知限制
- Ascension 3.3.5 客户端不支持通过命令行传入账号和密码。请自行输入密码,或关联现有账号。
- Windows 使用 DPAPI(`CryptProtectData`)及用于域隔离的额外熵来保护机密数据。Linux/macOS 使用权限为 `0600` 的文件。
- 已建立的直连 TCP 会话无法在不中断连接的情况下切换至中继。连接中断后,会在下一次加入服务器时自动尝试备用路径。
- 为保证远程导入便携角色的安全,请保留默认设置 `CharacterDatabase.WorkerThreads = 1`。
## 开发
```sh
npm install
cargo test --workspace
npx tsc --noEmit
node tools/check-i18n.mjs
npx vite
cargo build -p coa-server-manager
```
以上命令依次安装依赖、运行测试、检查类型与翻译、启动使用模拟数据的浏览器界面,以及编译原生应用。调试版应用连接 `http://localhost:1420`。
`crates/coa-core` 存放核心逻辑,`crates/coa-release` 提供打包和签名工具,`src-tauri` 处理原生命令,`src` 存放界面代码。
`cargo run -p coa-core --example scan -- <folder>` 可以只读检查现有安装。启动和停止测试必须使用可丢弃的独立副本:`tools/make-fixture.ps1` 会从安装包的原始数据库创建 `C:\games\coa-fixture`,并使用不同端口。不要在正在供玩家使用的服务器上进行此类测试。`tests/e2e/cdp.mjs` 可通过 WebView2 控制真实窗口,需设置 `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222`。
## 许可
管理器是自由软件,采用 [GNU AGPL v3.0](LICENSE),标识为 `AGPL-3.0-only`。
- 所安装的服务器来自公开的 [AzerothCore 分支](https://github.com/Corfirean/azerothcore-wotlk-coa)。继承自 MaNGOS 的部分采用 GPL-2.0-or-later,AzerothCore 自有部分采用 AGPL-3.0。[mod-coa-playerbots](https://github.com/Corfirean/mod-coa-playerbots) 采用 AGPL-3.0。每个安装包的清单都记录了准确的提交版本,便于查找对应源码。
- 随附的 MySQL 保留其 GPL-2.0 许可,许可文本位于安装包的 `Licenses` 目录。
- `Data` 中的游戏数据(`dbc`、`maps`、`vmaps`、`mmaps`)提取自已关闭的 Ascension Conquest of Azeroth 服务器客户端,**不属于**管理器许可的授权范围。
+56
View File
@@ -1,5 +1,39 @@
# TODO
## Подготовка 0.9.8, 2026-10-31
- Подготовлены исходники `C:/games/source/per-race-manager`, ветка `fix/launcher-validation-candidate-20261031`: изоляция bot configs на время проверки с точным восстановлением, повторное использование MySQL внутри validation, зависимость Dungeon Clear от SQUID, три режима логов и экспорт этапов launcher/control owner.
- Workspace: 840 тестов прошли, 60 ignored; последующие focused diagnostics: 11 прошли. Переводы новых заметок и UI подготовлены, web build/i18n/bridge/history checks прошли. Подробности и ограничения: `C:/games/source/candidate-preparation-20261031.md`.
- Не выпускать Manager до кандидата сервера. Installer ещё не собирался и не публиковался; подготовка источников не равна готовому кандидату.
## Приоритет: проверка установки и обновления (2026-10-31)
- **Локальные замеры массовых Companions (2026-10-31):** отчёт `C:/games/source/companions-benchmark-20261031/REPORT.md`, сырые выборки/qualification в той же папке. Native worldserver SHA `bd9f65ac7543fad8159231000d5ef6436a159aa009b65cbdc9541a0e9fe1ee7b`, Ryzen 7 7700X/32 GiB, `MapUpdate.Threads=1`, все CPU доступны. Перед условиями восстанавливался один снимок персонажей. Без записи логов медианы среднего тика: 0 ботов 4.5 ms; 500 — 39 ms; 1000 — 91 ms; 2000 — 246 ms, поздний замер 259 ms. С обычными логами: 500 — 43.5 ms; 1000 — 111 ms. Запуск 2000 с логами дал 1381 ms, последующий полный Logger-off 363 ms, но нагрузка хоста менялась; чистый множитель логирования этими числами не доказан. Всего 9 условий с подтверждённым online; исходная база 21 шаблон/0 тестовых аккаунтов восстановлена, тестовые процессы остановлены. Повтор 2000 с логами подготовлен, но НЕ выполнен: на C: осталось около 300 MiB. Соответствующий PDB для функционального профиля отсутствует.
- [ ] **Разобрать штатное завершение мира под большой популяцией**:
- В локальном бенчмарке ряд запусков (включая 2000 ботов и полностью отключённые логгеры) не завершились за 90 секунд после `server shutdown 1s 0`; пришлось завершать только тестовый процесс после сохранения измерений. Стек `2000-shutdown-stacks.txt` показывает ожидание `MSVCP140!Thrd_join`, точный ожидаемый поток без matching PDB не установлен. Не объявлять это доказанной причиной пользовательского control.lock или влиянием только логов.
- [ ] **Разобрать удержание control.lock после видимого запуска сервера**:
- Пользователь после hotfix v3 получил `Another start/stop action is in progress` при внешнем `with launcher["control_lock"]()`, хотя мир отвечал и Manager показывал работающий сервер. Не считать это доказательством «зависшего файла»: Windows блокирует диапазон живым дескриптором.
- На Python 3.14.7 точно воспроизведён конкурентный захват: второй лаунчер получает эту ошибку, после выхода владельца захват снова проходит. Причина долгого удержания у пользователя пока не установлена; нужны его свежие launch diagnostics.
- Добавить безопасную диагностику владельца (PID, время создания, действие, этап ожидания) и проверить сериализацию Start/Stop/Restart/validation/recovery. Различать реальную занятость и прочие OSError захвата, которые сейчас маскируются одним сообщением. Не удалять lock и не завершать чужие процессы ради обхода.
- **Проверка с ботами завершена (2026-10-31):** пользователь показал работающие MySQL/auth/world, 2000 Companions онлайн и вход своим клиентом в мир после обновления. Это подтверждает обычный запуск с ботами после hotfix, но не пригодность массового автологина для validation. Ранний снимок показывает около 11 тиков/с на 2m32s работы; результат замера после прогрева пока неизвестен.
- **Пользовательская проверка (2026-10-31):** после hotfix лаунчера v3 и отключения автологина Companions обновление завершилось успешно (server `0.261030.90`, Manager `0.9.7`). Отдельная проверка с включёнными ботами пока не завершена.
- [ ] **Сократить повторные запуски MySQL в установке/обновлении**:
- Пользователь после успешного обновления отметил большую длительность и многократные старты/остановки базы, в том числе на 85%. Проследить фактическую последовательность snapshot/SQL/schema/validation/recovery и повторно использовать уже запущенную, проверенную базу между совместимыми этапами.
- Не убирать остановки, необходимые для согласованного backup/restore, замены файлов и восстановления после отказа. Сохранить гарантии rollback и владения процессами. Записать число стартов/остановок и длительность этапов до/после; проверить обновление без ботов и восстановление после ошибки.
- [ ] **Временный конфиг проверки без массового запуска ботов**:
- Запрос владельца: грузить 2000 ботов ради проверки установки/обновления недопустимо. Облегчить все проверочные запуски, включая восстановление/повторную проверку, где применяется тот же путь запуска.
- Факты случая: этап обновления 85%, CoA Companions поставили в очередь 2000 ботов; пользователь сообщает об остановке продвижения на 519 за 6 минут. Логи показывают 518 уникальных имён в `ACTIVE_LIST`. Это не SQUID. Место зависания и причинная связь с автологином пока не установлены.
- Перед проверочным запуском временно отключать `CoaBots.AutoLoginOnStartup` и проверить другие пути автоматического входа/создания/заселения Companions, включая `CoaBots.RandomSpawn.AutoLogin`. Аналогично подавлять автоматическое заселение SQUID, если выбран этот модуль. Не подменять пользовательский выбор системы ботов и не отключать модуль целиком вместо проверки его инициализации.
- Сохранять исходные байты/отсутствие изменяемых конфигов в журнале восстановления; вернуть их до обычного запуска как при успехе, так и при ошибке, отмене, rollback и восстановлении после прерывания Manager. Не оставлять автологин выключенным пользователю. Проверить primary и дополнительные realms.
- Проверка должна подтверждать инициализацию ядра/выбранных модулей, SQL/schema, сервисы и отклик управляющего интерфейса; не ждать заполнения мира ботами и не создавать для этого тысячи персонажей. Вне validation обычный запуск сохраняет поведение пользовательских настроек.
- Проверить сценарии с Companions и лимитом 2000, SQUID, выключенными ботами; успех, отказ запуска, прерывание и восстановление исходных конфигов. Добавить регрессионные проверки и changelog после реализации.
- [ ] **Доставить исправление `manage.py` для PID 0 в согласованном серверном обновлении**:
- Серверная задача и готовый локальный hotfix описаны в `C:/games/coa-server-build/TODO.md`. Проверить импортируемый запуск через `runpy`/внешний вызов `main()` и штатный Manager update; диагностика должна работать при обоих способах загрузки.
## UI / UX
- [x] **Предупреждение о несохранённых изменениях при переходе между вкладками (Unsaved Changes Guard / Modal)**:
- Если у пользователя есть несохранённые изменения в настройках (`ModulesPage`, `SettingsPage` — сервер, боты и др.) и он переходит на другую вкладку (в боковом меню `Shell.tsx` или кнопками навигации), показывать pop-up диалог подтверждения.
@@ -27,3 +61,25 @@
4. Анализировать последние строки `Core/Logs/Server.log` и `Errors.log` на критические маркеры (потеря соединения с MySQL, нехватка RAM/OOM, ошибка бинда портов).
5. Проверять по встроенному словарю известных сигнатур (паттерны частых крашей с понятным описанием, например: «Сбой удаления объекта из сетки карты», «Ошибка запроса к базе данных», «Нехватка оперативной памяти»).
- *Fallback:* Если сигнатура не опознана в словаре известных проблем, показывать краткую техническую выжимку (код исключения + сработавший ассерт или вершина Call Stack) и кнопку разворота полного текста крашлога / копирования.
## Модули и контент
- [ ] **Следующий билд: переключатель Dungeon Clear только для SQUID** (запрос владельца 2026-10-31):
- Модуль: https://github.com/Zyth45/mod-dungeon-clear, ветка `coa`; серверная интеграция описана в `C:/games/coa-server-build/TODO.md`.
- Добавить в каталог отдельный модуль Dungeon Clear, по умолчанию выключенный. На старых серверах без модуля показывать недоступным.
- Разрешать включение только при установленном и включённом SQUID (`playerbots`). При выключенном SQUID блокировать переключатель и объяснять причину; CoA Companions не подходят.
- Проверять зависимость также в Rust backend при изменении модуля и его настроек. Отключение SQUID/переход на Companions отключает Dungeon Clear; обратное включение SQUID не включает Dungeon Clear автоматически.
- Проверить сохранение после перезапуска, ручные конфиги и отказ включения через API в обход UI. Серверный guard обязателен независимо от Manager.
- Все новые UI-тексты — на шести языках. После реализации добавить changelog fragments в соответствующие компоненты; пока это запланированная, не выпущенная возможность.
- [ ] **Внедрение модуля гильдхаусов (`mod-guildhouse`)**:
- **Репозиторий:** `https://github.com/azerothcore/mod-guildhouse`
- **Пайплайн сборки (`coa-server-build`):**
- Добавить checkout модуля в `.github/workflows/server-binaries.yml`, `build.yml` и `build-linux.yml` в директорию `modules/mod-guildhouse`.
- Добавить лицензию модуля и копирование в `scripts/assemble-tree.ps1` (`Licenses/` и `NOTICE.txt`).
- **Адаптация под Conquest of Azeroth (CoA):**
- В диалоге дворецкого (`mod_guildhouse_butler.cpp`) вместо 10 классических тренеров WotLK спавнить **Book of Ascension** (entry `499992`), которая открывает интерфейс `mod-spellbook` и заменяет всех тренеров для кастомных классов и прогрессии способностей.
- Оставить без изменений: профессии, порталы в столицы, банк, аукционы (включая нейтральный), почту, вендоров, парикмахера, горн и наковальню.
- **База данных:**
- Миграции модуля (`guild_house`, `guild_house_spawns`, `creature_template`, `gameobject_template`, `mod_guildhouse_locale`) подхватываются `coa-release` автоматически при валидации схемы контракта.
- **В игре:**
- Разместить NPC-продавца гильдхаусов (`.npc add 500030`) в ключевых хабах / столицах (Штормград, Оргриммар, Даларан).
-7247
View File
File diff suppressed because it is too large. Load diff
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Advanced settings cover creature melee damage, spell damage and health by rank
---
Configure normal, elite, rare, rare elite and world boss creatures separately. Existing normal-creature settings now identify their scope clearly. Changes persist in the server template and require a world server restart.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Internet sharing accepts existing port forwards to the same server
---
When a router rejects an already configured port forward, the Manager checks its destination. Matching enabled rules are accepted; conflicting rules report the affected TCP port and remain untouched.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Choose Parallel or Global level scaling in module settings
---
Content Scaling progression can now be set to Parallel (Classic over 1 to the level cap, TBC and WotLK over 45 to the cap) or Global (all expansions over 1 to the cap) without editing the config file by hand.
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: admins
title: The Auction House Bot card has a single switch
---
The separate "Post auctions" option is gone; turning the module on is enough. A server build with the single-switch Auction House Bot is needed, and an old EnableSeller line in the config is ignored.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: players
title: More character and server browser controls now use your selected language
---
Completed missing German, French, Spanish and Simplified Chinese labels and improved Chinese font support.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Configure the day and night cycle from the module settings
---
TimeIsTime now has a module card, an on/off switch and settings translated into all six Manager languages.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: A stalled database inspection no longer blocks server maintenance indefinitely
---
Update checks limit how long their database client can run and release the maintenance lock after a timeout. The Manager stops only its inspection client, keeps the database server running and reports that migration history could not be checked.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Server owners can allow portable characters per realm
---
Portable admission is off until enabled by the realm owner. Export and import requests enforce the saved choice.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Allowing portable characters also prepares the server for portable sessions
---
Stop the server before enabling access for the first time. The Manager enables portable sessions in the effective module configuration and preserves the required database setting across restarts. Existing configuration is backed up.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: players
title: Portable characters open again after using an experimental Manager
---
Preserves saved characters and collections when opening a portable store upgraded by an experimental Manager.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Managers stay compatible with the public connection service
---
Coordinator authentication no longer changes when portable messages change. The publishing card shows game relay status separately.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Relay connections recover and use the ports of the installed server
---
Dropped or unresponsive relay links reconnect automatically. Abandoned game connections close, and tunnels refresh when local ports become available or change. Custom authentication ports are respected.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Portable progress resumes after reconnecting or restarting the Manager
---
The player Manager now saves remote baselines, checkpoints and logout progress durably. Repeated logins stay monitored, and transfer retries preserve the same character and session.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: known-issue
audience: admins
title: Older copies on another host may require maintenance before returning
---
Experimental portable play blocks an outdated existing copy on another host. Automatic refresh while that remote worldserver runs is not available. Your canonical character remains saved in your Manager.
-7
View File
@@ -1,7 +0,0 @@
---
area: client
type: changed
audience: players
title: Install the matching CoA Custom 1.9.1 client files
---
The races installer verifies and installs all five client archives, including the new races and appearance corrections.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: players
title: Install the CoA Custom 1.9.2 client patches
---
Installs the updated Hozen and Centaur assets and quest safety addon. Existing CoA Custom 1.9.1 installations remain recognized when updating or removing patches.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Report Content Scaling problems directly to its repository
---
The report form now includes a separate Content Scaling destination.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Send custom race problem reports directly to their maintainer
---
The report form now includes Custom Races as a separate destination.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Internet sharing restores the LAN address after server restarts
---
Friends on the local network receive the server's LAN address and network mask while internet players keep using its public address.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Server updates preserve the order of database migrations added during merges
---
Older database snapshots no longer run after newer updates when preparing server packages. This prevents outdated Manastorm reward ranges from overwriting newer progression data.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Configure custom race availability for new characters
---
Choose individual races in a compact table inside module settings using the installed server catalog. Saving requires a compatible server build and a stopped server. Client synchronization is not yet automatic.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Public listing offers every realm that starts together, not just the main one
---
With Wildcard or Warcraft Reborn started next to Conquest of Azeroth, Settings now has one listing block per realm, each with its own name, description and access options.
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: admins
title: Public listing is a short list of realms with a window for the details
---
Settings shows one line per realm with its state, and publishing opens a window. Publish all realms at once. Account creation and portable characters are chosen before publishing; portable characters are on by default.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Configure profession and defense skill gains in server settings
---
Advanced rate settings now include prospecting and milling skill gains, plus the points gained from crafting, defense and gathering.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Find and edit CoA options in the existing server settings
---
Search includes the separate CoA configuration, including legacy mount flight. Changes go to the correct file; realm profile controls stay managed by the Manager.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Existing unsupported character records no longer block unrelated server updates
---
Updates compare each affected character with its saved pre-update state. Unchanged older problems are reported as warnings without changing characters. Newly missing race/class data still blocks the update and triggers recovery; schema and identity checks remain enforced.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Recovery can stop an unfinished world startup after restoring an older launcher
---
If the world console is unavailable, stop only the verified recorded world process. Keep MySQL running if ownership or shutdown cannot be confirmed.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: New server installation waits for slower database startup
---
Allow up to five minutes for MySQL to become ready. Failed installations stop their temporary database before cleaning up its files.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Control portable characters and keep Manager running in the system tray
---
Realm access settings can enable portable characters. Closing the window keeps Manager in the tray, with commands to reopen or exit. Offline realm messages explain why players cannot connect.
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: admins
title: Settings group updates, startup and maintenance with translated release history
---
Server and Manager keep separate update controls. Read their published changes in one place, including translations of the latest releases in all six interface languages. Saved notes remain available offline. Find public realm controls under Play with friends.
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: admins
title: Update and launch without updating share a divided button
---
Server and game client actions each use two adjacent segments of equal height. Both actions remain visible and keep their own availability checks.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Simultaneous update checks share results or wait their turn
---
Repeated checks no longer compete with another foreground or background check in the same Manager window. Maintenance and recovery locks remain enforced.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Maximizing the window keeps text and controls at a comfortable size
---
The interface no longer enlarges with window width. System display scaling and browser zoom still work, and large action buttons use more compact spacing.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Slow server startup no longer triggers an early update rollback
---
World startup now allows up to 25 minutes with either bot system and waits for both game and console ports within one deadline. Servers that stop during startup still fail immediately.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Account creation verifies a lost console reply against the requested login
---
Confirm the requested credentials after a lost reply, block creation during another server action, and explicitly report accounts whose administrator access could not be confirmed.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Abandoned game relay tunnels close their local connection immediately
---
Dropping a tunnel shuts down its shared socket directly instead of relying only on a background message, releasing its local read and write connection.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Keep disabled graphics components disabled during client updates
---
Client settings can disable DXVK and graphics enhancements. Existing launcher DISABLED files are respected.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Force-stop an unresponsive world after a failed normal shutdown
---
Confirm the risk of unsaved progress before stopping verified server processes. Shared databases stay running until every owned world has stopped.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Crash history includes reports from every world and Windows text files
---
Create and verify the crash report folder before native startup, and include reports from simultaneous worlds and files containing Windows ANSI text.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Show the online bot count for Playerbots on the overview
---
The overview displays bot population for both supported bot systems.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Disable public server browsing in Settings
---
Turn off public server browsing to block catalog list and detail requests. When browsing is enabled, load the list with Refresh.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Keep deliberate stops and update shutdowns from triggering crash restart
---
Status checks no longer forget a stop request while the world is still shutting down. Update validation and recovery do not trigger automatic crash restarts.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Show available update notes even when release history is cached
---
Fetch the release notes for the offered update when they are missing from the cached history, including when an update becomes available while the history is open.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Server startup waits for a responsive console before reporting success
---
An open port no longer marks a loading world as ready. Account creation checks that the console processes commands before sending a create request.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Restore the existing Manager window when launching it again
---
Choose whether closing the window exits the Manager or minimizes it to the tray. Tray actions restore the window on the UI thread.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Dungeon Clear can be enabled when SQUID bots are active
---
Dungeon Clear starts disabled. Switching SQUID bots off also switches Dungeon Clear off; enabling SQUID again leaves Dungeon Clear off until you choose to enable it.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Diagnostic exports include launcher stages and lock owner records
---
Support packages include recent launcher diagnostics for each realm, with sensitive fields removed. Recorded lock owners help diagnose overlapping startup and shutdown actions.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Custom Races patch installation recovers from interrupted downloads
---
Unfinished downloads resume automatically. Invalid archives in Downloads are skipped without changing them, and damaged cached archives are downloaded again.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Choose normal logs, errors only or no server logs in maintenance settings
---
The logging preset updates both the game world and login server, including their configuration templates. Previous settings are saved in configuration snapshots. Restart the server to apply the change.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Update checks temporarily suspend bot population and restore your configuration
---
Validation preserves the selected bot system and its population limits. Original configuration files are restored after validation, including recovery from interrupted updates.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Update validation keeps MySQL running between compatible checks
---
Database checks and the temporary server startup share one MySQL session. The server still stops before files or database snapshots are replaced or restored.
@@ -1,6 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Update and recovery checks use the temporary login port even with a Windows override
---
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Settings for how much help bots get in dungeons and raids
---
Bot damage, healing, damage taken and tank threat can now be tuned under Bots, Combat. Everything defaults to 1 (no change); a switch turns the extra help for four hard bosses on.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: players
title: Install community addons from the Manager
---
The game client card lists SquidBots Lite, DragonUI, IncahootsCoA and CoACombat. Each comes from its author's GitHub at a pinned version, every file is checked before it goes into Interface/AddOns, and the Manager updates or removes only what it installed.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: players
title: Old item and creature data is cleared before every Play
---
After a server update the game showed old names and stats from its own cache (Cache/WDB). Play now clears that cache first; it fills again within seconds. A switch next to the client graphics settings turns it off.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: players
title: Turning the custom races client patch on or off takes seconds again
---
V2 has over 7,000 files and switching it could run for many minutes. Now only the files the game itself loads are hidden, and the rest stays in place. A switch that was cut short is undone safely.
@@ -1,7 +0,0 @@
---
area: manager
type: changed
audience: players
title: The custom races client is updated to Custom Races V2
---
The client update installs V2 and starts its own CoACustomRace.exe; Ascension.exe is left as it was. Four archives are the same as in 1.9.2, so a game folder that already had 1.9.2 downloads only the rest.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: The database moves to a free port when Windows reserves or another program takes 3307
---
Hyper-V, WSL and Docker can reserve a range that includes the database port; the start then waited 30 seconds and failed. The database now picks a free port and records it, and a reserved game port is named as such at once.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Your own MySQL settings survive restarts and updates
---
Settings, Service has a MySQL settings box. Its options are added to my.ini at every start of the database; before, my.ini was rewritten and hand edits were lost. Port, addresses and data paths stay managed.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: admins
title: Disabled custom races stay disabled after a server update that adds races
---
A race list saved before Custom Races V2 no longer matched V2's race catalog, and the server then ignored it and turned custom races off. Before a start the Manager now keeps the list when every disabled race kept its ID and name.
-7
View File
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Rename your realms in the Manager
---
Settings, Startup has a name for every realm. A running server shows it at once, the game client picks it on the next Play, and it stays after restarts and updates. Before, the launcher wrote the default name back at every start.
@@ -1,7 +0,0 @@
---
area: manager
type: fixed
audience: players
title: The account for a friend's server is in the login box at every Play
---
The account the Manager made on a listed server was filled in only when joining. Play now fills it in every time, also after another server's account was used.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Restart the world every day at a chosen time
---
Settings, Startup, Scheduled restart: at that local time the world restarts with an in-game countdown and comes back by itself; the database keeps running. It works without the Manager open and needs a server with the new launcher.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu
---
The Custom Races settings now hold Subclasses and Hero Races (subclasses, the Thin Twins, the Two-Headed Ogre, two players per character) and the GM /dev menu, each with its own switch.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Companion bots on Wildcard and Warcraft Reborn
---
With a server build that supports it, Companions can be switched on for Wildcard and Warcraft Reborn: bots get whole Wildcard archetypes or Reborn abilities by level, and bot creation survives a crash without duplicates.
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: The Custom Races card tells which characters stay out while races are off
---
With custom races off, the card shows how many player characters and bots of custom races cannot enter the world, and offers to delete the companion bots of those races.
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: The game client now comes from the community launcher, not from the Manager
---
The community moved the game client behind its official launcher (account sign-in), so the Manager can no longer download or update it. The built-in client download and update are removed. "Set up the game client" now sends you to coa-development.org to get the launcher; once the launcher has installed the game, choose "I already have a client" and pick its folder. Linking a folder, the server address switch and the companion addon work as before.
+1 -348
View File
@@ -112,8 +112,6 @@
"Corfirean/coa-server-manager:20261016-preserve-core-migration-history.md",
"Corfirean/coa-server-manager:20261016-shared-auth-migration-history.md",
"Corfirean/coa-server-manager:20261016-update-compatibility-wording.md",
"Corfirean/coa-server-manager:20261017-creature-difficulty-rates.md",
"Corfirean/coa-server-manager:20261017-existing-router-mapping.md",
"Corfirean/coa-server-manager:20261018-custom-races-client.md",
"Corfirean/coa-server-manager:20261019-portable-stop-diagnostics.md",
"Corfirean/coa-server-manager:20261019-remote-character-class-names.md",
@@ -122,75 +120,7 @@
"Corfirean/coa-server-manager:20261021-portable-experimental.md",
"Corfirean/coa-server-manager:20261021-scaling-health-settings.md",
"Corfirean/coa-server-manager:20261021-warcraft-reborn-realm.md",
"Corfirean/coa-server-manager:20261022-custom-races-client.md",
"Corfirean/coa-server-manager:20261022-scaling-progression-modes.md",
"Corfirean/coa-server-manager:20261023-ah-bot-single-switch.md",
"Corfirean/coa-server-manager:20261023-interface-language-coverage.md",
"Corfirean/coa-server-manager:20261023-online-players-exclude-squid-bots.md",
"Corfirean/coa-server-manager:20261023-shared-addons-links.md",
"Corfirean/coa-server-manager:20261023-time-is-time-settings.md",
"Corfirean/coa-server-manager:20261023-update-check-database-timeout.md",
"Corfirean/coa-server-manager:20261024-portable-admission.md",
"Corfirean/coa-server-manager:20261024-portable-owner-core-activation.md",
"Corfirean/coa-server-manager:20261024-portable-schema-nine.md",
"Corfirean/coa-server-manager:20261024-relay-authentication.md",
"Corfirean/coa-server-manager:20261024-relay-recovery.md",
"Corfirean/coa-server-manager:20261024-remote-progress.md",
"Corfirean/coa-server-manager:20261024-remote-refresh.md",
"Corfirean/coa-server-manager:20261025-custom-races-191.md",
"Corfirean/coa-server-manager:20261026-custom-races-192.md",
"Corfirean/coa-server-manager:20261027-content-scaling-reports.md",
"Corfirean/coa-server-manager:20261027-custom-races-reports.md",
"Corfirean/coa-server-manager:20261027-internet-lan-address.md",
"Corfirean/coa-server-manager:20261027-merged-database-migration-order.md",
"Corfirean/coa-server-manager:20261027-per-race-server-settings.md",
"Corfirean/coa-server-manager:20261027-public-list-shows-every-running-realm.md",
"Corfirean/coa-server-manager:20261027-public-listing-window.md",
"Corfirean/coa-server-manager:20261027-skill-gain-controls.md",
"Corfirean/coa-server-manager:20261027-start-checks-the-realm-class-setting.md",
"Corfirean/coa-server-manager:20261027-start-wildcard-and-reborn-with-coa.md",
"Corfirean/coa-server-manager:20261028-coa-config-search.md",
"Corfirean/coa-server-manager:20261028-existing-character-update-validation.md",
"Corfirean/coa-server-manager:20261028-legacy-world-shutdown.md",
"Corfirean/coa-server-manager:20261028-mysql-install-startup.md",
"Corfirean/coa-server-manager:20261028-portable-settings-and-tray.md",
"Corfirean/coa-server-manager:20261028-settings-release-history.md",
"Corfirean/coa-server-manager:20261028-split-update-actions.md",
"Corfirean/coa-server-manager:20261028-update-check-queue.md",
"Corfirean/coa-server-manager:20261028-window-density.md",
"Corfirean/coa-server-manager:20261029-slow-world-startup.md",
"Corfirean/coa-server-manager:20261030-account-console-confirmation.md",
"Corfirean/coa-server-manager:20261030-close-abandoned-relay-sockets.md",
"Corfirean/coa-server-manager:20261030-disabled-client-renderers.md",
"Corfirean/coa-server-manager:20261030-force-stop-unresponsive-world.md",
"Corfirean/coa-server-manager:20261030-native-crash-reports.md",
"Corfirean/coa-server-manager:20261030-playerbots-overview-count.md",
"Corfirean/coa-server-manager:20261030-public-server-browsing-control.md",
"Corfirean/coa-server-manager:20261030-stop-does-not-trigger-auto-restart.md",
"Corfirean/coa-server-manager:20261030-update-history-target-cache.md",
"Corfirean/coa-server-manager:20261030-wait-for-world-console-readiness.md",
"Corfirean/coa-server-manager:20261030-window-lifecycle.md",
"Corfirean/coa-server-manager:20261031-dungeon-clear-dependency.md",
"Corfirean/coa-server-manager:20261031-launcher-diagnostics-export.md",
"Corfirean/coa-server-manager:20261031-recover-client-patch-downloads.md",
"Corfirean/coa-server-manager:20261031-server-logging-controls.md",
"Corfirean/coa-server-manager:20261031-validation-bot-population.md",
"Corfirean/coa-server-manager:20261031-validation-mysql-reuse.md",
"Corfirean/coa-server-manager:20261103-isolated-login-port.md",
"Corfirean/coa-server-manager:20261107-bot-strength-scaling-settings.md",
"Corfirean/coa-server-manager:20261115-addon-catalog.md",
"Corfirean/coa-server-manager:20261115-clear-game-cache.md",
"Corfirean/coa-server-manager:20261115-custom-races-fast-toggle.md",
"Corfirean/coa-server-manager:20261115-custom-races-v2-client.md",
"Corfirean/coa-server-manager:20261115-database-port-relocation.md",
"Corfirean/coa-server-manager:20261115-mysql-custom-options.md",
"Corfirean/coa-server-manager:20261115-race-restriction-kept.md",
"Corfirean/coa-server-manager:20261115-realm-names.md",
"Corfirean/coa-server-manager:20261115-remembered-friend-login.md",
"Corfirean/coa-server-manager:20261115-scheduled-restart.md",
"Corfirean/coa-server-manager:20261115-v2-feature-switches.md",
"Corfirean/coa-server-manager:20261116-companions-wildcard-reborn.md",
"Corfirean/coa-server-manager:20261116-custom-race-characters-off.md"
"Corfirean/coa-server-manager:20261022-custom-races-client.md"
],
"releases": [
{
@@ -693,283 +623,6 @@
"links": [
"[Guides and screenshots](https://github.com/Corfirean/coa-server-manager/blob/master/docs/README.md)"
]
},
{
"tag": "v0.7.2",
"version": "0.7.2",
"date": "2026-10-23",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.2",
"notes": [
"Advanced settings cover creature melee damage, spell damage and health by rank",
"Internet sharing accepts existing port forwards to the same server",
"The Auction House Bot card has a single switch",
"More character and server browser controls now use your selected language",
"Online player counts correctly separate random bots from players",
"Custom races work with shared addon folders on another drive",
"Configure the day and night cycle from the module settings",
"A stalled database inspection no longer blocks server maintenance indefinitely"
],
"commit": "4d59ce8cb1d4abd7f4992370e9a7ba4dc6bd02f7",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.7.1...v0.7.2"
},
{
"tag": "v0.7.3",
"version": "0.7.3",
"date": "2026-10-23",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.7.3",
"notes": [
"Portable characters open again after using an experimental Manager"
],
"commit": "2715170622665f62c396fe1a79f7ef6504713ef1",
"experimentalFeatures": [
"portable-characters"
],
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.7.2...v0.7.3"
},
{
"tag": "v0.8.0",
"version": "0.8.0",
"date": "2026-10-24",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.0",
"notes": [
"Server owners can allow portable characters per realm",
"Allowing portable characters also prepares the server for portable sessions",
"Managers stay compatible with the public connection service",
"Relay connections recover and use the ports of the installed server",
"Portable progress resumes after reconnecting or restarting the Manager",
"Older copies on another host may require maintenance before returning"
],
"commit": "b00e732c7f53f33680aaf6bd520da64b70b26a5a",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.7.3...v0.8.0",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.8.1",
"version": "0.8.1",
"date": "2026-10-25",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.1",
"notes": [
"Install the matching CoA Custom 1.9.1 client files"
],
"commit": "02e3a9e4e66870a627feeb0b4d3ec2d75a23973d",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.8.0...v0.8.1",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.8.2",
"version": "0.8.2",
"date": "2026-10-27",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.2",
"notes": [
"Installs the verified CoA Custom 1.9.2 client patches and quest safety addon, while recognizing existing 1.9.1 installations",
"Server updates preserve the order of database migrations introduced during merges, preventing older snapshots from overwriting newer progression"
],
"commit": "81b040ef02763c7cf7a3a3da1424b73177e9d433",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.8.1...v0.8.2",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.9.0",
"version": "0.9.0",
"date": "2026-10-28",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.0",
"notes": [
"Choose Parallel or Global level scaling in module settings",
"Report Content Scaling problems directly to its repository",
"Send custom race problem reports directly to their maintainer",
"Internet sharing restores the LAN address after server restarts",
"Configure custom race availability for new characters",
"Public listing offers every realm that starts together, not just the main one",
"Public listing is a short list of realms with a window for the details",
"Configure profession and defense skill gains in server settings",
"Starting a server sets the character classes of the realm chosen on Overview",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth",
"Control portable characters and keep Manager running in the system tray"
],
"commit": "dc97095bd6b36d9b5111f04f0cfd88e1fb2ab1f1",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.8.2...v0.9.0",
"experimentalFeatures": [
"portable-characters"
]
},
{
"version": "0.9.1",
"tag": "v0.9.1",
"date": "2026-10-28",
"notes": [
"Existing unsupported character records no longer block unrelated server updates"
],
"experimentalFeatures": [
"portable-characters"
],
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.1",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.0...v0.9.1",
"commit": "8bbf16ed4f14e9b78c680783e4be5d8c580cc06b"
},
{
"tag": "v0.9.2",
"version": "0.9.2",
"date": "2026-10-28",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.2",
"notes": [
"New server installation waits for slower database startup",
"Find and edit CoA options in the existing server settings",
"Simultaneous update checks share results or wait their turn",
"Recovery can stop an unfinished world startup after restoring an older launcher"
],
"commit": "2d9c6a65bbb1e296dc919e4c9e5785ed9d4a070b",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.1...v0.9.2",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.9.3",
"version": "0.9.3",
"date": "2026-10-29",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.3",
"notes": [
"Slow server startup no longer triggers an early update rollback"
],
"commit": "e7b76137d1b22a7596c2b1fa05ca9d12403b99d3",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.2...v0.9.3",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.9.4",
"version": "0.9.4",
"date": "2026-10-29",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.4",
"notes": [
"Settings group updates, startup and maintenance with translated release history",
"Update and launch without updating share a divided button",
"Maximizing the window keeps text and controls at a comfortable size"
],
"commit": "c004b90c54fa358b3037c56b093cf019dfcf02b8",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.3...v0.9.4",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.9.5",
"version": "0.9.5",
"date": "2026-10-30",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.5",
"notes": [
"Account creation verifies a lost console reply against the requested login",
"Abandoned game relay tunnels close their local connection immediately",
"Keep disabled graphics components disabled during client updates",
"Force-stop an unresponsive world after a failed normal shutdown",
"Crash history includes reports from every world and Windows text files",
"Show the online bot count for Playerbots on the overview",
"Disable public server browsing in Settings",
"Keep deliberate stops and update shutdowns from triggering crash restart",
"Server startup waits for a responsive console before reporting success",
"Restore the existing Manager window when launching it again"
],
"commit": "642da8fdc1a0165aea74fbd1ab1b46933fc7e589",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.4...v0.9.5"
},
{
"tag": "v0.9.7",
"version": "0.9.7",
"date": "2026-10-30",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.7",
"notes": [
"Show available update notes even when release history is cached"
],
"commit": "ba5816e3aea471d5b870e5f0db0b03920c071ed3",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.5...v0.9.7"
},
{
"tag": "v0.9.8",
"version": "0.9.8",
"date": "2026-11-01",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.8",
"notes": [
"Dungeon Clear can be enabled when SQUID bots are active",
"Diagnostic exports include launcher stages and lock owner records",
"Choose normal logs, errors only or no server logs in maintenance settings",
"Update checks temporarily suspend bot population and restore your configuration",
"Update validation keeps MySQL running between compatible checks"
],
"commit": "076fba185c4d96d74f7258d6ca0cae6a4ae4a613",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.7...v0.9.8"
},
{
"tag": "v0.9.9",
"version": "0.9.9",
"date": "2026-11-04",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.9",
"notes": [
"Update and recovery checks use the temporary login port even with a Windows override"
],
"commit": "173248efbe24da9b4c1b5ca12fa7580fcd1e8ea7",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.8...v0.9.9"
},
{
"tag": "v0.9.10",
"version": "0.9.10",
"date": "2026-11-08",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.10",
"notes": [
"Custom Races patch installation recovers from interrupted downloads"
],
"commit": "711f378ae82f75d3fc64368c042889c773315c54",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.9...v0.9.10"
},
{
"tag": "v0.9.12",
"version": "0.9.12",
"date": "2026-11-14",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.12",
"notes": [
"Settings for how much help bots get in dungeons and raids"
],
"commit": "d71c5635e3262a775b400a1c90ac81d7bddcbeaf",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.10...v0.9.12"
},
{
"tag": "v0.9.13",
"version": "0.9.13",
"date": "2026-11-15",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.13",
"notes": [
"The custom races client is updated to Custom Races V2"
],
"commit": "d3527312803fb5a3e1cd48e01496645a8bbc9dcf",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.12...v0.9.13"
},
{
"tag": "v0.9.14",
"version": "0.9.14",
"date": "2026-11-16",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.14",
"notes": [
"Install community addons from the Manager",
"Old item and creature data is cleared before every Play",
"Turning the custom races client patch on or off takes seconds again",
"The database moves to a free port when Windows reserves or another program takes 3307",
"Your own MySQL settings survive restarts and updates",
"Disabled custom races stay disabled after a server update that adds races",
"Rename your realms in the Manager",
"The account for a friend's server is in the login box at every Play",
"Restart the world every day at a chosen time",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu",
"Companion bots on Wildcard and Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off"
],
"commit": "1f64da3ae064b3f02d2bb11d818c44d26a557045",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.13...v0.9.14"
}
]
}
+1 -91
View File
@@ -15,15 +15,6 @@ pub const MAX_USERNAME: usize = 16;
pub const MIN_PASSWORD: usize = 8;
pub const MAX_PASSWORD: usize = 16;
pub const MAX_CHARACTERS: usize = 200;
pub const MAX_SESSION_BYTES: usize = 12 * 1024 * 1024;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum SessionMessageKind {
Started,
Checkpoint,
Collection,
}
/// A game account name: 3 to 16 ASCII letters, digits or `_`, not beginning or ending with `_`.
pub fn valid_username(s: &str) -> bool {
@@ -118,15 +109,6 @@ pub enum Request {
total_size: usize,
collections: BTreeMap<String, Vec<u32>>,
},
OwnedTransferOffer {
transfer_id: Uuid,
character_id: Uuid,
ruleset: String,
canonical_revision: u64,
content_hash: String,
total_size: usize,
collections: BTreeMap<String, Vec<u32>>,
},
/// A chunk of the encoded portable character snapshot payload.
TransferChunk {
transfer_id: Uuid,
@@ -146,24 +128,6 @@ pub enum Request {
transfer_id: Uuid,
character_id: Uuid,
},
SessionPoll {
character_id: Uuid,
session_id: Uuid,
},
SessionRead {
character_id: Uuid,
session_id: Uuid,
message_hash: String,
offset: usize,
},
SessionAck {
character_id: Uuid,
session_id: Uuid,
message_hash: String,
offset: usize,
total_size: usize,
data: String,
},
/// Phase 13: Request a short-lived relay allocation for a relayed JOIN.
AllocateRelay {
player_id: Uuid,
@@ -208,22 +172,6 @@ pub struct CharacterEntry {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "op", rename_all = "snake_case")]
pub enum Response {
SessionPending {
kind: SessionMessageKind,
total_size: usize,
content_hash: String,
},
SessionIdle {
closed: bool,
},
SessionData {
offset: usize,
data: String,
},
SessionAcked {
received_size: usize,
complete: bool,
},
Welcome {
realm_id: coa_registry_proto::RealmId,
automatic: bool,
@@ -299,10 +247,7 @@ pub fn decode_request(bytes: &[u8]) -> Result<Request> {
.map_err(|_| ControlError::Invalid("a request is not valid".into()))?;
if !matches!(
&r,
Request::TransferOffer { .. }
| Request::OwnedTransferOffer { .. }
| Request::TransferChunk { .. }
| Request::SessionAck { .. }
Request::TransferOffer { .. } | Request::TransferChunk { .. }
) && bytes.len() > MAX_CONTROL_REQUEST_BYTES
{
return Err(ControlError::Limit(
@@ -310,34 +255,6 @@ pub fn decode_request(bytes: &[u8]) -> Result<Request> {
));
}
match &r {
Request::SessionRead {
message_hash,
offset,
..
} => {
if message_hash.len() != 64
|| !message_hash.bytes().all(|b| b.is_ascii_hexdigit())
|| *offset > MAX_SESSION_BYTES
{
return invalid("invalid portable session read");
}
}
Request::SessionAck {
message_hash,
offset,
total_size,
data,
..
} => {
if message_hash.len() != 64
|| !message_hash.bytes().all(|b| b.is_ascii_hexdigit())
|| *total_size > MAX_SESSION_BYTES
|| *offset > *total_size
|| data.len() > 48 * 1024
{
return invalid("invalid portable session acknowledgement chunk");
}
}
Request::Provision {
desired, password, ..
} => {
@@ -363,13 +280,6 @@ pub fn decode_request(bytes: &[u8]) -> Result<Request> {
total_size,
collections,
..
}
| Request::OwnedTransferOffer {
ruleset,
content_hash,
total_size,
collections,
..
} => {
if !matches!(ruleset.as_str(), "coa" | "wildcard" | "reborn") {
return invalid("transfer ruleset must be coa, wildcard, or reborn");
+2 -14
View File
@@ -112,10 +112,6 @@ pub struct ProbeResponse {
pub all_reachable: bool,
}
/// Coordinator authentication is independent of the encrypted application protocol.
/// Changing portable messages must not invalidate deployed v1 host/player proofs.
pub const COORDINATOR_PROTOCOL_VERSION: u32 = 1;
pub fn challenge_nonce() -> String {
let mut n = [0u8; 32];
n[..16].copy_from_slice(Uuid::new_v4().as_bytes());
@@ -126,7 +122,7 @@ pub fn challenge_nonce() -> String {
fn host_input(realm: &RealmId, nonce: &str, ts: i64) -> Vec<u8> {
format!(
"coa-coord-host-v1\n{}\n{realm}\n{nonce}\n{ts}",
COORDINATOR_PROTOCOL_VERSION
crate::CONTROL_PROTOCOL_VERSION
)
.into_bytes()
}
@@ -134,7 +130,7 @@ fn host_input(realm: &RealmId, nonce: &str, ts: i64) -> Vec<u8> {
fn player_input(player: &Uuid, public_key: &str, realm: &RealmId, nonce: &str, ts: i64) -> Vec<u8> {
format!(
"coa-coord-player-v1\n{}\n{}\n{public_key}\n{realm}\n{nonce}\n{ts}",
COORDINATOR_PROTOCOL_VERSION,
crate::CONTROL_PROTOCOL_VERSION,
player.hyphenated()
)
.into_bytes()
@@ -281,14 +277,6 @@ pub fn to_text(frame: &Frame) -> String {
mod tests {
use super::*;
#[test]
fn deployed_coordinator_proofs_stay_v1_when_application_protocol_changes() {
let realm = RealmId::new();
let player = Uuid::now_v7();
assert_eq!(host_input(&realm, "nonce", 42), format!("coa-coord-host-v1\n1\n{realm}\nnonce\n42").into_bytes());
assert_eq!(player_input(&player, "public", &realm, "nonce", 42), format!("coa-coord-player-v1\n1\n{player}\npublic\n{realm}\nnonce\n42").into_bytes());
}
fn key(n: u8) -> SigningKey {
SigningKey::from_bytes(&[n; 32])
}
+1 -2
View File
@@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
[dependencies]
socket2 = "0.6"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
@@ -38,7 +37,7 @@ rand_core = { version = "0.6", features = ["getrandom"] }
ed25519-dalek = { version = "2", features = ["rand_core"] }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Threading", "Win32_System_Console", "Win32_System_SystemInformation", "Win32_System_Diagnostics_ToolHelp", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Cryptography", "Win32_UI_Shell", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging"] }
windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Threading", "Win32_System_SystemInformation", "Win32_System_Diagnostics_ToolHelp", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Cryptography", "Win32_UI_Shell", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging"] }
[features]
testkit = []
@@ -1,154 +0,0 @@
use coa_core::{
db::{Account, Db},
driver::{self, Verb},
ra::Ra,
Result,
};
use std::path::PathBuf;
fn main() -> Result<()> {
let root = PathBuf::from(std::env::args().nth(1).expect("disposable fixture"));
assert!(root
.file_name()
.unwrap()
.to_string_lossy()
.starts_with("coa-update-recovery-fixture-"));
assert!(root.join("recovery-e2e-started").is_file());
let result = std::panic::catch_unwind(|| -> Result<()> {
let started = driver::run(&root, Verb::StartAll)?;
assert!(started.ok, "{}", started.output);
assert!(root.join("Core/Crashes").is_dir());
let db = Db::from_repack(&root, Account::Admin)?;
println!("Account acceptance: server started, connecting to RA");
let mut ra = Ra::connect(&root)?;
println!("Account acceptance: RA authenticated");
let name = "STABILITYACCT2";
assert_eq!(
db.query("SELECT COUNT(*) FROM acore_auth.account WHERE username='STABILITYACCT2';")?
.trim(),
"0"
);
println!("Account acceptance: sending create command");
coa_core::accounts::create(&root, name, "PrivateTest773", true)?;
println!("Account acceptance: created");
assert_eq!(db.query("SELECT COUNT(*) FROM acore_auth.account WHERE username='STABILITYACCT2' AND LENGTH(salt)=32 AND LENGTH(verifier)=32;")?.trim(), "1");
assert!(ra
.create_account(name, "PrivateTest773")
.unwrap_err()
.to_string()
.contains("already taken"));
ra.set_account_password(name, "PrivateTest774")?;
ra.set_account_access(name, 3)?;
assert_eq!(db.query("SELECT gmlevel FROM acore_auth.account_access WHERE id=(SELECT id FROM acore_auth.account WHERE username='STABILITYACCT2');")?.trim(), "3");
ra.delete_account(name)?;
assert_eq!(
db.query("SELECT COUNT(*) FROM acore_auth.account WHERE username='STABILITYACCT2';")?
.trim(),
"0"
);
lost_reply(&root, &db)?;
println!("PASS: native RA account create, SRP salt/verifier, duplicate refusal, password change, administrator access and deletion");
Ok(())
});
let stopped = driver::run(&root, Verb::StopAll)?;
assert!(stopped.ok, "{}", stopped.output);
result.map_err(|_| {
coa_core::Error::Invalid("Native account acceptance failed; fixture stopped".into())
})?
}
fn lost_reply(root: &std::path::Path, db: &Db) -> Result<()> {
use std::io::{Read, Write};
use std::net::{TcpListener, TcpStream};
let path = root.join("Settings/repack.json");
let original = std::fs::read(&path)?;
struct Restore(std::path::PathBuf, Vec<u8>);
impl Drop for Restore {
fn drop(&mut self) {
std::fs::write(&self.0, &self.1).expect("restore disposable fixture settings");
}
}
let restore = Restore(path.clone(), original.clone());
let actual = coa_core::layout::read_ports(root).ra;
for (name, forward, ready) in [
("STABLOSTREPLY", true, true),
("STABNOTCREATED", false, true),
("STABNOTREADY", false, false),
] {
assert_eq!(
db.query(&format!(
"SELECT COUNT(*) FROM acore_auth.account WHERE username='{name}';"
))?
.trim(),
"0"
);
let listener = TcpListener::bind(("127.0.0.1", 0))?;
let mut config: serde_json::Value = serde_json::from_slice(&original)?;
config["raPort"] = listener.local_addr()?.port().into();
coa_core::fsx::atomic_write_json(&path, &config)?;
let proxy = std::thread::spawn(move || {
fn until(s: &mut TcpStream, marker: &[u8]) -> Vec<u8> {
s.set_read_timeout(Some(std::time::Duration::from_secs(30)))
.unwrap();
let mut bytes = Vec::new();
let mut byte = [0];
while !bytes.ends_with(marker) {
s.read_exact(&mut byte).unwrap();
bytes.push(byte[0]);
}
bytes
}
let (mut client, _) = listener.accept().unwrap();
let mut server = TcpStream::connect(("127.0.0.1", actual)).unwrap();
for marker in [b"Username: ".as_slice(), b"Password: ".as_slice()] {
client.write_all(&until(&mut server, marker)).unwrap();
server.write_all(&until(&mut client, b"\r\n")).unwrap();
}
client.write_all(&until(&mut server, b"AC>")).unwrap();
let readiness = until(&mut client, b"\r\n");
assert_eq!(readiness, b"server info\r\n");
if !ready {
return;
}
server.write_all(&readiness).unwrap();
client.write_all(&until(&mut server, b"AC>")).unwrap();
let command = until(&mut client, b"\r\n");
if forward {
server.write_all(&command).unwrap();
let _ = until(&mut server, b"AC>");
}
});
let outcome = coa_core::accounts::create(root, name, "PrivateTest773", false);
proxy.join().unwrap();
std::fs::write(&path, &original)?;
if forward {
outcome?;
assert_eq!(
db.query(&format!(
"SELECT COUNT(*) FROM acore_auth.account WHERE username='{name}';"
))?
.trim(),
"1"
);
assert!(coa_core::accounts::create(root, name, "DifferentPass77", false).is_err());
Ra::connect(root)?.delete_account(name)?;
} else {
assert!(outcome.is_err());
if !ready {
assert!(outcome
.unwrap_err()
.to_string()
.contains("No create command was sent"));
}
assert_eq!(
db.query(&format!(
"SELECT COUNT(*) FROM acore_auth.account WHERE username='{name}';"
))?
.trim(),
"0"
);
}
}
drop(restore);
println!("PASS: a lost native console reply is reconciled by exact SRP credentials; a command that was never executed is rejected");
Ok(())
}
@@ -1,11 +0,0 @@
use coa_core::{crashes, Result};
fn main()->Result<()> {
let root=std::path::PathBuf::from(std::env::args().nth(1).expect("marked native fixture"));
assert!(root.join("recovery-e2e-started").is_file());
let reports=crashes::list(&root,30)?;
let matching:Vec<_>=reports.iter().filter(|r|r.full_log.contains("AllowableRaces")).collect();
assert!(!matching.is_empty());
assert!(matching.iter().all(|r|r.exception_code.as_deref()==Some("C0000420")));
println!("PASS: Manager discovered {} actual worldserver SQL assertion reports from Core/Crashes, including Windows ANSI text",matching.len());
Ok(())
}
-75
View File
@@ -1,75 +0,0 @@
//! Live check of the client download path against the community launcher's public server:
//! reads the manifest and downloads the few smallest files into a temp folder (never a real client).
//! Usage: cargo run -p coa-core --example client_probe (PROBE_SKIP=n skips the n smallest files)
use coa_core::clientdl::{self, Apply, Manifest};
use coa_core::download::{Cancel, HttpTransport};
fn main() {
let full = clientdl::fetch_latest().expect("manifest");
println!(
"version {} · {} files · {:.1} GB",
full.version,
full.files.len(),
full.total_bytes() as f64 / 1e9
);
let mut small = full.files.clone();
small.sort_by_key(|f| f.size);
let skip: usize = std::env::var("PROBE_SKIP")
.ok()
.and_then(|v| v.parse().ok())
.unwrap_or(0);
let small: Vec<_> = small.into_iter().skip(skip).take(6).collect();
let manifest = Manifest {
version: full.version.clone(),
published_at: None,
files: small,
};
let dir = std::env::temp_dir().join(format!("coa-client-probe-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let cancel = Cancel::default();
let plan = clientdl::plan(&dir, &manifest, &Default::default(), &cancel, &|_| {}).unwrap();
println!(
"plan: {} files, {} bytes",
plan.items.len(),
plan.download_bytes
);
let transport = HttpTransport::new().unwrap();
clientdl::apply(
&Apply {
client: &dir,
manifest: &manifest,
plan: &plan,
keep_modified: false,
transport: &transport,
objects_url: clientdl::OBJECTS_URL,
cancel: &cancel,
},
&|s| {
println!(
"{} {}/{} {}",
s.phase,
s.done,
s.total,
s.file.unwrap_or_default()
)
},
)
.expect("apply");
let again = clientdl::plan(
&dir,
&manifest,
&clientdl::load_state(&dir).unwrap(),
&cancel,
&|_| {},
)
.unwrap();
println!(
"second plan: {} to do, {} up to date, version {:?}",
again.items.len(),
again.up_to_date_files,
clientdl::local(&dir).version
);
std::fs::remove_dir_all(&dir).unwrap();
}
@@ -1,91 +0,0 @@
use coa_core::{
db::{Account, Db},
driver::{self, Verb},
ra::Ra,
Result,
};
use std::{
path::PathBuf,
time::{Duration, Instant},
};
fn main() -> Result<()> {
let root = PathBuf::from(
std::env::args()
.nth(1)
.expect("disposable recovery fixture"),
);
assert!(root
.file_name()
.unwrap()
.to_string_lossy()
.starts_with("coa-update-recovery-fixture-"));
assert!(root.join("recovery-e2e-started").is_file());
let result = std::panic::catch_unwind(|| -> Result<()> {
let start = driver::run(&root, Verb::StartAll)?;
assert!(start.ok, "{}", start.output);
let db = Db::from_repack(&root, Account::Admin)?;
coa_core::companions::ensure_templates(&db)?;
let mut ra = Ra::connect(&root)?;
let before = coa_core::population::query(&root)?;
assert_eq!(before.bots_online, 0);
let rejected = db.query("SELECT name, at_login FROM acore_characters.characters WHERE guid=3030 AND account IN (SELECT id FROM acore_auth.account WHERE username LIKE 'COABOTHOST%');")?;
assert!(rejected.contains("Christian Shadowheart"));
assert_eq!(rejected.split_whitespace().last(), Some("1"));
println!("Repair reply: {}", ra.run("botcmd spawnbot 3030")?);
let repair_deadline = Instant::now() + Duration::from_secs(60);
loop {
let row = db.query(
"SELECT name, at_login, online FROM acore_characters.characters WHERE guid=3030;",
)?;
if row.trim().ends_with("0\t1") {
assert!(!row.contains("Christian Shadowheart"));
println!("PASS: the exact previously rejected companion was renamed by server validation and logged in");
break;
}
assert!(
Instant::now() < repair_deadline,
"previously rejected companion logged in"
);
std::thread::sleep(Duration::from_secs(1));
}
let _ = ra.despawn_all()?;
let clear_deadline = Instant::now() + Duration::from_secs(30);
while coa_core::population::query(&root)?.bots_online > 0 {
assert!(Instant::now() < clear_deadline);
std::thread::sleep(Duration::from_secs(1));
}
println!("Spawn reply: {}", ra.spawn_bots(21)?);
let deadline = Instant::now() + Duration::from_secs(180);
loop {
let pop = coa_core::population::query(&root)?;
if pop.bots_online >= 21 {
println!(
"PASS: {} companions logged in; real players={}",
pop.bots_online, pop.players_online
);
break;
}
if Instant::now() > deadline {
return Err(coa_core::Error::Invalid(format!(
"Only {} of 21 companion logins completed",
pop.bots_online
)));
}
std::thread::sleep(Duration::from_secs(2));
}
let _ = ra.cancel_spawning()?;
let _ = ra.despawn_all()?;
let deadline = Instant::now() + Duration::from_secs(30);
while coa_core::population::query(&root)?.bots_online > 0 {
assert!(Instant::now() < deadline, "companions despawned");
std::thread::sleep(Duration::from_secs(1));
}
println!("PASS: companion despawn completed");
Ok(())
});
let stopped = driver::run(&root, Verb::StopAll)?;
assert!(stopped.ok, "{}", stopped.output);
result.map_err(|_| {
coa_core::Error::Invalid("Companion native acceptance panicked; fixture stopped".into())
})?
}
@@ -1,12 +0,0 @@
use coa_core::{crashes, Result};
fn main() -> Result<()> {
let root = std::path::PathBuf::from(std::env::args().nth(1).expect("native crash evidence"));
assert!(root.join(".crash-report-evidence").is_file());
let reports = crashes::list(&root, 10)?;
assert_eq!(reports.len(), 1);
assert_eq!(reports[0].exception_code.as_deref(), Some("C0000005"));
assert_eq!(reports[0].category, "access_violation");
assert!(!reports[0].full_log.is_empty());
println!("PASS: Manager crash history discovers and classifies the actual native handler report from Core/Crashes");
Ok(())
}
@@ -1,90 +0,0 @@
use coa_core::{driver, fsx, process, Result};
#[cfg(windows)]
use std::os::windows::process::CommandExt;
use std::{
path::Path,
process::{Child, Command, Stdio},
};
struct OwnedChild(Child);
impl Drop for OwnedChild {
fn drop(&mut self) {
let _ = self.0.kill();
let _ = self.0.wait();
}
}
fn copy_tree(source: &Path, target: &Path) -> Result<()> {
std::fs::create_dir_all(target)?;
for entry in std::fs::read_dir(source)? {
let entry = entry?;
let destination = target.join(entry.file_name());
if entry.file_type()?.is_dir() {
copy_tree(&entry.path(), &destination)?;
} else {
std::fs::copy(entry.path(), destination)?;
}
}
Ok(())
}
fn spawn(path: &Path) -> OwnedChild {
let mut cmd = Command::new(path);
cmd.args(["-t", "127.0.0.1"])
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null());
#[cfg(windows)]
cmd.creation_flags(0x0800_0000);
OwnedChild(cmd.spawn().unwrap())
}
fn main() -> Result<()> {
assert!(cfg!(windows));
let source = std::path::PathBuf::from(
std::env::args()
.nth(1)
.expect("marked disposable runtime source"),
);
assert_eq!(
std::fs::read(source.join(".release-schema-fixture"))?,
b"disposable release-schema fixture"
);
let temp = tempfile::tempdir()?;
let root = temp.path();
copy_tree(&source.join("Runtime"), &root.join("Runtime"))?;
std::fs::create_dir_all(root.join("Core"))?;
std::fs::create_dir_all(root.join("Scripts"))?;
let system =
std::path::PathBuf::from(std::env::var_os("SystemRoot").unwrap()).join("System32/ping.exe");
std::fs::copy(&system, root.join("Core/worldserver.exe"))?;
std::fs::copy(&system, root.join("foreign.exe"))?;
let mut ports = Vec::new();
let mut listeners = Vec::new();
for _ in 0..4 {
let listener = std::net::TcpListener::bind("127.0.0.1:0")?;
ports.push(listener.local_addr()?.port());
listeners.push(listener);
}
let config = serde_json::json!({"mysqlPort":ports[0],"authPort":ports[1],"worldPort":ports[2],"raPort":ports[3],"raUsername":"fixture","raPassword":"fixture"});
fsx::atomic_write_json(&root.join("Settings/repack.json"), &config)?;
drop(listeners);
let mut launcher = std::fs::read_to_string(source.join("Scripts/manage.py"))?;
launcher.push_str("\nfrom contextlib import nullcontext\ndef control_lock(): return nullcontext()\ndef stop_all(config):\n assert not process('world'), 'world must stop before database'\n (ROOT/'database-stage').write_text('safe')\n");
fsx::atomic_write(&root.join("Scripts/manage.py"), launcher.as_bytes())?;
let mut foreign = spawn(&root.join("foreign.exe"));
let foreign_identity = process::identity(foreign.0.id()).unwrap();
fsx::atomic_write_json(&root.join(".state/world.json"), &foreign_identity)?;
let rejected = driver::force_stop(root)?;
assert!(!rejected.ok, "a foreign world record must be rejected");
assert!(!root.join("database-stage").exists());
assert!(foreign.0.try_wait()?.is_none());
let mut owned = spawn(&root.join("Core/worldserver.exe"));
let stopped = driver::force_stop(root)?;
assert!(stopped.ok, "{}", stopped.output);
assert!(owned.0.try_wait()?.is_some());
assert!(
foreign.0.try_wait()?.is_none(),
"foreign process was untouched"
);
assert_eq!(std::fs::read(root.join("database-stage"))?, b"safe");
println!("PASS: native Windows forced-stop rejects foreign records, recovers the exact owned world identity, stops it before the database stage, and leaves the foreign process alive");
Ok(())
}
-114
View File
@@ -1,114 +0,0 @@
//! The Rust launcher on a DISPOSABLE repack, side by side with Scripts/manage.py:
//!
//! 1. install the stable server into a new folder on unused ports;
//! 2. coa-launcher start-all, then manage.py status-json must see every service;
//! 3. manage.py stop-all stops what coa-launcher started;
//! 4. manage.py start-all, coa-launcher status-json sees it, coa-launcher stop-all stops it;
//! 5. both stop-alls leave nothing of the repack running.
//!
//! usage: launcher_e2e <new folder ending in -fixture> <coa-launcher.exe>
use std::path::Path;
use std::process::Command;
use coa_core::install::{install_base, Params};
use coa_core::registry::Registry;
fn free_port() -> u16 {
std::net::TcpListener::bind("127.0.0.1:0").unwrap().local_addr().unwrap().port()
}
fn run(exe: &Path, args: &[&str]) -> (bool, String) {
let out = Command::new(exe).args(args).output().unwrap();
let text = String::from_utf8_lossy(&out.stdout).into_owned() + &String::from_utf8_lossy(&out.stderr);
(out.status.success(), text)
}
fn launcher(root: &Path, exe: &Path, action: &str) -> (bool, String) {
let r = root.to_string_lossy().into_owned();
let t = std::time::Instant::now();
let out = run(exe, &["--root", &r, action]);
println!("[coa-launcher {action}] ok={} in {:?}\n{}", out.0, t.elapsed(), indent(&out.1));
out
}
fn manage(root: &Path, action: &str) -> (bool, String) {
let python = root.join("Runtime/python/python.exe");
let script = root.join("Scripts/manage.py").to_string_lossy().into_owned();
let t = std::time::Instant::now();
let out = run(&python, &["-B", &script, action]);
println!("[manage.py {action}] ok={} in {:?}\n{}", out.0, t.elapsed(), indent(&out.1));
out
}
fn indent(s: &str) -> String {
s.lines().map(|l| format!(" {l}")).collect::<Vec<_>>().join("\n")
}
fn status(out: &str) -> serde_json::Value {
let line = out.lines().rev().find(|l| l.trim_start().starts_with('{')).expect("a JSON status line");
serde_json::from_str(line).unwrap()
}
fn all(v: &serde_json::Value, running: bool) -> bool {
["mysql", "auth", "world", "relay"].iter().all(|k| v[*k] == running)
}
fn main() {
let a: Vec<String> = std::env::args().skip(1).collect();
let root = Path::new(&a[0]);
let exe = Path::new(&a[1]);
assert!(a[0].ends_with("-fixture"), "a folder ending in -fixture is required");
if root.join("Core/worldserver.exe").is_file() {
println!("reusing the installed fixture");
} else {
install(root);
}
test(root, exe);
}
fn install(root: &Path) {
assert!(!root.exists(), "a new folder is required");
let reg_dir = std::env::temp_dir().join("coa-launcher-e2e-registry");
let _ = std::fs::remove_dir_all(&reg_dir);
let reg = Registry::at(reg_dir.join("installs.json"));
// what the Manager installs: the stable release's installation image
let image = coa_core::install::Source::Installation(Box::new(coa_core::channels::resolve("stable").expect("stable channel")));
let installed = install_base(
&Params { source: image, dest: root.into(), trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, registry: &reg, cancel: Default::default() },
&|s| eprintln!(" {:>3}% {}", s.percent, s.step),
)
.expect("install");
println!("installed {}", installed.version);
let repack = root.join("Settings/repack.json");
let mut cfg: serde_json::Value = serde_json::from_slice(&std::fs::read(&repack).unwrap()).unwrap();
for k in ["mysqlPort", "authPort", "worldPort", "raPort"] {
cfg[k] = free_port().into();
}
std::fs::write(&repack, serde_json::to_vec_pretty(&cfg).unwrap()).unwrap();
}
fn test(root: &Path, exe: &Path) {
// 2. Rust starts, Python sees it
assert!(launcher(root, exe, "start-all").0, "coa-launcher start-all");
let seen = status(&manage(root, "status-json").1);
assert!(all(&seen, true), "manage.py must see the services coa-launcher started: {seen}");
// 3. Python stops what Rust started
assert!(manage(root, "stop-all").0, "manage.py stop-all");
assert!(all(&status(&launcher(root, exe, "status-json").1), false));
// 4. Python starts, Rust sees and stops it
assert!(manage(root, "start-all").0, "manage.py start-all");
let seen = status(&launcher(root, exe, "status-json").1);
assert!(all(&seen, true), "coa-launcher must see the services manage.py started: {seen}");
assert!(launcher(root, exe, "stop-all").0, "coa-launcher stop-all");
assert!(all(&status(&manage(root, "status-json").1), false));
// 5. Rust alone, a second time (start on a server it stopped)
assert!(launcher(root, exe, "start-all").0);
assert!(launcher(root, exe, "stop-all").0);
let left = coa_core::process::find_by_exe(&root.join("mysql/bin/mysqld.exe")).len()
+ coa_core::process::find_by_exe(&root.join("Core/worldserver.exe")).len()
+ coa_core::process::find_by_exe(&root.join("Core/authserver.exe")).len();
assert_eq!(left, 0, "nothing of the repack may be left running");
println!("LAUNCHER E2E PASS");
}
@@ -1,199 +0,0 @@
use base64::{engine::general_purpose::STANDARD, Engine};
use coa_core::{
backup,
db::Db,
driver::{self, Verb},
fsx,
manifest::{Kind, Migration},
package::{self, BuildOptions},
pkgsource::Source,
registry::MetaDir,
update::{self, RepackEnv},
Result,
};
use ed25519_dalek::{Signer, SigningKey};
use std::{collections::BTreeMap, path::PathBuf};
fn main() -> Result<()> {
let root = PathBuf::from(
std::env::args()
.nth(1)
.expect("qualified disposable fixture"),
);
let sql = std::fs::read(std::env::args().nth(2).expect("corrective SQL"))?;
assert_eq!(
root.file_name().unwrap(),
"coa-schema-fixture-stability-upgrade-76-85-20261030"
);
assert!(root.join(".release-schema-fixture").is_file());
assert!(!root.join("legacy-start-data-e2e-started").exists());
fsx::atomic_write(
&root.join("legacy-start-data-e2e-started"),
b"disposable regression test",
)?;
let result = std::panic::catch_unwind(|| -> Result<()> {
let meta = coa_core::registry::metadata_dir_for(&root)?;
let mut identities = String::new();
let mut custom = String::new();
backup::with_database(&root, |db| {
assert_eq!(
db.query(
"SELECT COUNT(*) FROM acore_world.playercreateinfo WHERE race IN (33,45);"
)?
.trim(),
"0"
);
let base: u32 = db
.query("SELECT MAX(guid)+100 FROM acore_characters.characters;")?
.trim()
.parse()
.unwrap();
clone_character(db, base, 33, 12, "Thinprobe")?;
clone_character(db, base + 1, 45, 30, "Leperprobe")?;
identities = db.query(&format!(
"SELECT * FROM acore_characters.characters WHERE guid IN ({base},{});",
base + 1
))?;
let missing = coa_core::character_start_check::missing(db)?;
assert!(missing
.iter()
.any(|c| c.guid == base && c.race == 33 && c.class == 12));
assert!(missing
.iter()
.any(|c| c.guid == base + 1 && c.race == 45 && c.class == 30));
db.query("INSERT INTO acore_world.playercreateinfo SELECT 33,class,map,zone,position_x+0.125,position_y,position_z,orientation FROM acore_world.playercreateinfo WHERE race=1 AND class=32;")?;
custom =
db.query("SELECT * FROM acore_world.playercreateinfo WHERE race=33 AND class=32;")?;
fsx::atomic_write(
&root.join("legacy-probe-guids.json"),
serde_json::to_string(&[base, base + 1])?.as_bytes(),
)?;
println!("PASS: reproduced missing starting data for existing race 33/class 12 and race 45/class 30 characters");
Ok(())
})?;
let source = root.join("legacy-start-data-source");
let pkg = root.join("legacy-start-data-package");
fsx::atomic_write(
&source.join("Core/legacy-start-data-proof.txt"),
b"corrective migration acceptance",
)?;
fsx::atomic_write(
&source.join("_migrations/world/stabilization_legacy_starts.sql"),
&sql,
)?;
let manifest = package::build(
&source,
&pkg,
&BuildOptions {
kind: Kind::Update,
version: "2.0.0".into(),
core_commit: None,
bots_commit: None,
built_at: "private regression acceptance".into(),
part_size: 1 << 20,
migrations: vec![Migration {
id: "stabilization_legacy_starts".into(),
db: "world".into(),
sha256: fsx::sha256_bytes(&sql),
compatible_sha256: vec![],
destructive: false,
}],
},
&|_| {},
)?;
let key = SigningKey::generate(&mut rand_core::OsRng);
fsx::atomic_write(
&pkg.join("manifest.json.sig"),
STANDARD
.encode(
key.sign(&std::fs::read(pkg.join("manifest.json"))?)
.to_bytes(),
)
.as_bytes(),
)?;
let trusted = STANDARD.encode(key.verifying_key().to_bytes());
let env = RepackEnv {
root: &root,
meta_dir: &meta,
};
let out = update::apply(
&update::Params {
root: &root,
meta_dir: &meta,
source: Source::Dir(pkg),
trusted_key: &trusted,
cancel: Default::default(),
resolutions: BTreeMap::new(),
env: &env,
fail_after_ops: None,
},
&|step, pct| println!("{pct}% {step}"),
)?;
assert_eq!(out.txn.state, update::State::Committed);
assert_eq!(
MetaDir::open(&meta)?.1.core.version.as_deref(),
Some("2.0.0")
);
backup::with_database(&root, |db| {
let guids: Vec<u32> =
serde_json::from_slice(&std::fs::read(root.join("legacy-probe-guids.json"))?)?;
assert_eq!(
db.query(&format!(
"SELECT * FROM acore_characters.characters WHERE guid IN ({},{});",
guids[0], guids[1]
))?,
identities
);
assert!(coa_core::character_start_check::missing(db)?
.iter()
.all(|c| !guids.contains(&c.guid)));
assert_eq!(
db.query("SELECT * FROM acore_world.playercreateinfo WHERE race=33 AND class=32;")?,
custom
);
assert!(coa_core::migrations::status(db, &manifest.migrations)?
.iter()
.all(|m| m.status == coa_core::migrations::Status::Applied));
let before = counts(db)?;
db.query(&format!(
"USE acore_world; {}",
String::from_utf8_lossy(&sql)
))?;
assert_eq!(counts(db)?, before);
assert_eq!(
db.query("SELECT * FROM acore_world.playercreateinfo WHERE race=33 AND class=32;")?,
custom
);
println!("PASS: signed Manager update restored legacy starts, preserved complete character rows and custom starts, and remained idempotent on a second SQL execution");
Ok(())
})?;
Ok(())
});
let stopped = driver::run(&root, Verb::StopAll)?;
assert!(stopped.ok, "{}", stopped.output);
result.map_err(|_| {
coa_core::Error::Invalid("Legacy start regression failed; fixture stopped".into())
})?
}
fn counts(db: &Db) -> Result<String> {
db.query("SELECT COUNT(*) FROM acore_world.playercreateinfo WHERE race IN (33,45); SELECT COUNT(*) FROM acore_world.playercreateinfo_item WHERE race IN (33,45); SELECT COUNT(*) FROM acore_world.playercreateinfo_action WHERE race IN (33,45); SELECT COUNT(*) FROM acore_world.player_race_stats WHERE Race IN (33,45); SELECT COUNT(*) FROM acore_world.ascension_custom_class_race WHERE race IN (33,45);")
}
fn clone_character(db: &Db, guid: u32, race: u32, class: u32, name: &str) -> Result<()> {
let columns = db.query("SHOW COLUMNS FROM acore_characters.characters;")?;
let names: Vec<_> = columns
.lines()
.map(|l| l.split('\t').next().unwrap())
.collect();
let values: Vec<String> = names
.iter()
.map(|c| match *c {
"guid" => guid.to_string(),
"name" => format!("'{name}'"),
"race" => race.to_string(),
"class" => class.to_string(),
"online" | "at_login" => "0".into(),
_ => format!("`{c}`"),
})
.collect();
db.query(&format!("INSERT INTO acore_characters.characters ({}) SELECT {} FROM acore_characters.characters WHERE class={class} LIMIT 1;",names.iter().map(|c|format!("`{c}`")).collect::<Vec<_>>().join(","),values.join(",")))?;
Ok(())
}
@@ -1,149 +0,0 @@
//! The Manager's start/stop (`driver`) on the Rust launcher, on a DISPOSABLE repack:
//!
//! 1. driver start-all: every service runs, the console answers, manage.py is not touched and sees the services;
//! 2. driver stop-all stops everything;
//! 3. manage.py start-all, then driver stop-all stops what Python started;
//! 4. a taken world port fails with the typed "port in use" code (no stderr parsing), then stop-all;
//! 5. driver start-all, then the forced stop;
//! 6. with a realm profile: the realm row gets the profile's name, manage.py is still not edited;
//! 7. nothing of the repack is left running.
//!
//! usage: manager_launcher_e2e <existing folder ending in -fixture>
use std::path::Path;
use std::process::Command;
use std::time::Instant;
use coa_core::driver::{self, Verb};
use coa_core::error::ErrorCode;
use coa_core::launcher::{services, settings::Settings, state};
fn indent(s: &str) -> String {
s.lines().map(|l| format!(" {l}")).collect::<Vec<_>>().join("\n")
}
fn drive(root: &Path, verb: Verb) -> driver::DriverOutcome {
let t = Instant::now();
let out = driver::run(root, verb).expect("driver");
println!("[driver {verb:?}] ok={} code={:?} in {:?}\n{}", out.ok, out.code, t.elapsed(), indent(&out.output));
out
}
fn manage(root: &Path, action: &str) -> (bool, String) {
let python = root.join("Runtime/python/python.exe");
let script = root.join("Scripts/manage.py").to_string_lossy().into_owned();
let t = Instant::now();
let out = Command::new(python).args(["-B", &script, action]).output().unwrap();
let text = String::from_utf8_lossy(&out.stdout).into_owned() + &String::from_utf8_lossy(&out.stderr);
println!("[manage.py {action}] ok={} in {:?}\n{}", out.status.success(), t.elapsed(), indent(&text));
(out.status.success(), text)
}
fn python_status(root: &Path) -> serde_json::Value {
let (ok, out) = manage(root, "status-json");
assert!(ok);
let line = out.lines().rev().find(|l| l.trim_start().starts_with('{')).expect("a JSON status line");
serde_json::from_str(line).unwrap()
}
fn all(v: &serde_json::Value, running: bool) -> bool {
["mysql", "auth", "world", "relay"].iter().all(|k| v[*k] == running)
}
fn nothing_running(root: &Path) -> bool {
["mysql", "auth", "world", "supervisor", "relay"].iter().all(|n| state::running(root, n).is_none())
&& ["mysql/bin/mysqld.exe", "Core/authserver.exe", "Core/worldserver.exe"]
.iter()
.all(|exe| coa_core::process::find_by_exe(&root.join(exe)).is_empty())
}
fn console(root: &Path) -> String {
let cfg = Settings::load(root, 0).unwrap();
let mut ra = coa_core::ra::Ra::connect_to(cfg.ra_port, &cfg.ra_username, &cfg.ra_password).unwrap();
ra.run("server info").unwrap()
}
fn realm_name(root: &Path) -> String {
services::mysql(root, Some("SELECT name FROM acore_auth.realmlist WHERE id=1;"), None).unwrap()
}
fn main() {
let a: Vec<String> = std::env::args().skip(1).collect();
let root = Path::new(&a[0]);
assert!(a[0].ends_with("-fixture"), "a folder ending in -fixture is required");
assert!(nothing_running(root), "the fixture must be stopped before the test");
let manage_py = root.join("Scripts/manage.py");
let original = std::fs::read(&manage_py).unwrap();
let profile = root.join("Settings/realm-profile.json");
assert!(!profile.exists(), "the fixture starts without a realm profile");
// 1
let started = drive(root, Verb::StartAll);
assert!(started.ok, "start-all");
assert!(all(&python_status(root), true), "manage.py sees what the Manager started");
let info = console(root);
println!("[console] {}", info.lines().next().unwrap_or(""));
assert_eq!(std::fs::read(&manage_py).unwrap(), original, "manage.py is not rewritten");
assert_eq!(realm_name(root), "AzerothCore", "no profile: the launcher's own realm name");
let shipped = root.join("Scripts/coa-launcher.exe");
let supervisor = state::running(root, "supervisor").expect("a supervisor");
println!("[supervisor] {}", supervisor.exe);
let expected = if shipped.is_file() { "coa-launcher.exe" } else { "python.exe" };
assert!(supervisor.exe.to_lowercase().ends_with(expected), "the world is supervised by {expected}");
let relay = state::running(root, "relay").expect("a bug-report relay");
println!("[relay] {}", relay.exe);
assert!(relay.exe.to_lowercase().ends_with(expected), "the relay is run by {expected}");
assert!(state::running(root, "relay-ready").is_some_and(|r| r.pid == relay.pid), "the relay reported ready");
// 2
assert!(drive(root, Verb::StopAll).ok, "stop-all");
assert!(nothing_running(root), "1-2 left something running");
// 2b: the repack's Python launcher stops a world the Manager started
assert!(drive(root, Verb::StartAll).ok);
assert!(manage(root, "stop-all").0, "manage.py stops what the Manager started");
assert!(nothing_running(root), "2b left something running");
// 3
assert!(manage(root, "start-all").0);
assert!(drive(root, Verb::StopAll).ok, "driver stops what manage.py started");
assert!(nothing_running(root), "3 left something running");
// 4
let cfg = Settings::load(root, 0).unwrap();
let blocker = std::net::TcpListener::bind(("127.0.0.1", cfg.world_port)).unwrap();
let refused = drive(root, Verb::StartAll);
assert!(!refused.ok);
assert_eq!(refused.code, Some(ErrorCode::PortInUse), "typed port error");
assert!(refused.output.contains(&format!("Port {}", cfg.world_port)));
drop(blocker);
assert!(drive(root, Verb::StopAll).ok);
assert!(nothing_running(root), "4 left something running");
// 5
assert!(drive(root, Verb::StartAll).ok);
let t = Instant::now();
let forced = driver::force_stop(root).expect("force stop");
println!("[driver force_stop] ok={} in {:?}\n{}", forced.ok, t.elapsed(), indent(&forced.output));
assert!(forced.ok && forced.output.contains("Force-stopped"));
assert!(nothing_running(root), "5 left something running");
// 6
std::fs::write(&profile, br#"{"active":"coa","wildcard_created":false}"#).unwrap();
let result = std::panic::catch_unwind(|| {
assert!(drive(root, Verb::StartAll).ok, "start-all with a realm profile");
assert_eq!(realm_name(root), "Conquest of Azeroth");
assert_eq!(std::fs::read(&manage_py).unwrap(), original, "manage.py is not edited for a realm profile either");
assert!(drive(root, Verb::StopAll).ok);
});
std::fs::remove_file(&profile).unwrap();
std::fs::write(&manage_py, &original).unwrap();
if result.is_err() {
let _ = driver::run(root, Verb::StopAll);
panic!("step 6 failed");
}
// 7
assert!(nothing_running(root), "something of the repack is still running");
println!("PASS: the Manager starts and stops through the Rust launcher, interoperates with manage.py, typed errors");
}
@@ -1,170 +0,0 @@
//! The Rust bug-report relay against the repack's `BugReport/relay.py`, offline (a scripted service, no network):
//!
//! 1. the same reports and the same service answers give the same `.status` files and journal rows;
//! 2. each relay continues the other's journal: what one delivered is never sent again by the other, and a post the
//! other left in progress is uncertain.
//!
//! usage: relay_equivalence <repack folder with Runtime/python and BugReport/relay.py>
use std::path::{Path, PathBuf};
use std::process::Command;
use std::sync::{Arc, Mutex};
use coa_core::launcher::relay::{Failure, Relay, Service};
const REPORTS: [(&str, &str); 5] = [
("1-00000000000000a1", "COABUG1\r\nQuest broken\r\nThe NPC is gone.\r\n"),
("9-00000000000000b2", "COABUG1\nRate limited\nBody text\n"),
("3-00000000000000c3", "COABUG1\nRejected\nBody\n"),
("4-00000000000000d4", "COABUG1\nxy\nTitle too short\n"),
("5-00000000000000e5", "COABUG1\nUnknown outcome\nBody\n"),
];
/// The answers per title, in the vocabulary of both relays.
fn answer(title: &str) -> std::result::Result<u64, Failure> {
match title {
"Quest broken" => Ok(101),
"Rate limited" => Err(Failure::Limited(60)),
"Rejected" => Err(Failure::Invalid),
_ => Err(Failure::Uncertain),
}
}
const PYTHON: &str = r#"
import importlib.util, sys, json
from pathlib import Path
spec = importlib.util.spec_from_file_location("relay", sys.argv[1]); relay = importlib.util.module_from_spec(spec); spec.loader.exec_module(relay)
spool = Path(sys.argv[2]); calls = []
class Fake:
def create(self, title, body):
calls.append(title)
if title == "Quest broken": return 101
if title == "Rate limited": raise relay.DeliveryError("limited", 60)
if title == "Rejected": raise relay.DeliveryError("invalid")
raise relay.DeliveryError("uncertain")
t = [float(sys.argv[3])]
def clock():
t[0] += 3
return t[0]
r = relay.Relay(spool, Fake(), clock=clock)
for path in sorted(spool.glob("*.report")):
r.process(path)
r.close()
print(json.dumps(calls))
"#;
struct Scripted(Arc<Mutex<Vec<String>>>);
impl Service for Scripted {
fn create(&self, title: &str, _: &str) -> std::result::Result<u64, Failure> {
self.0.lock().unwrap().push(title.into());
answer(title)
}
}
fn spool(dir: &Path) -> PathBuf {
std::fs::create_dir_all(dir).unwrap();
for (key, text) in REPORTS {
std::fs::write(dir.join(format!("{key}.report")), text).unwrap();
}
dir.into()
}
fn python(repack: &Path, spool: &Path, start: f64) -> Vec<String> {
let out = Command::new(repack.join("Runtime/python/python.exe"))
.args(["-I", "-B", "-c", PYTHON])
.arg(repack.join("BugReport/relay.py"))
.arg(spool)
.arg(start.to_string())
.output()
.unwrap();
assert!(out.status.success(), "{}", String::from_utf8_lossy(&out.stderr));
serde_json::from_slice(&out.stdout).unwrap()
}
/// The clock of both relays: `start`, then 3 seconds later at every reading.
fn rust(spool: &Path, start: f64) -> Vec<String> {
let calls = Arc::new(Mutex::new(Vec::new()));
let t = Mutex::new(start);
let clock = move || {
let mut v = t.lock().unwrap();
*v += 3.0;
*v
};
let relay = Relay::with_clock(spool, Scripted(calls.clone()), Box::new(clock)).unwrap();
relay.pass().unwrap();
drop(relay);
let c = calls.lock().unwrap().clone();
c
}
/// `.status` files and journal rows (without the post time).
fn snapshot(spool: &Path) -> (Vec<(String, String)>, Vec<String>) {
let mut statuses: Vec<(String, String)> = std::fs::read_dir(spool)
.unwrap()
.flatten()
.filter(|e| e.path().extension().is_some_and(|x| x == "status"))
.map(|e| (e.file_name().to_string_lossy().into_owned(), std::fs::read_to_string(e.path()).unwrap()))
.collect();
statuses.sort();
let db = rusqlite::Connection::open(spool.join("relay.sqlite3")).unwrap();
let mut q = db.prepare("SELECT key, digest, marker, state, number, next_try FROM deliveries ORDER BY key").unwrap();
let rows = q
.query_map([], |r| {
Ok(format!(
"{}|{}|{}|{}|{:?}|{}",
r.get::<_, String>(0)?,
r.get::<_, String>(1)?,
r.get::<_, String>(2)?,
r.get::<_, String>(3)?,
r.get::<_, Option<i64>>(4)?,
r.get::<_, f64>(5)?
))
})
.unwrap()
.map(Result::unwrap)
.collect();
(statuses, rows)
}
fn main() {
let repack = PathBuf::from(std::env::args().nth(1).expect("repack folder"));
let work = tempfile::tempdir().unwrap();
// 1
let (a, b) = (spool(&work.path().join("python")), spool(&work.path().join("rust")));
let py_calls = python(&repack, &a, 1000.0);
let rs_calls = rust(&b, 1000.0);
println!("python posted {py_calls:?}\nrust posted {rs_calls:?}");
assert_eq!(py_calls, rs_calls, "the same reports are posted");
let (pa, pb) = (snapshot(&a), snapshot(&b));
for s in &pa.0 {
println!(" {} = {}", s.0, s.1.trim());
}
assert_eq!(pa, pb, "the same statuses and journal");
// 2: each continues the other's journal. Before the retry times nothing is sent again; after them only the
// rate-limited report is (created, rejected and uncertain ones never are).
assert!(python(&repack, &b, 1000.0).is_empty(), "Python does not resend what Rust handled");
assert!(rust(&a, 1000.0).is_empty(), "Rust does not resend what Python handled");
// Later passes: the queued reports go out, a refused or uncertain one never again.
for start in [5000.0, 6000.0, 7000.0] {
let (p, r) = (python(&repack, &b, start), rust(&a, start));
println!("at {start}: python on rust's journal posted {p:?}, rust on python's posted {r:?}");
assert_eq!(p, r, "the same retries");
assert!(!p.iter().any(|t| t == "Quest broken" || t == "Unknown outcome"), "created and uncertain are final");
}
assert_eq!(snapshot(&a), snapshot(&b), "the same after a retry by the other relay");
for dir in [&a, &b] {
let db = rusqlite::Connection::open(dir.join("relay.sqlite3")).unwrap();
db.execute("UPDATE deliveries SET state='posting' WHERE key='9-00000000000000b2'", []).unwrap();
}
python(&repack, &b, 9000.0);
rust(&a, 9000.0);
for dir in [&a, &b] {
let db = rusqlite::Connection::open(dir.join("relay.sqlite3")).unwrap();
let state: String = db.query_row("SELECT state FROM deliveries WHERE key='9-00000000000000b2'", [], |r| r.get(0)).unwrap();
assert_eq!(state, "uncertain", "an interrupted post is not retried ({})", dir.display());
}
assert_eq!(snapshot(&a), snapshot(&b), "still the same after the crossover");
println!("PASS: relay journals, statuses and posts are the same in Python and Rust");
}
@@ -1,103 +0,0 @@
//! SQUID database provisioning in Rust gives exactly what Scripts/squid_playerbots.py gives, on a DISPOSABLE repack:
//! the same journals (coa_squid_migrations, coa_squid_pending) in every schema, the same acore_playerbots tables
//! with the same row counts, the same playerbots.conf. Each side starts from the same state (SQUID never
//! provisioned), and a second run of each must change nothing.
//!
//! usage: squid_equivalence <fixture ending in -fixture> <coa-launcher.exe>
use std::path::Path;
use std::process::Command;
use coa_core::launcher::{services, squid};
fn sql(root: &Path, q: &str) -> String {
services::mysql(root, Some(q), None).unwrap_or_else(|e| panic!("{q}: {e}"))
}
/// What provisioning leaves behind, comparable between runs.
fn snapshot(root: &Path) -> String {
let mut out = Vec::new();
for schema in ["acore_characters", "acore_world", "acore_playerbots"] {
let tables = sql(root, &format!("SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA='{schema}' ORDER BY TABLE_NAME;"));
for t in tables.lines() {
if schema != "acore_playerbots" && !t.starts_with("coa_squid") {
continue;
}
let n = sql(root, &format!("SELECT COUNT(*) FROM `{schema}`.`{t}`;"));
out.push(format!("{schema}.{t} rows={n}"));
if t == "coa_squid_migrations" || t == "coa_squid_pending" {
for row in sql(root, &format!("SELECT path, sha256 FROM `{schema}`.`{t}` ORDER BY path;")).lines() {
out.push(format!(" {row}"));
}
}
}
}
let conf = std::fs::read_to_string(root.join("Core/configs/modules/playerbots.conf")).unwrap();
out.push(format!("playerbots.conf:\n{}", conf.replace("\r\n", "\n")));
out.join("\n")
}
fn reset(root: &Path, conf: &[u8]) {
sql(root, "DROP DATABASE IF EXISTS acore_playerbots;");
for schema in ["acore_characters", "acore_world"] {
sql(root, &format!("DROP TABLE IF EXISTS `{schema}`.coa_squid_migrations, `{schema}`.coa_squid_pending;"));
}
std::fs::write(root.join("Core/configs/modules/playerbots.conf"), conf).unwrap();
}
fn python(root: &Path) {
let harness = root.join(".state/squid_harness.py");
std::fs::write(
&harness,
"import sys, pathlib\nroot = pathlib.Path(sys.argv[1])\nsys.path.insert(0, str(root / 'Scripts'))\nsys.argv = ['manage.py']\nimport manage\nfrom squid_playerbots import prepare_playerbots\nprepare_playerbots(manage.ROOT, manage.settings(), manage.mysql)\n",
)
.unwrap();
let out = Command::new(root.join("Runtime/python/python.exe")).arg("-B").arg(&harness).arg(root).output().unwrap();
assert!(out.status.success(), "python: {}{}", String::from_utf8_lossy(&out.stdout), String::from_utf8_lossy(&out.stderr));
print!("{}", String::from_utf8_lossy(&out.stdout));
}
fn rust(root: &Path) {
let cfg = coa_core::launcher::Settings::load(root, 0).unwrap();
squid::prepare_playerbots(root, cfg.mysql_port, &|q| services::mysql(root, Some(q), None), &|m| println!("{m}")).unwrap();
}
fn main() {
let a: Vec<String> = std::env::args().skip(1).collect();
let root = Path::new(&a[0]);
let exe = Path::new(&a[1]);
assert!(a[0].ends_with("-fixture"));
let modules = root.join("Core/configs/modules");
// SQUID on, Companions off
let companions = std::fs::read_to_string(modules.join("mod_coa_playerbots.conf")).unwrap();
std::fs::write(modules.join("mod_coa_playerbots.conf"), companions.replace("CoaBots.Enable = 1", "CoaBots.Enable = 0")).unwrap();
let squid_conf = std::fs::read_to_string(modules.join("playerbots.conf")).unwrap().replace("AiPlayerbot.Enabled = 0", "AiPlayerbot.Enabled = 1");
let r = root.to_string_lossy().into_owned();
let started = Command::new(exe).args(["--root", &r, "start-mysql"]).output().unwrap();
assert!(started.status.success(), "{}", String::from_utf8_lossy(&started.stderr));
reset(root, squid_conf.as_bytes());
let t = std::time::Instant::now();
python(root);
println!("python provisioned in {:?}", t.elapsed());
let by_python = snapshot(root);
python(root);
assert_eq!(snapshot(root), by_python, "a second Python run changed something");
reset(root, squid_conf.as_bytes());
let t = std::time::Instant::now();
rust(root);
println!("rust provisioned in {:?}", t.elapsed());
let by_rust = snapshot(root);
rust(root);
assert_eq!(snapshot(root), by_rust, "a second Rust run changed something");
if by_python != by_rust {
std::fs::write(root.join(".state/squid-python.txt"), &by_python).unwrap();
std::fs::write(root.join(".state/squid-rust.txt"), &by_rust).unwrap();
panic!("Rust and Python differ: see .state/squid-python.txt and squid-rust.txt");
}
println!("{} lines of journal/table/config state are identical", by_rust.lines().count());
let stopped = Command::new(exe).args(["--root", &r, "stop-all"]).output().unwrap();
assert!(stopped.status.success());
println!("SQUID EQUIVALENCE PASS");
}
@@ -1,8 +0,0 @@
use coa_core::{backup, schema_check, Result};
fn main()->Result<()> {
let root=std::path::PathBuf::from(std::env::args().nth(1).unwrap());
let contract=std::path::PathBuf::from(std::env::args().nth(2).unwrap());
assert!(root.join("recovery-e2e-started").is_file());
assert!(contract.join(".release-schema-fixture").is_file());
backup::with_database(&root,|db| {for p in schema_check::check(db,&contract)? {println!("{}.{}.{}: {}",p.database,p.table,p.column,p.detail);} Ok(())})
}
@@ -1,132 +0,0 @@
use base64::{engine::general_purpose::STANDARD, Engine};
use coa_core::{
backup,
driver::{self, Verb},
fsx,
manifest::{Kind, Migration},
package::{self, BuildOptions},
pkgsource::Source,
update::{self, RepackEnv},
Result,
};
use ed25519_dalek::{Signer, SigningKey};
use std::{collections::BTreeMap, path::PathBuf};
fn main() -> Result<()> {
let root = PathBuf::from(std::env::args().nth(1).unwrap());
let core = PathBuf::from(std::env::args().nth(2).unwrap());
let release = PathBuf::from(std::env::args().nth(3).unwrap());
assert!(root.join("recovery-e2e-started").is_file());
let result = std::panic::catch_unwind(|| -> Result<()> {
let meta = coa_core::registry::metadata_dir_for(&root)?;
let source = root.join("schema-sync-source-v2");
let pkg = root.join("schema-sync-package-v2");
assert!(!pkg.exists());
fsx::atomic_write(
&source.join("Core/schema-sync-proof.txt"),
b"official schema migration acceptance",
)?;
let published =
coa_core::manifest::Manifest::parse(&std::fs::read(release.join("manifest.json"))?)?;
let contract_path = PathBuf::from("C:/games/source/coa-schema-fixture-stability-upgrade-76-85-20261030/Scripts/database-schema.json");
let contract = std::fs::read(contract_path)?;
let expected = published
.files
.iter()
.find(|f| f.path == "Scripts/database-schema.json")
.unwrap();
assert_eq!(fsx::sha256_bytes(&contract), expected.sha256);
fsx::atomic_write(&source.join("Scripts/database-schema.json"), &contract)?;
let mut migrations: Vec<Migration> = Vec::new();
for id in [
"rev_1793212891571528600",
"rev_20261027_18_coa_strange_piece_of_scrap_faction_diamond",
] {
let m = published
.migrations
.iter()
.find(|m| m.id == id)
.unwrap()
.clone();
let sql = std::fs::read(
core.join(format!("data/sql/updates/pending_db_{}/{}.sql", m.db, m.id)),
)?;
assert_eq!(fsx::sha256_bytes(&sql), m.sha256);
fsx::atomic_write(
&source.join(format!("_migrations/{}/{}.sql", m.db, m.id)),
&sql,
)?;
migrations.push(m);
}
package::build(
&source,
&pkg,
&BuildOptions {
kind: Kind::Update,
version: "3.0.0".into(),
core_commit: None,
bots_commit: None,
built_at: "private native fixture schema sync".into(),
part_size: 1 << 20,
migrations,
},
&|_| {},
)?;
let key = SigningKey::generate(&mut rand_core::OsRng);
fsx::atomic_write(
&pkg.join("manifest.json.sig"),
STANDARD
.encode(
key.sign(&std::fs::read(pkg.join("manifest.json"))?)
.to_bytes(),
)
.as_bytes(),
)?;
let trusted = STANDARD.encode(key.verifying_key().to_bytes());
let env = RepackEnv {
root: &root,
meta_dir: &meta,
};
let out = update::apply(
&update::Params {
root: &root,
meta_dir: &meta,
source: Source::Dir(pkg),
trusted_key: &trusted,
cancel: Default::default(),
resolutions: BTreeMap::from([(
"Scripts/database-schema.json".into(),
update::Resolution::Replace,
)]),
env: &env,
fail_after_ops: None,
},
&|step, pct| println!("{pct}% {step}"),
)?;
assert_eq!(out.txn.state, update::State::Committed);
backup::with_database(&root, |db| {
assert_eq!(
db.query("SELECT name,at_login FROM acore_characters.characters WHERE guid=3030;")?
.trim(),
"Christian Shadowheart\t1"
);
assert_eq!(
db.query("SELECT id FROM acore_characters.manager_recovery_probe;")?
.trim(),
"42"
);
assert_eq!(
db.query("SELECT id FROM acore_world.manager_recovery_probe;")?
.trim(),
"44"
);
Ok(())
})?;
println!("PASS: the exact two published migrations brought the old fixture schema forward through the Manager updater while preserving the rejected companion and recovery probes");
Ok(())
});
let stop = driver::run(&root, Verb::StopAll)?;
assert!(stop.ok, "{}", stop.output);
result.map_err(|_| {
coa_core::Error::Invalid("Schema sync acceptance failed; fixture stopped".into())
})?
}
Loaded 100 of 406 files, more files were not shown because too many files have changed in this diff. Show more