cli/commands/replica.ts streams canister logs by parsing the PocketIC server's stderr for [Canister <id>] lines and routing them to per-canister streams. Upstream @dfinity/pic offers only all-or-nothing (showCanisterLogs pipes everything to the parent's stderr), so cli/helpers/pocket-ic-client.ts reaches the process through a documented cast — serverProcess is TS-private but present at runtime.
It works and is contained in one helper, but it depends on an implementation detail that an upstream refactor could remove without warning. A public stderr accessor or an onCanisterLog callback upstream would let mops delete the cast.
Not urgent — the cast is exercised by mops replica and the replica test path, so a break would surface immediately rather than silently.
cli/commands/replica.tsstreams canister logs by parsing the PocketIC server's stderr for[Canister <id>]lines and routing them to per-canister streams. Upstream@dfinity/picoffers only all-or-nothing (showCanisterLogspipes everything to the parent's stderr), socli/helpers/pocket-ic-client.tsreaches the process through a documented cast —serverProcessis TS-private but present at runtime.It works and is contained in one helper, but it depends on an implementation detail that an upstream refactor could remove without warning. A public stderr accessor or an
onCanisterLogcallback upstream would let mops delete the cast.Not urgent — the cast is exercised by
mops replicaand the replica test path, so a break would surface immediately rather than silently.