Files
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

100 lines
5.9 KiB
Markdown

# Native transport and packet-pipe continuation
Continuation of003f816. **Native engine session adoption, character selection and
world entry remain unverified.** The reference observations and gateway-absent
regression below are explicitly distinguished.
## Real write boundary
`ops/debug_client_owner.py` accepts only fixed `observe-engine-boundary` profiles;
currently `realm-adoption` and `packet-pipe-write`. It requires the pinned private
client, idle own-child observer, naturally executable target and matching entry
bytes. Modules reload between requests, allowing reader fixes without relogging.
An eight-second bound forwards genuine Wine signals and restores debug registers.
No code, instruction pointer, authentication field or connection state is changed.
`ops/engine_pipe_observation.py` validates the TCP pipe vtable0x144e59fe8, owner
at+8, connection at+0x10, owner's derived type and connection slots. It also checks
the TCP wrapper vtable0x1450396b0 and its real listener/NetClient owner. Only
public descriptor lengths/counts and bounded state/flag values are exported.
Descriptor data pointers are never dereferenced. Unknown types, oversized counts,
null nonempty buffers, ownership changes and metadata exceptions fail closed.
Actual reference WowB83557 invoked write0x141e4ca60 on its main thread with return
PC0x141e46e3f: R8D1, one32-byte descriptor, length4. Owner state5; connection and
listener ownership validated; framing and encryption enabled. The actual client
returned to character selection; no character login was sent. Five observer
stops, register restoration and normal continuation verified. The initial cold
entry was declined safely; a later genuine realm reconnect was observed using
the same authenticated session. No packet payloads/account/session buffers read.
`ops/native_lifecycle_audit.py` reproduces immutable vtable and saved instruction
checks. The large TCP packet-pipe has these established methods:
| Virtual offset | Address | Established behavior |
|---|---|---|
|0x00|0x141e4ca60|write descriptor vector; R8D is a count, stride32|
|0x08|0x141e4d120|read view; pointer+0, byte count+0x10|
|0x10|0x1401d9200|empty method|
|0x18|0x141e4e8e0|destructor; clears0x2220 context bytes, releases temporary storage, conditional delete|
|0x20|0x14091e6e0|returns16|
|0x28|0x1409e95f0|returns32|
|0x30|0x141e4c8f0|crypto-context setup; sets flag0x2|
|0x38|0x141e4c9e0|requires setup, sets activation flag0x8|
|0x40|0x141e4ca20|requires setup, sets activation flag0x10|
The semantic roles of the constant-return methods and the full setup/cancellation
contract are not yet established. This table is not a callable replacement ABI.
Do not replace the pipe with a header parser or treat its other methods as no-ops.
The account/session prefix and separate modern auth-string provider still require
legitimate adaptation. No guessed engine function was invoked.
## Shared transport-independent Turtle framing
`include/gateway/legacy_stream.hpp` / `src/legacy_stream.cpp` factor the existing
world framing out of POSIX socket ownership. `LegacyPacketStream` owns directional
40-byte-key ciphers, partial header/body and exactly one pending packet. Keys
remain private and Cipher's existing destructor wipes them. Arbitrary transport
chunks are consumed with explicit backpressure; coalesced excess stays with the
caller. A complete header is decrypted exactly once. Malformed headers latch the
stream failed. Invalid outbound frames do not advance the cipher.
`LegacySession::connect_world`, `send` and `receive_for` now use that same class.
The fallback and native backend therefore exercise the reusable implementation.
SRP/M2 verification, legitimate world proof, server-auth-response validation,
opaque authorized addon tail and fail-closed integrity handling are preserved.
Readiness deadlines preserve fragmented input; a zero-time wait drains only the
bounded packet bytes already available. This class makes no authentication claim,
owns no socket, invokes no engine function and starts no listener/subprocess.
A future legitimate Windows transport can reuse it without casting a POSIX socket
into a Windows object or embedding the gateway process architecture.
Focused and full tests cover fragmented/coalesced input, empty/maximal packets,
backpressure, directional cipher continuity, malformed failure latching, auth
rejection/M2 mismatch, partial timeouts, deferred initialization and lifetimes.
Normal26/26 passed18.84s; ASan/UBSan26/26 passed19.89s.
## Actual gateway-absent regression and rollback
With gateway19085 and reference1119/8081/8085 listeners stopped, actual private
WowB86889 loaded the refactored native library. It completed real SRP/M2,
authentication-server realm discovery and world authentication, received4 real
Turtle characters and4 encrypted heartbeat replies. The verified frame host
submitted/received the roster once. **Engine state remained2, the actual UI
remained login, and no character login/world-entry request was sent.**
The credential-screen guard discarded a requested login screenshot; only the
fixed UI state and public engine metadata are retained. This is a successful
framing regression, not successful native engine adoption.
The original per-object vtable was restored at the genuine frame-pump safepoint;
the retained backend released account/world handles with error0. The client
closed normally, debug registers restored, and
`python3 ops/native_pe_bridge.py restore` restored the private DXVK baseline.
Original clients/prefix, correct StartupFiles data, trust-key service, characters
and credentials were preserved. No new fatal report was observed.
Sanitized evidence: `evidence/gameplay/native-packet-pipe-contract.json`.
Next: validate OpenRealmConnection's direct/proxy-vector arguments and ownership,
then supply a real account/realm provider and Windows transport lifecycle backed
by verified Turtle authentication. No state5 writes or fabricated connected events.