Signed effective-stat and ability-trickle fixture
Scope and original identity
The original target is anarchy-vanilla-14.9.1/kkr.dll, SHA256
a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0.
sha256sum and REA open identity both match. The prior
local/briefcase-weapon-research/native/kkr.snapshot.json was reused before
requesting original assembly and missing constant/table bytes. No tracked
production/test files, game, browser or server processes were changed/started.
Owned REA sessions were closed after saving the complete evidence and snapshot.
The fixture runs seven maintained lifted routines, extracted verbatim except
newline normalization into lifted_signed_stats.c:
| Original routine | Lifted entry | Exact original assembly Evidence |
|---|---|---|
| stat getter1006dfb0 | 3606dfb0 | ev_74652ec491811d2dbb9348174f59fabc0739128af4fc0567877aee64d3b28a0e |
| effective10075ca0 | 36075ca0 | ev_c27bbca88da1a49ac67c28b427c73045affc7be7b57c2cf2814043387c7a4714 |
| base/trickle10075c60 | 36075c60 | ev_2c98108acd73789969ea7727ff8f5f7bca6eb7e99423b9db494fb68749b32a07 |
| ability trickle10073fa0 | 36073fa0 | ev_57658a87b490182c351df832518ad2cf4faa5ad2ffc195dd8597861aec6e1b1d |
| modifier getter10074a30 | 36074a30 | ev_c3dc476ddb84eedb69e4e81bbbd80a7c5bf28e3aca92e4d8e2e0386d6813ad6f |
| modifier add10074730 | 36074730 | ev_b2a9656c468675646d49b31ff6317ecdfd16fc3991e0dc6484322a01038bea1c |
| modifier remove10074b00 | 36074b00 | ev_8fbad422c0792a1be57aad44cb4daaa490d05eaa8c77c68e55c15f94fe2215fc |
Original assembly confirms signed FILD/FIMUL, signed modifier additions, float32 stores for intermediate ability-weight terms in reverse ability order, then the final Strength term and two float constants. Exact bytes:
-10170894:0ad7233c = float32 .01, actually0.009999999776482582;
ev_09c60b565e012a81f81e9d3c94ec67d0c24254ef6f3b10e62c82b7bed44dbf50.
-10170e78:0000803e = float32 .25 exactly;
ev_6a86ec868d0b1fbe5478ce751a52624e52b70a07f10856d44d4198851818b80f.
The fixture also loads original add/remove notification jump-table bytes,
relocating only their code pointers to the maintained36000000 image base:
ev_6f798fea6a935f231c213da6b2fe06c7805e39478c29a38fceac5f0ed1f4e1c7,
ev_78b9e9ffeb4d99a6673a876734cf4989c376ef85c18ba715bdbdfa1cbe7b9f01,
ev_04bc0d25a7e69899dd5abd384c9a4a113afa5ab9bb03f5bdf21eb7e63f2afd99,
ev_35956e67e7fe3769bf26d5889792fe21f00fcba50a46086efe4a790649abe95e.
tmp_validate.py confirms every original instruction address appears in the
selected lifted body's comments or jump-table labels:44,21,25,136,78,144,213
addresses respectively. This is instruction provenance coverage, not a proof
of every translation semantic or execution of the original Windows DLL.
Fixture boundaries
signed_stats.c supplies a fixed actor/raw stat array, native-shaped modifier
rows/iterators, resource-weight lookup and integer conversion. It calls actual
lifted add/remove arithmetic and getter/trickle bodies. Tree allocation,
zero-row erasure and unrelated UI/cache notifications are boundaries; the
fixture does not claim to test native map allocation or full effect lifetime.
Stat21 has no ability weights; weighted stat162 is deliberately supplied with
synthetic100% Psychic or50/50 Psychic/Intelligence weights to isolate signs.
These are fixture weights, NOT the actual Psychology resource's50/50 INT/SEN.
The item database and full actor initialization are outside this test.
The x87 representation in the maintained runtime uses double registers; the original uses x87 extended precision. All products/intermediate stores in these cases are small exactly representable integers. Their final fractional values are separated from truncation boundaries except deliberately sampled 8/-8, whose distance is about4.47e-8, far above double/x87 roundoff. Thus the bounded signed results agree with the original instruction arithmetic. This does not establish equivalence for arbitrary enormous/overflowing stats.
Hardcoded Linux and WASM results
Both builds passed all15 assertions with byte-identical output:
| State | Effective result |
|---|---|
| Psychic base6, modifier-17 | -11 |
| Add another+12 | 1 |
| Remove the-17 contribution | 18 |
| Remove the+12 contribution | 6 |
| Skill base5,100% effective Psychic-11 | 3 |
| Add direct skill-8 | -5 |
| Add direct skill+12 | 7 |
| Remove direct skill-8 | 15 |
| Remove direct skill+12 | 3 |
| Skill base5,50% Psychic-11 and50% Intelligence6 | 5 |
| Both weighted abilities-11 | 3 |
| Both weighted abilities restored6 | 6 |
| Skill base5,100% Psychic8 | 6 |
| Skill base5,100% Psychic-8 | 4 |
| Restore Psychic8 | 6 |
The underlying Psychic raw stat remains6 during the first modifier sequence. No getter floor turns-11 into0, and direct effective skill-5 is returned signed. The8/-8 case is especially useful: float32 .01 produces trickle just below2 and just above-2; truncation yields+1/-1 rather than+2/-2. Integer division400 would disagree at this boundary. Mixed negative weights truncate the completed trickle toward zero rather than flooring each contribution separately.
Reproduction and artifacts
From repository root:
sh local/signed-stat-research/run.sh
python3 local/signed-stat-research/tmp_validate.py
The script extracts the seven maintained bodies, restores exact original
tables/constants, builds and executes Linux and WASM, then compares outputs.
WASM executes in bundled Node, without a browser/game process. run.sh retains
the exact compiler flags and Node command. linux-results.txt,
wasm-results.txt, run.log and empty corresponding error files record the
successful run. verification.json records original identity,15 hardcoded
results, instruction-address coverage and source/binary hashes.
focused-evidence.json and citations.json retain13 exact original records;
complete session evidence/snapshot remain in kkr-evidence.json and
kkr.snapshot.json. The two complete maintained input hashes are recorded by
the extraction script in run.log. No test process remains running.
Unresolved downstream policy
These results establish the effective getter/trickle domain, not every consumer. The later focused static follow-up in resource-consumers.md distinguishes unfloored signed maxima from separately floored current HP/nano setters and signed regeneration division. It does not change this fixture's runtime scope. They do not decide HP/nano maxima below zero, resource clamping, damage/armor, prices, initiative timing, requirement error messages or IP caps. In particular, negative Stamina/Psychic feeding maximum-health/maximum-nano calculations needs its own native consumer trace and boundary fixtures before choosing a server floor or preserving a negative result. Native modifier-removal10074b00 has a separate direct MaxHealth1/currentHP27 clamp branch, which this fixture does not exercise; that branch cannot establish ability-driven resource policy.