aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/mission-isolation.md (5191B)


Private mission isolation

The supported fixed-mission loop uses each accepted assignment's persisted runtime playfield ID as its instance boundary. A shared generator, exterior, room or actor position does not make two assignments the same world. Guests in the same runtime world receive ordinary shared gameplay; ownership and corpse entitlement remain separate checks.

server/mission_boundaries_test.go accepts two real mission offers, populates both private worlds, and admits a third player through a copied key bound to the first assignment. All three stand at identical interior coordinates. Requests then go through the normal gameplay handlers rather than a separate isolation predicate.

Path Different runtime worlds Owner and same-world guest
Actor interest and movement No foreign population or relayed pose Guest receives the owner's movement
Player/NPC inspection No reply or absorbed health-bonus state, even with stale known-NPC IDs Requested represented actor replies
Harmful and friendly nanos Admission reserves nothing; a departing target cancels completion and durably refunds once Damage/effects and observer delivery work after a clear retry
Player trade No draft; late acceptance after departure cancels and restores the original axe The same axe transfers once and survives restart
Vicinity and history Say, whisper, shout and emote exclude the other mission, including saved history Owner and guest receive the message and retain the exact runtime world in history
Combat and corpse loot Stale interest cannot authorize combat; entitlement cannot authorize remote cash/item pickup Shared kill, cash and exact-instance pickup survive restart
Floor objective Another assignment cannot take the book at the same coordinates Guest picks up the original instance; only same-world observers lose its floor model
Retirement The other owner's journal, key, door, objective and five NPC lives remain Owner and copied-key guest return outside before the world is removed

A checkpoint after retirement cannot recreate the deleted population. Existing mission tests additionally cover SQL failure/retry, concurrent assignment and reward requests, completed-world retention, copied-key cleanup and startup expiry. Existing visibility tests cover periodic/control nanos and obstruction refund failures through the same admission/completion machinery.

Native verification

Two owned, unmodified WASM clients ran on the GPU against the sole HTTPS8443 preview. Visitors2/3 accepted missions43/45 and walked through the actual keyed entrance into worlds65541/65542. Controlled interior placements and casting skills isolate protocol/world behavior; this is not an ordinary fresh-character progression or historical balance check.

At the same interior coordinates, read-only native actor-directory lookups show only each world's five original Leet IDs and its own player. Each client's T inspection resolves its own Leet. A vicinity message sent in65541 is absent from the other client's chat stream. Winter's Bite deals13 cold damage to1068625; only the caster's client receives that result.

A control-panel placement then puts Visitor3 into65541 as a controlled guest. This does not test native key duplication; the copied-key admission path is covered by the Go fixture. Both clients now resolve both players. Ctrl+Tab and T show Visitor3's player information, shared vicinity reaches both, and Strength Boost27169 delivers the native effect to both observers. Native modifier maps show +12 strength on the recipient and0 on the caster. Right-clicking the guest opens trade on both clients. Returning the guest to65542 cancels the draft and removes the remote actor. Browser reconnect preserves the separation.

Screenshots, original WebSocket streams, native snapshots and assertion-based accounting are retained under local/mission-boundary-research/. The direct handler tests establish forged-request rejection; an absent native target alone does not prove server enforcement. No gameplay rule or client patch was needed to satisfy these checks.

A cold server restart also preserves both running world IDs, each world's exact five NPC IDs and the recipient-only saved buff. Native journal abandonment then retires the first world without disturbing the second player's private world, original population or journal. Test-only visitors and their state are removed afterward, with the preview stopped for database cleanup and all unrelated rows and identity counters checked unchanged.

Regression results

The selected mission, chat, trade, inspection, combat, nano and pickup run passes 215 test functions and1178 test/subtest results across ./server/.... Race detection passes13 functions and19 results, including the eight new boundary tests and concurrent mission/trade lifecycle checks. Build and go vet ./server/... pass. Logs are retained beside the native captures. No page exceptions or adapter aborts were recorded; baseline resource404 console messages remain. Owned browsers are closed, and one preview remains on the default game ports and HTTPS8443.