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>
Found this by reproducing locally (installed a Go toolchain + helm
earlier in this session; this time added Chromium anti-throttling
flags and instrumented walkTo/pendingAction/keys onto window.__aeternalis
to watch it live) rather than guessing from CI logs again: the
"Target Harbinger" button sets pendingAction/walkTo directly, bypassing
action() entirely -- so the give-up budget from the last commit, which
only got initialized inside action(), read Date.now() against its
initial value of 0 on the very first tick after clicking. That's
always "expired" by billions of milliseconds, so it gave up on "boss"
immediately, blacklisted it, and reselected the nearest sentinel mob
instead -- explaining every "boss out of reach" / zero-progress boss
failure we've chased across the last several rounds. Confirmed via a
throwaway diagnostic test logging position/target every second: the
character walked calmly away from the boss it started standing on top
of, chasing first one sentinel then another.
Fixed the immediate bug (also set the budget's clock in the button's
handler), then found a second one the same repro immediately exposed:
attack against a live target is *mostly* cooldown rejections between
the hits that land, so "no progress since the initial click" was still
wrong -- it gave up mid-fight after ~10 successful hits during a lull.
Replaced the give-up condition with an actual progress signal (target
HP for attack, held-item count for gather/loot); it now only gives up
once that has genuinely stopped moving, confirmed via the same
diagnostic: 10 clean hits (1200 -> 1020 HP) holding position, matching
the server's own attack cooldown.
Also added the standard Chromium flags
(--disable-background-timer-throttling etc.) to the test browser
launch: the CI logs' 2-11s gaps between retries (instead of the
intended ~0.3s) are the classic signature of requestAnimationFrame
throttling down to ~1Hz for a backgrounded/occluded headless tab,
which independently made every frame-driven client action crawl. Left
walkTo/pendingAction/keys exposed on window.__aeternalis since they
were useful for this and will be again.
Verified: tsc/build clean, and three full local e2e runs (7/7 each)
all show the boss test landing clean periodic hits via "attack
cooldown" rejections between them, never wandering to a mob.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The unbounded retry from the last commit was a real regression: CI's
gather test picked "arrival:ore", which an earlier sequential test's
character had already depleted in this same long-lived shared world
(a real ~120s respawn wait, not a stray-frame timing race), and the
retry loop hammered that dead target for the entire 45s test timeout
instead of failing cleanly at the 20s assertion -- which then looks to
have left the world/character state in a bad spot for the next test
("character cannot act" on a brand-new character in the boss test
right after).
Now each target gets at most 8 retries (~2.4s) before the client gives
up on it, marks it briefly avoided, and re-runs the same target search
that action() already does -- so a gather walks to the next-nearest
tree/ore/herb instead of retrying a resource that won't respawn for two
minutes, and a stuck attack at least fails fast instead of consuming
the whole test budget. Boss still has no substitute target, so it
correctly falls through to "No target nearby" after giving up, rather
than retrying forever.
Verified: tsc/build clean, and two full local e2e runs (7/7 both
times) -- one incidentally still showed the depleted-arrival-resource
case, resolving in the normal 2-3 retries once the retry itself no
longer needed to fight a stale position, confirming the mechanism this
was meant to catch is bounded now rather than open-ended.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The new server-side "intent rejected" log (from the last commit) caught
it in the act: a single "boss out of reach" / "resource out of reach"
rejection, then nothing -- the client's walk-to-target flow fires the
gather/attack intent exactly once, the instant its (possibly a tick
stale) view of the authoritative server position first reads as
in-range, then immediately clears pendingAction/walkTo regardless of
whether the server actually accepted it. One unlucky frame and the
action is silently dead for good, which is exactly what stalled the
e2e gather and boss-attack polls waiting on an effect that was never
going to happen without another click.
Now it keeps retrying (throttled to ~3/s, well under the websocket's
input-rate limit and matching the server's own action cooldowns) as
long as the character stays in range, instead of clearing on the first
attempt. Confirmed locally: normal runs now show the retry harmlessly
hitting "resource depleted"/"attack cooldown" for the attempts *after*
the one that actually landed, and the full e2e suite (7/7, both spec
files) still passes. Also held up under artificial CPU throttling via
a CDP session (up to 50x) in manual testing, which the old single-shot
code also happened to survive locally -- so this is a fix for a real
fragility this log caught directly, not a blind guess.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>