Commit graph

3919 commits

Author SHA1 Message Date
Erik
ff01423f3f ci: put the launcher's update pointer in a release, and delete the dist branch
Some checks failed
CI / linux-portable (push) Failing after 3m22s
CI / windows-gate (push) Successful in 5m27s
CI / release (push) Has been skipped
The dist branch existed to carry ~120 MB payloads that could not go on main.
Once payloads became release attachments it held one 500-byte manifest.json,
so it was a whole branch for a reason that no longer applied.

The pointer is now a release asset too: each publish recreates a one-asset
 release naming the versioned build. Forgejo has no
/releases/latest/download/ route (404), so a pointer is still required — but
keeping it in a release means nothing about distribution lives in git: no
payload branch, no bot commits on main, and no push that could retrigger the
pipeline (which is why writing the manifest to main was not the answer either).

Recreating the tag deletes the old release AND its tag; the tag outlives its
release and would otherwise block recreation.

Versioned releases are retained, so older builds stay downloadable.
tools/publish-dist.ps1 is removed — publishing is CI's job now.
2026-08-19 14:40:41 +02:00
Erik
353231fe6e docs: correct two landmine rows that my own later fixes disproved
All checks were successful
CI / linux-portable (push) Successful in 2m56s
CI / windows-gate (push) Successful in 4m56s
CI / release (push) Successful in 1m51s
The transport row said to cap xUnit.MaxParallelThreads; serializing that
assembly actually REGRESSED Windows (1000 passed in 7 s -> 999/1000 in 17 s)
and the real fix was widening the virtual-clock harness's wall-clock patience.

The Avalonia row said to serialize via xunit.runner.json; that does not fix it
either — proven twice, including with a compiled-in attribute so delivery could
not be blamed. It needs a real desktop and is now Lane=Manual.

Both rows now record what was tried and disproved, which is the part worth
keeping.
2026-08-19 14:23:31 +02:00
Erik
311c8bd3df test: lane the one Avalonia test that needs a real desktop session
All checks were successful
CI / linux-portable (push) Successful in 2m53s
CI / windows-gate (push) Successful in 5m6s
CI / release (push) Successful in 1m52s
MainWindowViewTests.CompiledMarkupAndEveryModalFocusPathRunInOneOwnedAvalonia
Session is Lane=Manual. Measured across five environments on 2026-08-19:

  dev desktop                  PASS
  CI Windows box, over SSH     PASS
  Windows under act_runner     FAIL
  Linux, plain SSH             FAIL

Always the same shape — Test Case Cleanup, 'The calling thread cannot access
this object', while a compositor is being CONSTRUCTED (Compositor..ctor ->
DefaultRenderLoop.Add -> VerifyAccess).

Two hypotheses were tested and disproved rather than assumed: serializing the
assembly (first xunit.runner.json, then a compiled-in CollectionBehavior
attribute, so delivery could not be the excuse) did not fix it, and removing
the test's only await did not either — that attempt actively CAUSED the
failure locally and was reverted. So it is neither parallelism nor a thread hop
in the test body; it is Avalonia's headless session lifecycle without a desktop.

The test is not weakened or deleted: the gate now runs 55/55 and this one runs
on demand via --filter Lane=Manual, where it passes. That matches how the
InstalledDat and Live lanes already work.
2026-08-19 14:15:21 +02:00
Erik
45f88d2d18 test: serialize Launcher.Tests via an assembly attribute, not xunit.runner.json
Some checks failed
CI / linux-portable (push) Successful in 3m10s
CI / windows-gate (push) Failing after 4m52s
CI / release (push) Has been skipped
MainWindowViewTests kept failing on CI in Test Case Cleanup ('The calling
thread cannot access this object') while passing 56/56 locally. The cause was
delivery, not the fix: xunit.runner.json only takes effect if it is copied
beside the test DLL, and under CI's 'dotnet build' + 'dotnet test --no-build'
split it did not arrive, so CI ran with parallel collections while local runs
did not.

[assembly: CollectionBehavior(DisableTestParallelization = true)] is compiled
into the DLL and cannot fail to deploy. It lives beside the existing
AvaloniaTestApplication/AvaloniaTestIsolation attributes, which document the
same thread-affinity hazard. The json and its csproj copy rule are removed so
there is one source of truth.
2026-08-19 14:06:24 +02:00
Erik
daf28bfec5 test: revert Core.Net serialization; widen the virtual-clock harness patience instead
Some checks failed
CI / linux-portable (push) Successful in 3m21s
CI / windows-gate (push) Failing after 4m57s
CI / release (push) Has been skipped
Serializing AcDream.Core.Net.Tests to fix a Linux starvation REGRESSED Windows,
which had been green: Core.Net went from 1000 passed in 7 s (run 154) to
999/1000 in 17 s (run 155), taking down LossSoak_TwoPercentBidirectional_
ZeroMessageLoss_LedgersConverge, a test that had never failed. That trade trans-
ferred the flake between platforms rather than fixing anything, so it is
reverted: no xunit.runner.json, no csproj change.

The actual fragility is narrower than it looked — exactly ONE test uses
real-time waits (PausedSelector_SeededDroppedServerReady_RecoversOnIdleSweep),
and its harness drives a VIRTUAL clock while asserting on 2 s wall-clock
windows. Those windows are patience for background work, not part of the
assertion, and 2 s only ever encoded 'the machine is idle'. They now share a
60 s HarnessPatience constant.

Nothing about what the test verifies changes: recovery must still occur, a
genuine failure to NAK still fails, and a real hang is still bounded. Campaign N
transport code is untouched.

Local: 1000/1000 in 6 s under the gate filter.
2026-08-19 13:59:42 +02:00
Erik
03bcc1a41b test: serialize AcDream.Core.Net.Tests so real-time transport waits are not starved
Some checks failed
CI / linux-portable (push) Successful in 3m22s
CI / windows-gate (push) Failing after 5m15s
CI / release (push) Has been skipped
PausedSelector_SeededDroppedServerReady_RecoversOnIdleSweep failed twice in CI
on the Linux runner, taking 37 s and 42 s, while passing 5/5 in ~350 ms in
isolation on that same machine. The test drives a virtual clock but asserts on
real-time 2 s SpinUntil windows, so full-assembly parallelism on a 6-core
container starves it.

Passing -- xUnit.MaxParallelThreads=2 through dotnet test did not take effect.
A xunit.runner.json is read by xUnit directly and is the convention already
used by AcDream.Core.Tests and AcDream.Launcher.Tests.
2026-08-19 13:51:07 +02:00
Erik
6ef82934dc docs: SSOT for the Gitea CI pipeline and automated alpha releases
Some checks failed
CI / linux-portable (push) Failing after 2m10s
CI / windows-gate (push) Successful in 4m59s
CI / release (push) Has been skipped
docs/ci-and-releases.md documents what happens on a push to main, why Gitea
rather than GitHub (billing-blocked, private repo, and Forgejo ships no hosted
runners), both runners and their prerequisites, the release/manifest layout,
and how to verify a release with the Lane=Live install test.

Its landmine table is the part worth keeping: every row cost a red pipeline —
Node for JS actions, setup-dotnet unmirrored on data.forgejo.org, the
zombie-task timeout caused by run-release-gate.ps1 redirecting child output,
an en-SE runner locale breaking 40 tests on decimal commas, DAT tests missing
their InstalledDat lane tag, parallel-load timing flakes, and the Avalonia
compositor threading failure that must NOT be 'fixed' by de-async-ing the test.

Also records the culture finding: config, parsing and the wire are all
invariant-safe, so US and European installs behave identically; only
diagnostic strings follow the current culture.

Cross-linked from docs/README.md and release-gate.md, which keeps ownership of
the local bounded gate.
2026-08-19 13:44:55 +02:00
Erik
657ac6baca test: prove a launcher installs the client from the live Gitea release
Some checks failed
CI / windows-gate (push) Has been cancelled
CI / linux-portable (push) Has been cancelled
CI / release (push) Has been cancelled
Lane=Live end-to-end verification against the real feed, using the production
updater the GUI button calls: ReleaseManifestClient.ProductionManifestUri, real
network, real SHA-256/size verification, real ZIP extraction, real atomic
activation. Asserts what the launcher actually does next — that
LauncherExecutableSet can resolve BOTH hosts out of the activated directory,
and that current.json names the installed version — rather than merely that
files exist.

Excluded from the bounded gate (Lane=Live needs the public feed reachable);
run deliberately after a release lands. Writes only under an isolated
temporary path set, never the caller's real launcher data directory.
2026-08-19 13:43:12 +02:00
Erik
aac29e359d ci: retire the smoke workflow now that the real pipeline is green
All checks were successful
CI / linux-portable (push) Successful in 3m23s
CI / windows-gate (push) Successful in 5m40s
CI / release (push) Successful in 1m55s
smoke.yml was scaffolding to prove the self-hosted runners could execute
anything at all, back when checkout and the SDK were still unresolved. ci.yml
now builds, gates and releases on both runners, so the smoke jobs only
duplicate its environment checks. Leaving dead workflows around is exactly the
debt that confuses the next reader.

This commit also serves as the pipeline's first real push-triggered run: every
green run so far was a workflow_dispatch.
2026-08-19 13:32:19 +02:00
Erik
c5492984ef ci: tag DAT-dependent tests into the InstalledDat lane; drop invariant workaround
Some checks failed
CI / linux-portable (push) Successful in 3m26s
CI / windows-gate (push) Failing after 5m2s
CI / release (push) Has been skipped
Three tests reached the CI gate needing the installed retail DATs, which no
build machine has, and failed with FileNotFoundException on client_cell_1.dat:
  - Issue127FloodFlipReplayTests (both facts replay via ResolveDatDir)
  - FindCellListConformanceTests.FindCellList_DoorwayThreshold_IndoorPicks_
    MatchRetail, the one untagged method among already-tagged siblings
They now carry [Trait("Lane", "InstalledDat")] like every other DAT test, so
the gate filter excludes them and the local DAT lane still runs them.

Also reverts the DOTNET_SYSTEM_GLOBALIZATION_INVARIANT pin from the previous
commit. It was too blunt: it fixed the 40 decimal-comma failures but broke
ChatLogTests.FormatTimestampPrefix_UsesLiteralColons_RegardlessOfCurrentCulture,
which legitimately constructs a culture and cannot under invariant mode. The
runner's HKCU locale (LocaleName=en-SE, sDecimal=',') was corrected to en-US
instead, which is the actual defect.
2026-08-19 11:19:14 +02:00
Erik
c851ac79e5 ci: pin invariant globalization on the Windows gate
Some checks failed
CI / linux-portable (push) Successful in 3m16s
CI / windows-gate (push) Failing after 5m5s
CI / release (push) Has been skipped
The runner reports en-US interactively, but its scheduled task inherits
en-SE (English/Sweden), whose decimal separator is a comma. That broke 40
tests across App/Core/Runtime/UI.Abstractions on number formatting alone
(expected "update:0.25", actual "update:0,25"). Set-Culture does not reach
a task running without a loaded user profile, and a build gate should not
depend on a machine's regional settings regardless.

Note for follow-up: this pins CI only. The underlying culture sensitivity is
real — a Swedish-locale player would see comma-formatted numbers in these
diagnostic strings.
2026-08-19 11:11:14 +02:00
Erik
3a02fc8369 ci: cap xUnit parallelism on the constrained Linux runner
Some checks failed
CI / linux-portable (push) Successful in 3m16s
CI / windows-gate (push) Failing after 5m7s
CI / release (push) Has been skipped
FakeAceTransportTests.PausedSelector_SeededDroppedServerReady_RecoversOnIdle
Sweep failed in CI after 37 s while passing 5/5 in ~350 ms in isolation on the
same machine: under full-assembly parallel load on a 6-core container its 2 s
real-time waits get starved. The test is timing-sensitive, not broken, so cap
the runner rather than edit Campaign N transport code.
2026-08-19 11:05:16 +02:00
Erik
994d52403f ci: stream tests on the Windows gate instead of the log-redirecting gate script
Some checks failed
CI / linux-portable (push) Failing after 2m15s
CI / windows-gate (push) Failing after 5m23s
CI / release (push) Has been skipped
The windows-gate job was marked failed while the work was still running: 20
dotnet processes were alive on the runner and a complete 8.7 MB App.Tests TRX
was on disk after Forgejo had already recorded a failure.

Cause: tools/run-release-gate.ps1 redirects every bounded child process to its
own log file, so the workflow step emits no output for minutes. Forgejo treats
a task that stops reporting as a zombie and fails it. The Linux job, which
runs dotnet test directly, streamed continuously and produced real results.

The Windows job now builds and then runs each test project directly with the
same trait filter copied from the gate script's default, so output streams the
whole time. run-release-gate.ps1 remains the canonical LOCAL gate, where its
bounded-process/blame-hang machinery is the point.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:50:21 +02:00
Erik
b746d3d61b ci: Gitea pipeline — gate on both self-hosted runners, publish alpha releases
Some checks failed
CI / linux-portable (push) Failing after 1s
CI / windows-gate (push) Failing after 6s
CI / release (push) Has been skipped
Every push to main now runs the gate on the self-hosted runners and, when
green, publishes a Gitea Release carrying the client, launcher+bake, and
manifest.

Pipeline (.gitea/workflows/ci.yml):
- windows-gate runs tools/run-release-gate.ps1, the project's own bounded
  gate. A bare `dotnet test AcDream.slnx` is NOT usable as a gate: it fails
  ~36 tests by design, because the InstalledDat/Live/Manual/OS lanes assert
  their own preconditions. The gate script's trait filter is what excludes
  them.
- linux-portable runs the portable closure, where the Linux-lane tests
  actually execute instead of failing on Windows.
- release depends on both, so a red gate cannot publish. It is a job in the
  same workflow rather than a workflow_run trigger, whose Forgejo support is
  unreliable; `needs` is guaranteed.

No actions/setup-dotnet: data.forgejo.org does not mirror it at all (404),
and both runners carry the pinned SDK band already. actions/checkout IS
mirrored and is used normally.

Release payloads become release ATTACHMENTS, outside git history, so ~120 MB
per build never enters a branch. Only the ~500-byte manifest.json is
committed, to the payload-free dist branch, because Forgejo has no
/releases/latest/download/ route (verified 404) for the launcher to poll.
publish-bin.ps1 takes -BaseUrl so the manifest points at the release tag.

Two real gate failures fixed:
- LauncherProjectBoundaryTests asserted four `**` path filters belonging to
  the push triggers that 8be14d39 removed when workflows went manual-only.
  The assertions about what the workflow DOES are untouched.
- MainWindowViewTests failed in Test Case Cleanup with "calling thread cannot
  access this object" while passing in isolation: Avalonia's headless session
  is thread-affine and xUnit ran collections in parallel. Serialized via
  xunit.runner.json, the same settings AcDream.Core.Tests already uses.

Local gate: 12 projects, 14,346 tests, 0 failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:35:36 +02:00
Erik
5256a39fb3 ci: extend smoke workflow with a real Linux build job 2026-08-19 10:20:27 +02:00
Erik
ba20d4bbf4 ci: add Gitea Actions smoke workflow for the self-hosted Windows runner 2026-08-19 10:11:26 +02:00
Erik
f260260caf fix(launcher-feed): strip debug symbols from distribution payloads (103 MB -> 77 MB)
A stock publish shipped native debug symbols to players: libSkiaSharp.pdb
(80 MB) and libHarfBuzzSharp.pdb (20 MB) from Avalonia's rendering packages
were 100 MB of a 278 MB launcher payload. MSBuild's DebugType switches only
govern our own managed symbols, not native .pdb files arriving as package
runtime assets, so the payload build drops every .pdb before zipping.

launcher-win-x64.zip 103.4 -> 77.4 MB, client 44.5 -> 43.6 MB. The launcher
payload now also fits under GitHub's 100 MB per-file limit, though the feed
stays on the Gitea-only dist branch to keep main's history clean.

Also fixes a StrictMode crash in the lock-file warning: an empty git status
result is null, not an empty array, so .Count threw at the end of a
successful publish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:56:20 +02:00
Erik
600c331ac6 feat(launcher): Gitea-backed alpha update feed replaces the GitHub Releases source
The launcher reported "no client available" because its update source was
pinned to a GitHub Releases manifest in a PRIVATE repo — nothing anonymous
could ever be fetched from it. Switch the feed to the PUBLIC Gitea repo so a
friend needs no account, and add the two commands that publish it.

- ReleaseManifestClient.ProductionManifestUri now points at
  git.snakedesert.se/erik/acdream raw on the `dist` branch. No update
  machinery changed: the existing strict reader already accepts any HTTPS
  manifest, so this is a URL swap plus a build script.

- tools/publish-bin.ps1 publishes the payloads into /bin and writes
  bin/manifest.json (schema v1, SHA-256 + size per artifact):
    client-win-x64.zip    AcDream.App + acdream-headless
    launcher-win-x64.zip  acdream-launcher + co-deployed acdream-bake
  Stamps InformationalVersion ONLY — never -p:Version, which also rewrites
  project-reference versions inside the committed packages.<rid>.lock.json
  files and churned every one of them with a throwaway build stamp.

- tools/publish-dist.ps1 pushes /bin to the Gitea-only `dist` branch from a
  throwaway worktree, leaving the developer's checkout, index, and HEAD
  untouched. It refuses a GitHub remote outright.

Why `dist` and not main: the launcher payload is ~103 MB because the launcher
and its co-deployed bake CLI are each self-contained single files (deliberate,
see AcDream.Launcher.csproj). GitHub hard-rejects files over 100 MB, and all
three refs currently track main, so payloads on main would break every GitHub
push. `dist` is a single-commit orphan branch that each publish REPLACES, so
superseded builds never accumulate. /bin stays gitignored repo-wide and is
force-added only on that branch.

Verified live: manifest and both payloads serve anonymously over HTTPS, and a
downloaded client payload matches its declared SHA-256 and size byte for byte.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 19:49:06 +02:00
Erik
8be14d3992 ci: make GitHub workflows manual only 2026-08-18 17:50:50 +02:00
Erik
328b7b456b docs: record stabilization merge handoff
Some checks failed
Headless portability / portable-headless (windows-latest) (push) Failing after 42s
Headless portability / portable-launcher (windows-latest) (push) Failing after 4s
Complete Release gate / Complete Release suite (Windows) (push) Failing after 25s
Headless portability / portable-headless (ubuntu-latest) (push) Failing after 13s
Headless portability / portable-launcher (ubuntu-latest) (push) Failing after 1s
Headless portability / linux-graphical (push) Failing after 1s
Headless portability / linux-vulkan (push) Failing after 8s
2026-08-18 17:49:09 +02:00
Erik
b64c8041dc docs: close r3 test cleanup 2026-08-18 17:02:15 +02:00
Erik
14d371a05b test: replace create authority source pin 2026-08-18 16:52:22 +02:00
Erik
84034f732c test: replace gameplay owner source freezes 2026-08-18 16:49:38 +02:00
Erik
9b94050229 test: replace frame orchestration source freezes 2026-08-18 16:40:56 +02:00
Erik
9bd5d47c47 test: replace graphical host source freezes 2026-08-18 16:30:25 +02:00
Erik
5e56045077 test: replace render leaf source freezes 2026-08-18 16:12:50 +02:00
Erik
3c492aedc2 test: replace runtime root source freezes 2026-08-18 16:02:15 +02:00
Erik
80c7b44457 test: replace composition source freezes 2026-08-18 15:50:53 +02:00
Erik
caa5eb8b2b test: replace input and physics source freezes 2026-08-18 15:31:57 +02:00
Erik
0ad2ee1cdf test: replace streaming source freezes 2026-08-18 15:14:41 +02:00
Erik
5a33369074 test: replace render source freezes 2026-08-18 14:58:25 +02:00
Erik
c31a9ac411 test: remove dormant panel self-tests 2026-08-18 14:37:42 +02:00
Erik
c5f0fbaaa4 test: audit helper-mediated source reads 2026-08-18 14:18:00 +02:00
Erik
dc94b0fe32 docs: make remaining test decisions exact 2026-08-18 13:55:13 +02:00
Erik
53b6841c5a test: remove final campaign labels 2026-08-18 13:50:31 +02:00
Erik
088add2fac test: own Avalonia application session 2026-08-18 13:41:23 +02:00
Erik
631ecd24e3 test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
Erik
a8cd3e2da2 docs: classify issue test taxonomy 2026-08-18 13:19:30 +02:00
Erik
ce2800a00c docs: reconcile ambiguous test contracts 2026-08-18 13:18:11 +02:00
Erik
79a4489e03 test: replace final fixed-delay oracles 2026-08-18 13:12:26 +02:00
Erik
ad7ebe9425 test: observe landblock worker joins 2026-08-18 13:03:30 +02:00
Erik
fa4bdfe89f test: observe monitor waits without delays 2026-08-18 12:56:25 +02:00
Erik
ea17bc8624 test: remove vacuous diagnostic assertions 2026-08-18 12:48:07 +02:00
Erik
5fa9933636 test: remove exact duplicate coverage 2026-08-18 12:36:41 +02:00
Erik
9c6b143a03 test: replace campaign labels with behavior names 2026-08-18 12:25:00 +02:00
Erik
e6fab96f12 docs: map source-text test debt 2026-08-18 12:17:58 +02:00
Erik
056af276d0 test: classify remaining explicit waits 2026-08-18 12:16:53 +02:00
Erik
6faeb4a103 test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Erik
dfc841b779 test: stabilize load-sensitive release contracts 2026-08-18 11:50:23 +02:00
Erik
c8c764a40e test: remove ambient timing from double-click contracts 2026-08-18 11:38:31 +02:00