aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/weapon-contract-research/conditional-native-lifecycle.md (2964B)


Conditional OnWear: hardware-accelerated WASM observations

Two headed clients used the unchanged shared preview, original Improved Tripler121582 (QL116, payload SHA256 f0479017b83604302b4280751892ee7dc3daaa7877133700d22d412546bb78c5), and original Sense Boost27154 through crystal27290. The Tripler's complete OnWear is Modify103+15, conditional on Sense20>150. No combat attacks were made, so its separate event5 proc was not exercised or claimed supported.

Only normal equipment/nano GUI inputs and public control fixture setup were used. Native modifier trees and inventory were read only; SQLite snapshots were read only. There were no native calls, heap writes or injected gameplay. Artifacts, screenshots, wire capture and15 asserted snapshots are retained in local/conditional-weapon-smoke/verification.json and its sibling files.

Owner state Sense base/bonus Raw103 modifier
Ordinary inventory 140/0 0
Worn below the condition 140/0 0
Sense Boost applied while still worn 140/12 0
Removed after the condition became true 140/12 -15
Re-equipped with the condition true 140/12 0
Owner reconnect while still worn/condition true 140/12 15
Sense Boost canceled while still worn 140/0 15
Removed after the condition became false 140/0 15
Owner reconnect with weapon in ordinary inventory 140/0 0

The observer was different: its remote owner's base Sense was5, yet it gained 103+15 on wear and removed that contribution on unwear regardless of the owner's condition. Its received Sense buff remained visible as+12. These observations must not be collapsed into a single local/remote rule.

For this path, native application and inverse removal sample current requirements independently. Merely crossing the condition does not update the existing modifier. This can subtract an unapplied contribution or retain an unremoved contribution. Full owner reconstruction resets the resulting offset. The visible native actor and original weapon instance were observed at every step; neither a lost item nor a new instance explains the arithmetic.

This is client behavior under the current reconstruction. It does not recover the original authoritative server's applied-effect state, stat compensation or reconnect policy. The present Go helper unconditionally accumulates these conditional values and also needs correction. Recomputing all bonuses from current requirements alone would not reproduce the observed lifecycle. Do not admit the83 conditional weapon contracts as complete or introduce a Tripler-specific workaround. Establish a reusable application/removal and owner/observer synchronization contract, including reconnect/restart, before supporting conditional gameplay.

Both owned clients closed cleanly. Isolated cleanup removed only owned players and items, verified all unrelated table hashes unchanged and checked SQLite foreign keys/integrity. The single shared HTTPS8443 preview was restored.