sots-re/campaign/research/NEXT.md

36 lines
2.3 KiB
Markdown

# Next RE / implementation boundary
Framework is complete. First research-completion static pass is now captured and cross-checked.
Do not reopen general workflow development as a prerequisite for this slice.
## Recovered
- Original MSVCR100 scalar new/delete allocation family and import thunks.
- ObservedTech 0x2c record constructor, copy construction, vector append/growth and old-element
destruction path. Its copy helper has three cdecl-style stack arguments.
- PlayerEvent 0x74 copy/append/destruction, with three independently owned strings. Its copy
constructor uses ECX destination and one stack source argument instead.
- Callback order: observation -> matched-target roll/clear -> completion event -> tech effects/tail.
- Observed record uses internal tech key; completion event uses the display-name member.
- Name-not-found versus capacity-full are distinct branches. NPC/non-rebellion and `_Root` tech
predicates are part of observation eligibility. `_Root` comparison is case-insensitive.
- Ghidra's non-returning-delete annotation omits real cleanup. Raw instruction captures recover
the post-free pointer clear and return; no shared database mutation was needed.
## Smallest next work
Recover/cross-check the nested TurnEvents bucket constructor/growth and event duplicate/prune
helpers (0x00885380, 0x00825d40, 0x00879eb0), including exceptional cleanup/ownership. Then build
a narrowly scoped live-record adapter using the verified ABI contracts. First exercise short/long
strings, spare/full capacity, and repeated-name/duplicate-event cases under a leased controlled
workload before wiring it into complete research replacement.
An ABI bridge may use original-runtime allocation services as an explicitly declared dependency;
that does not mean the original's RecordObservedTech or PostEvent game decisions may be counted
as our replacement. Our code must own record contents, event IDs/order/dedup and callback effects.
The original remaining turn driver is outside this scoped replacement. Full W1 original-vs-new
acceptance still requires fresh controls and complete state comparison.
Evidence entry points: research-completion-abi.md, record-observation-crosscheck.md,
research-callback-order.md and verify/results/{research-completion-abi,research-callback}/.
Static recovery is not a claim of live allocator safety or a successful replacement.