Skip to content

Collect live fleet interface and route evidence for local GroupMind - #150

Merged
ThinkOffApp merged 4 commits into
mainfrom
feat/network-collector
Nov 22, 2026
Merged

ThinkOffApp merged 4 commits into
mainfrom
feat/network-collector

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Collect live Linux interface and route evidence for the Fleet Connections map. Reports canonical subnets, authorized host addresses, interface kind, readable NIC speed and timestamped route evidence; it does not invent remote interfaces or throughput.

Publishing is explicit and patches only network on an existing device slot. Configured localhost/tailnet API targets are supported and redirects rejected. Route changes invalidate retained transfer measurements; removed links disappear on refresh. macOS physical kinds and Linux InfiniBand remain unknown until identified reliably.

Validation: eight targeted tests cover route classification, canonical prefixes, measurement invalidation, peer removal, publication shape and destination validation. No installation or production publication. asus1 has no Node on SSH PATH; a snapshot bridge/runtime preflight is required. Local asus3 GroupMind runs old code and needs compatibility review before fleet publication there.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T16:39:15.732036Z 59f4b7c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59f4b7cfe5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/network-collector.mjs
if(!/^[a-zA-Z0-9_-]+$/.test(peer.id||'') || isIP(peer.address)!==4)throw Error('Peer requires slot id and literal IPv4');
if(os!=='linux')continue;
const output=command('ip',['-j','route','get',peer.address]);let route;
try{route=JSON.parse(output)[0];}catch{continue;}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish failed route collection from removed links

When ip is missing, times out, or returns malformed output, run returns an empty string and this catch silently omits the configured peer. mergeNetwork then treats the result as a complete inventory, and publishNetwork patches away the peer's existing link and independent transfer measurement. Thus a temporary collection failure permanently deletes previously collected data even though the peer is still configured. Track collection failures and either abort publication or preserve the affected records, while still removing peers genuinely absent from the configuration.

Useful? React with 👍 / 👎.

@ThinkOffApp
ThinkOffApp merged commit 78b2f88 into main Nov 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant