Files
WoW-Hybrid-gateway/docs/NATIVE_CHANNEL_POLICY.md
praxisandClaude Fable 5.2 60b6d4b7a5 Design records
59 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

112 lines
7.1 KiB
Markdown

# Native single-world-channel policy
The actual Tortoise session uses one authenticated world TCP stream. Forever70334
classifies ordinary movement and other gameplay as logical Instance route1;
without its modern second-connection handshake it suspends that route. The
client already serializes these requests correctly. Passive real-client
references establish temporary slot3 → Instance slot1 promotion through genuine
ResumeComms on NetThread0, including deferred-buffer ownership and cursor16.
See the reference-instance evidence files and `native_lifecycle_audit.py`.
`native/wine_channel_policy.c` is a general opt-in adapter at the existing real
NetClient frame callback. It maps the existing deferred logical route to the
legitimate native Turtle pipe using original NetClientSend with explicit route0.
It preserves the original owner critical section, serializer, Windows socket,
header cipher and pipe/receive queues. It has no listener, extra socket, hidden
proxy, database subprocess, instruction patch, fabricated Instance object or
account-state write. Native SRP/server-proof/world authentication and self-create
must already have completed before activation.
The node-specific destructor wrapper at141e4e950 was not naturally available in
a fresh native session. Activation rejected before any call. The adapter instead
uses the active shared CDataStore release helper1445b7db0, whose three-argument
contract is established by both original node destruction and normal main-thread
packet receive. Only the canonical head is popped: previous link must be the
actual head, the successor must backlink to this node (or be the exact tagged
head sentinel), and the terminal tail must match. Store identity, capacity,
cursor, memory protection and ownership checks precede calls. Engine allocator
14452a5d0 releases the node with the original source/line/flags contract.
No cold page is forced executable. The quarantined executable-call routing trial
is still absent.
Owned Windows fixtures check readiness, state, locks, FIFO/buffer-release/free
ordering, malformed cursors/backlinks, duplicate channels, thread ownership,
disable and the32-node per-frame bound. Those fixtures alone are not gameplay
proof.
Actual WowB372521 completed genuine native authentication, four-character
selection and world entry with the gateway stopped. The new policy drained29
previously suspended requests without error, including real init-complete and
movement requests. A focused W input then increased the drain count29→31.
Normal close caused Tortoise to persist its authoritative new position: GUID4509
moved from(-8914.28,-209.439,82.9931) to(-8916.53,-210.625,82.7966).
No SQL writes or scripted position injection were used. Screenshot and complete
sanitized counters: `evidence/gameplay/native-shared-channel-movement.json/.png`.
This verifies the bounded native outgoing policy and server-confirmed movement.
It does not establish complete modern Instance ownership, reconnection, all
movement types, nearby entity synchronization or other gameplay operations.
Further native protocol coverage remains necessary. The policy remains opt-in.
Development activation after actual native world entry:
`Controller(pid).action('enable-native-channel-policy')`; inspect via
`inspect-native-channel-policy`. Disable via`disable-native-channel-policy` at
the same verified main-frame safepoint. Original instruction bytes and engine
connection slots are never changed. Normal client closure is full runtime
rollback; `python3 ops/native_pe_bridge.py restore` then restores byte-identical
DXVK in the disposable prefix. Original installations/prefix are untouched.
Do not replace mapped libraries while a client is running.
## Native jump/stop and transient code protection — 2026-10-16
A real jump-and-stop input in WowB393254 closed the pipe with error23 and the
policy with error7. The failing78-byte MOVE_STOP0x420002 had flags0x2801,
options0x20, fall direction0x80,21optional bytes, no forces/tail. All original
code checks remained good. This is a **codec failure**, distinct from error8.
[Forever MovementInfo.h](../../servers/trinity-forever/src/server/game/Entities/Object/MovementInfo.h)
defines PENDING_STOP0x2000; [Turtle Object.h](../../../../Servers/tortoise-wow/src/game/Objects/Object.h)
defines JUMPING at that same numeric bit. `src/world.cpp::forever_basic_movement`
now consumes only that modern pending intent when constructing the grounded
view, preserving actual direction, genuine fall data and the stop opcode. It
never forwards raw modern pending intent as a legacy flag. Golden codec/native
movement tests cover0x2801. Actual WowB396303 repeated jump/stop, stayed connected
with policy/pipe error0, and displayed a new genuine server `.gps` response.
See `evidence/gameplay/native-pending-stop.json/.png`. This is representative
movement verification, not a claim of all jump/control/transfer variants.
A separate read-only watch captured policy error8 with store-release status2
(guard/noaccess) while send/allocator status0. Later all original prefixes were
naturally readable/executable/matching. The former unconditional every-frame
check could permanently disable the policy even without queued work. The pending
correction validates contracts only for actual queued nodes and leaves them
untouched during the observed transient protection, waiting at most5seconds or
3000polls. It never changes protections, skips signatures or calls protected
code. Other failures remain fatal. Owned-memory regressions pass; **actual-client
recovery across this protection transition is still pending** at this record.
`ops/watch_native_channel.py` records bounded public evidence without latch resets.
The old PTY controller was terminated across a tool continuation while its
unauthenticated child remained. After normal client close, the stale socket was
renamed only after owner/type and ECONNREFUSED checks. The same controller now
runs in a detached development session with a private log under `runtime/`;
this preserves genuine parent ownership and is temporary test infrastructure,
not a packet translation service. Login recovery also retries one discarded
read-only focus-transition capture; credential operations remain guarded.
The bounded protection deferral is now compiled and fixture-tested: a queued
node is left untouched while its original release code is guarded, resumes when
naturally ready, and remains fail-closed for mismatched code or exceeded bounds.
Actual native440176 retained movement and real teleport after deployment; earlier
431676 completed300.254seconds with zero protection deferrals/errors. These runs
do not establish actual recovery across a protection transition, which remains
unobserved. No protection is changed or security mechanism disabled.
Actual right-strafe/jump reproduced error7 as a separate parser failure on modern
PENDING_STRAFE_STOP0x4000. Shared parsing now consumes six deferred motion intents,
and440176 repeated the test with pipe/policy error0 and fresh server position.
See MOVEMENT_PENDING_STOP.md. Error7 is a consequence marker, not by itself proof
of broken engine ownership. The watcher now captures the pipe's structural error
metadata when policy readiness fails, keeping secrets and payloads out of logs.