Commit Graph
12 Commits
Author SHA1 Message Date
dingo ece92fa65c Add audited admin player item and title management 2026-09-08 07:20:18 -04:00
dingo b6ce3bc292 Complete player stats inventory and Control content editors 2026-09-08 06:02:13 -04:00
dingo 2df1f6ab38 Checkpoint stats equipment and control catalog implementation 2026-09-08 05:37:47 -04:00
dingo 3f58de5744 pushing current 2026-09-07 13:44:10 -04:00
dingo bc0ffbbbe5 Add character levels and permanent player titles 2026-09-07 07:58:34 -04:00
dingo 7375fc6638 Revert "perf: take the admin-command DB poll off the world tick's global lock"
This reverts commit 9454b51914.
2026-09-06 14:02:00 -04:00
dingoandClaude Sonnet 5 9454b51914 perf: take the admin-command DB poll off the world tick's global lock
Testing one specific, targeted hypothesis rather than another blind
patch: the portal merge added an unconditional per-second DB query
(controls(), checking for pending admin commands) directly inside the
world tick loop's s.mu-locked section -- the same lock every websocket
intent, every HTTP handler, and every snapshot broadcast to every
connected player depends on. That runs forever, for every world,
whether or not the admin feature is ever used.

Verified the actual game logic isn't broken (a live-instrumented run
of the unpatched single-shot gather/attack code landed its first hit
immediately and correctly), so the e2e flakiness has to be about
something making the server slower under load rather than a logic
defect. This is the one change in the merge positioned to tax *every*
player's snapshot/intent latency, every second, permanently -- not
just an occasional per-request cost like the other additions.

controls() now runs on its own ticker, independent of the simulation
tick, and only takes s.mu at all if there's an actual pending command
to apply (the DB read itself needs no lock -- world.ID is immutable
after creation). The idle case, which is the overwhelming majority of
ticks, no longer touches s.mu for this at all.

Verified: go build/vet/test clean, and the full local e2e suite (7/7,
both spec files, including the admin-command test that exercises
controls() directly) passes across two runs.

If this doesn't change CI's result, it should be reverted and ruled
out -- the next candidate would be the new /worlds/<id> routing
rewrite or the added per-request ActiveCharacter DB lookups.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 13:55:15 -04:00
dingoandClaude Sonnet 5 f4068946ed Revert the six post-merge patch commits; back to the portal-merge state
Reverts the working tree for these six files to their state at 7c5cb78
(the control-portal merge, reconciled with the auto-deploy digest bump)
-- undoing c5b8361, 74ff146, b1a07b7, db3e5a8, 0bb3e4b, and 9b226f7.

Those six commits were reactive fixes chasing CI failures one at a
time; each one changed the failure mode without ever reaching a fully
green run, and the last one coincided with the browser session itself
crashing mid-test rather than a logic assertion failing. Reverting to
a clean, known point (right after the merge, before any of that
patching) rather than continuing to layer fixes on an unverified base.

Note: this reintroduces a real, independently-confirmed bug fixed by
db3e5a8 -- deploy/chart/templates/worlds.yaml's per-world loop is
missing a newline between iterations (a leading whitespace-trim on the
$host template variable eats it), which breaks `helm lint` /
`helm template` for any values file with more than one world. That
will fail again on the next push if it isn't re-applied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 13:15:04 -04:00
dingoandClaude Sonnet 5 74ff146717 diag: log rejected intents server-side; preserve e2e artifacts on CI failure
The boss-attack e2e test keeps reporting bossHp completely unchanged
(1200, not just short of the timeout) on the CI runner, across two
separate runs, while it passes reliably in ~11s locally. Couldn't get
more signal from the runner itself: test-results/ (screenshots,
trace.zip, error-context.md) was never uploaded anywhere by the
workflow, so it's gone the moment the ephemeral job container is torn
down -- there was nothing left to retrieve.

Two changes to actually get signal on the next failure instead of
guessing blind:

- internal/transport/http.go: a rejected intent (e.g. "boss out of
  reach", "attack cooldown") already gets stored on c.Message for the
  client to show as a notice, but was never logged server-side. Now it
  is, via slog.Warn, so it shows up directly in the [WebServer] console
  output already captured in the job log -- no artifact retrieval
  needed.
- .gitea/workflows/build.yaml: upload test-results/ as a build artifact
  when the verify job fails, so trace.zip etc. survive past the job
  container for cases where the console log alone isn't enough.

Verified server still builds/vets clean and the full local e2e suite
(all 7 tests across game.spec.ts + portal.spec.ts, matching CI's count)
still passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 11:57:36 -04:00
dingoandClaude Sonnet 5 5df2f1b681 Merge control portal work from RPGTheory/aeternalis-portal
RPGTheory/aeternalis-portal had diverged from this repo (the git/CI/CD
copy) with an in-progress control portal feature that was never synced
back here, so none of it had gone through CI or been deployed:

- New site/game/control routing split: index.html becomes a world
  directory landing page (site.ts), game.html is the renamed former
  index.html (main.ts), control.html is a new admin panel
  (control.ts, portal-shared.ts, portal.css).
- Server: new internal/store/portal.go (character/world registry,
  command queue, admin grants) and internal/transport/control.go
  (portal API routes), plus a new internal/gitops package that lets
  the portal provision new worlds via a GitOps repo commit.
- game.World gains BornAt/DiedAt/DeathReason and an operator Control()
  path (close/open admissions, awaken boss, end world, per-character
  rename/heal/unstuck/retire); death no longer reuses the same
  character id on rejoin, matching the "new life" permadeath model in
  Plan.md rather than the old bypass-prevention test's expectations.
- deploy/: new control-egress network policy and portal/control
  values (admin role, GitOps repo/branch/values file/CIDRs).
- New e2e coverage: tests/portal.spec.ts, tools/capture-world.mjs.

Verified this repo's own independent commits (800ms movement-staleness
window, 20s boss-attack poll, SRS/TLS deploy values, ubuntu-22.04
runner pin, DOCKER_HOST fix) were already present in the portal copy
before merging, so nothing here regresses them. `tsc --noEmit`, the
vite client build, and the protocol contract check all pass; no go.mod
changes. Could not run `go build`/`go test` locally (no Go toolchain
on PATH, Docker daemon not running) — every new/changed Go symbol was
manually cross-referenced and resolves, but this should still be built
and tested in CI before merging to master.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 11:08:44 -04:00
dingo 194bb917b1 world.go:473 — widened the movement-staleness cutoff from 250ms → 800ms. This is just a safety net for a truly dead connection (explicit disconnect/blur/tab-hide handlers already zero movement immediately), so loosening it doesn't weaken anything real — it just tolerates a slow frame instead of stranding a walk-to-target action.
tests/game.spec.ts:85 — bumped the boss-attack poll timeout 15s → 20s as extra headroom on slow CI hardware.
2026-09-06 08:14:09 -04:00
dingo ff87b8a544 Build playable Aeternalis foundation and GitOps deployment pipeline 2026-09-05 12:52:51 -04:00