Files
Ken Johnson 24a2350a51 Live interop fixes against the existing Comet daemon
End-to-end test against the canonical Comet daemon
(comet 1.2.1, both bbsnode2 and a local instance from
build/linux/comet) surfaced three wire-level mismatches.
fpc-comet now talks the existing daemon's protocol exactly:

  1) BOTH sides emit NPKT_INITACK.  My driver only had
     the inbound (answerer) sending INITACK.  The existing
     daemon waits for the originator's INITACK after
     sending its own; without it the answerer hangs in
     its post-INIT wait loop and times out (TimeoutSecs).
     SendOurInitAck now fires on the outbound side too,
     after authentication completes.

  2) Transfer-phase frame routing widened.  The peer can
     race ahead and send transfer frames (FINFO end-of-
     batch, FINFOACK, etc.) before we've fully transitioned
     out of cmpAuth.  Driver now routes transfer-typed
     frames to the xfer engine in any post-auth phase
     (cmpAuth / cmpKeyExchange / cmpTransfer / cmpShutdown)
     instead of dropping them with "unhandled frame in
     phase 3" warnings.

  3) TComFsProvider.NextOutbound now computes SHA-256 of
     each outbound file before returning the TCometSendItem.
     Previously left Item.SHA256 as zeros, which the receiver
     compared against its own freshly-computed hash and
     correctly reported "SHA-256 mismatch" -- the bytes
     transferred fine, the hash advertised in FINFO didn't.
     Added HashFileSHA256 helper.

example_outbound also takes:
  - CM_AKA env var for outbound local AKA (e.g. "1:213/725")
  - CM_PRIVKEY env var for ED25519 private-key seed (hex)
  - CM_LOG=trace for verbose diagnostics
  - CM_REQUEST="*.txt" to FREQ files from peer
  - CM_LIST="*" to LSTREQ a listing
  - File argument now optional (handshake-only is allowed)

Validated against bbsnode2 (1:213/721, FreeBSD x64,
unmodified canonical Comet daemon code at port 26638) AND
against a local Linux build of the same code:

  bbsnode2 dial:   ED25519 verified, 82-byte file accepted
                   + EOF acked, clean cmpDone, byte-identical
                   landing in inbound dir.
  local dial:      NOPWD path, same end-to-end success.

12 unit tests still pass; all 7 cross-targets clean.

That closes the wire-format gap.  fpc-comet v0.1.0 is
interop-validated against the canonical implementation.
2026-04-22 14:58:36 -07:00
..