Commit Graph

13 Commits

Author SHA1 Message Date
gamer147
0fd4f5f9f7 feat(battle-node): ScriptedLifecycle frame builders (Path-A static opponent) 2026-05-31 22:15:44 -04:00
gamer147
22a4825265 feat(battle-node): Gungnir alive-body builders (scs/ocs ONLINE placeholders) 2026-05-31 22:07:31 -04:00
gamer147
82b7d1e940 feat(battle-node): OutboundSequencer assigns playSeq + archives for Resume 2026-05-31 22:05:16 -04:00
gamer147
87051737da feat(battle-node): InboundTracker dedupes client pubSeq + tracks high-water 2026-05-31 22:02:56 -04:00
gamer147
3ade8ff4f5 feat(battle-node): in-memory IBattleSessionStore + PendingBattle 2026-05-31 22:00:40 -04:00
gamer147
c0c2bb5772 feat(battle-node): MsgPayloadCodec encodes/decodes msgpack↔envelope chain 2026-05-31 21:58:06 -04:00
gamer147
4cc8b3c01c fix(battle-node): MsgEnvelope rejects reserved Body keys + complete ReceiveNodeResultCode
ToJson now throws ArgumentException when a Body key collides with a reserved
envelope field (uri/viewerId/uuid/bid/try/cat/pubSeq/playSeq); FromJson reuses
the same shared ReservedEnvelopeKeys HashSet. ReceiveNodeResultCode expanded
from 9 to 31 codes to mirror the full enums.md catalog. Two regression tests
added for the collision guard and PascalCase uri serialization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:55:11 -04:00
gamer147
383044dd8f feat(battle-node): NetworkBattleUri / EmitCategory enums and MsgEnvelope record
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:50:17 -04:00
gamer147
6ff4f70f1a fix(battle-node): SocketIoFrame disposal safety + escaping + empty-args encoding
- Wrap all JsonDocument.Parse calls in using blocks and Clone() each
  retained JsonElement to eliminate UAF hazard after GC.
- Use JsonSerializer.Serialize with UnsafeRelaxedJsonEscaping so event
  names with " or \ produce \" / \ rather than " / plain \;
  avoids malformed JSON on Encode().
- Guard the [ ] block in Encode() behind EventName-or-args check so
  Connect/Disconnect packets round-trip as bare "0"/"1" not "0[]".
- Add three regression tests: Connect no-bracket, Event round-trip,
  special-char event name escaping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:46:02 -04:00
gamer147
8b1f613407 feat(battle-node): SocketIoFrame parse/encode for SIO2 incl. binary attachments 2026-05-31 21:39:53 -04:00
gamer147
6c6664f011 feat(battle-node): EngineIoFrame parse/encode for EIO3 packets 2026-05-31 21:34:11 -04:00
gamer147
a786599416 fix(battle-node): clarify NodeCrypto.GenerateKey contract + add fixed-vector regression test
Replace inaccurate GenerateKey docstring (it claimed to port Cryptographer.generateKeyString
directly but the input shape differs: server uses one hex digit per call, client uses
Random.Next(0,65535) per call). New doc is honest about the difference and explains why
it's safe. Add EncryptForNode_FixedVector_ProducesStableOutput: a pinned AES-CBC vector
that catches encoding/IV/padding regressions that would slip past the roundtrip test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:31:22 -04:00
gamer147
0a2eddd920 feat(battle-node): port AES-256-CBC encryptForNode/decryptForNode codec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:26:05 -04:00