Skip to content

[SEAM] W5.8 cli: connect CliApp.Mock.Stack to the real stack inside #50 #72

Open

Description

@leolara

Seam connections inside open PR #50 (W5.8 the demo and ping binaries). The PR builds the binaries against one mock, CliApp/Mock/Stack.lean, standing for the whole W5 stack. The mock declares opaque ops with executable failure bodies, and its NEED CHANGES review records which names are false against the current tree (Mock/Stack.lean:220,231, packages/cli/docs/ARCHITECTURE.md:154); the swap must re-check each.

The dependencies behind the stack: #20 W5.7 (PR #45), #11 W5.1 (PR #63 or #44, organiser picks), #15 W5.2 (PR #64), #17 W5.4 (PR #49, draft), #16 W5.3 (PR #67, draft), #19 W5.6 (PR #61). #14 W4.3 merged on 2026-11-06 (PR #62).

Definition of done

Ground rules

Activity

  1. IvanAnishchuk commented on Nov 10, 2026

    @IvanAnishchuk
    Contributor

    #86 moves the host onto the merged libp2p/negotiate and deletes Negotiate.Legacy. No existing signature changes. The host adds four names:

    • Libp2p.Host.upgrade runs the upgrade, with the secured checkpoint after the handshake and before the muxer stage.
    • Libp2p.Host.negotiateStream runs multistream-select on a muxed Stream, and hands the bytes after the selection to the handler.
    • Upgraded and Admission now live in Libp2p.Host. No code outside the host named them before.

    Once #86 merges, Tests/Host.lean runs real hosts over the sim (unit 1b). A swap of this unit's host mock can build its test hosts the same way.

  2. IvanAnishchuk commented on Nov 10, 2026

    @IvanAnishchuk
    Contributor

    #89 moves identify and ping onto the real libp2p/core and libp2p/host, and deletes Protocols/Mock/Core.lean and Protocols/Mock/Host.lean. The swap of CliApp/Mock/Stack.lean (#50) connects to these shapes:

    • Ping.protocolId, Identify.protocolId, and Identify.pushId are Libp2p.Core.ProtocolId values. Ping.pingHandler is a Libp2p.Core.StreamHandler.
    • Identify.respondHandler key addrs protocols agent spr takes no observed address. Each answer carries the remoteAddr of the stream's connection.
    • Identify.pushHandler h clock timeoutMs takes the Libp2p.Host.Host whose peerstore it updates. It checks each push against the remotePeer of the stream's connection.
    • Identify.client s clock timeoutMs expected and Ping.ping s clock payload keep their signatures.

    Tests/Protocols.lean in #89 runs identify and push between two real hosts of Tests/HostPair.lean, the same setup a demo node uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions