Skip to content

A companion stores the contacts it learns but reports none: contacts3 holds them and every client is told "0 contacts in device" #725

Description

@A13xB0

Found during the #318 pass on v0.0.11-dev.2, Windows 10 22H2, bundled MSI, clean install and fresh profile.

#712 is fixed — every node now has its own identity, and I have verified that first because it is what made this one invisible:

$ find . -name _main.id | wc -l                                   56
$ find . -name _main.id -exec sha256sum {} \; | awk '{print $1}' | sort -u | wc -l
56

56 nodes, 56 distinct keys. Thank you — that one was the important half.

What remains is the symptom I attached to it, and it has a different cause. A companion learns contacts, writes them to its own store, and reports none to any client.

contacts on disk, none reported

What the node knows

After driving adverts from five repeaters for six minutes, each companion's contacts3 holds real, correct entries — distinct keys, right names, and they are the nodes I actually adverted from:

Mothy/contacts3         (304 bytes)   key 3cd64e6b6d9e1af2…  name 'Markinch'
Jazzy/contacts3         (304 bytes)   key 3cd64e6b6d9e1af2…  name 'Markinch'
PeterB/contacts3        (304 bytes)   key 3cd64e6b6d9e1af2…  name 'Markinch'
AngusOutlaw1/contacts3  (608 bytes)   key dec9b87c081e4f82…  name 'SCO-ANG-02-RPT'
                                      key 5a5ed3242a25a7ed…  name 'Blairgowrie_RPT'

So the firmware is doing its job: it heard the adverts, matched them against its own key, found them to be other people, and stored them.

What every client is told

AngusOutlaw1   heard=337   ->  meshcore-cli contacts  ->  "0 contacts in device"
Mothy          heard=169   ->  meshcore-cli contacts  ->  "0 contacts in device"
Jazzy          heard=136   ->  meshcore-cli contacts  ->  "0 contacts in device"

This is not the client's fault. The workbench's own Companion panel says the same thing about the same nodes, in the screenshot above:

Mothy · 5ae4…0702          CONTACTS  none yet - a companion learns these from adverts
AngusOutlaw1 · 1124…9f30   CONTACTS  none yet - a companion learns these from adverts

Two different keys, so #712 is genuinely fixed — and two nodes whose contacts3 files, on disk, at that moment, hold the entries the panel says do not exist. The refresh button does not change it.

Why this is worth its own issue

The panel's sentence is the trap: "none yet - a companion learns these from adverts" tells a reader the mesh has not adverted yet, when the truth is that it has, the node recorded it, and the read path is what fails. On the last pass this looked like a consequence of the shared key, and it was reasonable to expect it to go with it. It has not.

It costs the same things #712 did, minus the cryptography: contacts, direct messages and anything addressed to a peer are unreachable from a companion client, and the companion bench cannot be used to develop the part of an app that lists people.

Repro

  1. Fresh profile, open fixture-fife-strict, firmware.start, sim.play.
  2. console.type advert on a few repeaters; wait a few minutes.
  3. bench.serve any companion, meshcore-cli -t <host> -p <port> contacts → 0 contacts in device.
  4. xxd %LOCALAPPDATA%\meshbench\nodefs\<that node>\contacts3 → the contacts are there, with names.

Worth saying the rest of the companion bench is in good shape: infos answers correctly with the node's own key, bench.drop and reconnect both work, and the port-reclaim message is a model of a clear one.


Filed from the #318 pass. 🤖 Generated with Claude Code

https://claude.ai/code/session_01RSb8bN9gtL72cXAxtyTbAG

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions