Add intermesh debug report command - #175
Merged
Merged
Conversation
Teach the daemon to report its own build hash and start time over the admin socket. The daemon may be running an older binary than the one on disk, so the CLI's version can't stand in for it. First piece of `intermesh debug report` (IM-16 Phase 1). Older daemons leave the fields empty; old TOML dumps still parse fine.
The report is assembled first, rendered second: collectors fill an in-memory Report, and rendering is a pure function of it, so the whole artifact is unit-tested without a daemon or network. Includes the state fingerprint ("do these two nodes agree?") and the per-node inputs digest, plus a proxy helper describing expected listeners. Part of `intermesh debug report` (IM-16 Phase 1).
One command, one file: fetch the trust snapshot over the admin socket, probe the environment (uname, nftables, resolver), tail the daemon log if configured, and write a single shareable report. If the daemon is unreachable, exit with an error instead of writing a near-empty file; all other probes degrade into notes in the report.
Capture interface addresses and the routing table, and keep the nftables rules the report was already fetching instead of throwing them away. Most "wrong self-IP" and "peer unreachable" questions can now be answered by eyeballing the report: the IPs the host actually has sit right next to the ones the mesh believes. Probe output is clipped to the first 25 lines so the report stays a report — a "… (+N lines)" marker says what was left out. The full inventories can live in a future debug archive.
Give the report a real header, clean up the summary legend, put environment info before the event log, and add a closing line so it's clear where the report ends. Also explain what the state and inputs hashes mean, both in the report itself and in --help.
sha256_short only renders the first 8 bytes, so a u64 round-trip
through {:016x} produces the same string without pulling hex back
into the tree (upstream had already removed it).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed language that felt overly verbose or confusing.
Collaborator
Author
|
As an example/reference, uploaded the generated node reports for two connected nodes. The reports do not include log output. |
Collaborator
Author
|
One thing I realized, this report uses a few utf8 characters (check mark and the like), so the report is not pure ASCII. The result of having utf-8 characters, in some text viewers or on some systems the characters will not render correctly (instead showing a three-letter code, like" âœ" in place of the utf-8 symbol ✓). The upside of using utf-8: it looks nice and we get a couple fun, concise symbols. What is Intermesh's opinion on utf-8 symbols for display and text output? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
intermesh debug report, which writes a single shareable text file with a node's trust state, environment info, and recent log output for troubleshooting.Test plan
cargo local