aorecomp

Anarchy Online classic in the browser

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


docs/contained-uploads.md (3182B)


Token and map uploads from carried backpacks

The shared Use dispatcher admits complete token and map contracts from page107, alongside its existing ordinary-inventory path. The upper16 source bits resolve the session's known Chest handle; the lower16 select its exact child. The bag must still be carried. A known handle remains usable after its window closes. Shared ownership, pending equipment and trade guards still apply.

Both upload handlers preserve their original authored requirements and metadata rules. The token path still evaluates current level and faction at redemption; the map path still applies the documented map-bank reconstruction policy. They clone the affected child slice and contents map, consume one exact child, and commit metadata with that removal before acknowledging success. Companions and empty bags remain owned. Completion and DeleteItem retain the request's actual packed source; native stat updates remain private.

Original KKR quantity callback1005e790 explicitly resolves the Chest handle, debits its child's Eat quantity and refreshes the Chest. Its source-bound REA record and the original DLL hash are retained with contained nano learning. The token and map authoritative effects already follow the native gates and resource descriptors documented in tokens and maps. This extends that recovered source contract; it does not establish original mission-token eligibility or new map arithmetic.

Public-handler tests place items through ordinary backpack deposits, then use nonzero child slots with distinct physical bag IDs and session handles. All six token variants and representative Hit, SetFlag and reader-upgrade maps verify first-success durability, private updates, exact removal, open/closed handles, companions, empty bags, replay and cold ownership. Metadata, child-removal, ignored-write and COMMIT failures preserve independent live contents and durable state before a one-time retry. Wrong faction, counter overflow, known map upgrades and strict skill equality remain refusals.

A controlled WASM baseline sends both real page107 commands and receives failure2 for each. The fixed14.52-second run redeems a level50 Omni token for3, uploads Arrow for MapOptions16, removes only those two rows and withdraws the remaining Monster Part through the same window. Native stats, feedback, screenshots, page replay and a cold reader retain the exact results with no page errors or dropped events. Supplies, faction, level and skills are fixture state, not earned progression or evidence of mission-token acquisition. Artifacts are under local/backpack-uploads/.

The ordinary/source-focused Go run passes17 roots/201 results, including all55 map entries and original token-level boundaries. The focused race run passes9 roots/92 results across contained uploads, duplicate/lost replies and neighboring medical, crystal, Briefcase and stale-source paths. Maintained-package vet and Node syntax checks pass. The independent native audit verifies both packed requests/completions, four absolute stat updates and exactly two child removals.