docs(build,test): align README and DEVELOPMENT with the real build (#72) - #95
Merged
Merged
Conversation
Closes F-DOCS-001 and F-DOCS-002. Every claim below was verified by running the command or reading the current source, not inferred. Build: - The manual compile in docs/DEVELOPMENT.md now names flows.c (it previously failed at link with `undefined reference to 'flows_create'`) and carries -Wall -Wextra plus -DMMTREADER_VERSION, matching what `make` emits. - The GDB recipe built a single translation unit and used the pre-subcommand argv; it now builds every source at -O0 and runs `run analyze -t ...`. - libconfuse is documented away everywhere: config.c has its own INI parser and the link line is `-lmmt_core -ldl -lpcap`. jq stays as a test-time-only prerequisite. - The WARNFLAGS gate and the -DMMTREADER_VERSION injection are now described in README, DEVELOPMENT and AGENT_ENVIRONMENT, with file:line citations. Tests — re-measured from an actual `make clean && make test`, replacing the "~194 unit asserts / 13 test groups" figures that several docs still carried: 14 numbered groups (plus sub-groups 2b and 5b), 252 unit asserts across groups 5-11, 35/35 CLI integration checks, 6/6 SDK-check assertions, one tolerated `lo` skip. docs/TESTING.md gains the full per-group table, and its two unit-test compile commands (which pointed at the wrong paths and omitted config.c) now run verbatim. README output samples: the banner, protocol tables, input statistics and JSON document were invented; they are replaced with output captured from `./mmtReader analyze -t smallFlows.pcap -a`, including the `version` object introduced in #70. A duplicated Usage Examples block is removed, `-F` is documented as taking seconds, and the two changelogs are cross-referenced.
…st and naming convention (#72)
This was referenced Aug 27, 2026
dev-montimage
pushed a commit
that referenced
this pull request
Aug 27, 2026
docs/USER_GUIDE.md was left out of #72 (PR #95) and still carried sample output no code path emits. Every block below was spliced from an actual run against smallFlows.pcap, not hand-edited, the same method PR #95 used. Fabrications removed: - The protocol-path format `TCP.HTTP.Google` (lines 61, 94-95, 110, 164, 332) is really the dotted lowercase stack, e.g. `ethernet.ip.tcp.http.msn`. - The INPUT STATISTICS sample printed `Input:` and `Sessions:` labels that do not exist. cli/output.c:304-340 emits Packets:, Data:, Total Sessions:, Protocols:, Duration:, Bandwidth:, pps: and fps:, plus IPv4/IPv6/Active Sessions only under -s. - The JSON sample predated both the `protocol_paths[]` split and the breaking `version` object from #70. It now shows version{mmtreader,mmt_dpi}, input_stats, protocol_paths[], protocols[] and anomalies[], with only the array lengths reduced. - Section "4. PCAP Statistics" described kernel/driver drop counts that are never produced: pcap_stats() is called nowhere, and the strings appear in neither the source nor the binary. Section and its troubleshooting entry are gone; ARCHITECTURE.md's matching Output Sequence bullet went with them. - Troubleshooting invented `eth0 is not an Ethernet`. The real messages are spliced in verbatim, and capture.c supports WiFi as well as Ethernet. Commands: every example was pre-subcommand (`./mmtReader -t ...`), which exits 0 but only prints help, and several pointed at a `capture.pcap` that does not exist and exits 2. All now carry analyze/capture and use smallFlows.pcap; the 11 runnable ones were executed verbatim and exit 0, the 4 live-capture ones are root-gated like the suite's own tolerated skip. Config and environment sections now agree with docs/CONFIG.md as rewritten by #96: which keys are live versus parsed-but-unused, and the precedence chain defaults < ~/.mmtreader.conf < --config < environment < CLI flags. ARCHITECTURE.md: the sorted-list helper is proto_info_insert() (cli/output.c:104), not insert_proto_info(), and it builds a doubly-linked list; engine_print_stats_ex() is defined in core/engine.c:281, not cli/output.c. Verified: 198 pasted output lines matched against fresh tool output, 11/11 runnable documented commands exit 0, `grep -n "TCP.HTTP" docs/USER_GUIDE.md` empty, and `make clean && make test` exits 0 with the single tolerated root-gated `lo` skip. Input flags are subcommand-gated symmetrically: `analyze -i` and `capture -t` each exit 2 (cli/parse.c:380,394). `analyze --help` nonetheless advertises `-i` as "alternative to -t"; that help text is reproduced verbatim with a note flagging it, since it is the tool's own output and a pre-existing bug.
dev-montimage
pushed a commit
that referenced
this pull request
Aug 27, 2026
docs/USER_GUIDE.md was left out of #72 (PR #95) and still carried sample output no code path emits. Every block below was spliced from an actual run against smallFlows.pcap, not hand-edited, the same method PR #95 used. Fabrications removed: - The protocol-path format `TCP.HTTP.Google` (lines 61, 94-95, 110, 164, 332) is really the dotted lowercase stack, e.g. `ethernet.ip.tcp.http.msn`. - The INPUT STATISTICS sample printed `Input:` and `Sessions:` labels that do not exist. cli/output.c:304-340 emits Packets:, Data:, Total Sessions:, Protocols:, Duration:, Bandwidth:, pps: and fps:, plus IPv4/IPv6/Active Sessions only under -s. - The JSON sample predated both the `protocol_paths[]` split and the breaking `version` object from #70. It now shows version{mmtreader,mmt_dpi}, input_stats, protocol_paths[], protocols[] and anomalies[], with only the array lengths reduced. - Section "4. PCAP Statistics" described kernel/driver drop counts that are never produced: pcap_stats() is called nowhere, and the strings appear in neither the source nor the binary. Section and its troubleshooting entry are gone; ARCHITECTURE.md's matching Output Sequence bullet went with them. - Troubleshooting invented `eth0 is not an Ethernet`. The real messages are spliced in verbatim, and capture.c supports WiFi as well as Ethernet. Commands: every example was pre-subcommand (`./mmtReader -t ...`), which exits 0 but only prints help, and several pointed at a `capture.pcap` that does not exist and exits 2. All now carry analyze/capture and use smallFlows.pcap; the 11 runnable ones were executed verbatim and exit 0, the 4 live-capture ones are root-gated like the suite's own tolerated skip. Config and environment sections now agree with docs/CONFIG.md as rewritten by #96: which keys are live versus parsed-but-unused, and the precedence chain defaults < ~/.mmtreader.conf < --config < environment < CLI flags. ARCHITECTURE.md: the sorted-list helper is proto_info_insert() (cli/output.c:104), not insert_proto_info(), and it builds a doubly-linked list; engine_print_stats_ex() is defined in core/engine.c:281, not cli/output.c. Verified: 198 pasted output lines matched against fresh tool output, 11/11 runnable documented commands exit 0, `grep -n "TCP.HTTP" docs/USER_GUIDE.md` empty, and `make clean && make test` exits 0 with the single tolerated root-gated `lo` skip. Input flags are subcommand-gated symmetrically: `analyze -i` and `capture -t` each exit 2 (cli/parse.c:380,394). `analyze --help` nonetheless advertises `-i` as "alternative to -t"; that help text is reproduced verbatim with a note flagging it, since it is the tool's own output and a pre-existing bug. ARCHITECTURE.md's online-mode characteristics claimed "Ethernet-only (DLT_EN10MB check)", which contradicted both capture.c and this change's own USER_GUIDE text. No datalink is ever rejected: pcap_datalink() is read at mmtReader.c:195, 802.11 is converted at capture.c:289-312, and anything else passes through to a handler initialized as DLT_EN10MB.
luongnv89
added a commit
that referenced
this pull request
Aug 27, 2026
…) (#99) docs/USER_GUIDE.md was left out of #72 (PR #95) and still carried sample output no code path emits. Every block below was spliced from an actual run against smallFlows.pcap, not hand-edited, the same method PR #95 used. Fabrications removed: - The protocol-path format `TCP.HTTP.Google` (lines 61, 94-95, 110, 164, 332) is really the dotted lowercase stack, e.g. `ethernet.ip.tcp.http.msn`. - The INPUT STATISTICS sample printed `Input:` and `Sessions:` labels that do not exist. cli/output.c:304-340 emits Packets:, Data:, Total Sessions:, Protocols:, Duration:, Bandwidth:, pps: and fps:, plus IPv4/IPv6/Active Sessions only under -s. - The JSON sample predated both the `protocol_paths[]` split and the breaking `version` object from #70. It now shows version{mmtreader,mmt_dpi}, input_stats, protocol_paths[], protocols[] and anomalies[], with only the array lengths reduced. - Section "4. PCAP Statistics" described kernel/driver drop counts that are never produced: pcap_stats() is called nowhere, and the strings appear in neither the source nor the binary. Section and its troubleshooting entry are gone; ARCHITECTURE.md's matching Output Sequence bullet went with them. - Troubleshooting invented `eth0 is not an Ethernet`. The real messages are spliced in verbatim, and capture.c supports WiFi as well as Ethernet. Commands: every example was pre-subcommand (`./mmtReader -t ...`), which exits 0 but only prints help, and several pointed at a `capture.pcap` that does not exist and exits 2. All now carry analyze/capture and use smallFlows.pcap; the 11 runnable ones were executed verbatim and exit 0, the 4 live-capture ones are root-gated like the suite's own tolerated skip. Config and environment sections now agree with docs/CONFIG.md as rewritten by #96: which keys are live versus parsed-but-unused, and the precedence chain defaults < ~/.mmtreader.conf < --config < environment < CLI flags. ARCHITECTURE.md: the sorted-list helper is proto_info_insert() (cli/output.c:104), not insert_proto_info(), and it builds a doubly-linked list; engine_print_stats_ex() is defined in core/engine.c:281, not cli/output.c. Verified: 198 pasted output lines matched against fresh tool output, 11/11 runnable documented commands exit 0, `grep -n "TCP.HTTP" docs/USER_GUIDE.md` empty, and `make clean && make test` exits 0 with the single tolerated root-gated `lo` skip. Input flags are subcommand-gated symmetrically: `analyze -i` and `capture -t` each exit 2 (cli/parse.c:380,394). `analyze --help` nonetheless advertises `-i` as "alternative to -t"; that help text is reproduced verbatim with a note flagging it, since it is the tool's own output and a pre-existing bug. ARCHITECTURE.md's online-mode characteristics claimed "Ethernet-only (DLT_EN10MB check)", which contradicted both capture.c and this change's own USER_GUIDE text. No datalink is ever rejected: pcap_datalink() is read at mmtReader.c:195, 802.11 is converted at capture.c:289-312, and anything else passes through to a handler initialized as DLT_EN10MB.
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
Closes #72 (
F-DOCS-001,F-DOCS-002) — the last issue of the modernization epic #75.The docs had drifted from the tree across four recently merged PRs (#91, #92, #93, #94). Every factual claim in this PR was verified by running the command or reading the current source; nothing was inferred, and nothing from the issue body (which quotes a
MODERNIZATION_PLAN.mdthat no longer exists) was trusted.Approach
Three classes of drift were fixed:
1. Broken build commands. The manual compile in
docs/DEVELOPMENT.mdomittedflows.cand failed at link (undefined reference to 'flows_create',flows_attach,flows_destroy,flows_print_top). The GDB recipe compiled a single translation unit and used pre-subcommand argv.docs/TESTING.md's two unit-test compile lines pointed at the wrong paths (test_config.cinstead oftests/test_config.c) and omittedconfig.c. All four now run verbatim, exit 0, warning-free.2. Stale prerequisites and build facts.
libconfuse-devwas listed as a prerequisite inREADME.mdanddocs/DEVELOPMENT.mdthoughconfig.cimplements its own INI parser and the link line is-lmmt_core -ldl -lpcap. The docs now also describe the-Wall -Wextrawarning gate (kept inWARNFLAGSsomake CFLAGS=...cannot disable it) and the-DMMTREADER_VERSIONproduct-version injection, withfile:linecitations.3. Test-count drift — the most-repeated error. Several docs still cited "~194 unit asserts", "13 numbered test groups", and in places "27/27 CLI checks". Totals were re-measured from a real run and standardized everywhere.
Beyond the two files the issue names, the README's sample output was invented (a banner format the binary never printed, tables in a layout it does not use). It is replaced with output captured from
./mmtReader analyze -t smallFlows.pcap -a, including theversionobject introduced in #93.Measured totals (standardized across all docs)
lo(root-gated)Broken documented commands found and fixed
gcccompiledocs/DEVELOPMENT.mdflows.cmissing from the source listdocs/DEVELOPMENT.mdmmtReader.c;run -t ...also skipped the subcommandgcc ... test_config.c config.cdocs/TESTING.mdtest_config.c: No such file— path missingtests/gcc ... test_parse.c cli/parse.cdocs/TESTING.mdconfig.hnot found;config.cnot linkedAll four now execute as written.
Changes
docs/DEVELOPMENT.mdflows.c/cli_mode_t/flows_tadded to structure and types, real build/--versionoutput, rewritten Testing section, corrected project layoutREADME.mdmake/make testsections with real output, real sample output and JSON, duplicated Usage Examples block removed,-F <seconds>semantics, project structure and docs tabledocs/TESTING.mdtest.pcapdescribed accuratelyAGENT_ENVIRONMENT.mdWARNFLAGS/VERSION_DEFSnotes, correctedMakefile/test_cli.shline refsCLAUDE.mddocs/PLAYBOOK.mddocs/CHANGELOG.mdCHANGELOG.mdthat holds[Unreleased]CHANGELOG.md[Unreleased]skills/mmt-reader/references/installation.mdTest Results
make coveragealso verified green (76.53% line / 61.56% branch).Acceptance Criteria Verification
docs/DEVELOPMENT.mdruns verbatim and linksmmtReader version: 0.3.0grep -ri libconfuse README.md docs/is emptyREADME.md,docs/DEVELOPMENT.md,AGENT_ENVIRONMENT.md,docs/TESTING.mdmake clean && make testexits 0, 0 failures, 1 tolerated skipNotes
.oss-ready/*.mdstill mentionslibconfuse. Those are point-in-time audit artifacts of a past OSS-readiness review, not living documentation; rewriting them would falsify the record. They are outside the acceptance-criteria grep scope.