Decision Log
Append-only log of ambiguities resolved during doc-manager runs.
2026-07-21
-
Q: README.md lists
simple_packet_handlerandmmt_onlineas examples, but neither exists insrc/examples/. Which should be documented? A (doc-manager): Replace with actual examples:packet_handlerandmmt_export_info. Source: confirmed absence viagrepacrosssrc/examples/. -
Q: DEVELOPMENT.md lists
cmakeas a prerequisite andTCP_SEGMENT=1/STATIC_LINK=1as build options, but neither exists in the codebase. A (doc-manager): Removecmakefrom prerequisites; removeTCP_SEGMENT=1andSTATIC_LINK=1from build options table; flag them. Source: no CMake inrules/orsdk/Makefile; noTCP_SEGMENT/STATIC_LINKinrules/common.mk. -
Q: DEVELOPMENT.md says
NDEBUG=1shows debug messages, but the code defines-DNDEBUGby default (which disables debug). A (doc-manager): Fix description to: “Define-DNDEBUG(default build; disables debug() output)”. Source:rules/common.mk:38-42. -
Q: DEPLOYMENT.md references
MMT_SEC_DTLS_CIPHER_ALLOWLISTenv var, but no code reference was found. A (doc-manager): Flag as unverified; remove from env var table. Source: grep acrosssdk/andsrc/returned no matches. -
Q: DEPLOYMENT.md says ldconfig file is
mmt.conf, but code usesmmt-dpi.conf. A (doc-manager): Fix tommt-dpi.conf. Source:sdk/Makefile:70,117. -
Q: USER_GUIDE.md says plugins and examples are under
MMT_BASE/dpi/, but code installs plugins to$(MMT_BASE)/plugins/and examples to$(MMT_BASE)/examples/. A (doc-manager): Fix install layout to show correct paths. Source:rules/common.mk:4-7. -
Q: USER_GUIDE.md says install script installs
cmake, but the script does not. A (doc-manager): Removecmakefrom dependency list. Source:install.sh— no cmake reference. -
Q: Compilation-and-Installation-Instructions.md has wrong git URL (
montimage/mmt-dpiinstead ofmontimage-projects/mmt-dpi), wrong example path (./examplesinstead ofsrc/examples), and invalid Homebrew packages (libpth-dev,ldconfig). A (doc-manager): Fix all three issues. -
Q: Add-New-Protocol.md references old paths (
lib/protocols/,lib/mmt_common_internal_include.h,lib/configured_protocols.c). A (doc-manager): Update to current paths undersrc/mmt_tcpip/lib/. Source: confirmed paths vialsandgrep. -
Q: Examples.md references
mmt-sdk/sdk/examples/as example source location and outdated plugin path (libmmt_tcpip.so.0.100). A (doc-manager): Update tosrc/examples/and remove hardcoded version from plugin path. -
Q: Data-Types.md has wrong path (
../src/mmt_core/public_include/types_defs.h), wrong type name (MMT_STRING_LONG_DATA_POINTERvsMMT_STRING_LONG_DATA), and incorrect descriptions for binary/string types. A (doc-manager): Fix path, type name, and descriptions. Source:sdk/include/types_defs.h:169-200, 50-72, 89, 101, 106. -
Q: MMT-Handler.md says
get_active_session_countreturnsmmt_handler_t*, but it returnsuint64_t. A (doc-manager): Fix return type description. Source:sdk/include/mmt_core.h:209. -
Q: MMT-Handler.md has wrong evasion_handler callback signature (missing
void * argsparameter) and wrong constant names (EVA_IP_FRAG_PACKETvsEVA_IP_FRAGMENT_PACKET). A (doc-manager): Fix signature and constant names. Source:sdk/include/mmt_core.h:86-90, 105. -
Q: MMT-Packet.md shows outdated
pkthdr_tandipacket_struct(missing many fields). A (doc-manager): Update to match current struct definitions. Source:sdk/include/data_defs.h:114-163. -
Q: Prepare-for-a-new-released-version.md references non-existent
mmt-test/directories andwall_etool. A (doc-manager): Replace with Valgrind-based memory leak check using existingsrc/examples/. -
Q: DNS-protocol.md, HTTP2-protocol.md have outdated development task lists and branch info. A (doc-manager): Replace with current protocol description.
-
Q: Protocol-Modeling.md contains TBD/???/blablabla placeholder text. A (doc-manager): Mark as incomplete and redirect to actual code definitions.
-
Q: NDN-protocol.md and NDN-packet-format.md reference non-existent
mmt-test/scripts/ndn.lua. A (doc-manager): Flag as unverified/historical. -
Q: Compiling-mmt-sdk-for-ARM-architecture-by-cross-compiler.md references
ARCH=green-armwhich no longer exists. A (doc-manager): Document available targets and suggest cross-compiler approach. -
Q: FTP-design.md has placeholder attribute names
MMT_FTP_XXXX_CMDandMMT_FTP_XXX_CODE. A (doc-manager): Flag as placeholder names. -
Q:
docs/Install-mmt-sdk-on-CubieBoard-X.mdis an orphaned doc (not linked from any other doc) referencing mmt-sdk 0.1 for a CubieBoard X. It is not linked fromdocs/README.mdorDeveloper.md. A (doc-manager): Left in place for historical reference but flagged as orphaned. Not linked from any navigation doc. - Q: Issue #123 asks for c-cpp.yml jobs that “build with BUILD=asan and BUILD=tsan and run bash tests/run_all_tests.sh”, but BUILD= is a rules/*.mk variable that only affects SDK library builds — the standalone suites compile directly with gcc and never read it.
A (issue-resolver): The runner gained a SANITIZE=asan|tsan mode that applies the exact flag sets of the SDK profiles to every suite compile+link line, and suites that build the SDK internally (citrix_ica_detection, http_header_case) forward BUILD=${SDK_BUILD_PROFILE} to their internal make. The workflow matrix carries the literal BUILD=asan / BUILD=tsan tokens mapping them to SANITIZE values.
Source:
tests/run_all_tests.sh:58-84,tests/citrix_ica_detection/run_tests.sh:26-31,.github/workflows/c-cpp.yml(sanitizer-tests job). - Q: TSan-instrumented suite binaries abort at startup with “ThreadSanitizer: unexpected memory mapping” on modern kernels (vm.mmap_rnd_bits default raised to 32; TSan’s fixed shadow layout needs ~28-30 bits).
A (issue-resolver): tests/run_all_tests.sh re-execs itself once under
setarch $(uname -m) -R(ASLR disabled) when SANITIZE=tsan, guarded by MMT_TSAN_REEXEC so it happens exactly once. No user/CI action needed. Source:tests/run_all_tests.sh:75-78. - Q: Issue #124 suggests gcov+lcov (or gcovr), but neither lcov nor gcovr is installed in the dev environment and the acceptance criteria only require a machine-readable report plus a printed line percentage.
A (issue-resolver): Implemented with gcov alone (
gcov --json-format+ jq, both shipped with gcc/standard images); the runner emits a genuine lcov-format tracefile at tests/coverage/coverage.info, so lcov tooling can still consume it. System headers outside the repo are excluded from the report. Source:tests/run_all_tests.sh:166-249. - Q: docs/AGENT_ENVIRONMENT.md, DEVELOPMENT.md and CONTRIBUTING.md claim 8 suites /
make testas the test command, but code now has 12 suites andmake testis an install-dependent trap. A (doc-manager): Update suite count to 12 (tests/run_all_tests.sh:141-154) and replacemake testdocs withbash tests/run_all_tests.sh; add trap note citingsdk/Makefile:239-242,rules/common.mk:4-8. FixNDEBUG=1description — it suppresses-DNDEBUG(keeps debug active) perrules/common.mk:38-43. Source:tests/run_all_tests.sh:141-154,sdk/Makefile:8-13,239-242,rules/common.mk:38-43. - Q: CONTRIBUTING.md and Compilation-and-Installation-Instructions.md list
cmakeas a prerequisite and unconditionallibxml2-dev, and use stale git URLmontimage/mmt-dpi. A (doc-manager): Removecmake; makelibxml2-devconditional onENABLESEC=1(rules/common.mk:76-84); notelibnghttp2-devoptional (rules/common.mk:56-74); fix URL tomontimage-projects/mmt-dpi.git. Source:rules/common.mk:56-84,install.sh:122-130. - Q: docs/DEPLOYMENT.md shows installed plugins under
/opt/mmt/dpi/plugins/and omits examples path. A (doc-manager): Fix to/opt/mmt/plugins/and add/opt/mmt/examples/perrules/common.mk:7-8; plugin load path atrules/common.mk:30. Source:rules/common.mk:4-8,30. -
Q: docs/README.md navigation omits
troubleshooting.md,ChronoChat.md,External-Attribution.mdand several protocol docs. A (doc-manager): Add Troubleshooting, ChronoChat, External-Attribution links; per-protocol docs remain reachable viaDeveloper.md. Source:docs/directory listing. -
Q: Issue #142 (spike) — should the vendored
http_parser(Joyent/nodejs http-parser 2.5.0 atsrc/mmt_tcpip/lib/http_parser.{c,h}) be updated or replaced? Is there a CVE/deprecation driver, and what is used for HTTP/2? A (spike): Keep the vendored parser but bump it to the final upstream release 2.9.4 (Mar 2020). Findings: (1) Current 2.5.0 is 9 years behind HEAD; upstream is now archived and explicitly recommends llhttp for new projects, but llhttp is TS-generated and not a drop-in (different API, rewrite ofhttp_parser_integration.c+proto_http.crequired — high risk, fingerprint impact). (2) 2.5.0→2.9.4 fixes that matter to DPI: OOB read viastrtoulinhttp_parser_parse_url()(9ce7316, not on the hot path —proto_http.c:383only callshttp_parser_execute()andrequest_url_cbis a no-op — but still reachable), strictContent-Lengthblank/empty rejection (01da95f/3502589, prevents request-smuggling-tolerant parsing), nread accounting and pointer-arithmetic fixes. No CVEs were issued but the fixes are security-hardening. (3) HTTP/2 is NOT parsed byhttp_parser;src/mmt_tcpip/lib/protocols/http2.c:18uses a bespoke frame parser (http2_can_read()bounds checks added in #146) so no dependency. (4) Bump is trivial and ABI-compatible: onlysrc/mmt_tcpip/lib/http_parser.h:8-10version macros and the vendored.cchange;http_parser_init/http_parser_execute/HTTP_PARSER_ERRNO/parser->upgradecontract is unchanged and SDK builds clean (make -C sdk -j). Decision: bump to 2.9.4 now, defer llhttp migration unless a future CVE or fingerprint requirement forces it. Source:src/mmt_tcpip/lib/http_parser.h:8-10,src/mmt_tcpip/lib/http_parser.c(vendored 2.5.0 vs nodejs/http-parser@2.9.4),src/mmt_tcpip/lib/protocols/proto_http.c:372-390,src/mmt_tcpip/lib/http_parser_integration.{h,c},src/mmt_tcpip/lib/protocols/http2.c:12-18, nodejs/http-parser README deprecation notice + tagsv2.5.0→v2.9.4(76 commits). - Q: Issue #147 — triage the TODO/FIXME backlog (phase p3, depends on #125). How many TODO/FIXMEs exist, which are already covered by prior work, and what is the disposition of the remainder?
A (triage): Baseline on main (29832485):
grep -rn "TODO\\|FIXME" src/ --include="*.c" --include="*.h"= 218 hits (207 excl. 11 insrc/mmt_mobile/asn1c/generated code which is never edited per AGENTS.md). Docs contain 6 TODO refs indocs/Phase2-Heuristics.md(catalogue, not code TODOs). After this triage: 213 total / 202 non-asn1c (5 stale entries removed). Disposition: | Category | Count (non-asn1c) | Representative files | Disposition | |—|—|—|—| | Vendored (never edit) | 2 |src/mmt_tcpip/lib/http_parser.c:1582,2045| Out of scope — upstream Joyent code; TODOs kept as-is (#142already bumped 2.5.0→2.9.4) | | Dead code already removed in #145 | ~2 (pre-triage) |src/mmt_tcpip/lib/protocols/ip_session_id_management.c(deletedsetup_application_detection/setup_session_id_listswith TODO), orphansrc/mmt_core/fuzz_engine/| Verified removed; residualip_session_id_management.c:114rename TODO kept, deferred to #148 | | Safety guards already handled in #146 | 0 new TODOs created |proto_dtls.c,proto_quic_ietf.c,http2.c,proto_cotp.cetc. | #146 hardened L4/L5/mobile parsers; TODOs left as documentation of future completeness, not safety | | Heuristics H1-H8 (Phase2-Heuristics.md) | 11 |src/mmt_tcpip/lib/protocols/proto_tcp.c:419,500,602,703,730andproto_udp.c:51,67,97,129(//TODO: check this out,best_effort,tcp_retransmission,memset) | Deferred — intentionally catalogued, gated behind fingerprint harness perdocs/Phase2-Heuristics.md; each needs payload-confirm measurement before merge | | Performance TODOs | 7 |src/mmt_tcpip/lib/protocols/http.c:84,373(optimization),mmt_tcpip_internal_defs_macros.h:307(alignment),proto_rtp.c:134(shift vs mul) | Deferred to #154 (dispatch short-circuit), #155 (session pool), #156 (hot-path/fragment expiry) — no large refactor in this triage | | Doc/naming TODOs | 5 |src/mmt_core/private_include/hash_utils.h:25,packet_processing.h:216,493,496,public_include/data_defs.h:42,public_include/mmt_core.h:22| Deferred to #148/#150 (structural cleanup / typed enums) — low risk, no behavior change | | Protocol completeness (BW TODOs) | ~60 |configured_protocols.c:4016,4029-4031,4096,4101-4102,4114,4118,proto_radius.c,proto_ftp.c,proto_gtp.c,proto_tds.c,proto_zattoo.c,proto_stun.c, many//BW: TODO: check this out| Deferred to #148 (table-driven registration) or standalone follow-ups — each requires per-protocol pcap validation | | Core TODOs (error codes, session handling) | 21 |src/mmt_core/src/packet_processing.c:344,501,717,840,1925,2399,2413,2659,2774,3123,...,proto_meta.c:147| Deferred — error-code/threshold work needs ABI discussion; parent-session TODO (#2659) already noted | | tips.c bare TODO | 49 |src/mmt_security/tips.c:356,401,428-549,2155-2933,...(empty// TODOand//TODO verify if OK) | Deferred — security rule engine batch; #137 already fixed overflow family, remaining are completeness stubs for futuremmt_securitysprints | | Trivial fixed now | 10 typo/comment fixes + 5 removals | see below | Fixed in this PR | | Other proto (singletons) | ~35 |proto_batman.c:29,proto_ssl.c:911,proto_int.c:50,87,323,369,proto_gre.c:166,sctp.h:26,50, etc. | Mixed: trivial typos fixed, substantive items deferred to respective follow-ups | Trivial fixes applied (comment-only, no behavior change,bash tests/run_all_tests.shgreen):src/mmt_tcpip/lib/protocols/sctp.h:26,50— removed stale commented-outSCTP_NUM_CHenum/define with//TODO:delete this later(dead code, kept surrounding commentedSCTP_DATA_*as intentional)src/mmt_tcpip/lib/protocols/proto_loopback.c:53-54— replaced two stale commentedregister_protocol_stacklines (//TODO: check return value) with a note that registration is intentionally disabled (DLT already used by Ethernet)src/mmt_tcpip/lib/protocols/proto_ethernet.c:172-173— collapsed two TODO lines into one// TODO: check return value (non-critical)and removed deadregister_protocol_stack_fullcommentsrc/mmt_tcpip/lib/protocols/tcp_segment.c:123—overwride→override(reworded towhether to override duplicate segment)src/mmt_tcpip/lib/protocols/proto_int.c:369—somewho→somehowsrc/mmt_tcpip/lib/protocols/proto_ssl.c:911—encrypeted→encryptedsrc/mmt_tcpip/lib/protocols/proto_batman.c:29—teste si le packet est bien formatte→check if packet is well formattedsrc/mmt_tcpip/lib/protocols/ip_session_id_management.c:114—tor emove→to remove(reworded torename to remove "id")src/mmt_core/private_include/packet_processing.h:493—net be used→not be usedsrc/mmt_tcpip/lib/protocols/proto_oscar.c:253+configured_protocols.c:4101-4102,4114—calssification→classification(4 sites) No large refactors; fingerprint-affecting TODOs explicitly NOT changed. Next steps are tracked as deferred issues above. Source:grep -rn "TODO\\|FIXME" src/ --include="*.c" --include="*.h"(218→213),docs/Phase2-Heuristics.md(H1-H8 catalogue),src/mmt_mobile/asn1c/(generated, excluded),src/mmt_tcpip/lib/http_parser.c(vendored, #142), git diffe8257c60(#145) and10afc854(#146), issues #148/#154/#155/#156.
-
Q: Issue #158 — repo-root report hygiene: which artifacts should be gitignored and does
make -C sdk cleanremove them? A (chore): Harden.gitignorefor report hygiene: generalizedclassification.actual.txt(tools/phase0/baseline/+**/classification.actual.txt), global gcov/coverage patterns (*.gcda/*.gcno/*.gcov/coverage.info/coverage.json/lcov.info/htmlcov/), static-analysis reports (cppcheck*.xml/cppcheck-report.xml/PVS-Studio.log/pvs.log), generic*.log/*.tmp/*.bak/compile_commands.json/gmon.out/perf.data.*, and keep the existingaccuracy_comparison_report.md/benchmark_comparison.md/CODE_REVIEW_2026.md/MASTER_IMPROVEMENT_PLAN.md/REVIEW_REPORT.mdentries. Extendedsdk/Makefile:cleanto also remove repo-root*.log/*.tmp/coverage.*/cppcheck*.xml/PVS-Studio.logand package leftovers (mmt-dpi_*.deb/.rpm/.zipat root andsdk/). No tracked files removed;changelog.htmlremains tracked (served asset, not a CI artifact). Verifiedgit check-ignoreandmake -C sdk cleandry-run. Source:.gitignore:73-129,sdk/Makefile:222-229,tools/phase0/capture_baseline.sh:9-15,cppcheck.sh,pvs-studio.sh. - Q: Issue #159 (6.6) — harden installers and dedupe the ZIP variant. Are there two installers, what risks, and how to dedupe?
A: Two installers:
install.sh(root, curl|bash, alreadyset -euo pipefailbut unvalidated env vars) anddist/ZIP/install.sh+uninstall.sh(offline ZIP, noset -euo pipefail, hardcodedVERSION=1.8.0diverging fromrules/common.mk, only 4 libs vs 7 insdk/Makefile,mmt.confvsmmt-dpi.confmismatch, no input validation,cp/lnglobs unguarded).tools/ci/build-package.shalready hardened (set -euo pipefail, validated args). Hardening: addvalidate_branch(allowlist^[A-Za-z0-9._/-]+$, reject../--/leading-),validate_mmt_base(absolute, no.., no metachars, no trailing slash),validate_jobs(1-256),validate_skip_deps,git clone --separator,cleanupgated to/tmp/*. Dedupe: extract shared paths/libs/config names todist/ZIP/mmt-install-common.sh(single source forVERSION,MMT_*paths,MMT_LIBS/MMT_PLUGIN_LIBS,LD_CONF_*,validate_mmt_base), install/uninstall bothsourceit;sdk/Makefile:zipnow stampsVERSIONfromrules/common.mkviasedso ZIP never drifts. Installed libs expanded from 4 to 7 (libmmt_tmobile,libmmt_tdicom,libmmt_business_appadded),ln -snfreplacesln -s,SCRIPT_DIRreplaces$(pwd),nullglobguards,ld.sohandling made idempotent and migrates legacymmt.conf.shellcheckpasses for all installers;scripts/validate-*.shupdated to check the new common file. Source:install.sh:33-98,120-135,287,dist/ZIP/mmt-install-common.sh,dist/ZIP/install.sh,dist/ZIP/uninstall.sh,sdk/Makefile:199-215,227-233,rules/common.mk:1,tools/ci/build-package.sh:14-18,scripts/validate-release-prep.sh:34-36,56-58,scripts/validate-compile-install.sh:64-67,shellcheck0.11.0.
2026-09-10
-
Q: Issue #178 (Pre.1) —
docs/AGENT_ENVIRONMENT.mdcitessdk/Makefile:239-242for themake testtrap and states a 20–30 s test runtime. Both are wrong (F-DOCS-006, F-DOCS-007). What are the correct values, and how is the doc kept from rotting again? A:sdk/Makefile:239-242is the tail of thedist-clean:recipe (which starts at:236); the real target istest:atsdk/Makefile:248-251— six lines later, exactly as F-DOCS-006 describes. The same stale citation was carried bydocs/DEVELOPMENT.md:75; that duplicated block is now a link to the canonical section instead. Four further citations were stale in the same way and were re-resolved: the ASan flag set (rules/common.mk:113-118→:120-127), the TSan flag set (:140-145→:150-157), the runner’s opt-in modes (tests/run_all_tests.sh:8-84→:8-87) and the coverage reporter (:166-249→:167-260). Measured runtime ofbash tests/run_all_tests.shis 52 s and 57 s over two runs (20-core host, 12/12 PASSED, exit 0 each time) against the 53 s recorded by the September 2026 audit, so the band is now45–65 sand the checklist line matches. Rot prevention:scripts/validate-agent-environment.shregisters an anchor regex per citation and fails when a cited range no longer contains what it is cited for, when a citation appears in the doc without an anchor, or when a registered anchor is no longer cited. Source:sdk/Makefile:236-242,248-251,rules/common.mk:120-127,150-157,tests/run_all_tests.sh:8-87,141-154,167-260, measured run on 2026-09-10. -
Q: Issue #178 acceptance criterion 3 requires the apt install line, the
MMT_BASEcontract and the “clean before switchingBUILD=” rule to be “stated exactly once in the repository”. Does that include executable package lists? A: No. The criterion is read as stated exactly once as documentation prose; executable package lists have to be runnable and cannot be replaced by a link, soinstall.sh,tools/ci/build-package.shand the.github/workflows/*steps are exempt.docs/DECISIONS.mdis exempt too — it is append-only, so historical entries quote facts on purpose and are never the live definition. Package sets installed for a different job are a different fact, not a copy of this one:docs/Install-mmt-sdk-on-CubieBoard-X.md(ARM board),docs/MMT-QoE-demo.md(demo application),DEB_PACKAGE_CHECKLIST.md(packaging workflow) anddist/ZIP/README.md(that ZIP ships prebuilt libraries and never compiles, so it needs a runtime-only set —dist/ZIP/install.shonly copies and symlinks). Under that reading the canonical home isdocs/AGENT_ENVIRONMENT.md§1/§3/§4/§5, and the prose duplicates inREADME.md,CONTRIBUTING.md,docs/DEVELOPMENT.md,docs/Compilation-and-Installation-Instructions.md,docs/USER_GUIDE.md,docs/DEPLOYMENT.md,docs/Examples.md,tools/phase0/README.md,CLAUDE.mdandAGENTS.mdbecame links.scripts/validate-agent-environment.shenforces the “defined once” half and checks that every#anchorlinked into the doc resolves to a real heading. Source:scripts/validate-agent-environment.sh(single-source-of-truth section),docs/AGENT_ENVIRONMENT.md:15-25,90-94,144-147,193-204. -
Q: Issue #180 (Pre.3) —
AGENTS.mdcarried three subagent blocks in loadable-definition shape (YAML frontmatter,tools:declarations) with no.claude/agents/directory to load them from (F-DOCS-017). Split them into real.claude/agents/*.mdfiles, or restate them as frontmatter-free role guidance? A: Restate as role guidance..gitignore:62-64ignores.claude/and.claude*with the explicit note thatCLAUDE.mdandAGENTS.mdare the tracked agent files (milestone ME, issues #120/#121), so committing.claude/agents/*.mdwould contradict a standing repo decision, and the three blocks were not loadable as written anyway — each declaredtools: Read, Grep, Glob, Bash, with no edit capability, while describing work that modifies sources. The blocks are now frontmatter-free role briefs under## Roles, which states in the file that they are briefs and not loadable config. In the same passAGENTS.mdstopped stating any build/test command of its own (it links toCLAUDE.mdanddocs/AGENT_ENVIRONMENT.md), and the phase0 line was corrected:classification-gate(“Golden classification fingerprint unchanged”,.github/workflows/phase0-baseline.yml:165-173) runs on every PR intomainand fails visibly, butmain’s required status checks arebuildandunit-testsonly, so it is advisory and does not block the merge. Source:.gitignore:62-64,AGENTS.md,.github/workflows/phase0-baseline.yml:165-173,gh api repos/montimage-projects/mmt-dpi/branches/main/protection/required_status_checks(contexts:build,unit-tests),scripts/validate-agent-environment.sh:342-348.
2026-09-12
-
Q: Issues #187/#188 — two organisations appear in
github.com/<org>/mmt-dpireferences (Montimagein install.sh and CONTRIBUTING.md,montimage-projectsin README.md, SECURITY.md and docs/index.html),scripts/validate-install-origin.shfails on the divergence, anddocs/DECISIONS.mditself shipped an unresolved merge-conflict block. Which organisation is canonical, and how is the conflict resolved? A:montimage-projectsis canonical — it is the organisation theoriginremote pushes to, the one every entry-point document except the two stale files already names, and the one the required-status-checks query resolves against.install.sh(REPO_URL plus the usage-comment and banner URLs, including theraw.githubusercontent.compair) and the two issue-template links inCONTRIBUTING.mdwere repointed to it, makingscripts/validate-install-origin.shgreen so it could move from the verify-helpers advisory loop to the blockingdoc-validatorsjob. The DECISIONS.md conflict markers were resolved by keeping both entries — they are append-only records for issues #158 and #159, so neither side is discarded.CONTRIBUTING.md’s gitleaks line was also corrected to the hook’s real command (gitleaks git --staged, notgitleaks protect --staged). Source:scripts/validate-install-origin.sh:48-83,install.sh:4,7,8,27,379,CONTRIBUTING.md:119-120,git remote -v(origin → montimage-projects/mmt-dpi),.pre-commit-config.yamlhook manifest for gitleaks v8.30.1. -
Q: Issue #184 (0.4) — the AC requires “the unit suite, the phase0 fingerprint and precision jobs, the sanitizer jobs, lint, the optional-engine build, and secret scanning” as required contexts on
main. Which check-run names does that map to, and how is the dynamicharnessmatrix made require-able without soft-locking merges? A (ci): Required contexts are the check-run names as they actually report, not job ids: jobs with aname:field report under it (Golden classification fingerprint unchanged,ASan/UBSan profile compiles,Labelled-pcap precision/recall holds or improves (M9, issue— GitHub truncates the name at the#of#74), so the required string is the truncated form observed viagh api …/check-runs), and matrix jobs report one context per child (unit-tests,unit-tests (-fsigned-char, hashmap memory hexdump mmt_utils mmt_inet_ntop),sanitizer-tests (BUILD=asan, asan),sanitizer-tests (BUILD=tsan, tsan)). The AC list was read as a minimum, so the description’s own advisory list addscoverage, and the phase-0 machinery added since addspre-commit,doc-validators,verify-helpersand the harness gate —buildstays required (dropping the compile gate would weaken protection). Theharnessmatrix enumeratestools/phase0/tests/run_*.shdynamically, so itsharness-run_*.shcontexts shift as scripts are added/renamed; pinning them would soft-lock merges, sophase0-baseline.ymlgained aharness-gateaggregate job (needs: harness,if: always(), fails on failure/cancelled/skipped) and protection requires that one stable context. Governance flags:enforce_admins,required_conversation_resolution,required_approving_review_count: 1,require_code_owner_reviews: truewith a new.github/CODEOWNERS(src/mmt_core/,src/mmt_tcpip/,.github/→@luongnv89 @dev-montimage @nhnghia— the active admin collaborators).strict: true(require up-to-date branches) was already set and kept; merge-strategy andsquash_merge_commit_messagesettings are out of scope and untouched. Source:gh api repos/montimage-projects/mmt-dpi/commits/1812d2d4/check-runs,.github/workflows/c-cpp.yml,.github/workflows/phase0-baseline.yml,gh api repos/montimage-projects/mmt-dpi/branches/main/protection.
2026-09-13
- Q: Issue #192 (1.2) —
proto_ip.cderivedl4_packet_lenfrom the attacker-controlled IPv4tot_lenand clamped to the captured length only on the reassembly branch (F-BUG-016). How is the bound computed, and what shape doproto_syslog.c/proto_redis.cand the HTTP/1 family adopt for payload reads (F-BUG-054, F-BUG-059)? A:ip_post_classification_functionnow computesusable = MIN(l3_packet_len, l3_captured_packet_len)before subtractingihl_byteson every branch, sol4_packet_len— and thepayload_packet_lenproto_tcp/proto_udp derive from it — can never exceed captured bytes; well-formed traffic (tot_len <= captured) is unchanged and Ethernet padding stays excluded becausel3_packet_lenstill wins when it is smaller. Syslog and Redis each derive one local clamped length (MIN(payload_packet_len, payload_end - payload)wherepayload_end = ipacket->data + p_hdr->caplen) and pass it through, so no read is bounded bypayload_packet_lenalone; the syslog scanner index was wideneduint8_t->uint32_tso a >255-byte payload cannot wrap it into an unbounded loop.http2_can_read(offset, n, caplen)(src/mmt_tcpip/lib/protocols/http2.c:18) — bounding each read by the absolutep_hdr->caplenbuffer end rather than a header-derived length — is recorded as the shape the HTTP/1 family adopts for its own bounded reads once this lands; no HTTP/1 code change is in this issue’s scope. Source:src/mmt_tcpip/lib/protocols/proto_ip.c:1694-1705,src/mmt_tcpip/lib/protocols/proto_syslog.c:209-218,src/mmt_tcpip/lib/protocols/proto_redis.c:65-74,src/mmt_tcpip/lib/protocols/http2.c:18,tools/phase0/tests/caplen_clamp_test.c. -
Q: Issue #200 (F-BUG-005) says
clear_protocol_stack_mapdeletes the global map without NULLing it “and two other globals share the shape”. Which two globals does that mean, and how is each fixed? A:mmt_configured_handlers_map(src/mmt_core/src/packet_processing.c:159) — deleted byclose_extraction()without NULLing — andtimeout_milestones_map(mmt_handler_tfield,src/mmt_core/private_include/packet_processing.h:458) — deleted byclear_timeout_milestones()without NULLing the field. Both now get NULL-after-delete.protocol_stack_mapadditionally became lazily (re)created on the write path (get_protocol_stack_map()), so a secondinit_extraction()gets a fresh map; read paths treat NULL as “no stack” instead of creating one. The other candidates already handle this correctly (configured_protocols_names_mapis NULLed atfree_registered_protocols(),configured_protocols[i]at:986,plugin_handlers_listatplugins_engine.c:190), andproto->attributes_map/attributes_names_mapcannot return failure to theirvoidparent — they are covered by the new NULL-tolerant map API instead. Source:src/mmt_core/src/hash_utils.cpp,src/mmt_core/src/packet_processing.c:978-997,2066-2090,src/mmt_core/src/plugins_engine.c:158-192. -
Q:
session_timeout_comp_fn_ptis defined twice —packet_processing.c:24(C, unmangled) andhash_utils.cpp(C++, mangled export_Z26session_timeout_comp_fn_ptjj). Marking the .cpp definitionextern "C"per the issue’s grep-metric would create a duplicate-symbol clash. Which survives? A: The C definition inpacket_processing.cis canonical —mmt_init_handler(packet_processing.c:1329) binds it inside its own translation unit. The C++ duplicate was dead code (no caller, no header declaration) and was removed. The same reasoning madeprotocol_stack_id_comp_fn_ptfile-localstatic(only user is the protocol-stack map itself). Source:nm -D sdk/lib/libmmt_core.sobefore/after,grep -rn session_timeout_comp_fn_pt src/. -
Q: Issue #197 (1.7) — which organisation is canonical for
mmt-dpi, and what does “verify the tag signature” mean when upstream release tags carry no GPG signature? A:montimage-projectsis canonical — confirming the 2026-09-12 entry (issues #187/#188):originpushes there, every entry-point document names it, and the alternateMontimageidentity is the stale mirror (git ls-remote: itsmainsits 15 commits behindorigin/mainand it lacks tagv1.8.0).install.shnow defaultsREFto the pinnedRELEASE_TAG=v1.8.0withRELEASE_TAG_SHA=af4c3cd7c4d04307411ef17bb16971a0df47f3d1; after the shallow clone it assertsgit rev-parse <tag>^{commit}equals the pin (a moved or re-created tag fails the build) and runsgit tag -v— an invalid signature is fatal while an unsigned tag warns, because every current upstream release tag is unsigned (git cat-file tag v1.8.0shows no signature block), so the commit pin is today’s enforced check and any future signed tag is verified automatically. A moving ref (BRANCHenv or--branch, e.g.dev/main) is refused unless--unverified-branchis passed;--dry-runprints the resolved plan.scripts/validate-install-origin.sh(committed under #190, run blocking by thedoc-validatorsjob from #187) remains the committed divergence check and now also smoke-runsinstall.sh --dry-runplus the--unverified-branchgate. Source:install.sh(REPO_URL,RELEASE_TAG,RELEASE_TAG_SHA,resolve_ref,verify_release_tag,parse_args,print_plan),scripts/validate-install-origin.sh:96-113,.github/workflows/c-cpp.ymldoc-validatorsjob,git ls-remote origin|github,docs/DECISIONS.md2026-09-12 entry. - Q: Issue #198 (1.8) — where should per-package SBOMs be generated, which assets get attested, and how is the wiring kept from rotting?
A: SBOMs are generated in the per-distro
buildjob — oneanchore/sbom-actionscan (file:input,format: spdx-json) of the package file itself, written next to it asdist/packages/<pkg>.sbom.jsonso the existing upload-artifact glob ships it — not in the tag-onlyreleasejob, so thepull_requesttrigger exercises SBOM generation on every packaging change instead of first failing on a tag push. The release job collects*.deb/*.rpm/*.sbom.jsonintorelease/, writesSHA256SUMSover all of them, then attestsrelease/*withactions/attest-build-provenance— every published file becomes an attestation subject, manifest included — and publishes the samerelease/*set, sosha256sum --checkandgh attestation verifyboth work on every asset.upload-artifact/upload-release-assetson sbom-action are disabled sosoftprops/action-gh-releasestays the single publisher. Permissions stay job-scoped:releaseaddsid-token: write(Sigstore OIDC) andattestations: write(repo attestation store) to its existingcontents: write; the build job and the workflow-levelcontents: readare untouched. Rot prevention:tools/ci/check-release-verification.shstatically re-checks the wiring (permissions, attestation subjects, manifest, SBOM path/collection, README verification commands, SHA-pinning) and runs blocking in theverify-helpersjob. Source:.github/workflows/release-packages.yml,.github/workflows/c-cpp.ymlverify-helpersjob,tools/ci/check-release-verification.sh,README.md“Verify a package before installing it”,gh api repos/actions/attest-build-provenance/tags(v4.2.2),gh api repos/anchore/sbom-action/tags(v0.24.2).
2026-09-14
- Q: Issue #217 (4.1) — how are the five release build images digest-pinned when GitHub matrix
image:values must stay literal, and where is the pin recorded so a dependency bot can see it? A: Pins arename:tag@sha256:<index-digest>literals in thebuildmatrix — the acceptance grep (image: [^@]+$) forbids${{ }}indirection, so a generated matrix was not an option — and the index digest (not a per-arch manifest digest) is used so the same pin resolves both the amd64 leg and the arm64 QEMU leg (docker buildx imagetools inspectshows every index coverslinux/amd64+linux/arm64/v8). The tag is kept in the ref for readability; the digest is what docker actually resolves.tools/ci/base-images.txtis the tracked record: one exactimage:value per line so the workflow cangrep -Fxits matrix pin before building (fail-fast on drift),digest-source:lines document the refresh command, and the file is added to the workflow’spull_request.pathsso a pin update runs the packaging matrix.tools/ci/check-image-digests.sh(committed advisory under #190) now runs as a blocking step in theverify-helpersjob — its gate condition holds. Source:.github/workflows/release-packages.yml(matrix + “Verify pinned base image is recorded” step),tools/ci/base-images.txt,tools/ci/check-image-digests.sh,.github/workflows/c-cpp.ymlverify-helpersjob,docker buildx imagetools inspect <image>:<tag>for all five images. -
Q: Issue #202 (2.4) — the AC requires every hand-written extraction callback in
proto_{ip,tcp,gre,gtp,icmp}.cto begin with the sharedmmt_have_bytescaplen prologue, including callbacks that read no packet bytes (session-only extractors liketcp_session_rtt_extraction,ip_client_port_extraction,_extract_jitter) and delegate wrappers (gtp_imsi_mmc/mnc,icmp_identifier_and_seq_nb,icmp_gateway). How are both handled without changing extraction semantics? A: Session-only callbacks get a floor prologueif (!mmt_have_bytes(packet, 0, 0) || extracted_data == NULL) return 0;— it validates the packet plumbing (NULL packet/p_hdr/data) while claiming zero bytes, so the grep coverage criterion holds and no extraction path changes on valid packets. Delegate wrappers keep the same shape but the flag-gating byte read (packet->data[proto_offset]/[proto_offset + 1]) is guarded for real, and the delegate’s return value is now propagated instead of unconditionally returning 1 — previouslyip_opts_type_extraction,gtp_imsi_mmc_extractionandgtp_imsi_mnc_extractionreported a set attribute even when the hardened generic extractor refused. The same-prologue rule also caught two adjacent defect classes fixed in the same pass:icmp_data_extractionsized its payload memcpy fromp_hdr->len(wire length) instead ofp_hdr->caplen— a truncated capture read past the mapped buffer — now bounded by caplen with the malformed-packet refusal preserved fordata_start > caplen; and strict u16/u32 loads at odd capture offsets (gre_key_extraction,gre_seqnb_extraction,ip_frag_offset_extraction,gtp_seq_num_extraction) were misaligned accesses (UBSan abort) now done via memcpy, mirroring the issue #59 convention. The in-file classifiersgre_classify_next_proto,gtp_classify_next_protoandicmp_classify_next_protoindexedpacket->databefore any room check and got the samemmt_have_bytestreatment —tools/phase0/ci/check_classification.shconfirms the golden fingerprint is unchanged. Source:src/mmt_tcpip/lib/protocols/proto_{ip,tcp,gre,gtp,icmp}.c,tools/phase0/tests/extraction_caplen_prologue_test.c,tools/phase0/tests/run_extraction_caplen_prologue_test.sh(50 checks, ASan+UBSan green),bash tests/run_all_tests.sh(12/12). -
Q: Issue #202 (F-BUG-010) —
register_extraction_attributesized the attribute scratch buffer fromget_data_size_by_data_type()whileextract_attribute->data_lencame fromget_data_size_by_proto_and_field_ids(); which side does the fix land on — allocator or metadata validation? A: Both, as belt-and-suspenders.validate_attribute_metadata(packet_processing.c) already rejecteddata_len > type size(anddata_len != 0on a zero-size type) — that check is kept and now emits anfprintf(stderr, …)diagnostic naming the attribute alias, id, declared length and type size, so the refusal is diagnosable (the new harness assertsregister_attribute_with_protocolreturns 0 forMMT_U8_DATA/data_len=64).register_extraction_attributeadditionally allocatessizeof(struct attribute_internal_struct) + max(type_size, data_len)so even metadata that bypassed protocol-registration validation cannot undersize the scratch. The diagnostic surfaced a pre-existing registration refusal:proto_http.c’sHTTP_HEADERattribute (aliasheader, id 19,MMT_GENERIC_HEADER_LINE=30,data_len=sizeof(void*)=8) fails thetype_size==0 && data_len!=0rule —get_data_size_by_data_typehas noMMT_GENERIC_HEADER_LINEcase — so the attribute has never registered since the validation landed; the message now says so instead of failing silently. Behaviour unchanged, flagged here for a follow-up (either add the type size or setdata_len=0). Source:src/mmt_core/src/packet_processing.c:298-345,2414-2473,src/mmt_core/src/mmt_data.c:313(noMMT_GENERIC_HEADER_LINEcase),src/mmt_tcpip/lib/protocols/proto_http.c:256. -
Q: Issue #203 (2.5) — QUIC/TLS/DTLS/DNS extractor hardening: how is the packed pointer-member QUIC overlay removed without changing classification, and what bound does the TLS extension cursor enforce? A:
quic_ietf_long_header_tbecame a local descriptor carrying the flag octet, host-order version and (offset,length) pairs intoipacket->datainstead of pointers;_quic_ietf_parse_long_header()validates each cursor step against the captured length and treats a header whose declared connection-id span overruns the capture as malformed (nothing extracted). The classifier no longer overlays either header struct: it reads the flag octet directly and the version viamemcpy, keeping the old packed-sizeofminimums (31 bytes long header, 21 short header) asQUIC_IETF_{LONG,SHORT}_HEADER_WIRE_MINso the golden-pcap classification boundary is unchanged.getServerNameFromClientHello()walks extensions with auint32_tcursor and breaks whenextension_len > extensions_len + 2 - extension_offset— the cursor counts the 2extensions_lenbytes themselves, so the extension body must end inside[offset+2, offset+2+extensions_len); the loop guardextension_offset + 4 < extensions_lenmakes the subtraction underflow-safe. The three TLS field extractors rejecttcp_index < 0,tcp_offset < 0,ssl_offset < 0andssl_offset + 5 > caplenbefore forming a packet pointer. DTLS publishes at mostBINARY_64DATA_LENcipher suites and_get_u16ismemcpy-based (the cipher list can start at an odd offset). DNS decompression tests the top two bits and assembles a 14-bit offset; the existing strictly-backward and in-payload checks still apply._extraction_quic_ietf_attand_dtls_extract_attributeare non-static solely asinternal_decls.htest seams. Red-to-green proof: the new harnesses abort/fail on the pre-fix build (ASan heap-buffer-overflow in the QUIC overlay write-back, hang-alarm on the 0xFFFC extension,u16_arr->len=100, wrong DNS parse) and pass on the fixed build. Source:src/mmt_tcpip/lib/protocols/proto_quic_ietf.{c,h},src/mmt_tcpip/lib/protocols/proto_ssl.c,src/mmt_tcpip/lib/protocols/proto_dtls.c,src/mmt_tcpip/lib/protocols/proto_dns.c,tools/phase0/tests/{quic_dtls_extractor_test.c,tls_ext_walk_test.c,dns_parser_test.c}. - Q: Issue #207 (3.1) — the SCTP DATA
lengthfield is attacker-controlled and both NGAP sites computedntohs(length) - sizeof(sctp_datahdr)before checking it; PPID 46 classified Diameter without proving the 20-byte header;s1ap_decode()leaked the partially-decodedS1AP_PDUonaper_decodefailure;_visite_pdu()letmsg->pdu_presentoverwrite the decoded CHOICE discriminant underSET_ACTION; and the S1AP entity store was a process-global unbounded list scanned linearly. What shapes do the fixes take? A: (F-BUG-079) Both NGAP sites rejecthdr_len < SCTP_DATA_HEADER_SIZEbefore the subtraction and clamp the payload length tocaplen, mirroringproto_nas_5g.c:73-77; the packet-level test drives declared-length8/4000frames and shows...sctp_datawith no.ngap. (F-BUG-080)_classify_from_sctp_databounds thesctp_datahdrcast, computesnext_offsetinsize_t(the olduint16_tcould wrap), and requires the wholediameter_headerto be captured before any classification — including PPID 46, so a 1–3-byte payload no longer classifies. (F-BUG-078)s1ap_decode()callsASN_STRUCT_FREE(asn_DEF_S1AP_PDU, pdu_p)onaper_decodefailure; verified by a 10,000-iteration malformed loop under ASandetect_leaks=1reporting zero leaks (pre-fix each call leaked the 112-byte CHOICE root). (F-BUG-087) the one inner-decode failure in_decode_s1ap_initialContextSetupResponsenow goes through_finishlike its siblings; the top-of-functionreturn -1sites are intentionally kept — they already freed the just-failedx_pand_finishwould double-free it. (F-BUG-089)_visite_pducopiespdu_p->presenttomsgonly underGET_ACTION; on encode the wire-carried arm wins and a mismatchedmsg->pdu_presentis ignored. (F-BUG-086) the store is nowlist_heads[S1AP_ENTITY_TYPE_GW+1]— one chain per type so lookups scan a per-type chain — bounded byS1AP_MAX_ENTITIES(4096, declared in the installedproto_s1ap.hwiths1ap_entities_update/count/resetas the testable seam),mmt_mallocis NULL-checked beforememset, and entity ids stay monotone via++entities_count(same 1,2,3… sequence the old head-relative id produced). No generatedasn1c/file was touched. Source:src/mmt_mobile/proto_ngap.c:70-80,115-122,src/mmt_mobile/proto_diameter.c:110-133,src/mmt_mobile/s1ap/s1ap_common.c:311-314,879-885,src/mmt_mobile/ngap/ngap.c:483-493,src/mmt_mobile/proto_s1ap.c:18-46,68-74,196-212,690-714,src/mmt_mobile/include/proto_s1ap.h:202-220,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c(leak loop, cap, discriminant),tests/s1ap_ngap_decode/test_s1ap_ngap_packets.c(packet-level),tools/phase0/gen_mobile_pcap.py(sctp_data_chunk_raw, lying-length frames). - Q: Issue #214 (3.8) — the AC requires assertions on external input to be unconditional,
-fcf-protectionon every release object, and the CI pcaps scrubbed of live credentials. Three ambiguities needed resolving: this repo’sNDEBUG=1knob is inverted (it suppresses-DNDEBUG, so “build with NDEBUG=1 keeping assertions live” means passNDEBUG=1, not define the macro);-fcf-protectionhard-errors on non-x86 GCC; and the credential pcaps are inside TCP streams where changing payload length breaks seq/ack arithmetic. A: (1) The CI job passesNDEBUG=1as an environment/make variable per the established meaning (rules/common.mk:38-43) and greps the verbose build log to prove-DNDEBUGnever reached a compile line; external-input assertions ins1ap_common.c/http_parser.cbecame unconditional checks, whileassert(0)unreachable-state markers that already carry a release fallback were left. (2)MMT_CF_PROTECTIONis a compile probe like the_FORTIFY_SOURCE=3one:-fcf-protectionwhere CET exists,-mbranch-protection=standard(PAC/BTI) on AArch64.-Wl,-z,force-btiwas tried and reverted: the crti/crtn stubs carry no GNU property note, and forcing BTI onto the output makes a BTI-enforcing loader SIGILL the process at startup — the checker’s--builtmode therefore asserts the CF property note only on targets where the-fcf-protectionprobe succeeds (x86 CI). (3)tools/phase0/ci/sanitize_pcaps.pyrewrites only payload bytes with same-length synthetic identities and recomputes checksums, so the golden classification fingerprint is unchanged; provenance and the per-file allowlist requirement are documented intools/phase0/ci/pcaps/README.md, and.gitleaks.tomlnames each capture instead of exempting the directory. Source:rules/common.mk:38-43,159-174,rules/common-linux.mk:85-142,tools/ci/check-hardening-flags.sh,tools/phase0/ci/sanitize_pcaps.py,tools/phase0/ci/pcaps/README.md,.gitleaks.toml,.github/workflows/c-cpp.yml(assertions-livejob).
2026-09-14
-
Q: Issue #216 (3.10) — the F-TEST-008 fix drains
mmt_handler_struct.ip_streamsthrough a plugin-registered value destructor, butip_process_fragment()(IPv4,proto_ip.c) andip6_process_fragment()(IPv6,proto_ipv6.c) shared one map while their value types need different destructors (ip_dgram_freevsipv6_dgram_free;struct ipv6_dgramcarries an extralast_offsetfield soholessits at a different offset). One map plus one destructor pointer cannot drain a mixed-family population correctly — how is it split? A: IPv6 fragment reassembly gets its own map:mmt_handler_structgainsip6_streams+ip6_streams_value_freealongside the IPv4 pair (src/mmt_core/private_include/packet_processing.h:464-469),mmt_init_handler()allocates both with the same cleanup discipline asip_streams, andmmt_close_handler()walks each map through its registered destructor beforehashmap_free(). A side benefit: the v4 key (saddr<<32|daddr ^ id) and the v6 key (low32(saddr)<<32|low32(daddr) ^ ident) shared one 64-bit key space, so a v4/v6 datagram pair could collide in the shared map — separate maps remove that latent cross-family collision. Both plugins also NULL-check*_dgram_alloc()and the reassemblymmt_malloc(), and verifyhashmap_insert_kv()actually landed the datagram (the API is void and drops silently on OOM — an unverified insert orphans the value). Source:src/mmt_core/src/packet_processing.c:1296-1310,1337-1368,1476-1488,src/mmt_tcpip/lib/protocols/proto_ip.c:1377-1399,1419-1422,src/mmt_tcpip/lib/protocols/proto_ipv6.c:310-355,386-389,src/mmt_tcpip/lib/protocols/proto_ip_dgram.h:40-53,src/mmt_tcpip/lib/protocols/proto_ipv6_dgram.h:40-53. -
Q: Issue #216 — the expanded golden corpus surfaced two out-of-bounds reads on the new synthetic pcaps (DICOM header read before the 6-byte bound check, and GTP G-PDU inner-IP reads via
ip_sessionizer/build_ipv4_session_key/ipv4_session_hash/ip_classify_next_protowhen the encapsulated payload is shorter than an IPv4 header). Fix the engine, or fix the captures to not trip the readers? A: Fix the engine — the captures are legitimate input (truncated encapsulation is normal traffic), the readers were missing bounds.mmt_check_dicom_tcp()now rejects whendicom_offsetis negative, outside the capture, or leaves fewer thanPROTO_DICOM_HDRLENbytes (src/mmt_dicom/dicom.c).gtp_classify_next_proto()now requires at leastsizeof(mmt_una_iphdr_t)captured bytes after the GTP header before declaring the next protoPROTO_IP(src/mmt_tcpip/lib/protocols/proto_gtp.c:149-160), andgen_mobile_pcap.pyships both variants: a complete inner IPv4/UDP datagram (exercises the fullgtp.ip.udpdecapsulation) and a short-inner G-PDU (covers the new guard). The classification baseline change is additive corpus growth — all pre-existing fingerprints are unchanged. Source:src/mmt_dicom/dicom.c:538-551,src/mmt_tcpip/lib/protocols/proto_gtp.c:144-160,tools/phase0/gen_mobile_pcap.py:145-191,tools/phase0/ci/baseline/classification.txt. -
Q: Issue #216 — the AC asks for “a Valgrind (or ASan
detect_leaks=1) CI job” over the golden pcaps. Which oracle runs where? A: Both, deliberately. The harnesstools/phase0/tests/run_leak_regression_test.shpicks its oracle at runtime:MMT_SDK_PREBUILT=1(aggregate runner) or missing valgrind → an ASan/LSan build withdetect_leaks=1forced intoASAN_OPTIONS(the project policy defaultdetect_leaks=0is filtered out); otherwise a default-profile SDK undervalgrind --errors-for-leak-kinds=definite --error-exitcode=42. The genericharness-*matrix already gates it automatically (ASan path on the runners, which have no valgrind), and a dedicatedleak-gatejob inphase0-baseline.ymlinstalls valgrind so the pinned Valgrind oracle also runs in CI. Each of the four 1.8.0 leak fixes runs as a separate process so a definite leak is attributed to exactly one case. Source:tools/phase0/tests/run_leak_regression_test.sh:38-46,99-137,.github/workflows/phase0-baseline.yml(leak-gatejob). -
Q: Issue #216 — the new corpus under the ASan/UBSan harness profile surfaced two latent UB classes the default build tolerates: misaligned
uint16_tloads inproto_ssl.c(ntohs(get_u16(payload, off))andntohs(*(uint16_t *)…)on odd payload offsets) and writes/memcpys throughextracted_data->datawhen it is NULL. Fix the few sites that fired, or the whole class? A: The whole class in the touched files — partial fixes leave the same latent abort on the next capture that reaches the sibling code path.proto_ssl.cnow routes every byte-aligned 16-bit payload read through the existing byte-assembledssl_read_u16_be()(allget_u16call sites ingetServerNameFromClientHello,getServerNameFromServerHello, the certificate item walkers, the WhatsApp stage check and the record-shape checks inssl_sessionclassification), andtls_number_record_extractionstores viamemcpyafter a NULL check. All sixgeneral_*_extractionhelpers inextraction_lib.cgainedextracted_data->data == NULLearly-returns — the framework setsdatato NULL to mark a not-extracted attribute, so NULL is a legal state, not an error — and every GTP extractor (gtp_*_extraction,_gtp_extract_next_extension_header_type,_gtp_extract_pdu_extension_header_field) bails on NULL before writing;gtp_seq_num_extractionadditionally switched its unaligned(unsigned short *)packet read and output store tomemcpy. Source:src/mmt_tcpip/lib/protocols/proto_ssl.c:60-70,199-211,262-283,349,381,680-682,829-932,src/mmt_core/src/extraction_lib.c:12-13,27-28,48-49,67-68,82-83,100-101,src/mmt_tcpip/lib/protocols/proto_gtp.c:187-343.
2026-09-14
-
Q: Issue #218 (4.2, F-DEP-207) — which concrete numbers are the declared GCC/glibc/libstdc++ floor, where does the single source of truth live, and how is the floor exercised in CI? A: The floor is the oldest toolchain the release matrix still builds on: GCC 11 / glibc 2.34 / libstdc++6 11 (Rocky 9 and CentOS Stream 9; Ubuntu 22.04 carries the same GCC on glibc 2.35, Debian 12 GCC 12, Ubuntu 24.04 GCC 13). The constants live once in
rules/common.mk(MMT_GCC_MIN,MMT_GLIBC_MIN,MMT_LIBSTDCXX_MIN— appended at end-of-file so everypath:linecitation pinned byscripts/validate-agent-environment.shstays put);rules/arch-linux.mk(a symlink toarch-linux-gcc.mk) enforces the GCC floor at parse time via a-dM -E -x cpreprocessor probe gated on__GNUC__without__clang__/__INTEL_COMPILER, exemptingclean/dist-clean; the.debDepends:consumes the same constants forlibc6andlibstdc++6(whose package versions track the GCC major, hence pinned toMMT_GCC_MIN).tools/ci/check-package-deps.shtreatslibstdc++6as wired via the$(CXX)link driver — it carries no-lflag. Thetoolchain-floorjob inc-cpp.ymlbuilds and runs the suite onubuntu-22.04(GCC 11.4, the oldest GitHub-hosted runner), which is the “oldest supported compiler in the matrix” the AC asks CI to exercise. Source:rules/common.mk:451-453,rules/arch-linux-gcc.mk:27-40,sdk/Makefile:127,.github/workflows/release-packages.yml:47-51,.github/workflows/c-cpp.yml,tools/ci/check-package-deps.sh:80-89. -
Q: Issue #219 (4.3, F-DEP-102/203..206/F-CI-013) — the
.debDepends:and the.rpmspec contradicted the build (hardlibpcap0.8/libnghttp2-14nothing links, noRequires:/BuildRequires:,Version:/Release:inverted, libxml2 installed butENABLESECnever set). Hand-maintained lists were the root cause — how are the declarations kept honest now, and which side moved for the libxml2/ENABLESEC disagreement? A: The declarations are derived, not maintained.tools/ci/shlib-deps.shreads theNEEDEDentriesobjdump -preports for the staged.sofiles and maps each soname to the package providing it (libc6 (>= $MMT_GLIBC_MIN),libstdc++6 (>= $MMT_LIBSTDCXX_MIN),libgcc-s1,libxml2, …;glibc >= …,libstdc++ >= …,libgcc,libxml2, … for rpm), failing the package build on an unmapped soname. Bothsdk/Makefilestanzas consume it:Depends: $$depsandRequires: $$reqs. Consequences that fell out:libpcap0.8 | libpcap0.8t64andlibnghttp2-14disappear (the shipped examples are sources, not binaries, and--as-neededdrops-lnghttp2anyway since nothing callsnghttp2_*);libxml2appears becausebuild-package.shnow passesENABLESEC=1— the AC’s either/or resolved toward building the engines, which also repairs the danglinglibmmt_fuzz/libmmt_securitysymlinks--private-prepare-build-diralways emitted.libpcap-dev/libpcap-develstay as build deps becausesrc/mmt_security/public_defs.h:18includes<pcap/pcap.h>(types only — nopcap_*call, so no runtime dep). The rpm spec gotVersion: $(VERSION)/Release: $(GIT_VERSION)(the AC’s “ordered as Debian does”) plus aBuildRequires:mirroringinstall_build_deps_rhel()floored atMMT_GCC_MIN.check-package-deps.shgained--verify-package, run insidebuild-package.shper artifact:dpkg-deb -f/rpm -qpoutput is compared against the derived set and the build fails on divergence; it also left theverify-helpersadvisory loop for a blocking step inc-cpp.yml.README.md’s package section now names exactly the five matrix targets (Ubuntu 22.04/24.04, Debian 12, Rocky Linux 9, CentOS Stream 9) — the broader distro list that stays describesinstall.sh’s package-manager detection, which genuinely supports them. Source:tools/ci/shlib-deps.sh,tools/ci/check-package-deps.sh,tools/ci/build-package.sh,sdk/Makefiledeb/rpmtargets,src/mmt_security/public_defs.h:18,.github/workflows/c-cpp.yml,README.md. -
Q: Integration #177 — after merging all 23 stacked branches the coverage CI job failed at 78.2% vs the committed 85.0% floor, even though no suite lost instrumentation (9 files ≥ 6). Is the floor being lowered to silence a failure, or re-baselined? A: Re-baselined, and the distinction is recorded here.
tests/coverage/floor.jsonnow readslibrary_line_pct: 76.0/instrumented_files: 9(measured 78.2%, same ~2pt gcc-attribution margin as the previous 85.0-vs-87.1). The aggregate moved for two structural reasons, not lost coverage: the #210/#215/#212 work added thedicom,ndn_dissectorandavlsuites which instrumentdicom.c,ndn.candavltree.cfor the first time, and the #200hash_utils.cpprewrite added defensive branches the suites do not yet exercise — both grow the denominator. Theinstrumented_filescounter (which fails on any drop) remains the guard against suites silently losing instrumentation; the percentage ratchet continues from 76.0 going forward. Source:tests/coverage/floor.json,tests/coverage/summary.json,tools/ci/check-coverage-floor.sh,tests/run_all_tests.sh. -
Q: Integration #177 —
internal_decls.hmirrorsndn.h’sndn_tlv_tfor the phase0 harnesses, but the merge kept the pre-#205 layout (uint16_t node_offset/data_offset) while the library widened both fields touint32_t. Tests readingn->data_offsetthrough the stale layout saw wrong bytes and reported parser failures even thoughndn_TLV_parser()was correct. How is this class of drift caught? A: The mirror was corrected to theuint32_tlayout, matchingndn.hfield-for-field (tools/phase0/tests/internal_decls.h:347-354). The file’s own header already warns that the structs mirrorndn.hand must be kept in step — this failure is what the warning is for. There is no automated layout check; the ndn harness failing its valid-length-form checks while a direct probe passed was the diagnostic signature (ABI mismatch, not parser bug). Source:tools/phase0/tests/internal_decls.h:347-354,src/mmt_tcpip/lib/protocols/ndn.h,tools/phase0/tests/ndn_test.c. -
Q: Integration #177 —
check-package-deps.sh --verify-packageruns inside the distro build containers, but its embedded verifier is Python and minimaldebian:12/ubuntu:22.04/rockylinux:9images ship nopython3. Where should the interpreter come from? A: From the container itself —build-package.shalready centralises the per-distro build-dep installs (install_build_deps_debian/install_build_deps_rhel), sopython3was added to both lists alongside the existingbinutils/dpkg-dev/rpm-buildentries the verify leg also needs. The check stays in-container (blocking, per issue #219) rather than moving to a host step, because the payloadsdk/libtree anddpkg-deb/rpmtooling it cross-checks only exist there. Source:tools/ci/build-package.sh:48-80,tools/ci/check-package-deps.sh:71-73.
2026-09-15
-
Q: Issue #220 (4.4, F-CI-011) —
sdk/MakefiledefinesBUILD_DIRtwice: line 5 with a`date +%s`wall-clock suffix and line ~105 withmmt-dpi_$(VERSION)_$(GIT_VERSION)_$(SYS_NAME)_$(SYS_VERSION). Which one actually names the staging path, and where does the wall-clock stamp live? A: GNU make keeps the LAST definition, so the line-105 form already named the staged tree and produced the artifacts; the line-5 definition was dead but still stampeddate +%sinto nothing. It is replaced in place by a comment pointing at the package-target definition (removing the line outright would shift everysdk/Makefile:Ncitation pinned byscripts/validate-agent-environment.sh). The remaining wall-clock stamps were the deb controlBuilt time:and rpm specBuild date:datecalls — both now print$(BUILD_DATE), the human-readable form ofSOURCE_DATE_EPOCHresolved once inrules/common.mk(honoured when exported, elsegit log -1 --format=%ctof the checked-out commit). Source:sdk/Makefile:4-5,105,189-193,227,246-252,rules/common.mk(trailing reproducible-builds block). -
Q: Issue #220 — where should “missing git history is a hard error in CI” live so that local tarball builds (no
.git) keep working? A: Two layers, both keyed onCIbeing non-empty (GitHub Actions exportsCI=true; the workflow now forwards it into the build containers viadocker run -e CI).rules/common.mkerrors at parse time whenGIT_VERSIONorSOURCE_DATE_EPOCHis underivable — covering every make invocation, not just packaging; locally the same tree getsGIT_VERSION := nogit(a deterministic marker, not a date) plus a warning that stampsSOURCE_DATE_EPOCH := nowso tarballmake debstill works.tools/ci/build-package.shindependently fails when it cannot resolveGIT_VERSIONandCIis set — the previousdate +%Y%m%dfallback there was the exact silent drift F-CI-011 names; the envGIT_VERSION=override stays as the explicit escape hatch for tarball packaging. Source:rules/common.mk(trailing block),tools/ci/build-package.sh,.github/workflows/release-packages.yml(-e CIon the docker run lines). -
Q: Issue #220 — byte-identical .deb needed more than SDE-derived metadata: which non-determinism did the double-build actually show, and what fixed it? A: Three sources: the ar-member and tar-member mtimes
dpkg-debrecords straight from the staged filesystem, the builder’s uid/gid embedded in the tar headers, and theBuilt time:string. Fixed respectively byfind $(BUILD_DIR) -exec touch -h -d "@$(SOURCE_DATE_EPOCH)" {} +immediately before packing (-h because the staged libmmt_*.so symlinks dangle during staging),dpkg-deb --root-owner-group, and$(BUILD_DATE). The .rpm path gets the same mtime clamp plus--define "_buildhost mmt-dpi"(RPMTAG_BUILDHOST/cookie would otherwise leak the container hostname) andcp -rpin%prepso the staged mtimes survive into the buildroot; rpm ≥4.13 honours the exportedSOURCE_DATE_EPOCHfor the header build time and payload clamp on its own. Source:sdk/Makefile:189-193,232,246-252, empirical double-build on dpkg 1.22.6 (byte-identical sha256). -
Q: Issue #220 (F-CI-010) — the AC wants “the release-prep validator” run as a gate in the release flow, but two candidates exist:
tools/ci/check-release-verification.sh(wired as a static check in c-cpp.yml) andscripts/validate-release-prep.sh(the one that “only asserts a version string exists” via the doc-validators glob). Which runs in the gate? A: Both. Theverify-tagjob in release-packages.yml runscheck-release-tag.sh(new: requires the pushed tag to equalv$(VERSION)from rules/common.mk), thencheck-release-verification.sh, thenvalidate-release-prep.sh— the issue text matches the latter’s description while the known-facts name the former, and running both costs seconds.releasenowneeds: [build, reproducibility, verify-tag], so a tag/version mismatch or a validator failure blocks every publish step. Source:.github/workflows/release-packages.yml(verify-tagjob,release.needs),tools/ci/check-release-tag.sh. -
Q: Issue #220 — the .rpm still differed after
_buildhost,use_source_date_epoch_as_buildtimeandclamp_mtime_to_source_date_epoch: which field was left, and why did .deb pass first? A: Nothing in the rpm header — RPMTAG_BUILDTIME/COOKIE/BUILDHOST all matched. The five shippedlibmmt_*.aarchives differed in exactly 42 member-header bytes each: GNUarrecords each.o’s mtime in its member header, and RHEL-family binutils defaults to non-deterministic archives while Debian/Ubuntu binutils is configured--enable-deterministic-archives— which is why the deb leg passed before anyarflag was considered.AR := ar rcsD(deterministic mode) in the GNU-ar arch files removes the dependence on each distro’s configure-time default;arch-osx.mkkeepsrcsbecause BSDaris already deterministic and rejectsD. Verified: byte-identical sha256 across two clean builds in the pinned Rocky 9 image. Source:rules/arch-linux-gcc.mk:4,rules/arch-linux-clang.mk:4,rules/arch-linux-icc.mk:4,rules/arch-win32.mk:6,rules/arch-win64.mk:6,sdk/Makefile:246-253. -
Q: Issue #221 (4.5, F-DEP-201) — for the vendored http_parser → llhttp migration: which llhttp version is adopted, does it move the task-4.2 toolchain floor, and which API differences are load-bearing for this codebase? A (spike): Adopt llhttp v9.4.3 (generated C sources from the
release/v9.4.3tag:include/llhttp.h,src/llhttp.c,src/api.c,src/http.c); it does not move the floor — the generated code is freestanding C89/C99 against the GCC ≥ 11 / glibc ≥ 2.34 / libstdc++6 ≥ 11 contract inrules/common.mk:481-483. The load-bearing differences:llhttp_executereturnsllhttp_errno_tnot a byte count (nparsed →llhttp_get_error_pos);llhttp_initdoes not preserveparser->data(http_parser_init did —proto_http.c:395-396relies on it), so reset-on-error maps tollhttp_reset; strictness is always compiled in with per-parserllhttp_set_lenient_*runtime opt-ins, which retires the F-BUG-060 class of bug (strictness gated on a build flag); callbacks return0/-1/HPE_PAUSED/HPE_USERper class, and pause/resume isHPE_PAUSED+llhttp_resume/llhttp_resume_after_upgrade. Full symbol map and diff inventory:docs/llhttp-migration.md. Source:src/mmt_tcpip/lib/http_parser_integration.{c,h},src/mmt_tcpip/lib/protocols/proto_http.c:370-398,rules/common.mk:173-183,481-483,docs/AGENT_ENVIRONMENT.md§1, nodejs/llhttpinclude/llhttp.h+src/native/api.c+ README API section + releases. -
Q: Issue #223 (4.7) — the
src/mmt_mobile/asn1c/tree claimed “asn1c-0.9.29” in a header comment but no single published asn1c revision regenerates it: the module.cfiles carry the-gen-PERcommand line andtd->encoding_constraints.general_constraints(vlm_master before the 2020-07-07 upstream merge 8ac149d3), whilecommon/asn_constant.hcarriesmin_val_/max_val_defines and ngap headers carry prefixed extern decls that only exist on the NR-RRC side lineage (755cadaa/1b8943a2, no-gen-PER). Which revision does the reproducibility gate pin, and what does “reproduces” mean for a mixed-vintage tree? A:mouse07410/asn1c @ dbd0ed0983a7b412ada27cb279f7823dcb381e80— the last vlm_master first-parent commit before 8ac149d3 — is pinned insrc/mmt_mobile/asn1c/ASN1C_VERSION(repo, ref, version string, tarball sha256) and consumed by.github/workflows/asn1c-regen.yml. It reportsASN.1 Compiler, v0.9.29, still accepts the recipe’s-gen-PER(removed at b5ed2c1f) and reproduces every module.cfile byte-for-byte; the residual delta (unprefixed ngap.hextern decls, dep-drivenEXTERNAL/GraphicString/ObjectDescriptorskeletons,asn_constant.hwithoutmin_val_) was regenerated once and committed as the new baseline, so from here on the tree is the deterministic output of the pinned recipe. The recipe gainedmkdir -p/mv -fand acommondependency ongen-ngapso the targets are idempotent; the CI job runsmake -C src/mmt_mobile/asn1c clean gen-s1ap gen-ngapinsidebuildpack-deps:bookwormweekly on the Task 0.8 schedule and fails when the stagedgit diff --statof the tree is non-empty. Verified: SDK builds,tests/run_all_tests.sh16/16, phase0 classification fingerprint unchanged. Source:src/mmt_mobile/asn1c/ASN1C_VERSION,src/mmt_mobile/asn1c/Makefile,.github/workflows/asn1c-regen.yml, generated file headers (asn1c -D ./common -gen-PER ...argv echo), mouse07410/asn1c history (8ac149d3, b5ed2c1f, 755cadaa). -
Q: Issue #233 (6.2, F-CLEAN-002) —
verify()must drop to ≤3 parameters with a context struct for its invariant arguments, but only 6 of its 9 are truly invariant (pkt,curr_root,list_of_tuples,reference,cause,current_packet_time);leftleft,contextandrall vary across the recursion. Which varying argument folds into the struct? A:leftleft. It is a latch-once flag: the whole traversal propagates it unchanged except the single site where a THEN node whose left branch just validated drops to its right branch (delay_min == 0 && not_equal_min == NO), which passesNO.verify_ctx_ttherefore carries the six invariants plusleftleft, andverify(verify_ctx_t *ctx, short context, rule *r)keeps the genuinely per-levelcontext(the parent’s temporal situation, re-read by leafstore_tuples) and the cursorras parameters. The one deviation site setsctx->leftleft = NO, recurses, then restores it from aconst short leftleftlocal taken at function entry — restore is required because AND/OR/NOT parents loop over several children through the samectx.contextwas not folded in because every child of an OR/AND/NOT node receivessituation == 0today, so mutating a shared field per call site would have added 15 writes for no gain. Source:src/mmt_security/tips.c(verify_ctx_ttypedef andverify()at ~4326, deviation site ~4395, callers ~4720/~4772),tools/ci/param-count-tips.txt.
2026-09-16
-
Q: Issue #237 (6.6, F-CLEAN-004/F-CLEAN-015) —
mmt_classify_irc_tcp()was a 449-line function at nesting depth ~12-13. How is it flattened without changing classification behaviour, and how is the misspelled exported helpermmt_search_irc_ssl_detect_ninty_percent_but_very_fasthandled without breaking ABI? A: The function is split into stage helpers that preserve the original sequential short-circuit order:mmt_irc_touch_detected_peer(per-hostirc_tsrefresh),mmt_irc_match_dcc_port(sport/dport vs remembered DCC ports),mmt_irc_scan_server_names(packet-2 server-name traces), the SSL signature dispatcher,mmt_irc_scan_command_stage(:-line counting plus the USER/NICK/… state machine),mmt_irc_check_http_post/mmt_irc_check_http_login(web-IRC login), andmmt_irc_process_detected(the olddetected_irc:tail). The twogoto detected_ircsites becomemmt_irc_process_detected(ipacket); return;and thegoto read_privmsgbecomes ahave_privmsgflag, so every extracted block keeps identical side effects and order — verified by an unchanged phase0 golden fingerprint. The duplicated “second NICK/USER signal word” scan (windowsline[]vs unixunix_line[]) is now the single helpermmt_irc_line_has_second_signal(lines, parsed); the DCC port-parse/save duplicated forsrc/dstis nowmmt_irc_read_dcc_ports+mmt_irc_save_dcc_port. The exported helper is renamedmmt_search_irc_ssl_detect(dropping the “ninty” typo and the unverifiable “90% accuracy” claim); the old name stays as an exported__attribute__((deprecated))alias delegating to the new one — ABI-stable, removal recorded for release 2.0.0 per the “future major version” convention from #149. The comparatorcomp2insrc/mmt_security/tips.cis renamedcompare_valueswith descriptive locals (u16_1/u32_1/u64_1/date_1/tv_1/fval_1… instead ofs1/l1/ll1/c1/d1/t1/f1). Source:src/mmt_tcpip/lib/protocols/proto_irc.c(helpers at ~383-942, deprecated alias at 372-380),src/mmt_security/tips.c(compare_values),tests/rule_engine/test_overflow_family.c,docs/Exported-Symbols.mddeprecation note. -
Q: Issue #241 — the new
core_enginesuite raisestests/coverage/floor.jsoninstrumented_files9 → 17 whilelibrary_line_pctstays at 76.0: is the files counter honest, and why does the line floor not move? A: The suite source-compilespacket_processing.c,hash_utils.cpp,memory.c,hashmap.c,mmt_data.c,mmt_inet_ntop.c,proto_meta.c,plugins_engine.c,extraction_lib.candmmt_init.cwith--coverage, so the tracefile grows by the eightSF:records only this suite’s objects can emit — the engine sources above plus the private/public headers whose inline functions they instantiate (packet_processing.h,mmt_core.h);hashmap.c/memory.c/mmt_inet_ntop.cwere already counted by their own suites. Measured 78.3% over 17 instrumentedsrc/files. The instrumented-files floor ratchets to 17 as the guard against the suite silently losing instrumentation; the line floor stays at 76.0 because the new files are large and only partly exercised — the same ~2pt gcc-attribution margin convention from the #177 re-baseline applies. The same commit fixesinternal_handler_iterator_callback(src/mmt_core/src/packet_processing.c:372), which read->argsthrough the 3-fieldinternal_attribute_iterator_struct— offset 16, eight bytes past the end of the 16-byteinternal_handler_iterator_structstack object — instead of the correct 2-field type. Source:tests/core_engine/run_tests.sh(C_SOURCESlist),tests/coverage/floor.json,tests/coverage/summary.json,src/mmt_core/src/packet_processing.c:356-373,435-440. -
Q: Issue #249 (8.10, F-DOCS-014) — the 2026-07-21 entry above records “Fix all three issues” for
Compilation-and-Installation-Instructions.md, including removal of the invalid Homebrew packages (libpth-dev,ldconfig), but the macOS<details>block carryingbrew install … libpth-dev … ldconfig— and a sibling Windowsmingw-w64block — are still in the tree. Apply the recorded fix or keep the sections? A: Apply it, late. The unsupported-platform instruction blocks (Homebrew formulas andARCH=osx/ARCH=win32|win64builds) are deleted fromCompilation-and-Installation-Instructions.md; the platforms they describe are documented as unsupported (AGENT_ENVIRONMENT.md:22— “Only Linux is supported”) and the make rules they relied on (rules/arch-osx.mk,rules/arch-win32.mk,rules/arch-win64.mk,rules/common-windows.mk) were removed in #228, so the instructions could only produce a failing build. The “macOS and Windows are not supported” note stays and now records the deletion. With the sections gone, the 2026-07-21 entry’s claim is finally true of the tree; the gap between that record and the tree is what F-DOCS-014 tracked. Source:docs/Compilation-and-Installation-Instructions.md(unsupported note),rules/listing (no arch-osx/win32/win64),docs/AGENT_ENVIRONMENT.md:22,docs/troubleshooting.md2026-09-16 correction entry. -
Q: Issue #251 (8.1, F-PERF-016) — the benchmark must separate library RSS from harness RSS: does the throughput driver stream the trace or keep the preload, and how is each share measured? A: Keep the preload — it is what removes pcap/disk I/O from the timed loop — and subtract its cost explicitly by sampling live RSS (
/proc/self/statusVmRSS, which reflects the resident set at call time;getrusageru_maxrssis a monotonic high-water mark and cannot attribute deltas). The driver reportsharness_rss_kib(VmRSS delta across the trace slurp),library_rss_kib(VmRSS delta on top of the preload, peaked across iterations while each fresh handler’s session/reassembly state is still allocated) andpeak_rss_kib(ru_maxrss, for context). Measured on the reference host: the bigFlows process peak (~448 MB, the figure the old report charged to the library) resolves to ~394 MB harness preload plus ~52 MB library over 200 iterations. The M4 ceiling (tools/phase0/ci/baseline/memory.txt, 64 MiB) gates the ~24.4 MiB the library reaches on the CI pcap subset via the auto-enumeratedharness-run_memory_ceiling_test.shjob; the post-change recapture on the same host moved bigFlows pps +1.2% (stated tolerance ±5%). Source:tools/phase0/phase0_throughput.c(RSS samplers and report),tools/phase0/tests/run_memory_ceiling_test.sh,tools/phase0/ci/baseline/memory.txt,tools/phase0/baseline/perf/throughput.txt. -
Q: Issue #222 (4.6, F-DEP-201) — executing the llhttp migration guide: the release tarball ships
src/api.candsrc/http.cnext tosrc/llhttp.c, butsrc/mmt_tcpip/lib/protocols/already has anhttp.c; also, does the HTTP_PARSER_STRICT build knob survive, and how does the F-BUG-058 white-box harness read parser state when llhttp has nonread/statefields? A: The four generated sources are vendored under namespaced names — upstreamsrc/api.c/src/http.cland asllhttp_api.c/llhttp_http.cso the flatlib/directory stays unambiguous (the protocol directory’s ownhttp.c/http.ois untouched); contents are byte-verbatim plus the VENDORED banner, andtools/ci/vendor-paths.txtmaps each renamed file back to its upstream path at pinrelease/v9.4.3.HTTP_PARSER_STRICTis removed rather than kept as a dead-D: llhttp compiles strict checks in unconditionally, so the knob could only mislead — the F-BUG-060 failure mode (strictness silently dropping out of a build flavour) is now impossible by construction, and leniency is a documented per-parser runtime opt-in (llhttp_set_lenient_*). The harness reads_current— llhttp’s public-but-underscored state-machine field, seeded to the start state byllhttp__internal_init()and restored byllhttp_reset()— as the direct analog of http_parser’sstate/nreadassertions, andllhttp_get_errno()forhttp_errno. Driver contract atproto_http.c:llhttp_executereturnsllhttp_errno_t(HPE_OK== all bytes consumed), upgrade surfaces asHPE_PAUSED_UPGRADE/llhttp_get_upgrade, and reset-on-error isllhttp_reset, which preservesdata/settings/type exactly as required. Verified:make -C sdkdefault +ENABLESEC=1clean,tests/run_all_tests.sh17/17,SANITIZE=asanhttp_header_case clean, phase0 golden fingerprint unchanged, ASan session/pcap/leak harnesses pass. Source:src/mmt_tcpip/lib/llhttp{,_api,_http}.c+llhttp.h(vendored v9.4.3),src/mmt_tcpip/lib/http_parser_integration.{c,h},src/mmt_tcpip/lib/protocols/proto_http.c:370-399,tools/phase0/tests/http_session_test.c,tools/ci/vendor-paths.txt,rules/common.mk:173-178,docs/llhttp-migration.md§4–§6. -
Q: Issue #232 (5.8, F-DEAD-007/008/013/015, F-CLEAN-016/017) — for the marker triage, which TODO/FIXME/XXX/HACK comments survive and how are the four deprecated public symbols scheduled? Is the hand-maintained
changelog.htmlkept, generated at release time, or deleted? A: Marker triage: every surviving marker now carries an issue reference inTODO(#N)form — the genuine open questions were filed as #326–#336 (and #245 for the duplicate-TCP-segment policy, #87 for the classification-strategy TODOs), while 10 stale/noise markers were deleted and 3 false positives (XXXXXXmkstemp templates, aHACKEDtest string,XXX…XXXdebug delimiters) were reworded or excluded by switchinglint-markers.shto whole-word matching.tools/ci/marker-baseline.txtratchets 188 → 170 and--strict(every marker referenced) is now the CI mode. Deprecated symbols: the four from the #149/#237 notes indocs/Exported-Symbols.md(setDataLinkType,get_attribute_extracted_data_encap_index,mmt_print_all_protocols,mmt_search_irc_ssl_detect_ninty_percent_but_very_fast) are all scheduled for removal in release 2.0.0 — recorded inCHANGELOG.mdunder an unreleased 2.0.0 heading, and the threemmt_core.hdeprecation attributes/comments that previously said “a future version” now name 2.0.0 to match the IRC alias.changelog.html: deleted — it was a hand-synced HTML render ofCHANGELOG.mdwhose only consumer was the release checklist;docs/Prepare-for-a-new-released-version.mdnow namesCHANGELOG.mdthe single canonical changelog (supersedes the “changelog.html remains tracked” line in the .gitignore entry above). Commented-out code: all 56 detected blocks of ≥5 statement-like lines (635 lines) were deleted; the one genuine open question they carried (HTTP exclude-strategy, F-CLEAN-016) moved to issue #334 and is referenced fromhttp.c(mmt_classify_http, where the dead block sat).lint-commented-code.shmoved from the advisory loop to a blocking step inverify-helpers. Source:tools/ci/lint-commented-code.sh,tools/ci/lint-markers.sh,tools/ci/marker-baseline.txt,.github/workflows/c-cpp.yml(verify-helpers job),CHANGELOG.md,src/mmt_core/public_include/mmt_core.h(deprecation notes),docs/Exported-Symbols.md,docs/Prepare-for-a-new-released-version.md. -
Q: Issue #234 (6.3, F-CLEAN-002) —
verify()had to become one handler per node type with every derived function at <=60 lines / depth 4, but the THEN arm alone was ~143 lines at depth 7 and several case tails deliberately fall through to a shared “Error 40” diagnostic. How is it split without changing a single verdict or stderr line? A:verify()is now a dispatcher onr->valuedelegating to static handlers:verify_then(situation picker —counter_max/delay_max> 0 => AFTER,counter_min/delay_min< 0 => BEFORE, else SAME) oververify_then_{same,after,before}plus the per-state pairsverify_then_{after,before}_{pending,valid};verify_or,verify_and(+verify_and_timeoutfor the armed-timer control andverify_and_sonfolding each pending son’s verdict into the node flags),verify_not(+verify_not_backtrackfor the no-right-sibling ancestor climb) andverify_leaf. The shared fall-through tail (Error 40 +NOT_VALID) becameverify_malformed_rule(), called by each handler at exactly the points the originalbreakreached it, so the two-line error pairs (e.g. Error 26 then Error 40) print in the same order. OR/AND/NOT children keep receiving theBEFOREsituation — the literal value of the original 0-initialisedsituationlocal they were always called with — while leaf evaluation keeps the incomingcontext.ctx->leftleftis read per handler instead of once per frame; the recursion-restores-before-return invariant from #233 makes the values identical. Verified by a byte-identical stdout+stderr verdict trace over the golden pcap corpus with a ruleset exercising every arm. Source:src/mmt_security/tips.c(verify()dispatcher andverify_*handlers at ~4342-4809),tools/ci/function-shape-tips.txt,tools/ci/param-count-tips.txt.
2026-09-17
-
Q: Issue #239 (6.8, F-CLEAN-008) —
packet_processing.cwas a 4,728-line TU mixing handler registration, packet pipeline, session lifecycle and statistics; issue #240 still needs the session/statistics half extracted. Where is the seam so this split lands atomically without stranding cross-TU symbols or pre-empting #240’s boundary? A: Three units:packet_registry.c(1,935 lines — protocol/handler/attribute registration, protocol-stack map,init_extraction/close_extraction,mmt_init_handler/mmt_close_handler, and theconfigured_protocols/mmt_configured_handlers_map/configured_protocols_names_mapglobals plus their mutexes, which travel with the only functions that touch them),packet_pipeline.c(1,121 lines —internal_extract_attribute, extracted-attribute accessors, classify/analyse dispatch,process_packet*/packet_process,clean_packet*, caplen-guard counters,generic_data_extraction), and a 1,663-linepacket_processing.cretaining session lifecycle/timeout plus protocol statistics — deliberately the exact slice #240 will split next. Boundary symbols are declared once inprivate_include/packet_processing.h:proto_status_load/proto_status_store(the issue-#69 relaxed-atomic helpers moved to the header so all three TUs share them), session/statistics entry points used by the other units (process_timedout_sessions,force_sessions_timeout,proto_session_management,update_proto_stats_on_{packet,new_session},free_handler_protocols_statistics,register_protocol_{stats,session}_attributes) and registry lookups used by the pipeline (attribute_ids_comparison_fct,get_registered_attribute{,_internal_struct}). Four helpers loststatic/static inlinefor cross-TU linkage (process_timedout_sessions,get_registered_attribute,update_proto_stats_on_packet,update_proto_stats_on_new_session).packet_processing.c’s two_is_valid_protocol_id()call sites switched to the publicis_valid_protocol_id()wrapper (the private macro stays local to the registry, which owns the table it guards). Noexternlines in.c; identical warning count (44) across the three units; phase0 golden fingerprint unchanged. Source:src/mmt_core/src/packet_{processing,pipeline,registry}.c,src/mmt_core/private_include/packet_processing.h(internal prototypes block),tests/core_engine/run_tests.sh(C_SOURCES). -
Q: Issue #248 (8.9, F-UX-003/F-DOCS-016) — the README said “200+ protocols” while the site title/meta/hero/FAQ said “643”, and the site also claimed “6,334 attributes”. What is the true figure each public claim should quote? A: Neither old number was the registered-protocol count. 643 was a protocol identifier (
PROTO_CDP 643,src/mmt_tcpip/include/mmt_tcpip_protocols.h) mistaken for a count; “200+” was stale marketing. The count of record is what the engine registers at runtime: compilingsrc/examples/mmt_export_info.cagainst the installed SDK and running it with the full plugin set (libmmt_tcpip,libmmt_tmobile,libmmt_business_app,libmmt_tdicom— all dropped under$(MMT_BASE)/pluginsbymake install,sdk/Makefileinstall target) printsNumber of protocols,669(UNKNOWN and META excluded,src/examples/mmt_export_info.c:60) andNumber of attributes (all),7,429. All five public sites now quote 669, and the site’s attribute claims quote 7,429 (the “no repeat” de-duplicated figure, 1,417, is not the public-facing claim — the registered-attribute total is what users can register by name).docs/PROTOCOLS.md’s “649 registered protocol initializers” is a different, already-generated metric — theMMT_PROTO_INITrows ofsrc/mmt_tcpip/lib/proto_init_list.def— and stays labelled as such; the plugin protocols register on top of it, which is why the runtime total exceeds it. Source:src/examples/mmt_export_info.c(enumerator),src/mmt_core/src/plugins_engine.c:35(load_plugins),rules/common.mk:7(MMT_PLUGINS),sdk/Makefile(plugin install lines),tools/gen-protocol-list.sh. -
Q: Issue #248 (8.9, F-UX-011) — README and docs/index.html each maintained their own copy of the feature list, quick-start and first C example, and they had drifted. Keep syncing two copies, make one a link, or make one canonical source with the other including it? A: Canonical fragments + CI-guarded embeds. The three blocks live once under
docs/_includes/{key-features,quick-start,first-example}.md. README embeds each between<!-- begin-shared: … -->/<!-- end-shared: … -->markers (raw HTML can’t transclude, so the marker convention plustools/ci/check-doc-includes.shis the enforcement — it fails CI when the embedded copy differs from the fragment, and--writeresynchronises it).docs/index.htmlhas Jekyll front matter, so Liquid runs: each block is{% capture %}…{% include … %}{% endcapture %} | markdownifyrendered in place — the landing page keeps its design (the feature grid became a styled two-column list; the tier-1 code panel renders the canonical minimal example) while containing zero duplicated prose. A side benefit:changelog.htmlwas already deleted in #232, so the only surviving hand-sync risk was these three blocks, and it is now mechanically excluded. Source:docs/_includes/,README.md(marker blocks),docs/index.html(capture/include sites),tools/ci/check-doc-includes.sh,.github/workflows/c-cpp.yml(verify-helpers blocking steps). -
Q: Issue #254 (8.5, F-PERF-011/012/013) — replacing the tree-based timeout index and interned-IP registry: how do the open-addressing tables reproduce the old map semantics (equality, insert-only contract, OOM behaviour), and how does a timing-wheel ring cover runtime-configurable timeout spans without hot-path allocation? A: All three stores now share the open-addressing layout the per-flow session store already used (issue #17): 16-byte slots, linear probing, NULL/0x1 key sentinels for the
void *table and a per-slot state byte for theuint32_ttable (int keys span the whole range, so no sentinel is safe). Equality is derived from each map’s strict-weak-ordering comparator exactly as the ordered tree computed equivalence (!cmp(a,b) && !cmp(b,a)), and every caller now passes a comparator-consistent hash —init_map_space(comp, hash)gained the second parameter;init_int_map_spacehashes the raw key since every registered int comparator isa < b. Inserts keep the no-overwrite contract (0 on duplicate), deletes tombstone, and the F-PERF-011 fix is the shrink: removal rehashes to half capacity below 25% occupancy (hysteresis against the 70% grow watermark) and clear/reset drops the slot array back to the initial 16 so a burst’s memory is actually returned (a multi-MB slot array is an mmap’d block — freeing it reaches the OS, not just the allocator cache). The timeout index is a timing wheel —slot = milestone & (cap - 1), one intrusivenext/previouslist per live milestone — so insert/update/delete/lookup are O(1) with zero allocations; the ring grows (power-of-two rehash of slot arrays, bounded at 2^22) only when two live milestones would collide, i.e. the live span outgrew capacity, and growth failure degrades to the same 0 return the old bad_alloc path produced. Verified:grep -c 'std::map' src/mmt_core/src/hash_utils.cpp= 0;tools/phase0/tests/session_scale_test.cbursts 100k real sessions, counts 0 allocations across 400k+ timeout-index ops, and returns RSS within 0.4% of pre-burst (gate: 20%); full suite 17/17, ASan suite 17/17, phase0 fingerprint unchanged, bigFlows pps +3.5% and smallFlows +9.2% on the same host. Source:src/mmt_core/src/hash_utils.cpp(mmt_oa_table/mmt_int_map/mmt_timeout_ring),src/mmt_core/private_include/hash_utils.h,src/mmt_core/src/packet_registry.c(alias_names_hash/pointer_hash_fn),src/mmt_tcpip/lib/protocols/ip_session_id_management.c(ipv4_addr_hash/ipv6_addr_hash),tools/phase0/tests/session_scale_test.c. -
Q: Issue #227 (5.3, F-DEAD-011) — the issue says to “leave the genuinely distinct ones with a one-line comment”, yet the verify command
count-init-wrappers.sh --strictfails unless zerommt_init_classify_me_*definitions remain; and its 2+-detection-add wrappers all share one normalised shape that a ≥3-repetition gate would flag wherever they land. How do both hold at once? A: Everymmt_init_classify_me_*wrapper (and quic_ietf’s look-alike_init_bitmask) is deleted — the strict counter demands it — while the distinct logic survives inside the registeredinit_proto_*_structcall sites. Shared shapes ride the generic helpers: single-add cases (ssl, quic_ietf) use #226’smmt_init_classify_bitmasks(), and multi-add cases use a newmmt_init_classify_bitmasks_multi()taking a(const uint32_t[], count)pair, so no repeated logic block exists for a normalised-body histogram to flag (helper call sites are the dedup mechanism, not duplicated blocks). Only two raw init statements survive the gate’s scan, each unique and commented: jabber’s second exclusion (PROTO_TRUPHONE— the helpers save exactly one excluded protocol) and http’s ~370-entry HTTP-based detection list, which stays in http.c as the renamedmmt_http_init_detection_bitmask()because the bitmask globals are TU-local there. Two redundantMMT_BITMASK_RESETs immediately beforeMMT_SAVE_AS_BITMASK(msn, http) were dropped — the save already zeroes every word — and ssl’s commented-out duplicate line went with them.check-canonical-init-wrappers.shgained the normalised-body report as phase 2 (asserts <3 repeats + comments present),count-init-wrappers.shgrew|| trueso its own--strictmode can actually reach the 0 state (xargs/grep exit 123 on zero matches), and both now run in the CI ratchet step. Source:src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h(both helpers),src/mmt_tcpip/lib/protocols/*.c(folded call sites),src/mmt_tcpip/lib/protocols/http.c(mmt_http_init_detection_bitmask),tools/ci/check-canonical-init-wrappers.sh,tools/ci/count-init-wrappers.sh,tools/ci/init-wrappers-baseline.txt,.github/workflows/c-cpp.yml. -
Q: Issue #235 (6.4, F-CLEAN-003) —
tips.chad to split along four responsibilities into units of at most 1,500 lines, but its engine state was shared throughstaticglobals defined instruct_defs.h(one copy per TU) and 11 anonymous-enum variable definitions (}enum_operation;etc.) that would multiply-define at link time the moment a second TU included the header. Where does each state item live, and how do the enums keep working? A: Five units:tips_xml.c(XML loading —read_rules/processNode, rule-tree construction,create_boolean_expression, tokenize/tuple registration,get_xdata),tips_extract.c(pcap extraction and leaf evaluation —get_my_data/get_value/funct_get_params_and_execute,compare_values/compute/exists_or_not/get_data_from_pcap,get_seconds/get_useconds),tips_eval.c(rule evaluation — instance lifecycle,verify_segment,check_time/action,verify_left, theverify()dispatcher and all 15verify_*handlers from #234),tips_report.c(reporting —store_history/store_tuples,get_verdict,detected_corrupted_message,generate_command,rule_is_satisfied_or_not,print_summary/xml_summary), and a 299-line drivertips.c(init_sec_lib/init_options/open_file, the xmalloc/xcalloc/xfree wrappers,analyse_incoming_packet). Sizes: 1202/1326/1338/1260 lines — all under the 1,500 gate. State ownership followed the writer set:op,top_rule,packet_count,p_meta,a_utime,token2,token3are written across units so they got a single definition in tips.c plus extern declarations in the newtips_internal.h;bot_rule/root_rule/top_father/bot_fatherare touched only by the loader so they stay file-local in tips_xml.c, likewisecorr_mess/counter_detection(tips_report.c),temptemp(tips_eval.c),OutputFile/xallocated_memory_size(tips.c).struct_defs.h’sstaticblock was deleted outright — it had silently relied on tips.c being the only TU that included it. The}enum_x;declarators becametypedef enum { ... } enum_x;— the names were never used as variables (grep over src/ + tests/), only their constants were, so a typedef preserves them without emitting one object per TU (the link failure that first exposed the latent bug).verify_ctx_tand theverify()prototype moved intotips_internal.hwith every cross-TU prototype;grep -c '^extern ' src/mmt_security/*.c= 0. Sources are picked up by the existing$(wildcard src/mmt_security/*.c)in rules/common.mk — no build-system edit. Stale file:line references in tests/rule_engine/* and both tools/ci snapshots were re-pointed/regenerated (the four >200-line and four >6-param functions are unchanged, now just attributed to their new units — #236 scope). Verified: both build profiles green, 17/17 suites, SANITIZE=asan rule_engine PASS, phase0 classification fingerprint byte-identical. Source:src/mmt_security/tips.c,tips_xml.c,tips_extract.c,tips_eval.c,tips_report.c,tips_internal.h,src/mmt_security/struct_defs.h,src/mmt_security/public_defs.h,tools/ci/function-shape-tips.txt,tools/ci/param-count-tips.txt. -
Q: Issue #238 (6.7, F-CLEAN-005/006/010/011/014/018) — the AC for the shared L4 dispatch table says “
proto_ip.c… shrinks by at least 1,300 lines”, but #250 already split the IPv6 switch out intoproto_ipv6.c, and the two switches were not textually identical (IPv4 had protocol numbers 2→IGMP and 94→IPIP that IPv6 lacked). How is the single shared table defined, and which file does the line-count gate apply to? A: One designated-initializer tablemmt_ip_l4_proto_table[256]lives insrc/mmt_tcpip/lib/protocols/ip_l4_proto_table.incand is included once per TU (file-localstatic const, same data-unit pattern asproto_init_list.def). Unlisted numbers zero-init toPROTO_UNKNOWN(== 0), reproducing the olddefault:arms; the IPv4-only entries 2 and 94 are kept in the shared table and masked back toPROTO_UNKNOWNinip6_classify_next_proto(), so the byte-level mapping is identical to HEAD (verified across all 256 protocol numbers). The line-count gate is therefore measured on the pair: proto_ip.c −808, proto_ipv6.c −800, net −1,411 across the three files — the AC’s ≥1,300-line intent holds on the combined dispatch code. The same question applied toinit_tcpip_plugin(): its ~160REGISTER_INTER_PROTO_OR_FAILcalls becameinter_proto_classif_list.defexpanded intointer_proto_table[](order/content verified identical, 54-line function). Intcp_option_extraction()thedata_offset > 15check is dead by construction (doff is a 4-bit bitfield instruct tcphdr) andtcphdr_len < 20 || > 60is subsumed oncedoff > 5is required — both deleted.get_session_proto_path_direction()’s flag is nowmmt_session_direction_t(uplink = setup direction); its comments stated which returned path each branch yields, since the original text read “downloading data” on three of four branches including one returning the uplink path. Source:src/mmt_tcpip/lib/protocols/ip_l4_proto_table.inc,proto_ip.c(ip_classify_next_proto),proto_ipv6.c(ip6_classify_next_proto),src/mmt_tcpip/lib/inter_proto_classif_list.def,src/mmt_tcpip/lib/configured_protocols.c(init_tcpip_plugin),src/mmt_tcpip/lib/protocols/proto_tcp.c,http.c(http_detected_protocols),src/mmt_core/public_include/data_defs.h(mmt_session_direction_t),src/mmt_core/src/mmt_data.c. -
Q: Issue #240 (6.9, F-CLEAN-008 part 2) — where is the second seam through the 1,663-line
packet_processing.cso session lifecycle and statistics each get their own TU without stranding cross-TU symbols, and how does the 244-lineproto_session_managementmeet the ≤200-line/≤6-depth gate while satisfying “the ten-field initialisation is one named function called from the session constructor”? A: Two new units on the #239 pattern:packet_session.c(session expiry/timeout machinery —cleanup_timedout_sessions,force_sessions_timeout,session_timer_handler_callback,process_outofmemory_force_sessions_timeout,process_timedout_sessions,get_active_session_count, theset_*_session_timed_out/set_fragment_*/set_session_timeout_delaysetters,proto_session_management,process_session_timer_handler) andpacket_stats.c(theproto_*_extractionfunctions, the stats/session attribute-metadata tables withregister_protocol_{stats,session}_attributes,free_handler_protocol{s,}_statistics, enable/disable/isProtocolStatisticsEnabled, the_create/_get*_protocol_stats*helpers,print_protocol_stats,get_protocol_stats{,_path},update_proto_stats_on_session_timeout,reset_statistics,get_children_stats,reset_proto_stats,update_proto_stats_on_{packet,new_session}).packet_processing.ckeeps the proto-hierarchy/string helpers, protocol/attribute accessors, and themmt_*_snprintf/_fprintf/_formattail plusmmt_version(688 lines).proto_session_managementdecomposed intosetup_new_session— the session constructor (field init → timestamps → path copies → milestone insert → parent wiring →session_data_initcallback) — which callsinit_new_session_fields, the named function holding the raw zero-init block; a 127-line dispatcher remains. The constructor’s double-OOM destroy path returns 0 so the caller still reports “no new session”.update_proto_stats_on_session_timeoutgained apacket_processing.hprototype (stats TU → session TU call);reset_proto_stats’s forward declaration moved into packet_stats.c. The pre-existing depth-7register_extraction_attributein packet_registry.c (a #239 leftover that failed the issue’s whole-directory verify) was flattened to depth 4 via early return + else-if chain — behaviour identical. Two stale references from #239 re-pointed at packet_registry.c: the OOM guard’sinit_extractionscan (also updated to its currentboolreturn type) and the TSan suppressions comment namingconfigured_protocols_mutex’s file. Verified:report-function-shape.sh src/mmt_core/src/*.cclean, both build profiles green, 17/17 suites, phase0 fingerprint unchanged, Exported-Symbols.md in sync (451 exported symbols — every moved symbol kept its linkage). Source:src/mmt_core/src/packet_{processing,session,stats,registry}.c,src/mmt_core/private_include/packet_processing.h(internal prototypes block),tests/core_engine/run_tests.sh(C_SOURCES),tools/phase0/tests/run_oom_no_abort_test.sh,tools/phase0/tests/mt_tsan_suppressions.txt.
2026-09-17
- Q: Issue #255 (8.6, F-PERF-010/014/015) — the AC wants the session record ≥190 B slimmer with child statistics kept only for tunnel parents, but the 12
sub_*counters alone are 144 B; andmmt_reallocused the removed size prefix for its shrink short-circuit. Where do the remaining bytes come from, and what replaces the stored size? A:proto_path_direction[2](2 x 68 B) moves into the extension too. Those copies are only meaningful once a session parents an embedded session — until then each direction entry is either a verbatim copy ofproto_pathor empty, soget_session_proto_path_direction()on a leaf session now returns&session->proto_pathdirectly (semantically the same path; a never-observed direction used to read an empty copy, now reports the session’s actual path — strictly more informative and the only in-tree consumer ignores the result). The 280 Bmmt_session_children_stats_t(paths + 12 counters) is allocated lazily bymmt_session_get_children_stats()when a session first becomes a parent (setup_new_sessionembedded branch) or first takes a children-counter write (theparent_sessionwalks inpacket_session.c,proto_ip.c,proto_ipv6.c,mmt_tcpip_plugin_internal.h); under OOM it stays NULL and the update is skipped — counters degrade to 0 rather than aborting the packet path. Netsizeof(mmt_session_t): 1032 → 760 B (−272), pinned by a_Static_assertintests/core_engine. The block is released by the plugin session destructor (free_session_data,ip_session_id_management.c) — it is alwaysmmt_malloc‘d regardless of how the session block itself was allocated. For F-PERF-015 the prefix is removed outright rather than threading a caller-supplied size:mmt_malloc/mmt_realloc/mmt_freeare now plain libc pass-throughs (keeping the B5 NULL-on-OOM contract and themmt_realloc(p,0)free-and-NULL semantic), so every request reaches its natural size class (e.g. the 32 Bmmt_hent_tno longer lands in the 48 B class) andmmt_freeno longer touches the prefix cache line; a side effect is thatpacket_session.c’s double-OOMmmt_free(session)on themalloc‘d IP-session block — heap corruption under the prefix — becomes correct. For F-PERF-014 the two interleaved scalar loops resetting the sevenPROTO_PATH_SIZEarrays inprocess_packet/process_packet_with_reassemblyare onereset_ipacket_path_arrays()helper — sixmemsets plus the dense=1fillmemsetcannot express — which compiles to vector stores. Source:src/mmt_core/private_include/packet_processing.h(extension type + lazy helper),src/mmt_core/src/packet_session.c(init/parent-wiring/update walk),src/mmt_core/src/packet_pipeline.c(direction writer guard + reset helper),src/mmt_core/src/mmt_data.c(18 counter getters + direction-path fallback),src/mmt_core/src/memory.c(prefix-free allocator),src/mmt_tcpip/lib/protocols/{ip_session_id_management,proto_ip,proto_ipv6}.c,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h,tests/core_engine/test_core_engine.c.
2026-09-17
- Q: Issue #245 (8.3, F-PERF-003/004/005/006 + F-BUG-038) — bounding TCP reassembly while keeping the extracted image identical: how do segment ordering, duplicates, overlaps and sequence wrap behave once a consumed prefix can no longer be re-emitted, and how does the flattened buffer stay under a per-flow ceiling?
A: The pending store is a seq-sorted doubly-linked list carved from a reclaimable bump-block chain (
mmt_segblk_t, tcp_segment.h) — each block counts its live carved bytes so a fully consumed block is freed mid-flow instead of pinning memory to teardown (the old per-flow arena could only be released wholesale). In-order arrivals append through a per-direction tail pointer and strictly-reversed arrivals prepend at head — both O(1), sotcp_seg_insert()’s walk only runs for genuinely interior reorders and is bounded by the ceiling-limited pending window (instrumented viammt_tcp_reasm_insert_visits()). Ordering is wrap-aware (tcp_seq_before— signed 32-bit subtraction) so a stream crossing 2^32 keeps appending instead of re-sorting. The per-direction flattened image (mmt_tcp_reasm_t.image[]) is a persistent buffer grown geometrically and returned as-is: extraction drains only newly pending segments, so each payload byte is memcpy’d exactly once (mmt_tcp_reasm_bytes_moved()) and unchanged bytes are never recopied (the old path reallocated + recopied the whole list per read).mmt_session_t.tcp_reasmis a lazily-allocated extension — sessions without TCP payload keep one NULL pointer. The bound ismmt_handler->tcp_reassembly_limit(defaultMMT_TCP_REASSEMBLY_LIMIT_DEFAULT= 4 MiB,set_tcp_reassembly_limit(), 0 restores):live= pending carves + image bytes never exceeds it — segments are refused when the carve would overflow and counted viammt_tcp_reasm_bytes_dropped(). Two deliberate semantic resolutions: (1) once bytes are emitted into the image the consumed prefix is gone — a segment whose whole range lies below the emitted frontier (a late retransmission) is dropped rather than spliced mid-image, while a partially overlapping segment is still appended in full, preserving the pre-#245 sorted-concat output for overlapping ranges byte-for-byte; (2)ipacket->internal_packetin reassembly mode now aliases the shared per-protocol-context packet exactly like the non-reassembly path (the ~6.7 KB per-packet malloc+memset is gone — F-PERF-003), so a packet held past its callback sees scratch state overwritten by later packets — the same contract the non-reassemblycurrent_ipacketalways had; the pooledmmt_ipacket_slot_tstill gives a held packet its own ipacket + copy buffer untilmmt_drop_packet(). Per-packet protocol-offset snapshots moved from a per-layer heapproto_hierarchy_tinto the ipacket’s embeddedinternal_proto_headers_offset(F-BUG-002’s owned flag is never set on a pooled packet; the free guard stays as defence). Verified: both build profiles green, 17/17 suites (default + ASan; the rule_engine TSan failure reproduces on a clean tree — pre-existing), phase0 golden fingerprint byte-identical, valgrind clean, harness: 2048-packet in-order stream 9,446 → 617 ns/pkt, 2 packet allocations total, 0 list visits, bytes moved == stream bytes. Source:src/mmt_tcpip/lib/protocols/proto_tcp.c(offer/drain/image helpers + extraction rewrite),src/mmt_tcpip/lib/protocols/tcp_segment.c+src/mmt_tcpip/lib/tcp_segment.h(mmt_segblk store, wrap helpers, instrumented insert),src/mmt_tcpip/lib/protocols/proto_{ip,ipv6}.c(shared context packet),src/mmt_core/src/packet_pipeline.c(ipacket pool + counters),src/mmt_core/src/packet_session.c(embedded offsets, setter, lazy init),src/mmt_core/src/packet_registry.c(handler init + pool drain),src/mmt_core/private_include/packet_processing.h(mmt_tcp_reasm_t, mmt_ipacket_slot_t, stat decls),src/mmt_core/public_include/mmt_core.h(set_tcp_reassembly_limit, limit macro),tools/phase0/tests/{tcp_reassembly_perf_test.c,run_tcp_reassembly_perf_test.sh}.
2026-09-18
- Q: Issue #236 (6.5, F-CLEAN-003 part 2 + F-CLEAN-012) — the repeated
(pkt, curr_root, list_of_tuples, cause, packet time)bundles across the fivetips*.cunits had to collapse onto the #233verify_ctx_tand everyshort/intmode flag had to become a named enum, but several parameters were dead weight andfunct_get_params_and_execute’slist_of_tuplesis not the traversal’s. Which arguments fold onto the context, which are dropped, and which stay? A:verify_ctx_tgainedenum_yes skip_refs— the flagverify_segment,get_data_from_pcapandfunct_get_params_and_executeused to re-receive alongsidepkt/list_of_tuples— soverify_left,verify_segment,get_data_from_pcap,store_history,store_tuples,detected_corrupted_messageandrule_is_satisfied_or_noteach take the context instead of the bundle.verify_left’s left-branch probe setsskip_refs = YESso.EVENTtuple references stay symbolic there (the literalYESit used to pass toverify_segment), resolved against the rule’s owncurr_rule->list_of_tuples, not an instance’s. Dead parameters were dropped rather than threaded:short *reference(the verdict scratch flag, written at both ctx initializers but never read anywhere),use_causeandcauseinrule_is_satisfied_or_not(never referenced in the body),db_create_funct/db_insert_functininit_sec_lib(never stored),lib_name(alwaysLIB_NAMEat both call sites) andprint_option/packet_time_stamp(alwaysop->Print/pkt->p_hdr->ts— the callees read them fromop/ctxdirectly).funct_get_params_and_executekeeps its ownlist_of_tuplesparameter because the reaction path inrule_is_satisfied_or_notresolves tuples againstr->list_of_tuples, a different list than the traversal’sctx->list_of_tuples.init_sec_lib’s two selector shorts (option_satisfied/option_not_satisfied—(1,0)→SATISFIED,(0,1)→NOT_SATISFIED, else BOTH) became oneenum_print; its only in-repo caller is the rule_engine suite, which passed(1,1)→BOTH and now passesBOTH(the symbol is not in the installed headers — the signature change is internal). Typed flags:enum_yes(leftleft, reg_tuple, first_time, skip_refs,my_strstr/get_time_valuereverse+direct),enum_found(foundout-param),enum_operation(operator/action/ope),enum_operation_type(context/situation),enum_print(state, print_option, verdict selectors),enum_type_rule_node,enum_clean(create_father’s clean). Remainingshortparams are genuine numbers (event_id,size,depth,jump/refout-pointers);shortreturn types carrying verdict codes (event_found,action,check_time,init_time) were left as-is — the AC gates parameter flags, not result codes.get_data_from_pcap’s localshort found = 0becameenum_found found = NOT_FOUND— equivalent becausefunct_get_params_and_executewrites*foundon every path that returns non-NULL, and the single no-write path (xmallocfailure) returns NULL, which forces the caller’s error branch regardless of the initial value. Pure refactor: no control-flow, allocation-order or evaluation-semantics change — same verdicts, same history bytes. Verified: both build profiles green (zero warnings in mmt_security), 17/17 suites,SANITIZE=asanrule_engine PASS,report-param-count.sh --max 6clean over the five units, golden classification fingerprint unchanged. Source:src/mmt_security/{tips,tips_eval,tips_extract,tips_report,tips_xml}.c,src/mmt_security/tips_internal.h(verify_ctx_t + cross-unit prototypes),tests/rule_engine/{test_rule_engine.c,test_overflow_family.c,run_tests.sh},tools/ci/{param-count-tips,function-shape-tips}.txt.
2026-09-18
- Q: Issue #243 (7.3, F-TEST-015/014/018) — three gate-failing uncovered runs were attribute formatters (
mmt_u16_array_snprintf,mmt_u32_array_snprintf) that thecore_enginesuite already registered extraction attributes for, yet theMMT_U16/U32/U64_ARRAYswitch arms inmmt_attr_snprintfnever dispatched. Why, and how is it fixed without registering dishonestly smalldata_lenvalues? A: The F-BUG-001/#193 central caplen guard ininternal_extract_attribute(packet_pipeline.c) refuses any extractor whose declared extentproto_offset + position_in_packet + data_lenexceeds the packet caplen. The suite’s synthetic packets are 64 bytes but the array types declare 132/260/516-bytedata_len(mmt_u16/32/64_array_toverBINARY_64DATA_LENelements) andBINARY_64DATA_TYPE_LENis 68, so those attributes were silently never extracted —get_extracted_attributereturned NULL and the formatter pass skipped them. The fix keeps the real type lengths and instead grows the first packet through the handler (pkt_aintest_session_lifecycle, the one the once-only formatting pass inspects) from 64 to 1024 bytes; later 64-byte packets still exercise the guard’s refuse side. The reassembly-instrumentation counters (mmt_tcp_reasm_stat_*,mmt_reassembly_stat_packet_alloc, themmt_tcp_reasm_*accessors) sit on reassembly code paths no session-lifecycle packet reaches, sotest_reasm_stats()drives them directly and pins the contract (resident bytes are a signed gauge that clamps negative balances to 0 on read). For F-TEST-015 the business-app plugin is source-compiled intotests/business_appwith registration/packet helpers stubbed (the dicom_dissector convention) because the plugin’s public headers are not installed — the pcap harness already registers the IPS_DATA attributes by alias for the same reason and replays the linktype-801ips_datapcap under ASan/UBSan. For F-TEST-014 the three crafted-input tests target the actual 1.8.0 fixes:6782d7da(DCERPC packet-type bytepayload[2]→payload[1]and payload threshold>64→>=16),c344ad97/6858f4f4(PTP over UDP ports 319/320 with a 44-byte capture floor), and8844d6fb(syslog RFC 3164/RFC 5424 format split plus hostname/tag and UDP-514 lenient branches). Each was verified to fail when its fix is surgically reverted. Coverage: 75.4% → 82.1% (19 → 29 instrumented files); floor.json raised to 80.0/29 keeping the ~2-point gcc-attribution margin.DEFAULT_SUITESgrew to 19, so the suite-count references in CLAUDE.md/AGENT_ENVIRONMENT.md moved 17 → 19. Source:tests/business_app/{test_business_app.c,run_tests.sh},tests/proto_classifiers/{test_dcerpc_offset.c,test_ptp_classify.c,test_syslog_format.c,run_tests.sh},tests/core_engine/test_core_engine.c(pkt_a caplen + test_reasm_stats),src/mmt_core/src/packet_pipeline.c(internal_extract_attributeguard, reasm counters),src/mmt_core/src/packet_processing.c(mmt_*_array_snprintf),src/mmt_tcpip/lib/protocols/{proto_dcerpc,proto_ptp,proto_syslog}.c,src/mmt_business_app/{mmt_business_app,proto_ips_data}.c,tests/coverage/floor.json,tools/phase0/{gen_tcpip_pcap.py,tests/tcpip_pcap_harness.c}.
2026-09-21
- Q: Issue #252 (8.2, F-PERF-002/017) — the AC demands “0 classifier checkers per packet on an already-classified TCP flow” and an unchanged golden fingerprint, but the checker chain (
mmt_check_ssl,mmt_check_ftp, …) is also the flow’s per-packet protocol engine (stage machines, SNI/hostname service detection viammt_int_*_add_connection). How can the walk be skipped without losing mid-flow service classification? A: It cannot — a first implementation that skipped the whole walk on a converged layer collapsed everyhttp.*/ssl.*service line in the fingerprint (e.g.ssl.google23,917 → 0). The resolution keeps the winning checker but reaches it in O(1):mmt_session_t.proto_checkers[PROTO_PATH_SIZE]records the checker node that owns each layer, andproto_packet_classify_nextdispatches straight to it whenproto_path[index+1]is already converged — the ~98 sibling probes that were no-ops on a committed flow never run. The counter semantics follow:mmt_classify_checker_callscounts chain probes (0 on converged layers — the AC), whilemmt_classify_direct_callsseparately counts the dispatches so the per-packet engine calls stay visible. Owner attribution cannot rely on the MATCHED verdict alone — FTP-class checkers classify viaadd_connectionwhile returning a non-matched status — so two plugin funnels stampipacket->mmt_classifier_claimfromipacket->mmt_current_classifier(set by the pipeline around everyclassify_mecall):mmt_change_internal_flow_packet_protocol(the deepest tcpip stack-mutation funnel, coveringmmt_internal_add_connectionand the four directmmt_change_internal_flow_packet_protocolcallers) andset_classified_proto(plugins that write the path insideclassify_me, e.g. mmt_mobile). The slot is only (re)written whenproto_path[index+1]actually changes — first detection and reclassification — so a converged layer’s owner cannot be displaced by a later checker’s correlated-protocol claim; a path change to a different protocol clears/refreshes the owner, and a layer converged with no identifiable owner (port/IP fallback, externalset_classified_proto) keeps the full walk. Sessions are initialised with the slots NULLed ininit_new_session_fields; checker nodes outlive sessions (handler lifetime), so no dangling. Verified: phase0 golden fingerprint byte-identical (20-pcap CI gate PASS), valgrind clean, harnessclassified_flow_fastpathPASS — 459 classified-flow packets, 0 IP/TCP/UDP chain probes, 925 direct dispatches; same-machine throughput bigFlows 954,524 → 1,059,993–1,108,923 pps (+11–16%), smallFlows 1,486,122 → 1,928,127–2,821,570 pps (+30–90%) — the host’s absolute pps drifts ~2×, so BEFORE/AFTER were captured minutes apart on the same tree state. Source:src/mmt_core/src/packet_pipeline.c(proto_packet_classify_nextdispatch + claim bookkeeping,set_classified_protoclaim hook, counters),src/mmt_core/private_include/packet_processing.h(mmt_session_t.proto_checkers, frozen attribute/handler arrays),src/mmt_core/public_include/data_defs.h(ipacketclaim channel),src/mmt_core/src/packet_session.c(slot init),src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h(funnel claim),tools/phase0/tests/classified_flow_fastpath_test.c.
2026-09-21
- Q: Issue #253 (8.4, F-PERF-007/008) — shrink the ~17.9 MB eagerly-built 256-way hostname trie below 4 MB and cut the per-packet session lookup from two comparator calls plus a 13/37-deep dependent FNV-1a multiply chain, all without changing hostname matches, session-equivalence semantics or the golden fingerprint.
A: F-PERF-007: the dense
leaves[256]node (2,056 B x ~9,091 nodes, built in_constructor) became a sparse node of 24 B plus a sorted(char -> child)edge array (16 B/edge) built lazily by_ensure_tree()on the firstget_proto_id_by_hostname()call — the per-packet read is one acquire load, the one-time build is serialised on aPTHREAD_MUTEX_INITIALIZERmutex (the packet_registry pattern), the root is published with a release store, and a failed build is latched (_host_name_trie_init_failed) so OOM keeps the old permanent-disable-with-one-log behaviour instead of retrying per packet. Lookup and the ‘.child’ fallback walk the sorted edges with early-out;_free_tree_nodefrees edges+nodes under the same lock from the destructor.mmt_hostname_trie_resident_bytes()exports accounted node+edge bytes (always exported — it moves only at build/free time): measured 0 before first lookup, 488,552 B after (vs the 4 MiB bound), VmRSS delta 676 KiB, valgrind 0 bytes in use at exit. F-PERF-008:generic_equal_fct(data_defs.h) +register_session_equal_function(plugin_defs.h) +protocol_t.session_key_equal(memset-zeroed, so unregistered protocols keep the fallback) give the open-addressing session store a ONE-call equality predicate;mmt_oa_table.key_equaluses it when set and otherwise keeps the old!comp(a,b) && !comp(b,a)equivalence — audit confirmed no ordered-tree consumer of comparator ordering remains, so equivalence semantics are preserved either way.ipv4_session_equal/ipv6_session_equaltest exactly the fields the comparators distinguish. The FNV-1a key hashes (13/37 serially-dependent multiplies) became independent per-word multiplies plus a one-step finalizer (v4: 4 multiply ops, 2-deep chain; v6: 6 ops, 2-deep) — source-counted by the harness — and the table’s fmix64 mixer is documented static-inline at the call site. Stats tripwiresmmt_oa_equal_call_count/mmt_oa_comp_call_count(assert/sanitizer builds, relaxed atomics, always-exported weak-linkable accessors — the packet_pipeline counter contract) let the harness prove zero comparator calls on the equal path and identical answers on the fallback.init_session_map_spacegrew a third parameter; all in-tree callers updated (packet_registry, test_fi_engine, test_session_table, the new harness);init_map_spacepasses NULL and keeps the two-call path. Verified: default + ASan builds green, 19/19 suites, phase0 fingerprint byte-identical, memory ceiling 6,368/65,536 KiB, valgrind 0 leaks on golden pcaps AND on the trie harness itself, harnesseshostname_trie_mem_test9/9 andsession_lookup_perf_test8/8 (equal-predicate 30–31 ns vs fallback 41–43 ns under ASan), same-machine bigFlows 954,524 → 1,108,923–3,109,296 pps across two after-captures (host pps drifts ~2x, both above baseline), smallFlows 1,486,122 → 2,971,750; library RSS bigFlows 51,696 → 33,972 KiB. Source:src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c(sparse lazy trie + resident-bytes accessor),src/mmt_tcpip/lib/protocols/{proto_ip,proto_ipv6}.c(equal predicates + parallel-multiply hashes + registration),src/mmt_core/public_include/data_defs.h(generic_equal_fct),src/mmt_core/public_include/plugin_defs.h(register_session_equal_function),src/mmt_core/private_include/{packet_processing.h,hash_utils.h}(session_key_equal, 3-arg init_session_map_space),src/mmt_core/src/{hash_utils.cpp,packet_registry.c}(equal-aware table + counters + wiring),tests/{fault_injection/test_fi_engine.c,hashmap/test_session_table.cpp}(callers),tools/phase0/tests/{hostname_trie_mem_test.c,session_lookup_perf_test.c,run_hostname_trie_mem_test.sh,run_session_lookup_perf_test.sh,internal_decls.h},tools/phase0/README.md(46-job matrix).
2026-09-21
- Q: Issue #244 (7.4, M3 clause 1) — the AC requires the floor file to name the instrumented sources (
packet_processing.c,hash_utils.cpp,mmt_tcpip_classif_utils.c, the business-app plugin) whilesummary.jsononly carried counters, and thecoveragejob must provably fail when the floor is breached. How is the bound committed without weakening the existing ratchet? A:summary.jsongainedinstrumented_sources— the sorted, repo-relativesrc/paths lifted from the tracefile’sSF:records, so the summary is machine-independent (CI and local checkouts emit identical values) and self-contained for the floor check.floor.jsongainedrequired_instrumented_filesnaming the five mandated sources by repo-relative path (paths, not bare basenames, so the membership test is exact and collisions are impossible);check-coverage-floor.shverifies each named path is present ininstrumented_sourcesand fails rc=1 when one is absent, rc=2 when a floor names files but the summary predates the key — a broken measurement can never pass silently. The line floor stays at 80.0 against the measured 82.1%: the M3 bound is a minimum of 60% and the floor note already forbids lowering the ratchet to silence a failure, so the stricter committed value stands.coveragewas already a required status check onmain(verified via the branch-protection API); the breach path is proved on a scratch PR whose floor is bumped above the measurement — the job fails, the PR is closed unmerged. Doc citations in AGENT_ENVIRONMENT.md and the validator anchors moved 188-290 → 188-297 and 292-308 → 299-315 with the emitter growth. Source:tests/run_all_tests.sh(instrumented_sourcesemission),tests/coverage/floor.json(required_instrumented_files),tools/ci/check-coverage-floor.sh(named-file floor),docs/AGENT_ENVIRONMENT.md,scripts/validate-agent-environment.sh(citation anchors),.github/workflows/c-cpp.yml(coveragejob),gh api repos/montimage-projects/mmt-dpi/branches/main/protection(required contexts).
2026-09-21
- Q: Issue #87 — “configurable DPI profiles with per-level protocol toggles” bundles four detection levers (inspection depth, application-protocol/hostname detection, port-based detection, IP-range detection), but three of the four already exist as per-handler flags and the fourth has no natural single gate. Where does the profile model live so a depth cap is honoured by every classifier without editing each protocol file, and what do the presets pin?
A: The levers map onto the existing handler fields —
hostname_classify(application/hostname),port_classify(+port_classify_payload_confirmuntouched),ip_address_classify— plus one new fieldclassification_max_depth(defaultPROTO_PATH_SIZE - 1= unlimited) onmmt_handler_t. Depth is enforced centrally inpacket_pipeline.c, not per protocol:proto_packet_classify_next()skips the checker walk and post-classification when the nextproto_pathindex would exceed the cap (that skip is the CPU saving), andset_classified_proto()refuses new appends beyond the cap while still allowing updates/reclassification of in-bound slots — so out-of-band writers honour the same bound and theTODO(#87)markers inproto_tcp.c/proto_udp.care resolved.pre_classifyheader parsing still runs, so transport sessions and attribute extraction keep working under a shallow cap (index 0 = META, 1 = link, 2 = network, 3 = transport, 4 = first app layer).mmt_dpi_profile_tis an opt-in struct applied bymmt_apply_dpi_profile/mmt_apply_dpi_profile_by_nameto individual handlers; four presets pin the stock configuration (default, also the implicit base), the L2–L4 structural-only configuration (minimal, depth 3, all heuristics off), depth 5 with heuristics but no port hint (balanced), and everything on including the port hint (full). Operator profiles come frommmt_load_dpi_profiles_file()orMMT_DPI_PROFILES_FILE—<name> <depth> <app> <port> <ip-range>lines,#comments, case-insensitive names, collisions with predefined/loaded names and out-of-range toggles rejected, up to 32 customs — andMMT_DPI_PROFILEselects a name atmmt_init_handler()time (unknown name logs and keeps defaults). Zero behaviour change without opt-in: the golden fingerprint is byte-identical. New suitedpi_profiles(suite 20) covers presets, custom-file parsing/rejection paths, env selection, and both depth gates. Source:src/mmt_core/src/dpi_profiles.c(registry/parser/apply),src/mmt_core/src/packet_pipeline.c(depth gates inproto_packet_classify_next+set_classified_proto),src/mmt_core/src/packet_registry.c(handler field init + env hookup),src/mmt_core/public_include/mmt_core.h(public API + presets),src/mmt_core/private_include/packet_processing.h(classification_max_depth),src/mmt_tcpip/lib/protocols/{proto_tcp,proto_udp}.c(resolved TODO(#87)),tests/dpi_profiles/,docs/DPI-Profiles.md.
2026-09-22
- Q: Issue #262 —
init_proto_dtls_struct()was defined inproto_dtls.cand manually declared inmmt_common_internal_include.h, but absent fromproto_init_list.defno translation unit ever called it:init_tcpip_plugin()never ran it, soPROTO_DTLSwas missing from the registry, its six attributes were unextractable, andclassify_dtls_from_udp()was never hooked ontoPROTO_UDP. The #104 crafted-input guard harness drives the classifier symbol directly, so the gap was invisible to the test suite. How is DTLS registered through the production path, and what happens to the golden fingerprint and the published protocol/attribute counts? A: One rowMMT_PROTO_INIT(init_proto_dtls_struct, "PROTO_DTLS")was appended toproto_init_list.def, which is the single source for both the generated prototypes inmmt_common_internal_include.hand the init table walked byinit_tcpip_plugin()(#148) — the now-redundant manual declaration was deleted.mmt_init_classify_bitmasks()moved above theprotocol_struct != NULLguard ininit_proto_dtls_struct(): the values are deterministic constants so recomputing is idempotent, and a caller that drives the exported classifier after the protocol was already registered through the plugin path (the #104 harness pattern) still gets populated bitmasks in its own translation unit. The fingerprint change is intentional and asserted:gen_tcpip_pcap.py --pcap dtlssynthesises a DTLS 1.2 ClientHello record, an application-data record, and a bogus-version (0x0100) datagram on a second flow; the CI corpus (golden_pcaps.txt,regen_pcaps.sh) gaineddtls.pcapand the regenerated baseline adds exactly2 x meta.ethernet.ip.udp.dtls+1 x meta.ethernet.ip.udp.unknownwith no other flow touched — the unrelatedtcp_h223-over-tcp.pcapDICOM→unknown drift surfaced by a full local regeneration is stale-baseline drift (TCP-only, unreachable by a UDP-hooked classifier) and was not committed. New harnessdtls_registration_testcovers the real path:init_extraction()→ plugin.so→init_tcpip_plugin(), then registry presence,"dtls"name resolution, attribute registration (dtls.content_length,dtls.version), and end-to-end pcap classification throughpacket_process()(the 46→47 job matrix,tools/phase0/README.mdregenerated).mmt_export_infomeasured 669→670 protocols and 7,429→7,445 attributes (+16: six own + ten shared stats attributes), so the three public count sites (README.md,docs/_includes/key-features.md,docs/index.html) were updated anddocs/PROTOCOLS.mdregenerated viatools/gen-protocol-list.sh(649→650 unique initializers). Source:src/mmt_tcpip/lib/proto_init_list.def,src/mmt_tcpip/lib/mmt_common_internal_include.h,src/mmt_tcpip/lib/protocols/proto_dtls.c(init_proto_dtls_struct),tools/phase0/gen_tcpip_pcap.py(gen_dtls_pcap),tools/phase0/ci/{golden_pcaps.txt,regen_pcaps.sh,baseline/classification.txt,pcaps/dtls.pcap},tools/phase0/tests/{dtls_registration_test.c,run_dtls_registration_test.sh},tools/phase0/README.md,README.md,docs/{PROTOCOLS.md,index.html,_includes/key-features.md}.
2026-09-22
-
Q: Issue #327 (F-DEAD-008) —
proto_packet_analyzeoverwroteretvalwith every analyser’s return, so a laterMMT_CONTINUEerased an earlierMMT_DROP/MMT_SKIPverdict and the post-analysis return was discarded entirely. What is the verdict contract, and does propagating the post-analysis return change behaviour? A: First non-MMT_CONTINUEwins: all analysers in the weight-ordered chain still run for their side effects (fail-safe — a veto must not suppress the other engines’ analysis), but only the first non-CONTINUE result is kept; a non-CONTINUEpre_analysestill gates the whole chain as before.post_analyse’s return is now captured under the same first-non-CONTINUE rule — in-tree no protocol registers a post-analysis function (register_pre_post_analysis_functionsis a plugin-facing API), so the captured verdict is inert for the stock build and only tightens the contract for out-of-tree engines. Classification-side markers were verified-correct rather than changed: checker verdicts are already tested viaMMT_CLASSIFY_MATCHED_MASK(winner stops the walk),proto_packet_classify_next’s exit code is thepost_classifyverdict (falsy mapped toMMT_SKIPby the caller), and the classification-depth threshold the marker asked for isclassification_max_depth(issue #87).init_protocol_structnow initialises everyprotocol_tfield explicitly (belt-and-suspenders — the struct is memset atinit_extraction, andmmt_init_handlerenablesdata_analyser.status/classify_next.statusper registered protocol, so the 0-inits match the previous effective state). Verified: 20/20 suites, phase-0 golden fingerprint unchanged. Source:src/mmt_core/src/packet_pipeline.c(verdict contract + docs),src/mmt_core/src/{packet_registry,packet_session,proto_meta}.c,src/mmt_tcpip/lib/protocols/{proto_ip,proto_ipv6,proto_ip_dgram,proto_ipv6_dgram,proto_ethernet,ip_session_id_management,rfc2822utils}.{c,h},tests/core_engine/test_core_engine.c(test_analyse_verdict). -
Q: Issue #367 — does
MMT_BASEisolate build outputs, and does install supply an executable sanitizer example? A: It redirects installed files only; SDK outputs and objects remain in the checkout. Recipes now use unique temporary prefixes, clean before switching profiles, remove the install prefix and restore the default build. Install copies example sources, so the ASan notes direct executable verification to the suite runner rather than an unbuiltextract_all. The plugin object refresh runs on every SDK invocation, not only when a prefix changes. Source:rules/common.mk:187-206,rules/common.mk:467-469,sdk/Makefile:28-35,sdk/Makefile:48-70,tests/run_all_tests.sh:8-98. -
Q: Issue #367 — is the task’s 30-file audit coverage scope the enforced whole-library baseline? A: No. It describes an instrumented subset; the runner reports the exact source list for each run, while the committed floor remains 29 files and 80.0%. The environment notes distinguish measurement from minimum and do not claim a new measurement. Ruby 3.3 and locked Bundler are documentation-site requirements only; SDK configuration uses Make and shell variables without an application
.env. Source:tests/run_all_tests.sh:213-217,tests/run_all_tests.sh:273-287,tests/coverage/floor.json:2-10,.github/workflows/c-cpp.yml:213-225,docs/Gemfile.lock:112-113,sdk/Makefile:8-18,rules/common.mk:3-8.Audit provenance: the original untracked
MODERNIZATION_REPORT.md, preserved read-only in stash objecte546dd45^3, records the audited commit2ab7b73516113009622cb3d32194d20121457010at line 3 and the 82.9% (5,660/6,831 lines), 30-file measurement at line 28; finding F-TEST-004 at line 107 explicitly identifies the subset denominator. No audit artifact was restored or changed. -
Q: Issue #367 review — is the local Bundler lock part of the clean-checkout toolchain, and is the decision log a built page? A: No Bundler lockfile or version pin is tracked; CI uses Ruby 3.3 and enables ruby/setup-ruby bundler-cache. The guide now documents Bundler without a version pin and no longer validates an ignored local lockfile. The decision log has no Jekyll front matter, so the guide links to its GitHub source instead of a raw Markdown site target. This supersedes the locked-Bundler claim above. Source:
.github/workflows/c-cpp.yml:213-218,.github/workflows/c-cpp.yml:225,docs/Gemfile:6-11,docs/DECISIONS.md:1.
2026-09-22
-
Q: Issue #368 — does the coverage percentage represent the whole SDK, and what should an agent do when the golden classification fingerprint changes? A: Coverage counts executable lines from the instrumented
src/subset represented by suite gcov data, not all SDK sources. Clarify that denominator inCLAUDE.md, link the authoritative environment testing and install sections, and explicitly require stopping and flagging any changed classification fingerprint before the intentional-baseline process. Source:tests/run_all_tests.sh:217,226,234-287(source filtering, suite data and line totals),docs/AGENT_ENVIRONMENT.md:184-192,206(coverage and install guidance),tools/phase0/README.md:76-87(classification differences and intentional golden updates). -
Q: Issue #369 — does
AGENTS.mdsatisfy its sprint-Pre acceptance checks as written, and isdist/wholly a build output? A: The guide already linkedCLAUDE.mdanddocs/AGENT_ENVIRONMENT.mdfor every command and preserved the four role-instruction elements (branch/commit etiquette, append-only source-cited decisions, generated-source exclusions, classification-mismatch escalation), so the update is a refresh, not a rewrite: the header@-mentions become ordinary Markdown links, matching the form the role briefs already use for the same two documents in the vendor-neutral file, and the build-output list gainssdk/examples/andsdk/bin/to matchCLAUDE.md’s authoritative enumeration.dist/is not wholly generated:dist/ZIP/{README.md,install.sh,mmt-install-common.sh}are tracked installer sources copied into$(BUILD_DIR)by theziptarget, so the never-commit rule coversmake dist-style outputs, not that subtree; the wording stays as-is. The.claude/exclusion also stays:.gitignoreignores it while tracking exactlyCLAUDE.md/AGENTS.md, so no agent-definition tree is added — the role briefs remain frontmatter-free prose. Source:AGENTS.md,CLAUDE.md(Hard rules),.gitignore:39,53,62-64,git ls-files dist(dist/ZIP/*),sdk/Makefile:269($(CP) ../dist/ZIP/* $(BUILD_DIR)),.github/workflows/c-cpp.yml:314-330(doc-validatorsrunsscripts/validate-*.sh),gh api repos/montimage-projects/mmt-dpi/branches/main/protection/required_status_checks(contexts includedoc-validatorsandGolden classification fingerprint unchanged). -
Q: Issue #372 — is a Bundler lockfile tracked for the documentation toolchain? A: Yes —
docs/Gemfile.lockis now tracked (.gitignorenarrows the blanketGemfile.lockrule with!docs/Gemfile.lock), regenerated under Ruby 3.3 + bundler 2.6.9 withx86_64-linuxinPLATFORMSfor CI, and verified underBUNDLE_FROZEN=trueon theruby/setup-rubystep plus agit diff --exit-code -- docs/Gemfile.lockafter the docs build. After changingdocs/Gemfile, regenerate the lock (bundle lock) and commit it or the frozen install fails. This supersedes the no-lockfile answer above. Source:docs/Gemfile.lock,.gitignore:149-152,.github/workflows/c-cpp.yml:213-232,docs/Gemfile:4-8,docs/AGENT_ENVIRONMENT.md:95-99. -
Q: Issue #374 — where do the installed-consumer fixtures live, and how does the consumer find the packaged plugins when
./pluginsalso exists? A: The captures are reused, not duplicated:tools/ci/tests/fixtures.txtlabels three pcaps already vendored undertools/phase0/ci/pcaps/(one per packaged protocol plugin —ftp_txt/libmmt_tcpip,dicom/libmmt_tdicom,s1ap/libmmt_tmobile), andtools/phase0/ci/labels.txtis left untouched because the precision gate diffs it against a committed baseline.libmmt_business_apphas no packet fixture (itslps_dataprotocol parses serial data), so plugin presence for all four is asserted instead through the required-protocol list resolved byget_protocol_id_by_name. Plugin loading is CWD-relative —load_plugins()scans./pluginsbefore the compiled-inPLUGINS_REPOSITORY_OPT(src/mmt_core/src/plugins_engine.c:43-61) — sorun-installed-consumer.shruns the consumer from an empty private workdir, forcing the packaged<prefix>/pluginspath exactly as a package-installed consumer experiences it. Source:tools/ci/tests/{run-installed-consumer.sh,installed_consumer.c,fixtures.txt},tools/ci/build-package.sh:154-164,tests/installed_consumer/run_tests.sh,src/mmt_core/src/plugins_engine.c:35-61,tools/phase0/README.md:184-189.
2026-09-22
- Q: Issue #371 — what does “exact-release-SHA correctness” concretely require, and which evidence can the publish job trust?
A: Two evidence classes, asserted by the new
release-gatesjob beforereleaseruns. Same-run evidence arrives through theneedscontext (results ofbuild— the package matrix carrying the installed-consumer check —reproducibilityandverify-tag); commit evidence is queried from the check runs recorded on the candidate SHA (unit-tests,sanitizer-tests,ASan/UBSan profile compiles,Golden classification fingerprint unchanged/classification-gate). Verdicts are fail-closed: missing, queued/in-progress-only, failed, skipped, cancelled, neutral or wrong-SHA evidence is ineligible, and per check-run NAME the newest completed run wins — required because a tag push re-triggersc-cpp.yml(legs still in flight when the gate runs) and rebase-merges leave same-SHA check runs from both the PR and the main push (observed: twobuildruns at45ae46e3, failure then success). Check runs are matched by name with aname (matrix-suffix rule because GitHub names unnamed matrix legs<job> (<values>); the classification job is matched by display name with the job id as fallback.phase0-baseline.ymldoes not trigger on tag pushes, so its evidence must come from an earlier run at the SHA — a tag on a commit that never ran the gates is correctly ineligible. Source:tools/ci/check-release-gates.sh,.github/workflows/release-packages.yml(release-gatesjob,release.needs),tools/ci/tests/test-release-gates.py,gh api repos/montimage-projects/mmt-dpi/commits/45ae46e3/check-runs(duplicatebuildruns, matrix-suffixed names).
2026-09-22
- Q: Issue #375 (F-BUG-002) — how should
udp_pre_classification_functionreconcile the UDPlenfield with the enclosing IP payload bound, and what doesudp->len == 0mean per family? A:payload_packet_lenis nowmax(0, MIN(udp_len, l4_packet_len) - 8)— the UDP header’s declared datagram length bounds the payload inside the enclosing IP payload (IPv4tot_lenvial4_packet_len, IPv6payload_lennet of extension headers — newly applied tol4_packet_lenfor UDP, so over-captured tails pastpayload_lenare not L4 data), and the pre-existing caplen clamp (F-BUG-107/#195) still bounds reads to captured bytes last. Three resolved edge cases:udp_len == 0over IPv4 keeps the enclosing bound (kernel semantics — “rest of the datagram”);udp_len == 0over IPv6 is legal only in a jumbogram (payload_len == 0, RFC 2675) and keeps the captured bound, while a non-jumbo IPv6 packet declaring it is malformed and exposes zero payload; theudp->lenfield itself is only read whenl4_offset + 8 <= caplen, so a corrupt offset past the capture can never be dereferenced (the earlier code never dereferencedpacket->udpat all). Sessiondata_byte_volume/data_packet_count(mmt_connection_tracking,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h:463-489) consequently count only declared UDP payload, which is the intended behaviour change behind “trailing captured bytes cannot affect extraction/detection”. Verified: newparser_boundariessuite (unit reproducer +packet_processAPI path) green default and ASan/UBSan, full suite run, golden classification fingerprint unchanged. Source:src/mmt_tcpip/lib/protocols/proto_udp.c:22-45,65-97,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h:463-489,tests/parser_boundaries/(run_tests.sh,test_udp_bounds_unit.c,test_udp_payload_bounds.c),tools/phase0/tests/caplen_clamp_test.c(API-path pattern reused).
2026-09-22
- Q: Issue #376 (F-BUG-001 follow-up) — how does the central caplen guard separate an extractor’s wire extent from the attribute’s output capacity (
data_len)? A:data_lenis the capacity of the attribute’s output scratch (register_extraction_attribute()sizes the buffermax(type_size, data_len),packet_registry.c:1613-1640), not the number of wire bytes the extractor reads — conflating the two madeinternal_extract_attribute()refuseDTLS_CLIENT_HELLO_CIPHER_SUITE(132-bytemmt_u16_array_tresult) on a valid 67-byte record andICMP_DATA(1028-byte buffer) on ordinary packets. The guard (src/mmt_core/src/packet_pipeline.c:190-222) now checks the wire extent:general_byte_to_byte_extraction()is the one stock extractor whose contract memcpy()s exactlydata_lenwire bytes atposition_in_packet, so for it the fullproto_offset + position_in_packet + data_len <= caplenextent stays required; every other extractor self-bounds (themmt_have_bytes()caplen prologues), so the central floor is the declared start inside the capture —proto_offset + max(position_in_packet,0) + 1 <= caplen, which also keeps POSITION_NOT_KNOWN (#193/F-BUG-032) on the same floor. Alternative considered and rejected: awire_lenfield onattribute_metadata_t— touches the public plugin ABI and every positional initializer while adding no information the extraction-function dispatch does not already carry. The #193 harness’s two “declared extent past caplen is refused” cases encoded the conflation and were re-purposed to pin the separation (output capacity past caplen now reaches the self-bounding extractor), plus byte-copier controls on both sides of the floor;tests/parser_boundariesgained thedtlsfixture (unit:internal_extract_attribute+ real_dtls_extract_attributeover crafted records; API:mmt_init_handler/packet_processwith a registered attribute handler — valid 67-byte ClientHello extracts cipher 0x1301, truncated fields reject, 100-suite list clamps to the 64-entry array, direct and normal paths agree). Verified:run_tests.sh dtlsdefault and ASan/UBSan,run_position_unknown_guard_test.shandrun_extraction_caplen_prologue_test.sh(corpusunvalidated=0), golden classification fingerprint unchanged. Source:src/mmt_core/src/packet_pipeline.c:183-236,src/mmt_core/src/extraction_lib.c:9-22(the byte-copy contract),src/mmt_core/src/packet_registry.c:1605-1640,src/mmt_tcpip/lib/protocols/proto_dtls.c:105-233,tools/phase0/tests/position_unknown_guard_test.c,tests/parser_boundaries/{test_dtls_wire_extent_unit.c,test_dtls_wire_extent_api.c,run_tests.sh}.
2026-09-22
-
Q: Issue #377 (F-BUG-003) — how should the SOA answer parser advance past the two rdata names, and why did
real_length/is_refmisplace the mailbox and the five 32-bit fields? A: By consumed wire length, measured independently of the decoded value: the newdns_name_wire_length()walks the label encoding at the rdata position only — each literal label counts its length byte plus content, the root terminator counts 1, a compression pointer counts exactly 2 — never following pointer targets (they live earlier in the message, outside the record). The old code advanced byreal_length, which is one byte short for terminator-ended names (the terminator node returns NULL and is never counted) and, via anis_refshortcut that is dead code anyway —dns_extract_name_value()never setsis_refon the value struct — counted a pure pointer as 1 byte, not 2; a literal primary name therefore started the mailbox walk on its own terminator and a compressed one inside the pointer’s low byte, shifting the serial/refresh/retry/expire/minTTL block. Names and fields are now bounded by the declared rdata extent (data_lengthclamped to the captured remainder), so a truncated name or a short RDLENGTH rejects the record (dataNULL) or withholds the integer block instead of reading the next record’s bytes; a pointer whose target fails to decode still counts its 2 wire bytes, keeping the record aligned with an empty decoded name — the two functions deliberately differ there. The samereal_length + 1convention indns_extract_queries()/dns_extract_answers()is exact for terminator-ended and pure-pointer names but one byte long for mixed names (literal labels + pointer); left unchanged here — recorded as residual risk for a follow-up since the issue scopes to SOA and those paths feed no test fixture in this suite. Verified: newdns-soafixture intests/parser_boundaries(7 packet/API fixtures: literal+pointer headlinea/b/42, mixedx.b, compressed primary, self-pointer, out-of-range target, short RDLENGTH with trailing capture, truncated name) — 25/25 checks pass default and ASan/UBSan; golden classification fingerprint unchanged (SOA runs in attribute extraction, post-classification). Source:src/mmt_tcpip/lib/protocols/proto_dns.c:27-59(dns_name_wire_length),src/mmt_tcpip/lib/protocols/proto_dns.c:572-637(SOA case),src/mmt_tcpip/lib/protocols/proto_dns.c:341-411(real_length accumulation),tests/parser_boundaries/{test_dns_soa_consumed_bytes.c,run_tests.sh}. -
Q: Issue #378 (F-BUG-004) — how should the TXT answer parser treat its rdata, and what should
dns_answer_t->datahold for a multi-string record? A: A TXT rdata is a sequence of<character-string>fields — a length byte plus that many content bytes — that must tile the declared RDLENGTH; the old code read only the first field and bounded it bypayload_end, so a string-length byte near the rdata end absorbed the following record’s captured bytes (RDLENGTH=1 + length 3 read the next record’sabc). Thecase 16walk now bounds every field byrdata_end = data_anwser_payload + min(data_length, captured remainder)— the same clamp pattern as the SOA fix — and rejects the record (dataNULL) when any field’s declared length runs past it;a_lengthstill advances by RDLENGTH, so the next record stays aligned.dataconcatenates all field contents into one NUL-terminated string — the usual multi-string TXT reading (RFC 7208 §3.3) — instead of silently returning only the first field; single-string records are unaffected. Alternative considered and rejected: keep first-field-only extraction — it fixes the confinement bug but discards valid rdata content and leaves later fields unvalidated, contradicting the issue’s “sequential TXT fields” wording. TXT rdata carries no domain names, so no message-wide bound for compression is needed there —dns_extract_name_value()keepspayload_endfor the PTR/NS/CNAME/MX/SOA paths that legitimately follow pointers to earlier message bytes. Verified: newdns-txtfixture intests/parser_boundaries(10 packet/API fixtures: RDLENGTH-short headline with trailingabc, malformed-first + valid-second, single/empty/multi/multi+empty strings, truncated mid-sequence field with trailing capture, declared-length-past-RDLENGTH inside capture, consecutive records, RDLENGTH=0) — green default and ASan/UBSan; golden classification fingerprint unchanged. Source:src/mmt_tcpip/lib/protocols/proto_dns.c:527-566(TXT case),src/mmt_tcpip/lib/protocols/proto_dns.c:541-543(rdata clamp),tests/parser_boundaries/{test_dns_txt_rdata_bounds.c,run_tests.sh}.
2026-09-22
- Q: Issue #379 (F-PERF-001) — how should the interned-IPv6-address store hash all 16 address bytes, be keyed per handler, and bound collision work?
A: Three coordinated changes. (1)
ipv6_addr_hash()foldedw[0] ^ (w[1] << 1)— the shift droppedw[1]’s top bit so 1 of the 128 address bits never reached the bucket index, and the XOR let correlated differences cancel into the same bucket; both 64-bit words now feed independent multiplies plus a one-step finalizer (same shape asipv6_session_hash(), still consistent withipv6_addr_comp’s memcmp equivalence). (2)mmt_oa_tablegained aseedfield mixed intohash_of()(mmt_mix64(hash(k) ^ seed)), drawn per table from a process-local counter decorrelated through fmix64 — two maps are keyed independently (a collision set computed for one handler’s table does not transfer) while staying deterministic across runs because table creation order is fixed, which the golden classification fingerprint and reproducible tests rely on. (3)mmt_oa_insert’s probe loop is now explicitly bounded bycap(matching find/update/remove) and fails when a full scan finds no EMPTY terminator — unreachable under theused < capinvariant, so it is defense-in-depth, not a semantic change. Per-operation work is therefore at most O(cap) probes = 2·cap comparator calls even under forced collisions; the seed is the mitigation, the probe ceiling is the guarantee. Alternatives rejected: changinggeneric_hash_fctto take a seed (touches every registered hash across the plugin ABI for no benefit — the table is the only consumer that can hold per-handler state); seedingmmt_int_maptoo (its keys are internal ids, not attacker traffic — out of scope); a per-probe comparator-count budget enforced inside the table (the load-factor/resize contract already keeps clusters short — a hard cap on probe length would silently drop live entries). Verified: newresource_boundssuite (ipv6-hashfixture, 10,532 checks — 128/128 bits change the hash, old-fold pair separates, two tables carry different seeds, 2,048 distinct addresses preserved on both, realget_ip6_id/findID6path, 4,797/84,607 comparator calls at 1,024/16,384 vs the 751,360/200,273,920 budgets, 17.6x growth vs the 24x limit, forced-collision ops each ≤ 2·cap, saturated-table insert fails bounded) — green default and ASan/UBSan;DEFAULT_SUITESgrew 25 → 26 with AGENT_ENVIRONMENT.md and the CITATIONS registry reconciled; golden classification fingerprint unchanged. Source:src/mmt_tcpip/lib/protocols/ip_session_id_management.c:42-63,src/mmt_core/src/hash_utils.cpp:57-65,85-103,194-218,256-279,tests/resource_bounds/{run_tests.sh,ipv6_addr_fns.c,test_ipv6_hash_bounds.cpp},tests/run_all_tests.sh:155-182.
2026-09-23
-
Q: Issue #380 (F-PERF-002) — how does TCP reassembly keep duplicate offers allocation-free, and what does the per-flow
tcp_reassembly_limitbound? A: Two coordinated changes. (1)tcp_reasm_offer()now finds the insert position — tail append, tail/head equality, head prepend, or an interiortcp_seg_locate()walk (thetcp_seg_insert()walk without a node, one visit per node examined, so the #245 visit accounting is unchanged) — BEFORE carving; a duplicate sequence number is dropped and counted once without touching the block chain. Previously the carve came first and the release of a duplicate only decremented the block’s live count, so every duplicate burned head-block bump space: 1,024 retained one-byte segments each followed by 169 duplicates allocated 1,024 blocks (16,809,984 B, 1,025 allocator calls) whilelivestayed ~98 KB; now 7 blocks (114,912 B, 8 calls — the same as without duplicates). This also settles the #245 duplicate-policy TODO: the first segment wins. (2) The limit now bounds reserved storage, not content:mmt_tcp_reasm_t.reserved= Σ(block header + cap) + both image capacities, maintained bymmt_segblk_carve/release/free_alland the image realloc;livestays the content gauge (content <= reserved <= limit). Admission requiresreserved (+ any new block) + owed[0] + owed[1] <= limit, whereowed[d] = max(0, image_len + pending_len - image_cap)is the image growth still needed to flatten the direction’s pending bytes; a new block is right-sized to the remaining room (never below the aligned carve), and an emptied head block that the carve does not fit is freed first and credited to that room (otherwise it stayed behind the new head, reserved until teardown), and image growth (x4 geometric) is clamped tocap_max = limit - (reserved - image_cap[dir]) - owed[!dir]. Review follow-up: the speculative part of a growth step — beyond the direction’simage_len + pending_len— takes at most half of whatcap_maxleaves free, and an offer the invariant would refuse first trims both images’ idle capacity (beyondimage_len + pending_len, 16-B rounded) with a shrinking realloc and creditsreserved(a failed shrink keeps the buffer and accounting), then recomputesowed— the trimmed cap excludes the arriving segment — before re-checking admission. Without this, one direction passing 1 MiB reserved nearly the whole budget as empty capacity and starved the other (a keep-alive request after a 1.46 MB response lost 137 of 200 segments; a peer that sent 1.08 MB and stopped capped the other side at 1 MiB). Trimming happens only at packet arrival, the same pointer contract the growth realloc already relies on (readers hold an image pointer only within the current packet callback). Under that invariant a drain can always absorb what was admitted, so images stay gap-free; if the limit is lowered mid-flow, new reservations are refused and the drain keeps what fits and drops (counts) the rest — a budget clamp is reported distinctly from realloc OOM, which still re-links the segment. Exhaustion policy: offers that would break the budget are dropped and counted inmmt_tcp_reasm_bytes_dropped(); teardown frees every block, both images and the state. Metadata is reported separately and not charged: the per-flowmmt_tcp_reasm_t(120 B on LP64) and transient realloc copies. Alternatives rejected: a pure clamp of block + image bytes without the owed headroom (admitted pending bytes could then be unflattenable — a wedged drain or silent gaps — and would churn blocks); a new public knob or a global reserved-bytes gauge (public ABI growth for no extra guarantee — the existingset_tcp_reassembly_limit()is the budget); compacting partially-dead blocks (copies and pointer fix-ups on the packet path, unnecessary once duplicates never carve). Measured with the newtcp-memoryfixture at the 4 MiB budget: AC1 workload 8 allocations / 114,912 B reserved; 8,129-B undrained segments peak 2,804,240 B (HEAD: 8,372,160 B); two-direction and image+pending streams peak at most 4,194,304 B (HEAD: 8,503,520 / 5,835,904 B); all admitted bytes flattened in order; the fairness cases (keep-alive, idle peer) refuse nothing until content is within 256 KiB of the budget, and a single in-order stream filled to the budget reallocates its image 17 times.tools/phase0/tests/run_tcp_reassembly_perf_test.shstill passes (0 in-order/reversed visits, duplicates dropped once, 64 KiB ceiling respected, teardown gauge 0). Source:src/mmt_tcpip/lib/protocols/proto_tcp.c(tcp_reasm_owed,tcp_reasm_image_append,tcp_reasm_drain,tcp_reasm_offer,clean_session_payload),src/mmt_tcpip/lib/protocols/tcp_segment.c(mmt_segblk_carve/release/free_all,tcp_seg_locate),src/mmt_tcpip/lib/tcp_segment.h,src/mmt_core/private_include/packet_processing.h(mmt_tcp_reasm_t),src/mmt_core/public_include/mmt_core.h(set_tcp_reassembly_limit),tests/resource_bounds/{run_tests.sh,test_tcp_memory.c,tcp_alloc_count.c,tcp_alloc_count.h}. -
Q: Issue #381 (F-PERF-003, first part) — before the pending-segment insertion structure changes, what exactly does TCP reassembly emit for in-order, reversed, interleaved, duplicate, overlapping, 32-bit-wrapped, partially consumed and torn-down streams? A: Characterized as-is (post-#380) with byte-exact image assertions; no source change. Resolved policy readings, now pinned by
tests/tcp_pending_order: (1) ordering is by wrap-aware sequence number (tcp_seq_before), so in-order, reversed and interleaved arrivals — including across 2^32 — flatten to the same stream; in-order appends and strictly reversed prepends walk 0 nodes. (2) Duplicates: the first segment with a given sequence number wins, whether it is still pending or already flattened, even when the later copy is longer or carries different bytes. (3) Overlaps are not trimmed: pending segments with overlapping ranges are concatenated in full in sequence order (the pre-#245 sorted-concat output), a segment straddling the consumed frontier is appended in full, and a segment whose whole range ends at or below the frontier is dropped — at offer time when the frontier already covers it, or at drain time when an earlier pending segment moves the frontier past it (a contained overlap). (4) Gaps are closed silently: the image carries no filler, and a late gap filler that arrives after later bytes were drained lies below the frontier and is dropped. (5) Drains are incremental and never rewrite the emitted prefix. (6)clean_session_payload()returns every allocation for pending-only, image-only and mixed sessions and is a no-op without reassembly state. Evidence, not desired behavior: evens-then-odds arrival walks(n/2 - 1) * (n/2)nodes — 261,632 visits at 1,024 segments and 67,100,672 at 16,384 — the quadratic cost the follow-up must remove; those two assertions are expected to change with it, deliberately, while every byte-output assertion must hold. Verified: newtcp_pending_ordersuite (330 checks) green default and ASan/UBSan; the #380 link stubs and gauges moved totests/resource_bounds/tcp_reasm_stubs.hand are shared by both fixtures;DEFAULT_SUITESgrew 26 → 27 with AGENT_ENVIRONMENT.md and the CITATIONS registry reconciled; golden classification fingerprint unchanged. Source:src/mmt_tcpip/lib/protocols/proto_tcp.c(tcp_reasm_offer,tcp_reasm_drain,clean_session_payload),src/mmt_tcpip/lib/protocols/tcp_segment.c(tcp_seg_locate),src/mmt_tcpip/lib/tcp_segment.h(tcp_seq_before),tests/tcp_pending_order/{run_tests.sh,test_tcp_pending_order.c},tests/resource_bounds/tcp_reasm_stubs.h. -
Q: Issue #382 (F-PERF-003, second part) — how is out-of-order insertion into the TCP pending-segment store bounded? A: With an index, not a capacity limit: every characterized workload stays fully accepted. Interior inserts in
tcp_reasm_offer()now locate their position through an insert-only AVL index over the pending list (tcp_seg_idx_locate()/tcp_seg_idx_link(), children and height carried intcp_seg_t, root inmmt_tcp_reasm_t.seg_root[dir]) instead of thetcp_seg_locate()list walk. The list stays the source of truth for drain order; the tail-append and head-prepend fast paths still touch neither structure (0 visits), andtcp_seg_idx_sync()indexes those nodes lazily the next time an interior lookup needs the index — an empty index is built from the sorted list in O(n), otherwise the unindexed head prefix and tail suffix are inserted — so each node is indexed at most once. The locate path is recorded and reused to link the node after admission and carving (neither relinks pending segments), so a lookup is one O(log n) descent; duplicates are still refused before any carve. Ordering istcp_seq_before(), consistent only while pending seqs span less than 2^31 (the same precondition as the list walk); beyond it the insert position is unspecified, but a sync always links every node — even one whose seq repeats an indexed node, which a head prepend can add in that regime — so no node stays unindexed and is re-walked by every later sync (QA review: skipping such nodes let 8,192 stuck prepends cost 813,294,061 visits; now 223,399). The drain drops the index with the list, and an image OOM that re-links a suffix resets it (heights cleared) for a lazy rebuild. Measured visits (one per node examined, including index builds): evens-then-odds 5,375 / 118,783 at 1,024 / 16,384 segments (issue #381 evidence 261,632 / 67,100,672), tail-anchored ascending 9,218 / 212,994, shuffled across 2^32 8,968 / 210,194 — at most 23.4-fold growth for 16x the segments; the wide-span case 21,894 / 223,399 at 1,024 / 8,192. Cost: the pending node grows from 80 to 96 B on LP64 (two index links; the height uses existing padding), charged inside the carve like the rest of the node, so the reserved-storage budget of #380 is unchanged — the AC1 workload now needs 8 blocks / 131,328 B instead of 7 / 114,912 B. Alternatives rejected: a per-offer walk cap (the 16,384-segment interleaved stream would be refused, changing characterized output); a search cursor (linear only for friendly orders, still quadratic for adversarial ones); indexing on every fast-path append (O(log n) on the in-order hot path). Verified: every byte-output assertion oftests/tcp_pending_orderunchanged (only its visit pins moved, deliberately), newtcp-orderfixture intests/resource_bounds(default and ASan/UBSan), golden classification fingerprint unchanged. Source:src/mmt_tcpip/lib/protocols/proto_tcp.c(tcp_reasm_offer,tcp_reasm_drain),src/mmt_tcpip/lib/protocols/tcp_segment.c(tcp_seg_idx_*),src/mmt_tcpip/lib/tcp_segment.h(tcp_seg_t,tcp_seg_idx_path_t),src/mmt_core/private_include/packet_processing.h(mmt_tcp_reasm_t.seg_root),tests/resource_bounds/{run_tests.sh,test_tcp_order.c,test_tcp_memory.c},tests/tcp_pending_order/test_tcp_pending_order.c. -
Q: Issue #383 (F-PERF-004) — how does the IPv4/IPv6 fragment map pick its eviction victim at the 1,024-datagram ceiling without walking the whole map on every arrival? A: With a maintained recency order. Every in-flight datagram embeds an intrusive
mmt_hlru_tnode (prev/next plus its map key) in the prefix shared byip_dgram_tandipv6_dgram_t; the circular list’s sentinel lives on the handler (ip_streams_lru,ip6_streams_lru; the zeroed handler reads as an empty list). The arrival path stampslast_activityand callsmmt_ip_frag_lru_touch()(unlink + tail link, free when already the tail);mmt_ip_frag_map_make_room()— now shared by both paths — evicts from the list head through the stored key, and the dgram deallocators unlink, so completion, malformed removal, the age sweep,mmt_ip_frag_map_drain()and themmt_close_handler()drain all keep the list exact without new hooks. The victim is therefore the least recently updated datagram: with non-decreasing packet timestamps that is exactly the old smallest-last_activitychoice (ties, previously hash-walk order, are now the earliest updated), while a timestamp that runs backwards has no effect of its own: the update moves the datagram to the tail like any other, whereas the old scan would evict it next. The age sweep still walks the map once per expiry second; it is off the arrival path, and (unchanged by #383)packet_session.conly runs it onip_streams—ip6_streamsdatagrams leave by completion, ceiling eviction or handler close. Measured: 10,000 replacement arrivals at the ceiling examine 10,000 victims (the old scan: 10,240,000 walker callbacks), make 0 walker callbacks and 20,000 index operations. Alternative rejected: a timestamp-ordered min-heap (keeps min-timestamp semantics under backwards clocks but costs O(log n) per fragment and a per-map array to allocate and free). Source:src/mmt_tcpip/lib/protocols/proto_ip_dgram.{c,h}(mmt_ip_frag_lru_*,mmt_ip_frag_map_make_room,mmt_ip_frag_map_evict_oldest),src/mmt_tcpip/lib/protocols/proto_ipv6_dgram.{c,h},src/mmt_tcpip/lib/protocols/{proto_ip.c,proto_ipv6.c}(fragment arrival paths),src/mmt_core/private_include/hashmap.h(mmt_hlru_t),src/mmt_core/private_include/packet_processing.h(ip_streams_lru,ip6_streams_lru),tests/resource_bounds/{run_tests.sh,test_frag_eviction.c}. -
Q: Issue #384 (plan task 2.5) — what is the resolved advisory status of the docs gems, the pinned GitHub Actions and the release-distro runtime packages, and how is it measured reproducibly? A: Measured by the new
tools/ci/check-dependency-advisories.shon 2026-09-23 (UTC), at the commit the report records; the full per-advisory output is committed astools/ci/dependency-advisories.md. Scopes and sources: (1) all 40 gems resolved indocs/Gemfile.lockagainst OSV (RubyGems, database dated 2026-09-22 23:48 GMT) and the reviewed GitHub Advisory Database (oneaffects=name@versionquery per pin) — 0 affected; (2) the 15 SHA-pinned actions at the release named by their# vX.Y.Zcomment against the reviewed GitHub Advisory Database (OSV cannot evaluate GitHub Actions versions) — 0 affected. The #385 targets were checked ad hoc, outside the committed report, withgh api '/advisories?type=reviewed&ecosystem=actions&affects=<action>@<version>'(andtype=unreviewed):ruby/setup-rubyv1.325.0 (tag →e8944e80fb94b20106697132f8c20c665fab29e9) anddocker/setup-qemu-actionv4.4.0 (tag →99012661954931238ded8c8b007157a8430204e1, viagh api repos/<action>/git/ref/tags/<tag>) return no advisory; (3) the runtime packages the shipped.deb/.rpmdeclare (libc, libstdc++, libgcc, libxml2 — theshlib-deps.shset for theENABLESEC=1package build), resolved withapt-get update/dnf repoqueryinside each pinned image oftools/ci/base-images.txtand checked against the distro’s own OSV feed, keyed on the source package (glibc,gcc-12/gcc-14/gcc,libxml2) — the feeds hold no records under the binary nameslibstdc++/libgcc, so the report also prints each source’s feed-record count. Distro advisories are judged against the distro revision, and every record is classifiedfixed-by-backport(fix landed without moving the upstream base — e.g. 40 for Ubuntu 22.04 libxml2 2.9.13),backport-available,upstream-version-gaporunfixed, so an old upstream base is never mistaken for an open advisory. Result: Rocky Linux 9 has 0 affected (21 feed records across glibc, gcc and libxml2, all fixed at or below the resolved revisions); Ubuntu 22.04, Ubuntu 24.04 and Debian 12 carry 31 affected High/Critical advisories (glibc and libxml2 only, allunfixed— the distro has not published a fixed revision), 3 Debian glibc advisories carry no rating in any source (Not Assessed), and CentOS Stream 9 is Not Assessed by construction (no advisory feed; its pinned digest also no longer resolves, tracked in #414). Severity is the highest available rating: several Ubuntu entries are distro-priority low/medium but NVD CVSS ≥ 7.0, so they count as High. Verdict: exit 1 — confirmed unresolved High/Critical advisories in distro runtime packages, so M1’s advisory condition does not hold yet; the remediation has no in-repo patch (no fixed distro revision exists) and needs an explicit maintainer disposition (accept/track per advisory, or wait for distro fixes and re-run). No dependency was upgraded here — this task is measurement only. The script exits 2 (never 0) when any required scanner did not run, a pin comment is unreadable or an affected advisory has no rating;--self-testcovers that fail-closed path offline. It is not wired into CI: it needs docker and live network, and would fail on the distro findings above. Source:tools/ci/check-dependency-advisories.sh,tools/ci/dependency-advisories.md,docs/Gemfile.lock,tools/ci/base-images.txt,tools/ci/shlib-deps.sh(runtime soname→package map). -
Q: Issue #385 (plan task 2.6, F-DEP-101/F-DEP-102) — what changed between the pinned and target releases of the two reviewed action minors, and do the new pins resolve to those releases? A: Both are minor updates with no input, output or runtime change (neither
action.ymlis touched by the delta), so they are applied as plain pin bumps.ruby/setup-rubyv1.323.0 → v1.325.0 (c-cpp.ymldocs-site job): two builder-bot commits (v1.324.0 adds truffleruby 40.0.0 / truffleruby+graalvm 40.0.0, v1.325.0 adds jruby 10.0.7.0 / 10.1.2.0) touching onlyruby-builder-versions.json,README.mdand the matching one-linedist/index.jsversion table; Ruby 3.3 resolution,bundler-cacheandBUNDLE_FROZENhandling are unchanged.docker/setup-qemu-actionv4.3.0 → v4.4.0 (release-packages.ymlarm64 legs):@docker/actions-toolkit0.96.0 → 0.100.0 (the onlypackage.jsonchange) plus lockfile-only transitive npm bumps, andsrc/main.tsnow throws on any non-zero Docker exit (previously only when stderr was also non-empty) with a named error message — stricter failure reporting only, same binfmt image andplatformsinput. Pins were verified withgh api repos/<action>/git/ref/tags/<tag>(both are lightweight tags pointing straight at commits): v1.325.0 →e8944e80fb94b20106697132f8c20c665fab29e9, v4.4.0 →99012661954931238ded8c8b007157a8430204e1; each workflow’s# vX.Y.Zcomment names the new release. Re-runningbash tools/ci/check-dependency-advisories.sh --only actionswith the new pins reports 0 affected advisories for both (verdict PASS for that surface); the committedtools/ci/dependency-advisories.mdstays the #384 snapshot at its recorded commit. Source:.github/workflows/c-cpp.yml,.github/workflows/release-packages.yml, https://github.com/ruby/setup-ruby/compare/v1.323.0…v1.325.0, https://github.com/docker/setup-qemu-action/compare/v4.3.0…v4.4.0. -
Q: Issue #386 (plan task 3.1, F-DEP-001/F-DEP-002) — how does Pages publish the exact site CI verifies, and what does moving the publisher from github-pages 232 (Jekyll 3.10) to the locked Jekyll 4 graph change? A: One recipe, two callers.
tools/ci/build-docs-site.shruns the source-tree link check, aBUNDLE_FROZEN=true/JEKYLL_ENV=productionbundle exec jekyll buildfromdocs/Gemfile.lock, the lock-unchanged diff (#372), the built-site link check, a renderer guard (fails unless Jekyll major 4) and writesdocs/_site/build-manifest.json(Jekyll/kramdown/Ruby/Bundler versions,Gemfile.locksha256, source commit, file count,site_sha256= sha256 over the sorted<sha256> <path>lines of every other file). The PR gate (c-cpp.ymlverify-helpers) andpages.ymlboth call it after the same pinnedruby/setup-rubyv1.325.0 step;pages.ymluploadsdocs/_sitewithupload-pages-artifactanddeploy-pagespublishes it unmodified —actions/jekyll-build-pages(and the unusedconfigure-pages) are gone, so there is no deployment-time Jekyll 3 render. The deploy job alone holdspages: write/id-token: writeand runs only onrefs/heads/main. The repository Pages source was alreadybuild_type: workflow(read-onlygh api repos/montimage-projects/mmt-dpi/pages, 2026-09-23), so no settings change is needed. Renderer review against https://jekyllrb.com/docs/upgrading/3-to-4/: Ruby — 3.3 kept, above Jekyll 4.4’s floor. Permalinks — nopermalink:setting and no posts; every page keeps its.htmlURL (canonical URLs in a local ruby:3.3 build equal the live site’s). Includes — onlydocs/index.htmluses{% include NAME.md %}from_includes/with no parameters orinclude_relative, unaffected by Jekyll 4’s include caching. Plugins — the graph is jekyll-remote-theme, jekyll-seo-tag, jekyll-relative-links; the github-pages auto-plugins are not carried over:jekyll-optional-front-matter(only this file lacked front matter — it now declareslayout/titleandrender_with_liquid: false, a Jekyll 4 key, because entries quote{% … %}and${{ }}verbatim;DECISIONS.htmlstays published),jekyll-default-layout/jekyll-titles-from-headings(every other page already sets both), andjekyll-github-metadata(replaced by a staticgithub:block in_config.ymlholding the five fields the pinned cayman layout reads;site.github.build_revision, the stylesheet cache-buster, is supplied bybuild-docs-site.shas the source commit through an overlay--config, sostyle.css?v=<commit>matches the live site). baseurl — formerly injected by the Pages builder, now declared asurl: https://montimage.github.io+baseurl: /mmt-dpiin_config.yml, so PR, local and published builds share it;check-site-links.shalready resolves the prefixed site-absolute links. Markdown/Sass — kramdown 2.5.2 + kramdown-parser-gfm (same major as github-pages 232’s kramdown 2.4), Liquid 4.0.4 in both, and jekyll-sass-converter 3 (dart-sass) compiles cayman with deprecation warnings only. Source:tools/ci/build-docs-site.sh,.github/workflows/pages.yml,.github/workflows/c-cpp.yml(verify-helpers “Documentation checks”),docs/_config.yml,docs/Gemfile,docs/Gemfile.lock, https://jekyllrb.com/docs/upgrading/3-to-4/. -
Q: Issue #387 (plan task 4.1, F-TEST-004) — how does
--coveragereach SDK code exercised by the integration suites, and how are those counters kept apart from the unit floor? A: With a build profile plus a runner-level harvest. (1) Profile: newBUILD=coverage(rules/common.mk, appended so no cited range moves) puts-g -O0 --coverageonCFLAGSandCXXFLAGS— the.sorecipes link with$(CXXFLAGS), so libgcov is linked into each library and-Wl,-z,defsstill holds (kept) — andrules/common-linux.mkdrops release hardening/LTO for it as for tsan (-O3 inlining and LTO would blur the function counts the controlled-call check relies on).--coverageexportsSDK_BUILD_PROFILE=coverage, the variable the SDK-building suites already turn intoBUILD=;fault_injectionnow skips its engine leg only for asan/tsan and passes the profile to its make lines.SANITIZEtogether with--coverageexits 2, since one run carries one SDK profile. (2) Harvest timing: objects build in-tree, so consumer counters land in<repo>/src/**/*.gcda(never in the throwaway prefix, which is why they survive its deletion), and the next SDK build deletes them (-frandom-seedrecompiles drop the.gcdaand rewrite the.gcno);make -C sdk cleandoes not. The runner therefore callstools/ci/sdk-coverage.sh harvest --consumeafter every suite, pass or fail: it pairs each.gcdawith the.gcnoof the same build, runsgcov -jper source directory (asn1c reuses basenames), stores repo-relative line and function TSV in amktempdirectory outsidetests/coverage/(CI uploads that directory) and deletes the harvested.gcdaso a later suite cannot count them twice; stalesrc/**/*.gcdaare deleted at run start. This assumes one SDK build per suite, which holds for all ten SDK-building suites today; a suite that rebuilt twice would lose its first build’s counters. (3) Report: the top-levelsummary.jsonkeys andcoverage.infoare left byte-for-byte unit-only, socheck-coverage-floor.sh,floor.jsonandreport-uncovered-runs.share unchanged. A newcohortsobject carriesunit,sdk_integration(with per-suite rows),combined(also written astests/coverage/coverage-combined.info) andgenerated_asn1c, each with adenominatorstring. Paths are normalized to repo-relative form by stripping both the logical and the physical (pwd -P) repo root — the SDK compiles throughrealpath— and records with the same (path, line) are summed, so a source appears once. Cohort membership is decided by gcov’s.files[].file, not by where the.gcdalives, because handwritten objects emit records for asn1c headers; everything undersrc/mmt_mobile/asn1c/goes togenerated_asn1cand is excluded from the other three. First measurement: unit 81.9% (5,751/7,022, 32 files, same as before), sdk_integration 34.0% (14,568/42,887, 727 files), combined 41.1% (17,670/42,996), generated_asn1c 4.9% (1,053/21,492, 297 files); the mobile decoderss1ap_common.c,ngap.candnas_msg.care now measured (128/546, 86/393, 32/61 lines). (4) Proof: the newsdk_coveragedelegate suite (tools/ci/tests/test-sdk-coverage.sh) builds and installs aBUILD=coverageSDK, runs an uninstrumented consumer that callsmmt_version()ands1ap_entities_count()or not, withGCOV_PREFIXso the hits never reachsrc/, deletes the prefix, harvests with the real helper (>= 1 hit with the call, 0 without) and checks the report on synthetic rows (logical/physical dedup, asn1c isolation, denominators, top-level keys unchanged, floor gate still green). It ignoresSANITIZE/--coverageand runsmake -C sdk cleanon exit, so no coverage-profile objects are left for a later plain build to relink. Deferred to #388: sources whose objects wrote no.gcda(zero-hit files, so the denominators are not whole-SDK), per-family totals and a whole-SDK floor, the vendored llhttp files (tools/ci/vendor-paths.txt), which still count as handwritten, and the counterstcp_pending_orderandresource_boundslose because they compile SDK sources into amktempdirectory their trap deletes (recovering them would change the unit denominator the floor pins). Source:rules/common.mk(BUILD=coverage),rules/common-linux.mk(MMT_RELEASE_BUILD),tests/run_all_tests.sh(run_test_suite,write_coverage_report),tools/ci/sdk-coverage.sh,tools/ci/tests/test-sdk-coverage.sh,tests/sdk_coverage/run_tests.sh,tests/fault_injection/run_tests.sh. -
Q: Issue #388 (plan task 4.2, F-TEST-004) — how is whole-SDK coverage measured, including zero-hit sources, and how is the audit’s 82.9% 30-file cohort preserved? A: (1) Zero-hit sources: a consumer that loads a library makes gcov write a
.gcdafor every object in it, so the only sources missing after #387 were those in libraries no consumer loaded (e.g. the ENABLESEC engines wheninstalled_consumerdoes not load them).sdk-coverage.sh harvest --unexecutednow also reads each.gcnowith no.gcda— gcov reports it “not executed”, every line at count 0 — and with--consumedeletes those notes so the next suite does not re-read the same build. The runner passes it after every suite and deletes stalesrc/**/*.gcnoat start, so only this run’s builds count; a run that built aBUILD=coverageSDK (a subset run included) now ends withmake -C sdk clean, closing the #387 gap that left coverage objects for a later plain build to relink. (2) Accounting:tools/ci/check-sdk-coverage.shtakes the build sources from the SDK’s own object lists (make ENABLESEC=1printsCORE_OBJECTS…FUZZ_OBJECTS), classifies each record ofcoverage-combined.infoby path prefix into families (core,tcpip, handwrittenmobile,business_app,dicom, optionalsecurity_fuzz), generated (asn1c) or vendored (tools/ci/vendor-paths.txt, so llhttp no longer counts as handwritten), and fails on a built handwritten source without records, a tracked one neither built nor justified, a stale justification, an empty family, an unclassified record, or either floor. Nine sources are justified infloor.jsonsdk.excluded_sources: the sevensrc/examples/programs andmmt_tcpip_init.care in no library’s object list, andnas/util/decoder.cis built but has no executable lines. Headers count in their family (their inline code is executable). Branch coverage stays Not Assessed. (3) First measurement (aarch64, GCC 13.3): core 83.9%, tcpip 39.91%, mobile 29.5%, business_app 89.22%, dicom 89.19%, security_fuzz 35.35% (1,437/4,064); whole SDK 46.03% (15,126/32,858 lines, 715 files); floorwhole_sdk_line_pct45.0 (one point for gcov attribution differences across gcc versions/architectures). (4) Original cohort: the audit report names no files, so the 30 were recovered by re-runningbash tests/run_all_tests.sh --coverageon agit archiveof2ab7b73— it reproduced 82.9% (5,660/6,831) exactly — and the list is pinned insdk.original_cohort.sources. At HEAD the unit-only rate of those files is 82.87% (5,668/6,839), just under 82.9 because later code grew their denominator, so the gate measures the cohort on the combined records, where the integration suites also count: 83.29% (5,854/7,028). The unit-only figure is reported beside it. The #185 unit floor (floor.jsontop-level keys) is unchanged. Source:tools/ci/sdk-coverage.sh(harvest --unexecuted),tools/ci/check-sdk-coverage.sh,tests/run_all_tests.sh(coverage setup,run_test_suite, final clean),tests/coverage/floor.json(sdk),tools/ci/tests/test-sdk-coverage.sh,.github/workflows/c-cpp.yml(coverage job). -
Q: Issue #391 (plan task 4.5, milestone M3) — do the cleanup ratchets still hold after the coverage (#388) and accuracy (#390) tests, and does validation justify any new cleanup scope? A: Validation only — no rewrite. Measured on the branch base (
76f72075):count-init-wrappers.sh --strict0 definitions;check-canonical-init-wrappers.sh0 canonical wrappers and no raw init-logic block repeated ≥3 times (2 distinct, each once — the DEAD repeated-block findings set is empty);count-weak-types.sh --strict0/0/0 oversrc/mmt_core/public_include/;lint-commented-code.sh0 blocks;lint-markers.sh --strict80 markers, 0 without an issue reference. The one ratchet change:lint-markers.shreported the count below its baseline (80 < 107) — #327 resolved 26 markers and #380 one more without tightening it — sotools/ci/marker-baseline.txtmoves 107 → 80, as the helper asks. The dependency PRs touched nosrc/files; their handwritten scripts are shellcheck-clean and carry no new markers. Two unused locals intools/phase0/gen_mobile_pcap.py(chunk_len,f1) date from #144, not the new tests, so they stay out of scope under the task’s “new evidence before expanding scope” rule. Source:tools/ci/marker-baseline.txt,tools/ci/lint-markers.sh,tools/ci/count-init-wrappers.sh,tools/ci/check-canonical-init-wrappers.sh,tools/ci/count-weak-types.sh,tools/ci/lint-commented-code.sh,.github/workflows/c-cpp.yml(verify-helpers job). -
Q: Issue #392 (plan task 5.1, F-DOCS-001) — what is the embedding lifecycle and who owns a handler? A: Two levels of state. Global:
init_extraction()runs once, on one thread, before any handler exists, and itsfalsereturn means nothing else may be called (not evenclose_extraction(), whose handler-map walk assumes a completed init). Per-handler:mmt_init_handler()(NULL +errbufon failure) records the handler in the global map;mmt_close_handler()frees it and removes it from that map;close_extraction()runs last, force-closes any handler still registered, then unloads the plugins, so every handler pointer is dangling after it. Error paths release in reverse order. Worker ownership: onemmt_handler_tper worker, fed only by that worker; registration finishes before workers start; shutdown stops workers, closes each handler, then callsclose_extraction()once on a single thread.docs/THREADING.mdpreviously told embedders to call the internalclose_plugins()/free_registered_protocols()instead of the publicclose_extraction();docs/USER_GUIDE.md§3 omittedinit_extraction()entirely anddocs/Global-Handler.mdcited a stale header path andintsignatures.src/examples/packet_handler.cbecomes the runnable reference (it ignoredinit_extraction()’s result and leaked the handler and global state on its error paths). A newdocs_lifecyclesuite pins the citations, the call order, and compiles/runs the installed example against a throwawayMMT_BASEprefix; it runs the example from a neutral CWD becauseinit_extraction()prefers./pluginsover$MMT_BASE/plugins. Alternative rejected: citing only function names without lines (the task requires file:line sources; the suite’s registry keeps them from drifting). Source:src/mmt_core/src/packet_registry.c(mmt_init_handler,mmt_close_handler,init_extraction,close_extraction),src/mmt_core/src/plugins_engine.c(load_plugins),src/examples/packet_handler.c,docs/USER_GUIDE.md§3,docs/THREADING.md,tests/docs_lifecycle/run_tests.sh. -
Q: Issue #393 (plan task 5.2, F-UX-001) — where do the downloadable first-run source and capture live, and what makes the capture redistributable? A: Both are static files under
docs/first-run/(hello_packet.c,traffic.pcap), which plain Jekyll copies verbatim into the site artifact, so they are served athttps://montimage.github.io/mmt-dpi/first-run/by the same build CI verifies; the landing page links them relatively socheck-site-links.shfails if either is missing from the source tree or_site.docs/_includes/first-example.md(shared by README and the site) now carries the exactcurl/gcc/run steps, the expected output and the full source; the hero copy controls copy the same three commands. The capture is synthetic — ten Ethernet/IPv4 packets (a DNS lookup and one HTTP exchange) between RFC 5737 documentation addresses with locally administered MACs and fixed timestamps — generated bytests/docs_onboarding/make_traffic_pcap.py;google-fr.pcapwas not reused because it is a capture of real third-party traffic whose redistribution terms are not recorded in the repository. Thedocs_onboardingsuite regenerates the capture byte-for-byte, runs the displayed commands verbatim in an empty directory (site URL mapped tofile://ondocs/orDOCS_SITE_DIR,/opt/mmtmapped to a throwawayMMT_BASE), and diffs the output with the displayed one.hello_packet.copens the capture beforeinit_extraction()so a missing file is reported (with the fetch command) without touching MMT state. The USER_GUIDE §3 run line now fetchestraffic.pcapinstead of naming the repo-relativesrc/examples/google-fr.pcap, which only resolved from the checkout root (#392 review note). Source:docs/first-run/hello_packet.c,docs/first-run/traffic.pcap,tests/docs_onboarding/make_traffic_pcap.py,tests/docs_onboarding/run_tests.sh,docs/_includes/first-example.md,docs/index.html(hero),docs/USER_GUIDE.md§2–§3.
2026-09-24
-
Q: Issue #394 (plan task 5.3, F-PERF-001..004) — how are the P1 adversarial resource checks preserved as reproducible budgets, and what does a run record? A: The four
tests/resource_boundsfixtures stay the workloads (1,024/16,384 IPv6 inputs, 174,080 duplicate TCP offers, 1,024/16,384 out-of-order segments, 10,000 fragment replacements at the 1,024-datagram ceiling) and now report every deterministic count they already asserted as@rb <fixture> metric|seed <key> <value>lines (rb_result.h): workload scales, fixed seeds, accepted and refused work per workload, and counters (comparator calls, allocator calls, reserved bytes, list visits, victim visits, walker callbacks, index operations).run_tests.sh(default orall) strips those lines from the human log, writesresults.json(schemaresults.schema.json; path overridable withRESOURCE_BOUNDS_RESULTS, git-ignored by default) and evaluates the committedbudgets.json:eq/le/ltagainst a literal or a factor of another metric, andsumso offered work equals accepted plus refused. A missing, duplicated or malformed metric, a fixture without budgets, a failed budget or a failed fixture fails the run; the in-fixture CHECKs remain. Budgets hold the exact figures of the P1 issues: comparator calls below 751,360/200,273,920 with at most 24-fold growth, reserved storage at most 4,194,304 B against the 16,809,984 B baseline, pending-segment visits below 261,632/67,100,672 with at most 24-fold growth, and at most 10,000 victim callbacks against 10,240,000 with no map walk. Only counts are budgeted — no pps or timing guarantee (the epic defers timing benchmarks); the RSS-based phase0 harnesses (run_memory_ceiling_test.sh,run_session_scale_test.sh) stay separate because they need a built SDK and measure memory the counting fixtures cannot. CI enforcement ofresults.jsonis issue #395. Source:tests/resource_bounds/{run_tests.sh,budgets.json,results.schema.json,rb_result.h,test_ipv6_hash_bounds.cpp,test_tcp_memory.c,test_tcp_order.c,test_frag_eviction.c}. -
Q: Issue #396 (plan task 5.5, milestone M4) — does the documented first run work through the built site artifact, and what did the recorded browser checks find? A: Yes, now verified in CI. The new
site-onboardingjob in.github/workflows/c-cpp.ymlbuilds the site withtools/ci/build-docs-site.sh(the recipe Pages publishes, including the built-site link check) and runstests/docs_onboarding/run_tests.shwithDOCS_SITE_DIR=docs/_site: the suite now reads the renderedindex.htmlfrom that directory, requires both download targets to be byte-identical todocs/first-run/, runs the displayed fetch/compile/run steps verbatim in an empty directory (file URL percent-encoded, prefix shell-quoted, so paths with spaces work) and diffs the output; it also pins the copy-feedback live region and the mobile-menu toggle markup. Browser checks were recorded on 2026-09-24 against a locked Jekyll 4.4.1 build of this branch (Ruby 3.3.12 container;site_sha256737a1fa7…, before this entry was added) served under/mmt-dpi/, with headless Chromium (Playwright) at 1280×800 (desktop) and 375×812 (mobile, touch): 26/26 checks pass across the two viewports — both download links HTTP 200 and byte-identical; all 26 landing-page links and fragment targets resolve; Tab reaches the four copy buttons in order and every one of the first 40 Tab stops is visible with a focus outline; Enter on a copy button copies exactly itsdata-cmd, shows “copied ✓”, announces “… copied to clipboard” in#copyStatusand restores the label; the API tablist follows ArrowRight/End/Home; on mobile the toggle is shown, tap/Enter/Space open and close the menu (aria-expandedtracks it) and tapping a section link closes it; no console errors. The first pass found two defects, fixed here without redesign: the fullhello_packet.ccard widened the API grid past the viewport (content clipped bybody { overflow-x: hidden }— 526 px on mobile, 71 px on desktop), fixed withminmax(0, 1fr)grid tracks andoverflow-wrap: anywhereon the card’s prose; and a/favicon.ico404 at the origin root, fixed by declaring the site’s ownfavicon.ico. The #393 review notes are closed too: the missing-capture error prints thetraffic.pcapfetch hint only when that file was requested. Lifecycle (docs/USER_GUIDE.md§3) citations were already pinned bydocs_lifecycle; the resource-limit pagedocs/MMT-Handler.mdcited stalesdk/include/mmt_core.hlines and wrong return types, and now citessrc/mmt_core/public_include/mmt_core.h— registered in the same suite so the citations cannot drift. Source:.github/workflows/c-cpp.yml(site-onboarding),tests/docs_onboarding/run_tests.sh,tests/docs_lifecycle/run_tests.sh(CITING_DOCS),docs/index.html(API grid, favicon),docs/first-run/hello_packet.c,docs/_includes/first-example.md,docs/MMT-Handler.md,tools/ci/build-docs-site.sh. -
Q: Issue #421 — why did the ubuntu-22.04 arm64 package job intermittently fail with
qemu: uncaught target signal 11fromldconfig, and why run the arm64 legs on a native runner rather than retry the step? A: The crash is in the emulation layer, not in the package: the failing log (run 35817872534, job 107043215139, attempt 1) prints theqemu:prefix — QEMU user-mode (tonistiigi/binfmt@sha256:400a4873…, qemu v10.2.3) delivering SIGSEGV while running the Ubuntu 22.04 (glibc 2.35)ldconfig— once in the apt libc-bin trigger (which apt tolerates, as in runs 35811132281 and 35802233452) and once at the explicitldconfigintools/ci/build-package.sh, which exits 139; attempt 2 of the same commit passed. Pinning the binfmt image cannot help — every failing and passing run already used the same digest — and a retry would mask a realldconfigfailure behind the same exit code. So thebuildmatrix now selectsubuntu-24.04-arm(GitHub’s native arm64 runner, free for public repositories, already used by theresource-budgetsjob inc-cpp.yml) forarch: arm64and dropsdocker/setup-qemu-action: no instruction is emulated,docker run --platform linux/arm64runs the same digest-pinned image natively, andbuild-package.shkeeps its strictldconfig. Evidence on a native aarch64 host (the only kind the new legs use):build-package.sh ubuntu-22.04 debin the pinnedubuntu:22.04arm64 image built, installed (libc-bin trigger and explicitldconfigclean) and passed the installed-consumer check; 500 consecutiveldconfigruns in that image had 0 failures. One green CI run cannot prove flake-freedom; the argument is that the crashing component (the emulator) is no longer in the path. Native legs are also faster than emulated ones; the 60-minute cap stays. Source:.github/workflows/release-packages.yml(buildjobruns-on),tools/ci/build-package.sh(smoke-testldconfig),tools/ci/base-images.txt(header comment). -
Q: Issue #336 — the fuzz engine’s built-in VoIP quality model used bare metric IDs (12, 15, 3) flagged “just a test”, and
trapezoid_left()carried a commented-outkpi_value >= 0bound. Define the IDs or delete the scaffolding? Keep the bound? A: Define, not delete:init_voip_quality_estimation_struct()is exported bylibmmt_fuzzand exercised by therule_enginesuite, and its IDs are matched against XML-modelmetric_idattributes and the rule-registration helpers, so the values are a model contract. They becameVOIP_METRIC_ID_LOSS(12),VOIP_METRIC_ID_JITTER(15) andVOIP_METRIC_ID_QUALITY_INDEX(3) inmmt_quality_estimation_defs.h, values unchanged so existing models keep matching. The bound stays out: the left-shoulder trapezoid is open by definition (membership 1 for every value up to parameter 0), and XML models may declare a negativemetric_range_low, so a>= 0guard would leave such values in no grade. The dead line was replaced by a comment stating that, andtests/rule_engine/test_fuzz_engine.cnow asserts both the named IDs and the open shoulder. Marker baseline 80 → 76. Source:src/mmt_fuzz_engine/mmt_quality_estimation_defs.h,src/mmt_fuzz_engine/mmt_quality_estimation_engine.c,src/mmt_fuzz_engine/mmt_quality_estimation_utilities.c(trapezoid_left),tests/rule_engine/test_fuzz_engine.c,tools/ci/marker-baseline.txt. -
Q: Issue #329 (F-DEAD-008, surfaced by #232) — should the protocol “Throughout” metrics accumulated in
update_proto_stats_on_packet()/update_proto_stats_on_new_session()be replaced by periodic handlers? A: No — the current design stays. Each packet adds to cumulative per-protocol counters (packets_count,data_volume,payload_volume,sessions_count, first/last packet time, IP-fragment counters) only whileenable_protocol_statistics()is on; the application owns the reporting cadence by reading them withget_protocol_stats()/get_children_stats()and clearing them withreset_statistics(), the same application-driven model asregister_session_timer_handler()+process_session_timer_handler(). A periodic handler would not remove the per-packet work (a period’s totals must still be summed packet by packet), would need a clock the core does not have in offline/pcap replay (packet timestamps, not wall time), and would add a new public registration API and callback semantics (snapshot vs. reset, per-thread handlers) — none of which a caller has asked for. Keeping it changes no public API, ABI or classification output. A future implementation would need: an opt-inregister_protocol_stats_handler(handler, interval, cb, user)driven by packet timestamps from the packet path (like the session-timeout check,process_timedout_sessions()), a defined snapshot-then-reset contract that leaves the existing polling API unchanged, per-handler state only (no globals, perdocs/THREADING.md), and a unit suite exercising interval boundaries on a pcap replay. The twoTODO(#329)markers became plain comments pointing here, andtools/ci/marker-baseline.txtdropped 72 -> 70. Source:src/mmt_core/src/packet_stats.c(update_proto_stats_on_packet,update_proto_stats_on_new_session),src/mmt_core/public_include/mmt_core.h(get_protocol_stats,get_children_stats,reset_statistics,enable_protocol_statistics,register_session_timer_handler),src/mmt_core/src/packet_session.c(process_session_timer_handler),src/mmt_core/src/packet_pipeline.c(process_timedout_sessionscalls),tools/ci/marker-baseline.txt. -
Q: Issue #334 — the commented-out HTTP stage machine deleted in #232 asked whether to enforce the exclude strategy “payload seen in both directions ⇒ not HTTP”, and a second note asked whether
CONNECTshould classify as a distinctPROTO_HTTP_CONNECTinstead ofPROTO_HTTP. Enforce/add them, or keep the current detection? A: Keep the current behaviour for both; no classification or API change. Exclude strategy:mmt_classify_http()already excludes HTTP (http_bitmask_exclude()) on positive evidence — a first client payload that is not a known request line, a request that still has no line structure after 5 data packets, or a line that does not end in ` HTTP/1.x— andhttp_stage(0 → 1 → 2) only tracks how far the request line was seen. A "both directions carried payload" rule adds no evidence the request-line check lacks: every HTTP/1.x exchange carries payload both ways, and a flow whose client request was not recognised is already excluded, so the rule could only drop flows the parser currently accepts, i.e. change classification with no identified false positive to fix.CONNECT: the method is recognised in the request-line table and exposed per message through thehttp.methodattribute (MMT_HTTP_CONNECT_CODE,http.h), so consumers can already tell CONNECT tunnels apart; a new protocol ID would be a public API change (src/mmt_tcpip/include/mmt_tcpip_protocols.h, protocol names/attribute tables) and would reclassify existing flows. A future change to either would require: a new protocol ID and its registration (forPROTO_HTTP_CONNECT), a behaviour note inCHANGELOG.md, and — because both move session classifications — regenerating the phase0 golden-pcap baselines pertools/phase0/README.md(theclassification-gatefingerprint check blocks the merge otherwise), with evidence of the false positive/negative it fixes. The twohttp.ccomments that pointed at the open issue now state this decision. Source:src/mmt_tcpip/lib/protocols/http.c(mmt_classify_http,http_bitmask_exclude, request-method table),src/mmt_tcpip/lib/protocols/http.h(MMT_HTTP_CONNECT_CODE,HTTP_METHOD),tools/phase0/README.md`. -
Q: Issue #335 — the NAS decoder did not decrypt ciphered PDUs, decoded only the first TAI of a TAI list and stopped scanning the Attach Accept at the GUTI. What is implemented, and why is decryption deferred? A: The TAI list decoder (TS 24.301 §9.9.3.33) now decodes every partial list of all three types — one PLMN with non-consecutive TACs (00), one PLMN with consecutive TACs (01, expanded to one entry per TAC), several PLMNs (10) — into
tai[](at most 16 TAIs), and consumes the whole IE. Before, it always stopped after the first TAI, so with a multi-TAC list the Attach Accept read its ESM message container, and so the UE IP and the M-TMSI, from the wrong offset. The first TAI is still copied into the old flat fields, which are zeroed first. A number of elements above 01111 is read as 16, as the clause prescribes for a receiving UE. A partial list that overruns the IE length, the reserved type 11, or a 17th TAI stops decoding and setsmalformed; the IE length is still consumed, so the rest of the message is still parsed. The Attach Accept decoder (TS 24.301 §8.2.1) walks every optional IE by its format (TS 24.007 §11.2.4: type-1 TV for IEI ≥ 0x80, fixed TV for LAI/EMM cause/T3402/T3423, TLV-E for 0x7X, TLV otherwise) instead of scanning byte by byte for 0x50. The byte scan could stop on any value byte equal to 0x50. The decoder records GUTI, LAI, MS identity, EMM cause, T3402, T3423, equivalent PLMNs, emergency number list, EPS network feature support, additional update result and T3412 extended value in apresentbitmask; for a repeated IE only the first occurrence is kept (TS 24.301 §7.6.3), and other IEs are skipped and counted. An optional IE that overruns the message stops the walk and setsNAS_EMM_ATTACH_ACCEPT_TRUNCATEDwithout failing the message; a GUTI with a wrong length is skipped and leaves no half-filled identity. Decryption is deferred to #452. EEA1/EEA2/EEA3 need the per-UE NAS security context (K_NASenc, NAS COUNT, algorithm, direction), which cannot be derived from the traffic, and the SDK has no API for a host to supply it — inventing one is a design decision outside this issue. Passing the payload through unchanged stays correct for EEA0 (null ciphering), which is what makes the protected Attach Accept readable in lab captures. Marker baseline 64 → 62. Source:src/mmt_mobile/nas/ies/tracking_area_identity_list.{c,h},src/mmt_mobile/nas/emm/nas_emm_attach_accept.{c,h},src/mmt_mobile/nas/nas_msg.c(_nas_msg_decrypt),tests/nas_ies_tail/test_nas_ies_tail.c,tools/ci/marker-baseline.txt.
2026-09-25
-
Q: Issue #455 (follow-up to #331) — GRE sequence/loss tracking: implement
gre.seq_out,gre.seq_in,gre.seq_gapandgre.loss(per-tunnel state keyed by endpoints + GRE key, an eviction policy and a reorder-vs-loss definition), or deprecate them? A: Deprecate. GRE has no session of its own — the session belongs to the inner flow — so implementing them needs a new handler-level table keyed by (outer src, outer dst, key) with its own eviction and a reordering window, i.e. new per-packet state and memory on a path every GRE packet takes, for four attributes no consumer has reported missing (they have always beensilent_extractionand never produced a value). The raw inputs are already exported per packet (gre.key,gre.seqnb), so an application that needs loss/reorder accounting can keep that state with the policy it wants. The four ids stay reserved: the enum entries, aliases andsilent_extractionregistrations are kept, so name lookups andregister_extraction_attribute()keep succeeding and the attribute count is unchanged; the header documents them as deprecated, never extracted. The newparser_boundariesgrefixture checks the ids still resolve and register, that none of them is ever extracted, and thatgre.key/gre.seqnbextract within caplen (full and truncated frames, ASan-clean). Source:src/mmt_tcpip/include/mmt_tcpip_attributes.h(gre_attributes),src/mmt_tcpip/lib/protocols/proto_gre.c(gre_attributes_metadata),tests/parser_boundaries/test_gre_deprecated_attrs_api.c,tests/parser_boundaries/run_tests.sh. -
Q: Issue #455 — GTP per-message-type detail: should
gtp_classify_next_proto()handle echo, error indication, end marker and the other message types separately? A: No, dropped: the single non-G-PDU arm is already complete for classification. Per 3GPP TS 29.281 (§5.1, §7.1) only the G-PDU (type 255) carries a T-PDU; echo request/response, error indication, supported extension headers notification, end marker and every GTP-C message carry information elements only, so none of them encapsulates a further protocol and every one of them needs the same handling (truncate the inherited proto path at GTP). Separate arms would change no classification result while adding branches to the classification path, and the per-message distinction consumers need is already exported asgtp.msg_type; decoding GTP-C IEs would be new extraction work, not classification. The marker is replaced by a comment citing the spec; the phase0 golden fingerprint is unchanged. Source:src/mmt_tcpip/lib/protocols/proto_gtp.c(gtp_classify_next_proto,gtp_attributes_metadata),tools/phase0/ci/check_classification.sh. -
Q: Issue #455 — internal packet/flow struct realignment (“rebuild all memory areas to have a more aligned memory block”) in
mmt_tcpip_internal_defs_macros.h: do it now? A: Dropped. It is a layout refactor of the core with no measurement behind it: the note sat among macros, next to no struct, and named no field, target size or hot path. A reorder ofmmt_tcpip_internal_packet_structor the per-flow structs changes every protocol’s field offsets and cache behaviour, so it is only worth doing against profiling data (pahole holes, per-session bytes, cache-miss counters from the phase0 benchmark) showing a gain; without that data it is risk with no demonstrated benefit. The marker is removed rather than retargeted; a future layout change starts from such a measurement. Source:src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h. -
Q: Issue #455 — RTP quality-estimation setup (
rtp_initial_data_processing, compiled only without_MMT_BUILD_SDK): who owns it, and should it become a generic helper? A: The fuzz engine (libmmt_fuzz) owns quality estimation; protocols only supply their metric values. Implemented:init_application_quality_estimation_context(model, values, nb_values)builds the estimation context of a model and bindsvalues[i]to the model metric withmetric_indexi; the context owns the model, andfree_application_quality_estimation_context()frees both (context first, as #447 requires). The helper validates everythinginit_new_internal_application_quality_estimation_struct()wouldexit()on and every slotestimate_quality_index()dereferences — NULL model or values,nb_valuesdifferent from the model’s metric count (the old RTP code bound two slots whatever the model held, leaving the rest uninitialised), a NULL slot, a metric index out of range, an invalid estimation-metric set — and frees the model on every refusal (the old code leaked it when the context could not be built). RTP now calls the pair in its init and cleanup paths. Testing it throughestimate_quality_index()exposed an off-by-one incalculate_index_array(): it sampledsample_nb + 1points into aSAMPLES_NB-element stack array (stack smashing on the first estimate); it now samples indexes0 .. sample_nb - 1, the range every consumer reads. Therule_enginefuzz-engine test covers the refusals, the binding, an in-range estimate and heap balance, ASan-clean. Source:src/mmt_fuzz_engine/mmt_quality_estimation_utilities.{c,h},src/mmt_fuzz_engine/mmt_quality_estimation_calculation.c(calculate_index_array),src/mmt_tcpip/lib/protocols/proto_rtp.c(rtp_initial_data_processing,rtp_session_data_cleanup),tests/rule_engine/test_fuzz_engine.c,tools/ci/marker-baseline.txt. -
Q: Issue #452 (split from #335) — the NAS decoder passed the payload of a ciphered EPS NAS PDU (security header type 2 or 4) through unchanged, so for EEA1/EEA2/EEA3 the plain-message decoder parsed ciphertext. Should the SDK decrypt NAS (a key-supply API plus EEA1/EEA2/EEA3), or keep decryption out of scope? A: Keep it out of scope, and stop parsing ciphertext. Context: decryption needs the per-UE NAS security context — K_NASenc, the selected algorithm, the NAS COUNT (overflow and sequence number) and the direction — and only the algorithm is on the wire. Options: (1) a public key-supply API (per-UE keys keyed by an S1AP/UE identity, their lifetime and eviction, thread safety) plus SNOW 3G, AES-CTR and ZUC implementations checked against the TS 33.401 Annex C / TS 35.201-35.223 vectors, and NAS COUNT tracking across lost or reordered PDUs; (2) no decryption, but never parse a PDU known to be ciphertext. Chosen: (2). Option (1) is a large new public API and crypto surface with no user asking for it, and a passive probe rarely holds the subscriber keys; option (2) fixes the actual defect — ciphertext read as a UE IP or an M-TMSI. Implemented: a DownlinkNASTransport is now decoded only to read the Security Mode Command it carries (integrity protected, never ciphered, TS 24.301 §5.4.3.2); the type of ciphering algorithm of its Selected NAS security algorithms IE (§9.9.3.23) is kept per S1 connection, keyed by the (MME-UE-S1AP-ID, eNB-UE-S1AP-ID) pair, in a fixed 1024-slot table (
S1AP_NAS_CIPHERING_SLOTS) direct-mapped by MME-UE-S1AP-ID: a newer connection overwrites its slot, a UEContextReleaseCommand frees it, and handler cleanup (s1ap_entities_reset()) clears the table, so the state never grows.nas_decode_ciphered()then decodes a ciphered PDU as plain text for EEA0, returnsDECODE_CIPHERED_PAYLOADwithout reading the payload for EEA1-EEA7 (4-7 are reserved and treated as non-null), and, when the algorithm is unknown (no Security Mode Command seen — capture started later, a handover or a new S1 connection re-using a NAS context, an evicted slot, or an initial UE message), decodes it only if its first octet is the one of a plain NAS message (0x07 for EMM, protocol discriminator 2 for ESM). Unknown stays best-effort rather than refused because the EEA0 lab and test captures this path exists for often do not contain the Security Mode Command, and refusing would lose their UE IP and M-TMSI; the first-octet check alone rejects about 15 of 16 random ciphertexts, and being read as an Attach Accept needs octet 1 = 0x07 and octet 2 = 0x42, a probability of about 1/65536 for a ciphertext. Integrity-only PDUs (types 1 and 3) are unaffected. A future key-supply API would plug in at the same place: the S1AP decoder already resolves a per-connection context before it callsnas_decode_ciphered(); that lookup would return the keys and COUNT alongside the algorithm, and_nas_msg_decrypt()would decrypt into a scratch buffer instead of returning NULL for EEA1-EEA3. Marker baseline 38 → 37. Source:src/mmt_mobile/nas/nas_msg.{c,h}(nas_decode_ciphered,nas_get_security_mode_command_ciphering,_nas_msg_decrypt),src/mmt_mobile/nas/util/decoder.h(DECODE_CIPHERED_PAYLOAD),src/mmt_mobile/s1ap/s1ap_common.{c,h}(_decode_s1ap_downlinkNASTransport, the ciphering table),src/mmt_mobile/proto_s1ap.c(_free_entities_list),src/mmt_mobile/include/proto_s1ap.h,docs/ARCHITECTURE.md,tests/nas_ies_tail/test_nas_ies_tail.c,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c,tools/ci/marker-baseline.txt. -
Q: Issue #330 — the weak-classifier marker backlog (46
TODO/XXX(#330)sites insrc/mmt_tcpip): which flagged classifiers are wrong, and which flags were only unanswered questions? A: Seven sites were real gaps and are fixed; the other flags were verified or accepted and replaced by a plain comment recording the verdict. Fixed: MQTT on port 1883 now needs a well-formed fixed header (type nibble 1..15, a 1..4-byte Remaining Length varint) — the port alone matched any payload; port 8883 (MQTT over TLS) is unchanged. IPFIX (version 10) is read with its own header (message length at offset 2 must equal the datagram, export time at offset 4) — it was read with the NetFlow v5/v9 layout, so a real IPFIX message almost never matched; v5/v9 are unchanged. sFlow additionally needs agent address type 1 or 2 and the header length it implies — the00 00 00 02/05prefix alone is common in other UDP payloads. RADIUS accepts every RFC 2865/2866 and RFC 5176 code (1-5, 11-13, 40-45) instead ofcode <= 5(code 0 accepted, Access-Challenge refused), requires the 20-byte header including the authenticator (RFC 2865 §3; a 5-19-byte payload with a matching length field was accepted), and reads the length field only once the header is in the payload. A PASV227reply on an IPv6 FTP control connection dereferenced the NULL IPv4 header; it now records the control connection’s server address, as the EPSV229path does; the IPv6 session tuples of the FTP analysis stored the address in 17-byte buffers thatftp_copy_tupl6()/ftp_compare_tuple6()handle as 32 bytes (heap overflow under ASan), now sized and zero-filled to 33. OSCAR’s checker excludes a UDP flow at once (every signature needs TCP). Spotify’s source-endpoint lookup is NULL-guarded. Found during the review: iMesh’s BearShare-login match comparedAccept-Encoding: identitywith length25 == 0(a misplaced parenthesis), so it never fired; it now compares 25 bytes. Verified (no change): the UDP registrations of eDonkey, Jabber, POPO and the TCP ones of POPO, Icecast and SHOUTcast match on that transport; pcAnywhere-on-TCP and Gadu-Gadu-on-UDP exclude on the first packet; Gnutella/Pando already branch per transport; SIP’s inline retransmission test equals the selection bitmask; ICMP deliberately classifies nothing after it; the offset-0 stacking inproto_tcp.c/proto_udp.cis right; Thunder already returns before the TCP search; thehttp.cheader parser and the batman format attribute are unreachable (never registered). Accepted as deliberate strictness: exact-length STUN/RTP-over-TCP framing, STUN-gated RTP-over-TCP, TDS pre-login only, QQ 0x03, NetBIOS name query/response only, Zattoo fixed User-Agent, Meebo fixed offsets, the new-flowmemsetinproto_tcp.c. Marker baseline 37 → 0. Source:src/mmt_tcpip/lib/inter_proto_classif_list.def,src/mmt_tcpip/lib/protocols/proto_{mqtt,netflow,sflow,radius,ftp,oscar,spotify}.c(fixes),tests/parser_boundaries/test_classifier_audit_api.c,tools/ci/marker-baseline.txt. -
Q: Issue #481 — which file is the cross-agent source of truth, and does the never-commit rule still cover all of
dist/? A:AGENTS.md. It now carries the commands (build, the 30/30 test runner, subsets, sanitizer/coverage modes, the phase0 gates with a scratchMMT_PREFIX, the--with-harnessespre-push tier, lint and doc validators), the layout map, the hard rules as Never / Ask-first constraints and the Done-when checks thatCLAUDE.mdused to hold; it no longer defers toCLAUDE.md. Facts with a single home (toolchain line,MMT_BASEcontract, profile-switch clean rule) stay indocs/AGENT_ENVIRONMENT.mdand are linked. The never-commit rule is narrowed fromdist/todist/packages/(thetools/ci/build-package.shoutput, now in.gitignore):dist/ZIP/is hand-maintained installer source (F-DOCS-017), which supersedes the #369 entry’s decision to keep thedist/wording.scripts/validate-agent-environment.shchecks each point. Source:AGENTS.md,.gitignore(dist/packages/),tools/ci/build-package.sh(output path),git ls-files dist(dist/ZIP/*),scripts/validate-agent-environment.sh(section 5). -
Q: Issue #482 — what stays in
CLAUDE.mdonceAGENTS.mdholds the shared rules, given the task names the token-efficiency notes as Claude-specific but also forbids repeating anyAGENTS.mdrule? A: Only the two imports and a comment:@AGENTS.mdon line 1, then@docs/AGENT_ENVIRONMENT.md(Claude-only syntax —AGENTS.mdcarries no@imports, so it links the environment notes, while the wrapper loads them in full). The token-efficiency block is identical for every agent, so it lives once, at the end ofAGENTS.md, and reaches Claude through the import; a copy inCLAUDE.mdwould state each line twice, which the no-repeat criterion rules out.scripts/validate-agent-environment.sh(section 6) checks the first line, the absence of a commands/hard-rules block and that no substantiveCLAUDE.mdline appears inAGENTS.md. Source:CLAUDE.md,AGENTS.md(Token Efficiency),scripts/validate-agent-environment.sh(section 6). -
Q: Issue #489 (F-CI-002) — how does the release workflow become the only publisher, given that a Release can still be created by hand and v1.9.0’s verify-tag failure went unnoticed for 24 days? A: Three pieces, each statically re-checked by
tools/ci/check-release-verification.sh. (1)tools/ci/check-release-tag.sh <tag>adds an ancestry gate — the peeled tag commit must satisfygit merge-base --is-ancestoragainst${RELEASE_BASE_REF:-origin/main}, whichverify-tagfetches explicitly; a missing tag or base ref or a shallow clone is exit 2, never a skip. The gate runs only for an explicit tag argument: theGITHUB_REF_NAMEdefault stays version-only because c-cpp.yml’sversion-agreementjob calls the script without an argument on tag pushes from a depth-1 checkout. (2)softprops/action-gh-release(which created or updated whatever Release existed) is replaced bytools/ci/publish-release.sh: it lists releases through the API (the by-tag endpoint hides drafts), refuses any existing Release for the tag except a draft authored bygithub-actions[bot]— the leftover of a failed attempt, deleted so a re-run can finish — creates the Release as a draft with every asset, then publishes it by id withmake_latest=legacy, so a Release is never visible without its assets and an older-line patch never takes “Latest”. (3) Arelease-alertjob ((failure() || cancelled()), tag pushes only, job-scopedissues: writeheld by no other job, asfuzz-alertin c-cpp.yml) runstools/ci/release-alert.sh, which opens or comments onRelease workflow failed for <tag>with each job’s result. Restricting who may createv*tags (a tag ruleset) and retiring the empty v1.9.0 Release are repository-setting and release-object changes left to a maintainer; the workflow can only refuse a Release that exists at publish time.tools/ci/dependency-advisories.mdstill lists softprops: it is a dated, commit-pinned measurement and is refreshed by its own script, not by hand. Source:tools/ci/check-release-tag.sh,tools/ci/publish-release.sh,tools/ci/release-alert.sh,.github/workflows/release-packages.yml(verify-tag,release,release-alert),tools/ci/tests/test-release-gates.py,tools/ci/tests/test-release-publish.sh. -
Q: Issue #491 (F-DEP-202, F-DEP-201, F-DEP-102) —
tools/ci/base-images.txtclaimed a dependency bot and a weekly run diff the pins, but neither existed; how are the CI image pins kept current when quay.io drops the previouscentos:stream9manifest on every retag? A: Dependabot only reads images from Dockerfiles, so the pins are refreshed bytools/ci/refresh-base-images.sh: for eachname:tag@sha256:<digest>line it resolvesname:tagandname@<digest>withdocker buildx imagetools inspect --format '{{json .Manifest}}'and reportsok,drift(tag moved) ormissing(pinned digest gone — every pull fails); a repin target must be an index coveringlinux/amd64andlinux/arm64.--checkexits 1 on any of these, 2 when a tag does not resolve at all (inconclusive);--writerewrites the pin in the baseline and every workflow quoting it..github/workflows/base-image-refresh.ymlruns it daily (weekly is too slow: two hand repins, #588 and #591, were needed within a day): a read-onlydriftjob fails visibly on exit 1 or 2, and only on exit 1 arepinjob runs--write. Because every pin is quoted in a workflow file and the built-inGITHUB_TOKENcannot be granted theworkflowsscope, GitHub refuses its push of such a commit; so the job force-pushesci/base-image-refreshand opens or edits one PR only when the optional secretBASE_IMAGE_REFRESH_TOKEN(contents, pull-requests, workflows write) is set — such a PR also triggers CI, which aGITHUB_TOKENPR would not — and otherwise opens or edits one issue, “Base image pins out of date”, with the exact diff (issues: writeis the job’s only write scope). Creating that secret is a maintainer decision, not made here. A pinned-digest lookup counts asmissingonly when the registry answers “not found”; any other error is inconclusive (exit 2), so a rate limit never reads as a garbage-collected pin. The drifted Ubuntu/Debian pins found while building this were deliberately not repinned in the same change — the first scheduled run proposes them.tools/ci/check-image-digests.shnow scans every workflow and composite action by default (image:/container:keys,uses: docker://, and the image operand ofdocker run|create|pull) and also fails on a baseline entry no workflow uses, sobuildpack-deps:bookworm(asn1c gate) is pinned and recorded. Dependabot gains abundlerentry for/docs;pipx install pre-commit==4.6.2pins the CI hook runner (4.7.0 was under two weeks old). Source:tools/ci/refresh-base-images.sh,tools/ci/check-image-digests.sh,tools/ci/base-images.txt,.github/workflows/base-image-refresh.yml,.github/workflows/asn1c-regen.yml,.github/dependabot.yml,.github/workflows/c-cpp.yml(pre-commitjob),tools/ci/tests/test-image-pins.sh. -
Q: Issue #492 (F-DEP-204, plan task 1.4) — the committed #384 advisory snapshot (
tools/ci/dependency-advisories.md, FAIL with 31 High/Critical distro advisories) had no disposition, the script ran in no workflow, and Debian could never pass becauseunimportantrecords counted as blocking. How does the measurement become a gate that can pass, and stay current? A: Four changes totools/ci/check-dependency-advisories.sh. (1) Distro triage: a record whose distro marks it as having no security impact on that release — Debianurgency: unimportant(OSVaffected[].ecosystem_specific, per release) or Ubuntu prioritynegligible(an OSV severity entry of typeUbuntu) — is listed with its severity but never blocks, because an upstream CVSS score merged in from an alias must not override the distro’s decision (CVE-2019-1010022 is CVSS 9.8 upstream andunimportantin Debian). The 2026-10-21 run marks 9 Debian 12 and 4 Ubuntu records non-blocking this way. (2) Dispositions:tools/ci/advisory-dispositions.txtholds one time-boxed entry per advisory (id | target glob | expires | tracking | reason, matched by id or alias); an unexpired entry makes that advisory non-blocking, an expired entry fails the run (exit 1) whether or not its advisory is still reported, and a malformed line makes the assessment incomplete (exit 2). It ships with 17 entries expiring 2026-12-31 for the advisories that still blocked after triage on 2026-10-21 — 15 High/Critical and 2 unrated, glibc/gcc-12/libxml2 in Debian 12 and gcc-12 in Ubuntu 22.04, allunfixed(no fixed distro revision exists, so there is no in-repo change). They are tracked, not accepted, and are a maintainer decision to confirm or replace. (3) Repository advisories: the direct docs gems (the lockfile’s DEPENDENCIES; the repository comes from RubyGems metadata) and every pinned action are also checked againstGET /repos/{owner}/{repo}/security-advisories, whose advisories the reviewed global database may not carry yet — GHSA-572m-7cg5-6j5r (jekyll-seo-tag 2.9.0) and GHSA-3343-386p-v26g (jekyll-remote-theme 0.5.2), both returning 404 from/advisories/{id}, are reported againstdocs/Gemfile.lockas Medium (non-blocking; #494 bumps them). Version ranges are evaluated with Gem::Version-style ordering, including thea and b, or cform repository advisories use; an unreadable range is a scanner failure, never a silent miss. (4) Image map: Debian 13 /trixieand the codename tags map to their OSV ecosystems, andbuildpack-deps(the asn1c gate container recorded intools/ci/base-images.txtby #491) is listed as an excluded CI tooling image instead of failing the run as unmapped. The weeklydependency-advisoriesworkflow (Mondays,contents: readonly, never on a pull request, so never a required check) runs the script over the images oftools/ci/base-images.txtand uploads the Markdown and JSON report as an artifact; the committed snapshot is deleted, and the measurement entries above that cite it remain as the historical record. The verdict logic is tested offline on every PR bytools/ci/tests/test-dependency-advisories.py(release_gates suite), which drives the real script on fixture trees against a local stub of OSV, the GitHub APIs and RubyGems. Source:tools/ci/check-dependency-advisories.sh,tools/ci/advisory-dispositions.txt,.github/workflows/dependency-advisories.yml,tools/ci/tests/test-dependency-advisories.py,tools/ci/tests/dependency-advisories-feeds.json,tests/release_gates/run_tests.sh.
2026-10-21
-
Q: Issue #490 (plan task 1.2, F-CI-004/F-CI-005/F-CI-014/F-SEC-011) — branch protection required the 16 contexts #184 set while later gates stayed advisory, the release-packages PR jobs were path-filtered (so no context of theirs could be required), approvals were 0 with code-owner review off while
.github/CODEOWNERS:3-6claimed one code-owner approval, two required context names were fragile, and CODEOWNERS omitted the scripts and configs that decide what CI enforces. What does the repository change, and what is left to a maintainer? A: The repository records intent and checks it; protection itself is a maintainer action (the change cannot edit repository settings). (1).github/required-checks.txtlists the 27 contexts to require, exactly as the check runs report: the 16 live ones verbatim plustoolchain-floor,assertions-live,codeql,fuzz(the fuzz-regression replay, #486), bothresource-budgetslegs,site-onboarding,root-install,leak-gate,version-agreementandpackages-gate. (2)tools/ci/check-required-checks.shderives every job’s check-run name from the workflows (name:with matrix expressions substituted, else the job id, plus the ` (v1, v2)matrix suffix with empty values dropped — the observed bareunit-tests; run-timefromJSONmatrices as globs, an exact name winning over a glob) and fails when a context matches no job, or only jobs that never report on a pull request intomain(no or path-filteredpull_requesttrigger, a tag/scheduleif:); a name shared with such a job passes when one pull-request job reports it (buildis also apages.ymljob).–livecompares the list with live protection (read-only; needs admin read, so not in CI). It runs blocking inverify-helpers, which installs python3-yaml first; its self-test runs there withREQUIRE_PYYAML=1and from therelease_gatessuite, which skips it without PyYAML so the suites never depend on the runner image. (3)release-packages.ymllost its workflow-levelpaths:filter: achangesjob matches the PR's merge-commit diff (HEAD^1..HEAD) against the same paths,build/reproducibilityrun only on a match (always on tags and dispatch), and theif: always()packages-gatepasses when they were skipped for a non-packaging change and otherwise requires both to succeed. PR runs now cancel superseded runs; tag runs still never do. (4) Fragile names: the two non-required ones being added —Leak regression over the golden corpus (Valgrind)andVersion sites agree with rules/common.mk— now report asleak-gateandversion-agreement. The two fragile required ones stay, because renaming a required context in the same change leaves it unreported and blocks every PR:Labelled-pcap precision/recall holds or improves (M9, issue(the#74in the unquoted name is a YAML comment) andunit-tests (-fsigned-char, hashmap memory hexdump mmt_utils mmt_inet_ntop)(the suffix is the suite list); each rename is a follow-up change that swaps the context at its merge. (5).github/CODEOWNERS:3-6states the intended review setting — 1 approving code-owner review — and CODEOWNERS now coverstools/ci/,tools/phase0/ci/,scripts/,.gitleaks.toml,.gitleaksignore,.pre-commit-config.yaml,.shellcheckrc,install.sh,dist/ZIP/,rules/,sdk/Makefile,debian/andSECURITY.md. The apply commands are inCONTRIBUTING.md("Required checks and review"). Source:.github/required-checks.txt,tools/ci/check-required-checks.sh,tools/ci/tests/test-required-checks.sh,tests/release_gates/run_tests.sh,.github/workflows/release-packages.yml(changes,packages-gate),.github/workflows/c-cpp.yml(verify-helpers,version-agreement),.github/workflows/phase0-baseline.yml(leak-gate),tools/phase0/README.md(regenerated ci-gates block),.github/CODEOWNERS,CONTRIBUTING.md,gh api repos/montimage-projects/mmt-dpi/branches/main/protection(16 contexts,required_approving_review_count: 0`, read 2026-10-21). -
Q: Issue #509 (plan task 5.1, F-TEST-004) —
tips_eval.chad 8 of 834 lines covered and no test fed packets through a loaded rule; which evaluator behaviour do the new characterisation tests pin, given that #510-#512 change the evaluator afterwards and some current verdicts contradict the rule’s plain reading? A: The CURRENT verdicts, quirks included, so each later fix has to change an expectation on purpose.tests/rule_engine/test_rule_eval.cloads one single-property rule fromtests/rule_engine/eval/throughinit_sec_lib()per forked child (the engine keeps its rules in process globals and has no unload; analarmturns a hang into a failure), replays synthetic Ethernet/IPv4/UDP frames throughpacket_process()and asserts the ROOT rule’snb_satisfied/nb_not_satisfiedcounters plus the verdicts passed to the result callback. 43 scenarios cover THEN on the same packet, AFTER, BEFORE, the delay window, the packet-counter window, AND, OR, NOT, REPEAT, nested THEN, a.1event reference and||/arithmetic expressions, each with a satisfied and a not-satisfied case where the rule can produce both. Pinned quirks, each marked “current behaviour” in the test: an AND or NOT node without a delay of its own cannot span two frames (check_for_timeout()returns 0, which isVALID, andcheck_time()passes it on as an expiry), so the NOT rule’s not-satisfied case comes from that expiry and the negated event on a fresh instance reports nothing; a verdict reached without any validated event is counted but not passed to the callback (no JSON history); an out-of-order timestamp is only logged (Error 23); a counter-only BEFORE rule never reports “A without a preceding B” (theverify_leftprobe runs only for a negativedelay_min); a BEFORE sequence below the root never completes; a too-close B eliminates a BEFORE-window instance. Two shapes crash today and are deliberately not tested: NOT as the right son of a root THEN (NULLcurr_rinverify_not_backtrack(),src/mmt_security/tips_eval.c:1248) and any rule withkeep_state(thecopy_instance()path) — #510 owns thekeep_statetest. Measured afterbash tests/run_all_tests.sh --coverage:tips_eval.c561/834 lines (67.3%) intests/coverage/coverage-combined.info;security_fuzz61.48%, whole SDK 51.05%. Source:tests/rule_engine/test_rule_eval.c,tests/rule_engine/eval/*.xml,tests/rule_engine/run_tests.sh(step 8),src/mmt_security/tips.c(analyse_incoming_packet),src/mmt_security/tips_eval.c,src/mmt_security/tips_report.c(rule_is_satisfied_or_not),tools/ci/check-sdk-coverage.sh. -
Q: Issue #496 (plan task 2.3, F-DEP-305) —
tools/ci/vendor-paths.txtrecorded only llhttp; BSDqueue.hand the Apple/MIT-derivedmmt_inet_ntop.chad their notices stripped in 1b02f7e0, the asn1c runtime had no recorded licence, and the release SBOM listed only the package. Where does the inventory live, and what happens to the two stripped files? A: A new machine-readable manifest,tools/ci/vendored-components.json, holds one entry per component: SPDX packagenameandspdx_id, version, upstream, pin, download location, purl, SPDX licence, copyright line, in-treepathsandchecks(a file plus a regex whose groups, joined by., must equal the recorded version or pin). It lists llhttp 9.4.3 (MIT,release/v9.4.3, checked againstLLHTTP_VERSION_*insrc/mmt_tcpip/lib/llhttp.h) and the asn1c runtime skeletons undersrc/mmt_mobile/asn1c/common/(BSD-2-Clause, mouse07410/asn1cdbd0ed09…, 0.9.29, checked againstASN1C_REF/ASN1C_VERSIONinsrc/mmt_mobile/asn1c/ASN1C_VERSION).tools/ci/vendor-paths.txtkeeps its one job — the files excluded from the clean-code metrics and the coverage denominators — unchanged in content: listing more there would move the cppcheck/marker ratchets and the coverage accounting.tools/ci/vendored-components.py check(blocking inverify-helpers, and in the release build job) fails when one of its entries belongs to no component.vendored-components.py sbomadds each component to the syft SPDX-JSON (which only holds the package file andDOCUMENT DESCRIBESit) as a package CONTAINed by the described root, in the build job before the artifact upload, so SHA256SUMS and the attestation cover the extended SBOM;tools/ci/check-release-verification.shchecks that step stays wired. The two stripped files were replaced rather than re-noticed, since Linux/glibc is the only supported platform:queue.his deleted andhashmap.h/proto_ip_frag.hinclude glibc<sys/queue.h>(they use onlyLIST_HEAD/ENTRY/INIT/INSERT_AFTER/INSERT_HEAD/REMOVE, the same BSD macros and field names);mmt_inet_ntop.ckeeps its name, so the build lists, the suites,tests/coverage/floor.jsonand the required-check names are untouched, but now holds an original wrapper over glibcinet_ntopthat keeps the exported symbol and its NULL returns. Its IPv6 text is now the canonical RFC 5952 form: a single zero group is no longer shortened to::(2001:db8:0:1:1:1:1:1, formerly2001:db8::1:1:1:1:1), and::a.b.c.dfollows glibc’s rules; no golden output, phase0 baseline or test expectation formats such an address.hashmap.handproto_ip_frag.hare Montimage code that only includedqueue.h, so they are not components. Reviewed and not listed: every other tracked source outsidesrc/mmt_mobile/asn1c/was searched for third-party copyright/licence notices;src/mmt_tcpip/lib/protocols/proto_citrix.cadopts nDPI’s citrix detection logic (the ICA/CGP byte signatures and the== 6/> 22length thresholds, as its header says) re-expressed in MMT code, andproto_syslog.cis likewise “nDPI-inspired” — no nDPI source text is copied, so neither is a vendored component. The generated S1AP/NGAP codecs undersrc/mmt_mobile/asn1c/{s1ap,ngap}and the 3GPP ASN.1 modules undersrc/mmt_mobile/asn1c/support/are generator output and input, pinned byASN1C_VERSIONandsupport/README; the 3GPP specifications’ terms are left to the licence-files task #497, which generates the notices from this manifest. No CHANGELOG line: the topmost section is the released 1.9.1 andscripts/validate-release-prep.shties it toVERSION(as for #494). Source:tools/ci/vendored-components.json,tools/ci/vendored-components.py,tools/ci/tests/test-vendored-components.py(run by therelease_gatessuite),.github/workflows/release-packages.yml(step “Add vendored components to the SBOM”),.github/workflows/c-cpp.yml(verify-helpers),tools/ci/check-release-verification.sh,src/mmt_core/src/mmt_inet_ntop.c,tests/mmt_inet_ntop/test_mmt_inet_ntop.c,src/mmt_core/private_include/hashmap.h,src/mmt_tcpip/lib/protocols/proto_ip_frag.h. -
Q: Issue #504 (plan task 4.1, F-BUG-009/F-BUG-202) — the public
data_defs.h#undef‘dntohl/ntohsand redefined them as unconditionalswab32/swab16macros that evaluated their argument up to four times, andstruct diameter_headerdeclared the command flags as four 1-bit bitfields in wire order, which GCC allocates LSB-first on little-endian hosts. What replaces the override, what happens to theswab*/ntohllhelpers consumers may use, and how are the flags decoded? A:data_defs.h:47-82now includes<arpa/inet.h>and<endian.h>and no longer touchesntohl/ntohs, so every TU and every consumer gets the system definitions: single evaluation, and a no-op on big-endian hosts. On the little-endian hosts the SDK ships for, glibc’sntohl/ntohscompute the same values as the old swaps, and no in-tree call passes an argument with a side effect, so classification is unchanged.swab16/swab32stay as public unconditional byte swaps.swab64stays an unconditional 64-bit swap, now written with twoswab32calls so it no longer depends onntohl.ntohllbecomesswab64(x)on little-endian hosts and((uint64_t)(x))when__BYTE_ORDER == __BIG_ENDIAN. It is still guarded by#ifndef ntohlland is now function-like (was the object-like#define ntohll swab64), and its two in-tree callers (proto_dtls.c,proto_int.c) already call it. The four flag bitfields become oneuint8_t flagsat byte offset 4 (mmt_mobile_internal.h), read throughDIAMETER_HDR_FLAG(hdr, DIAMETER_HDR_FLAG_{R,P,E,T}_MASK)(0x80/0x40/0x20/0x10, RFC 6733 §3).proto_diameter.ccheckssizeof == 20andoffsetof(flags) == 4with_Static_assert. The attribute ids, aliases and types (flag_r…flag_t,MMT_U8_DATA) are unchanged; only the extracted values change: a CER (0x80) now reports R=1, where the oldflag_rbitfield read the byte’s least significant (reserved) bit. Out of scope and left as is:copy_4bytes_order()and the 24-bitlength/command_codebitfields still assume a little-endian host. No CHANGELOG line: the topmost section is the released 1.9.1, the same as for #494/#496. Source:src/mmt_core/public_include/data_defs.h,src/mmt_mobile/mmt_mobile_internal.h,src/mmt_mobile/proto_diameter.c,tests/proto_classifiers/test_diameter_flags.c,tests/installed_consumer/test_byte_order.c(run bytests/installed_consumer/run_tests.shat -O0 and -O2 against the installed headers). -
Q: Issue #507 (plan task 4.4, F-BUG-201/F-BUG-220) — S1AP attribute extraction cached the parsed packet in
static __threadvariables keyed only bypacket_id, a per-handler counter, and held raw pointers into the process-global entity store that any handler close frees; the NAS decoders wrote a process-globalerrorCodeDecoder. How is the cache keyed, and what does it hold? A: The key is (packet->mmt_handler,packet_id, store generation);_free_entities_list()bumps the generation under the entitymutex, so a handler that reuses a closed handler’s address never hits the old entry. The cache holds copies of the packet’s eNodeB/MME/UE entities taken under the mutex after the parent links are set, not entity ids re-resolved on each attribute (the issue’s suggestion): a copy needs no per-attribute list walk, cannot resolve to a recycled id after a reset, and for a single handler yields the same values, since a packet’s attributes are extracted with no store write in between.errorCodeDecoderwas written on every error path and never read (its one reader,CHECK_MESSAGE_TYPE, has no caller), so the decoders now only return their code andsrc/mmt_mobile/nas/util/decoder.c, which held nothing but the global, is deleted together with itssdk.excluded_sourcesentry intests/coverage/floor.json(8 justified sources remain; the #388 entry above names 9). TheerrorCodeDecoderdynamic symbol leaveslibmmt_tmobile.so; no installed header declared it. No CHANGELOG line: the topmost section is the released 1.9.1, as for #504. Source:src/mmt_mobile/proto_s1ap.c(_free_entities_list,_extraction_att),src/mmt_mobile/nas/util/decoder.h,tests/s1ap_ngap_decode/test_s1ap_ngap_packets.c(test_s1ap_two_handlers),tests/nas_ies_tail/test_nas_ies_tail.c(test_concurrent_decode_errors),tests/coverage/floor.json,docs/THREADING.md. -
Q: Issue #508 (plan task 4.5, F-SEC-006/F-SEC-007/F-SEC-013) — the release-hardening block was gated on
$(filter gcc clang,$(CC)), soCC=/usr/bin/gcc,gcc-13or a wrapper silently built without FORTIFY, stack protector, full RELRO or LTO;check-hardening-flags.sh --builtonly ever ran on unshipped host builds; the phase0 gates and two lint scripts used fixed/tmppaths. How is hardening keyed, what is checked on the shipped packages, and which paths moved tomktemp? A:rules/common-linux.mkprobes$(CC)and$(CXX)once each with-dM -Eon empty input (no compile) and derivesMMT_CC_ID/MMT_CXX_ID(icc over clang over gcc); the block is gated onMMT_CC_IDbeing gcc or clang, andrules/arch-linux(-gcc).mktakes its GCC floor from the same probe instead of a second one. LTO additionally requires$(CC)and$(CXX)to report the same__GNUC__/__GNUC_MINOR__/__GNUC_PATCHLEVEL__, since objects are compiled by$(CC), libraries linked by$(CXX), and LTO bytecode does not cross GCC releases; otherwise LTO alone is dropped. Every skip prints a build$(warning)(unidentified compiler, LTO dropped, and the existing DEBUG/VALGRIND/sanitizer/coverage one); DEBUG, VALGRIND andBUILD=asan|tsan|coveragestill disable the block.check-hardening-flags.sh --built [DIR...]checks the regular*.so/*.so.*files of the given directories (defaultsdk/lib/) and adds a_FORTIFY_SOURCEfloor — at least one__<name>_chkimport across the set,__stack_chk_*excluded. It is a floor, not proof: Ubuntu GCC fortifies by default, so an unhardened build passes it there; BIND_NOW is the built-object discriminator (an unhardenedCC=/usr/bin/gccbuild on main failed it on all five libraries), and the makefile side of FORTIFY is pinned by the newtools/ci/tests/test-hardening-identity.sh(run by therelease_gatessuite), which evaluates the real makefiles through amake --evalprint goal.release-packages.ymlruns the check in each build container right aftertools/ci/build-package.shinstalled the package, on/opt/mmt/dpi/liband/opt/mmt/plugins— every distro and both architectures — and its packaging path filter now lists the checker so a checker-only change still exercises the matrix.check_classification.sh/check_precision.shkeepMMT_PREFIXas the override (the precision-gate job sets it to share the install with the accuracy oracle) and otherwise install intomktemp -d /tmp/mmt-phase0.XXXXXX, removed on exit;capture_baseline.shdoes the same without--prefix(its valgrind SKIPPED note then names<prefix>);check-gitleaks-allowlist.shandlint-commented-code.shusemktempinstead of/tmp/<name>.$$. Thetools/phase0/gen_*.pyoutput defaults are explicit output paths and were left unchanged. Source:rules/common-linux.mk(identity probe, hardening gate, warnings),rules/arch-linux-gcc.mk(rules/arch-linux.mkis a symlink to it),tools/ci/check-hardening-flags.sh,tools/ci/tests/test-hardening-identity.sh,tests/release_gates/run_tests.sh,.github/workflows/release-packages.yml(changesandbuildjobs),tools/phase0/ci/check_classification.sh,tools/phase0/ci/check_precision.sh,tools/phase0/capture_baseline.sh,tools/ci/check-gitleaks-allowlist.sh,tools/ci/lint-commented-code.sh. -
Q: Issues #500 and #499 (plan tasks 3.2 and 3.1, F-BUG-002/F-BUG-003/F-BUG-001) — a timeout-ring insert that could not fit the live milestone span (> 2^22 s) returned 0 like an allocation failure, so every caller ran the out-of-memory sweep; that sweep stopped mid-list at 65,000 sessions and then deleted the whole milestone, orphaning the rest of the list; and a tunnel child’s raw
parent_sessionpointer dangled once the outer session expired first. Clamp or park the outlier milestone, and reference-count the parent or have its expiry detach its children? A: Park, and reference-count. (1) A span the ring cannot reach is not OOM:mmt_ring_grow()reports it distinctly andinsert_session_timeout_milestone()parks the milestone in an ordered side index (std::map, allocating only on that cold path), returningMMT_TIMEOUT_PARKED(2);MMT_TIMEOUT_INSERTED(1) andMMT_TIMEOUT_NOMEM(0) keep their values, so callers that test== 0or== 1are unchanged. Lookup, unlink, range expiry, iteration and teardown consult both stores, and a milestone lives in exactly one. Clamping was rejected: it changes when the session expires (early or never). A ring growth that fails oncallocis stillMMT_TIMEOUT_NOMEM, so the existing double-OOM path keeps its trigger. (2) The forced sweep unlinks each session before freeing it (force_session_timeout()), so a milestone disappears with its last session and a budget stop (MMT_OOM_SWEEP_BUDGET, 65,000) leaves the remainder linked and expirable. It also skips a session that still has live tunnel children and the sessions of the packet being processed. (3) Detaching children needs a child list (two or three more pointers in every session); a count fits the existing padding afternext_tcp_seq_nr[2], sosizeof(mmt_session_t)is unchanged.live_childrenis incremented when an embedded session is linked (before its first ring insert, so the forced sweep that insert may trigger cannot free the parent) and decremented after the child is freed. A parent with live children is never freed: a sweep that reaches it re-arms it at or after the end of that sweep (process_timedout_sessions()now publisheslast_expiry_timeoutbefore sweeping), andmmt_close_handler()drains the ring in rounds (expire_all_sessions(), at mostPROTO_PATH_SIZE + 1, then an unconditional drain), so children always expire first and an expiry handler can still read a child’s parent. To keep the deferral rare, a child’s milestone is carried up to every ancestor whose milestone is earlier, and a parent’s own refresh never moves it below that. Tunnel parents whose inner flow has the longer timeout therefore now expire with their last child instead of on their own delay; the golden classification fingerprint and the precision baseline are unchanged. Source:src/mmt_core/src/hash_utils.cpp(parked index,mmt_ring_grow,mmt_ring_drain),src/mmt_core/private_include/hash_utils.h(MMT_TIMEOUT_*),src/mmt_core/src/packet_session.c(expire_session,defer_parent_expiry,expire_all_sessions,process_outofmemory_force_sessions_timeout,hold_ancestors_milestone),src/mmt_core/private_include/packet_processing.h(live_children,MMT_OOM_SWEEP_BUDGET),src/mmt_core/src/packet_registry.c(mmt_close_handler),tests/core_engine/test_core_engine.c(test_timeout_span_overflow,test_tunnel_parent_lifetime),tests/resource_bounds/test_timeout_sweep.c(fixturetimeout-sweep),tools/phase0/tests/run_tunnel_parent_lifetime_test.sh. -
Q: Issue #510 (plan task 5.2, F-BUG-209/F-BUG-210/F-BUG-211) —
store_history()wrote packet strings and the cause into the verdict JSON raw,get_data_from_pcap()handedstrstr()/strcmp()operand buffers with no terminator, andcopy_instance()searched the JSON history for XML tags, so any rule withkeep_statecrashed on its first verdict (the #509 entry above). How are values escaped, how are operands terminated, and what doeskeep_statenow keep? A: (1) One bounded escaper,json_escape_into()(the core ofconvert_string_to_json_compatible(), whose behaviour is unchanged), escapes the cause, header lines and inline string records into buffers sizedn*6+1; pointer strings, the TCP payload and generic header lines, already escaped, are now appended piecewise (json_append_string_attr()) because their escaped form can exceed the 8192-byte formatting buffer, whosesnprintf()used to cut off the closing"},. Two output-format corrections ride along, both for JSON validity: a 6-byte binary value is quoted ("AA:BB:…", was a bareAA:BB:…) and a non-finite float printsnull(wasnan/inf). Bytes ≥ 0x80 still pass through unescaped. (2) Every operand buffer ofget_data_from_pcap()is allocated with one trailing zero byte (alloc_operand(),size + 1) rather than switching XC/XD tomemmem():sizeand every comparison result are unchanged, andstrstr()/strcmp()stop inside the allocation. (3)copy_instance()keeps the history members"event_<id>":{…}whose idkeep_statelists, skipping each object by brace depth with string escapes honoured, and re-appends each with its comma; no kept member means no history, as on a fresh instance. Known limitation, pinned as “current behaviour” intests/rule_engine/test_rule_eval.cand left as a follow-up:analyse_incoming_packet()(src/mmt_security/tips.c) copies every eliminated instance, including one that expired, timer and all, so after a timeout akeep_staterule reports not-satisfied on every later frame; restricting the copy to satisfied verdicts changestips.c, which #511/#512 rework. The NOT-as-right-son crash inverify_not_backtrack()is outside #510 and still untested. No CHANGELOG line: the topmost section is the released 1.9.1, as for #504. Source:src/mmt_security/tips_report.c(json_escape_into,json_append_string_attr,store_history),src/mmt_security/tips_extract.c(alloc_operand,get_data_from_pcap),src/mmt_security/tips_eval.c(filter_json_history,copy_instance),tests/rule_engine/test_overflow_family.c(test_store_history_escapes_strings,test_contains_unterminated_operands),tests/rule_engine/test_rule_eval.c,tests/rule_engine/eval/json_escape.xml,tests/rule_engine/eval/keep_state.xml,tests/rule_engine/run_tests.sh(jq checks in steps 6 and 8). -
Q: Issues #511 and #512 (plan tasks 5.3/5.4, F-BUG-212/213/214, F-BUG-221/216 and part 1 of F-BUG-215), resolved together: the evaluator retried a NOT_VALID instance forever, read 4-byte U32/IP values through an LP64
unsigned long, called embedded#function(...)s through an uncheckeddlsym()with an unbounded argument count, and the loader trusted any well-formed XML, ended the process on the rest, hard-coded the reaction folder and allowed a second engine. What is rejected at load, what changed at run time, and which pinned expectations moved? A: (1) Load errors are returns:init_sec_lib()now returnsint(0, or -1 with the reason on stderr; the symbol is not in the installed headers, as for #236),read_rules()likewise, andtips_xml.chas noexit(left. Rejected at load: an element other than<beginning>/<property>/<operator>/<event>(Error 12a — its attributes were written through a NULL rule), an emptydelay_min/delay_max(12b — index -1), an<operator>/<event>with no parent on the father stack (12c — the stack underflowed), a THEN without exactly two branches, an AND with fewer than two, an OR/REPEAT with none or a NOT without exactly one (12d —verify()dereferences them unchecked), an expression that climbs above its own node through a leading operator or a surplus)followed by more expression (37b — NULL father; a surplus)that ends the expression is still tolerated, as the old parser stopped on the empty rest), an unknown attribute (9a — it used to register protocol 0 silently), a constant the operand type cannot hold (3g —get_xdata()returned NULL andcreate_instance()copied from it; this rejectsMETA.utime > 0, a timeval constant), an empty embedded-function parameter, trailing comma included (3f —#f(a,)passed one parameter fewer than written), an embedded function with more than four parameters (3e) or that the library does not export (3h), for an expression leaf and for a#functionreaction alike. The failed load frees what it built (free_rules()), so LSan sees no leak, and releases the engine.rules_minimal.xmlgave its properties both THEN branches and dropped theMETA.utime > 0comparison for this; META.UTIME is now registered by every load, on the loading handler, instead of once per process from the first expression. (2) One engine per process: an atomic claim ininit_sec_lib()makes a second call, or the loser of a race, return -1 (Error 105) before allocating anything;docs/THREADING.mdstates the rule. Moving the state per handler is plan task 13.2 (the rest of F-BUG-215). (3)analyse_incoming_packet()logs a NOT_VALID existing instance (Error 41) and eliminates it like any final result;keep_statere-creates only a satisfied instance (COUNT_SATISFIED_ELIMINATE) — the #510 follow-up — so thekeep_statescenario that expires at 4 s now pins 1 satisfied + 1 not satisfied (was 1 + 2, “current behaviour”); that is the only expectation changed intest_rule_eval.c. (4) Embedded functions: the library is opened once and each symbol resolved when the rule loads (embedded_funct_resolve(),rule.funct); the call goes through the exactvoid *f(void *, ...)signature of its 0..4 parameters with unused slots NULL;#f()is now a zero-argument call (it used to pass one uninitialised argument); a NULL result fails the condition instead of ending the process (Error 123). (5) LP64: U32 and IP values are read asuint32_t/bytes inget_my_data(),compare_in_table(),compare_values(),compute()(whose U32 result is computed and stored in 64 bits, the 8 bytesverify_segment()copies asMMT_U64_DATA),get_xdata()andstore_history(). (6) Reactions: the folder isMMT_SEC_REACTION_DIRwhen it holds an absolute path, else$(MMT_BASE)/probe/confbaked in byrules/common.mk(make variableMMT_SEC_REACTION_DIR_DEFAULT, named apart from the environment variable so an exported run-time value is not baked in; a stamp recompilestips_report.owhen it changes, likeplugins_engine.o); the folder is quoted as one shell word in the command;detection_<n>.datais created withO_CREAT|O_EXCL|O_NOFOLLOWand mode 0600, and a number whose file already exists — a planted symlink included — is skipped, so the script’s first argument stays the file’s number. Carried over from #509/#510: NOT as the right son of a root THEN no longer crashes —verify_not_backtrack()stops at the rule instance instead of climbing to itsnextinstance or a NULL father — and is pinned as “current behaviour” (the NOT node’s no-delay timer reads as expired on the next frame, so even B satisfies it). Left as found: a root AND/OR that validates on a fresh instance still hits the “Should not be here2” exit inanalyse_incoming_packet(), and a rule instance does not copytype_rule, sodetection_<n>.dataalways starts with “attack”. No CHANGELOG line: the topmost section is the released 1.9.1, as for #510. Source:src/mmt_security/tips.c(init_sec_lib,engine_state,analyse_incoming_packet),src/mmt_security/tips_xml.c(processNode,apply_attribute,attach_to_father,create_boolean_expression,climb_with_operator,funct_check_call,validate_rule_tree,read_rules,free_rules),src/mmt_security/tips_extract.c(embedded_funct_resolve,funct_get_params_and_execute, the LP64 reads),src/mmt_security/tips_report.c(reaction_dir,open_detection_file,generate_command),src/mmt_security/tips_eval.c(verify_not_backtrack),rules/common.mkandsdk/Makefile(MMT_SEC_REACTION_DIR),tests/rule_engine/run_tests.sh(steps 4 and 8),tests/rule_engine/test_rule_engine.c(load-error,reinit,race),tests/rule_engine/test_rule_eval.c,tests/rule_engine/malformed/*.xml,tests/rule_engine/eval/{and_root,then_not,embedded_funct,reaction}.xml,tests/rule_engine/embedded_functions.c,docs/THREADING.md. -
Q: Issue #501 (plan task 3.3, F-BUG-004/F-BUG-008/F-BUG-017) — handlers may unregister attribute handlers from inside their callbacks, but the dispatch loops kept using the attribute that unregistration freed and skipped the handler that shifted into the closed slot;
fire_attribute_event()leftattr->datapointing at the caller’s stack local after the dispatch; andunregister_attribute_handler()decrementedregistration_counteven for a handler that joined an attribute already registered withregister_extraction_attribute(), releasing that registration. Defer the free, clear the payload, record the owner? A: All three. (1) Both dispatch loops (fire_attribute_event(),proto_process_attribute_handlers()) run inside a per-handler bracket,mmt_handler_t.attr_dispatch_depth; an attribute released while it is open is unlinked from the arrays at once but chained onattr_free_pending(through the otherwise unusedattribute_internal_t.next) and freed when the outermost dispatch returns, andmmt_close_handler()flushes the chain too. After each callback the loops re-derive where to continue instead of stepping an index. The handler loops record the successor (the handler function at the next slot; functions are unique per attribute) before the callback and continue from wherever it sits afterwards; a handler that was last ends the walk, so handlers its callback registers (inserted at the head) wait for the next dispatch. So while the successor stays registered nothing after it is skipped: a callback that unregisters itself or handlers other than its successor, or unregisters and re-registers itself (the only way to change itsuser_args), runs once and the remaining handlers each run once. When the successor itself left, the loop falls back to the slot after the handler just run, or to that same slot when that handler left too; and a successor re-registered to the head is resumed there. Those cases can replay or skip handlers when the same call also re-registered handlers or removed ones that already ran; edge cases left as found. Each handler loop is therefore bounded by an iteration budget — the handler count when it started, raised whenever the count grows past its high-water value during the dispatch (dispatch_budget_update) — so it always terminates: before the successor rule a lone handler re-registering itself, or two handlers swapping each other in, looped forever. The element loop continues at the first element whose field_id is greater than the one just run (the elements stay sorted by field_id, one per field of the protocol). Every element therefore runs at most once per dispatch, a slot released and re-created for the same field is not replayed, an element present when the walk reaches its field runs whatever was added or removed before it, and an element added below the current field waits for the next packet. field_id strictly increases every iteration, so that walk needs no budget: an element budget skipped an untouched later element when a callback moved a handler from an element already run to a new field ahead. (2)fire_attribute_event()setsattr->datato the payload before each handler and to NULL after the dispatch; both extraction paths re-arm a NULLdatato the attribute’s own scratch area (right after the struct), so an event fired on an extractable attribute cannot leave its next extraction writing through a dead pointer. Every event site, including the HTTP parser callbacks and the IPv4/IPv6 RTT events, goes through that function. (3)attribute_internal_t.extraction_ownerrecords the handler whose registration created the slot (the only handler registration that counts inregistration_count); unregistering any other handler leaves the count alone, and the slot is released once both counts are zero. No CHANGELOG line: the topmost section is the released 1.9.1, as for #510. Source:src/mmt_core/src/packet_pipeline.c(rearm_attribute_scratch,attr_dispatch_enter/attr_dispatch_leave,next_attribute_handler,next_attribute_element,dispatch_budget_update,fire_attribute_event,proto_process_attribute_handlers,generic_data_extraction),src/mmt_core/src/packet_registry.c(release_registered_attribute,flush_deferred_attribute_frees,release_extraction_registration,unregister_attribute_handler,register_attribute_handler),src/mmt_core/private_include/packet_processing.h,tests/core_engine/test_core_engine.c(test_attr_dispatch_safety),docs/MMT-Attributes.md. -
Q: Issue #505 (plan task 4.2, F-BUG-007/F-BUG-013/F-BUG-014/F-BUG-015/F-BUG-019/F-BUG-107, F-DOCS-005) — six helpers lacked a guard:
mmt_header_line_pointer_snprintf()wrotebuff[-1]forlen <= 0,str_replace()calledstrcat(…, NULL)on adjacent matches,_is_registered_protocol()read through NULL registry slots,init_http_parser()used its allocation unchecked,clean_packet()freed a reassembled datagram only onDLT_EN10MB, and onestatic int seenbacked the U32 and U8 TCP connection events.docs/Memory-Management.mdalso told contributors not to check allocations, contradictingsrc/mmt_core/src/memory.c:8-17. What does each guard do, and where are the regression tests? A: (1) The header-line formatter returns -1 for a NULL buffer or attribute orlen <= 0, like the other*_snprintfformatters, and prints an empty string for a line with no data. (2)str_replace()skips the empty gap between adjacent matches and returns NULL when its prefix copy cannot be allocated. (3) A NULL slot (beforeinit_extraction(), afterclose_extraction(), or past the slot where an out-of-memoryinit_extraction()stopped) is unregistered, and registering into one returns NULL instead of crashing ininit_protocol_struct(). The edits keeppacket_registry.candpacket_pipeline.cat their line counts, so theirpath:linecitations do not move. (4)init_http_parser()returns NULL and frees whatever it made when any of its three allocations fails; the session keepssession_dataNULL, which the analysis and cleanup functions already skip. (5)clean_packet()freesipacket->datawhenever it differs fromoriginal_data. Only IPv4/IPv6 fragment reassembly replaces it, always with anmmt_malloc()buffer, on any link stack. (6) Each fire site passes a block-scope literal of the declared width:(uint32_t){1}fortcp.syn_receivedand(uint8_t){1}fortcp.establishedandtcp.closed. A handler that writes through the payload no longer changes later events, and the U8 events no longer read 0 on a big-endian host. The memory page now states the NULL-return contract and the caller’s duties; the rest of the page is unchanged (allocation-failure scope only). Test placement:str_replacecases are intest_mmt_utils.c. The formatter needspacket_processing.c, which links on its own with two stubs, so themmt_utilssuite builds a second binary,test_attr_snprintf.packet_registry.cneeds most of the core, so the NULL-slot lookups run incore_engineafter its finalclose_extraction(). The HTTP-parser sweep is a unit-level fault-injection binary that runs in every profile (the engine leg is skipped under sanitizers). The leak harness replays the fragment captures as Linux cooked frames on thePROTO_SLLstack. The event payload test is theparser_boundariesfixturetcp-events. Each new test failed on the unfixed sources: SEGV, ASan negative-size-param, SEGV, SEGV, LSan 36,792 bytes in 18 blocks, and 2 bad events per U8 event respectively. No CHANGELOG line: the topmost section is the released 1.9.1, as for #510. Source:src/mmt_core/src/packet_processing.c(mmt_header_line_pointer_snprintf),src/mmt_core/src/mmt_utils.c(str_replace),src/mmt_core/src/packet_registry.c(_is_registered_protocol,get_protocol_struct_for_registration_if_free),src/mmt_tcpip/lib/http_parser_integration.h(init_http_parser),src/mmt_core/src/packet_pipeline.c(clean_packet),src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h,docs/Memory-Management.md,tests/mmt_utils/test_attr_snprintf.c,tests/mmt_utils/test_mmt_utils.c(test_str_replace_adjacent_edges),tests/core_engine/test_core_engine.c(test_null_slot_lookups),tests/fault_injection/test_fi_http.c,tools/phase0/tests/leak_regression_test.c(non_en10mb_reassembly),tests/parser_boundaries/test_tcp_event_payload_api.c. -
Q: Issue #506 (plan task 4.3, F-PERF-103/F-PERF-109) — the DNS queries/answers/auth-records, FTP request/parameter/response-value and NDN string extractors returned heap objects through
attribute_t.datathat nothing freed, one leak per read, andmmt_check_ndn_payload()leaked its TLV root on every match. Who owns an extracted heap value, and when is it freed? A: The handler that processed the packet. A new public call,mmt_packet_scratch_adopt(ipacket, value, release)(plugin_defs.h;mmt_opaque_t/boolper the weak-type ratchet), chains the value on a per-handler list whose records are bump-allocated from anmmt_arena_tcreated on first use;packet_process()releases the list and rewinds the arena before it hands the next packet over, andmmt_close_handler()releases it and frees the arena (throughfree_registered_extraction_attributes()). So a value is valid while its packet is processed and its handlers run, consumers must not free it, and a handler that never reads such an attribute pays one pointer test per packet. The reset sits inpacket_process(), the only caller ofmmt->process_packet, rather than at a per-attribute “previous value” slot: an attribute can be read several times per packet (each read of a packet-scope attribute re-extracts it), and an unregistered attribute is freed between packets, so a per-attribute owner would either leak the earlier reads or write through a freed attribute. A per-packet arena for the parsed objects themselves (the issue’s other suggestion) would mean rewriting the DNS/NDN parsers’ allocations; the parsers keepmalloc()and the extractor hands over the result with its matching release (dns_free_query_list/dns_free_answer_list,free). An extractor setsdataonly when the adoption succeeds; on failure the value is already released and the attribute reads as not extracted.ftp_get_command_str()returned the literal"UNKNOWN_CMD"on two paths and now returns a heap copy so its result can always be freed. NDN error exits that leaked parsed TLV nodes are fixed alongside (ndn_TLV_parser_name_comp()on a non-name-component TLV, and the content, key-locator, signature-value and exclude extractors when the node is absent). Pinned by the leak-gate caseextractor_heap_attrs(all thirteen attributes read twice per packet overdns_query.pcap, the three FTP captures and crafted NDN and DNS frames; on the unfixed sources Valgrind reports 26 definite-loss records) andtests/ndn_dissector(test_issue506_error_exits, adoption checks).phase0_throughputgained an opt-inPHASE0_ATTRSthat reads the named attributes and prints the live RSS per iteration: over a 22,320-packet FTP/DNS mix and 30 iterations the library RSS went 5,344 → 12,640 KiB on the unfixed build and 5,092 → 5,104 KiB with the fix. Behaviour change for embedders: a caller that freed one of these values must stop (it now double-frees), and one that kept a value past the packet must copy it. The security engine’sstore_tuples()kept aMMT_STRING_DATA_POINTERreference’s pointer in the rule instance (#326), so a rule referencing one of these FTP/NDN strings from an earlier event would read a released value (a use-after-free where it used to be a leak; session strings such asftp.user_namealready dangled once the session expired): it now copies the string, terminator included, into the rule instance, so a reference outlives the packet (and the session) it came from; the comparison and substitution readers (get_data_from_pcap(),get_value()) and embedded-function parameters use that copy. Pinned bytest_reference_string_outlives_packetintests/rule_engine/test_overflow_family.c(the unfixed engine reports a heap-use-after-free there underSANITIZE=asan). No CHANGELOG line: the topmost section is the released 1.9.1, as for #505. Source:src/mmt_core/src/packet_pipeline.c(packet_process,mmt_packet_scratch_adopt,mmt_packet_scratch_release,mmt_packet_scratch_destroy),src/mmt_core/src/packet_registry.c(free_registered_extraction_attributes),src/mmt_core/private_include/packet_processing.h,src/mmt_core/public_include/plugin_defs.h,src/mmt_tcpip/lib/protocols/proto_dns.c,src/mmt_tcpip/lib/protocols/proto_ftp.c,src/mmt_tcpip/lib/protocols/ndn.c,tools/phase0/tests/leak_regression_test.c,tools/phase0/tests/run_leak_regression_test.sh,tools/phase0/phase0_throughput.c,tests/ndn_dissector/test_ndn_dissector.c,docs/MMT-Attributes.md,docs/Memory-Management.md. -
Q: Issue #513 (plan task 5.5, F-DEP-302 part 1 of 3) — the S1AP/NGAP APER runtime in
src/mmt_mobile/asn1c/common/is the 2020 skeleton of the pinned generator (mouse07410/asn1c @ dbd0ed09) and carries GHSA-x882-jvjm-xxh9 (INTEGER_decode_aper()never bounded a constrained INTEGER’s length determinant: a signed shift by up to 56 places and over-long encodings accepted) and GHSA-rcj5-gcvg-x796 (OPEN_TYPE_*_get()formedNULL + offsetfor an unallocated member). The generated tree must never be hand-edited and theasn1c-regen.ymlgate must stay byte-identical; how is the fix carried without the full generator upgrade (#521)? A: As patches the regeneration recipe applies.src/mmt_mobile/asn1c/patches/*.patchare unified diffs against the generatedcommon/runtime (each with a header naming the advisory and the upstream fix it backports);src/mmt_mobile/asn1c/Makefileapplies them, sorted, at the end of bothgen-s1apandgen-ngap— both targets rewritecommon/, and the pinned asn1c overwrites the skeletons, so the second target re-applies them; a patch that is already applied is skipped and one that does not apply exactly (--fuzz=0) fails the target, so a pin bump that makes a patch obsolete is loud. The committedcommon/INTEGER.candcommon/OPEN_TYPE.care the recipe’s output, regenerated with the pinned asn1c in the gate’sbuildpack-deps:bookwormimage; every other generated file is byte-identical, andasn1c-regen.ymlnow also runs whenpatches/**changes. The backport is targeted, not upstream’s rewrittenINTEGER_aper.c: rejectrange_bitswider than theunsigned longaccumulator, reject a length abovemax_range_bytesbefore aligning or reading payload, accumulate unsigned and add the lower bound in unsigned arithmetic, so every conformant length decodes to the same value as before. The OPEN_TYPE patch fails the decode when*memb_ptr2is NULL, the selector returns no type descriptor, or its index exceeds the open type’selements_count, in the BER, XER, UPER and APER_getfunctions; every open type in the committed tree isATF_NOFLAGS(S1AP r10.5.0 carries IE values as ANY, NGAP members are embedded), so the NULL-member branch is defence in depth and the selector checks are what the regression reaches. S1AP reaches the INTEGER flaw through BitRate (34-bit range, up to 8 octets declared for 5; signed overshift) and eNB-UE-S1AP-ID (24-bit range, 4 declared for 3; over-long acceptance), the latter in a fields1ap_decode()reads: the unfixed decoder returned 0 withenb_ue_id1 for a 4-octet encoding. Regression: thes1ap-integerfixture ofparser_boundaries(tests/parser_boundaries/test_s1ap_integer_length.c, linked likes1ap_ngap_decodeagainstlibmmt_tmobile.awhole-archive) — red on the unfixed runtime (UBSan abort underSANITIZE=asan, failed checks and a SEGV without it), green after. Thegenerated_asn1ccoverage cohort excludes the patched files as before. No CHANGELOG line: the topmost section is the released 1.9.1. Source:src/mmt_mobile/asn1c/patches/0001-INTEGER-aper-length-determinant.patch,src/mmt_mobile/asn1c/patches/0002-OPEN_TYPE-unallocated-member.patch,src/mmt_mobile/asn1c/Makefile(apply-patches),src/mmt_mobile/asn1c/common/INTEGER.c(INTEGER_decode_aper),src/mmt_mobile/asn1c/common/OPEN_TYPE.c,.github/workflows/asn1c-regen.yml,tests/parser_boundaries/run_tests.sh,tests/parser_boundaries/test_s1ap_integer_length.c, mouse07410/asn1c GHSA-x882-jvjm-xxh9 (fixed in v1.5.2, ce45145ad4) and GHSA-rcj5-gcvg-x796 (e9600cf7f2). - Q: Issue #495 (plan task 2.2, F-DEP-003/F-DEP-101/F-DEP-304) — the build-dependency lists contradicted the code (an HTTP/2 library probed, linked and installed though nothing calls it; libxml2 installed by
install.shfor a profile that never builds the engines; libpcap declared as if a library needed it) and five files carried them with no single source. What does each list hold now, how is it kept honest, and what did the W2 patch/minor batch move? A: (1) nghttp2 is gone: no source calls annghttp2_*function (the only mention is a commented include insrc/examples/extract_all.c) and HTTP/2 is the in-tree dissectorsrc/mmt_tcpip/lib/protocols/http2.c, so the pkg-config/linker probe and theNGHTTP2_CFLAGS/NGHTTP2_LIBSuses leaverules/common.mkandrules/common-linux.mk, and everyinstall.shbranch drops its nghttp2 package.objdump -pshowed no NEEDED entry before (--as-neededdropped the flag) and shows none after. The removed make lines are replaced by explanatory comments of the same length, so the manyrules/*.mk:N-Mcitationsscripts/validate-agent-environment.shchecks by boundary stay valid;tools/ci/shlib-deps.shkeeps its soname map (a mapper, not a declaration). (2) libpcap is examples-only: no SDK library includes<pcap.h>or links-lpcap(src/mmt_security/public_defs.hno longer includes it, so the old install-build-deps rationale was stale). It stays where a capture-reading program is compiled —install.sh(the documented first run compileshello_packet.c -lpcap, exercised byinstall-smoke.yml),tools/ci/install-build-deps.sh(the installed-consumer check inbuild-package.sh), the CI bootstrap action and the toolchain line — and leaves the rpmBuildRequires:, which only rpmbuild reads. The EL8/EL9 CRB enablement therefore stays in both installers. (3) libxml2 is ENABLESEC-only:install.shbuilds the default profile and drops it; the package build (ENABLESEC=1),BuildRequires:, the bootstrap action and the toolchain line keep it. (4) One source:tools/ci/build-deps.txtholdsrole <role> <manager> <pkg>...rows (build, enablesec, examples, package, verify, devtools) andlist <id> <manager> <role>...rows;tools/ci/check-dependency-lists.shextracts eleven lists from the five files (sixinstall.shbranches, the deb/rpm functions ofinstall-build-deps.shminus the best-effort|| truednf-plugins-core helper,BuildRequires:with version floors stripped, the bootstrap action without its${{ inputs.extra-packages }}expression, and thedocs/AGENT_ENVIRONMENT.mdtoolchain line) and fails unless each equals the union of its roles; a list found zero or two times, an unknown list id or an undefined role also fails. The canonical apt build set isbuild-essential gcc g++ make git, which addedgccto the deb container list andg++to the toolchain line.BuildRequires:is a literal list checked by that lint; only the debDepends:and the rpmRequires:are derived byshlib-deps.sh(the #219 wording is narrowed accordingly).tools/ci/tests/test-dependency-lists.shruns the real lint on fixture trees where one list or manifest row diverges (run by therelease_gatessuite, so the suite count stays 30; also a blockingverify-helpersstep). (5) Action pins: the five SHA-pinned actions a patch/minor behind their latest same-major release on 2026-10-22 move to the peeled commit of that release, each with its# vX.Y.Zcomment —actions/download-artifactv8.0.1 → v8.0.2,actions/upload-artifactv7.0.1 → v7.0.2,anchore/sbom-actionv0.24.2 → v0.24.3,github/codeql-action(init/analyze) v4.38.0 → v4.39.1,ruby/setup-rubyv1.325.0 → v1.332.0; the others were current. (6) Gems:bundle lock --update --minor --strict(Bundler 2.6.9,ruby:3.3, Gemfile unchanged) —--strictkeepspublic_suffixon 6.x, its major belongs to the P2 modernize wave; jekyll-relative-links 0.8.0 → 0.9.1, listen 3.10.0 → 3.10.1, rubyzip 3.6.0 → 3.7.0, sass-embedded 1.102.0 → 1.106.1, google-protobuf 4.35.1 → 4.36.2 (plus its declared rake/bigdecimal dependencies), and theaarch64-linux-gnuvariants the lock’s existingaarch64-linuxplatform was missing. No CHANGELOG line: the topmost section is the released 1.9.1. Source:tools/ci/build-deps.txt,tools/ci/check-dependency-lists.sh,tools/ci/tests/test-dependency-lists.sh,tests/release_gates/run_tests.sh,.github/workflows/c-cpp.yml(verify-helpers),rules/common.mk,rules/common-linux.mk,install.sh(install_deps_linux),tools/ci/install-build-deps.sh,sdk/Makefile(rpm target),.github/actions/bootstrap-deps/action.yml,docs/AGENT_ENVIRONMENT.md§1,docs/Gemfile.lock,.github/workflows/*.yml. - Q: Issue #497 (plan task 2.4, F-CI-109) — the packages shipped no LICENSE or third-party notices, the RPM spec said
License: proprietary(sdk/Makefile rpm target), and the one package bundled the GPL enginelibmmt_security. What licence does each package declare, from which evidence, and how are the engines split out? The answers ofdebian/license-audit.md§3 are not onmain(it lives in the #475 working tree), so they were not used. A: The expressions come only from evidence in this tree, andpython3 tools/ci/vendored-components.py notices --check(verify-helpers job and the release build job) re-derives them, failing on drift. Montimage’s own code is Apache-2.0:LICENSEand the README’s licence section. Everysrc/mmt_security/*.c(5 of 5) carries the “GPL version 3 … or (at your option) any later version” notice, solibmmt_securityis GPL-3.0-or-later; the check fails if one of them loses it.src/mmt_fuzz_engine/*carries no notice at all, so the repositoryLICENSE(Apache-2.0) is the only evidence forlibmmt_fuzz. The vendored components oftools/ci/vendored-components.json(#496) are llhttp (MIT, inlibmmt_tcpip) and the asn1c runtime (BSD-2-Clause, inlibmmt_tmobile), and none of them lies in the engine sources (the check enforces this). That givesmmt-dpi=Apache-2.0 AND BSD-2-Clause AND MIT(its own licence AND every manifest licence) andmmt-dpi-security=GPL-3.0-or-later AND Apache-2.0, recorded asPKG_LICENSE/SEC_PKG_LICENSEinsdk/Makefile.THIRD-PARTY-NOTICESis generated from the manifest (notices) and committed, so packaging needs no Python. It holds the package licence table and, per component, the upstream, the pin, the paths, the copyright line and the full licence text fromLICENSES/<id>.txt: MIT is llhttp’s upstream wording, BSD-2-Clause the SPDX text, and GPL-3.0-or-later the FSF GPL-3 text (sha2563972dc97…). The engines move to their own package,mmt-dpi-security: the stagedlibmmt_security*/libmmt_fuzz*(libraries, links, archives),dpi/include/fuzzand the GPL text asCOPYING. It requires exactly the samemmt-dpiversion, becauselibmmt_securityresolves 12libmmt_coresymbols at load time (nm -D; rules/common-linux.mk -z,defs note) — NEEDED does not show that dependency, and the first plan, which assumed a standalone package, was dropped for this reason.check-package-deps.sh --verify-packagerequires that one sibling entry and exempts only it from the NEEDED-backing checks. The deb carries an unversionedReplaces: mmt-dpi, so it takes over the files a pre-splitmmt-dpiowns: the revision is a git hash, so a version bound cannot order. Both install orders were tested in ubuntu:24.04. Each package installsLICENSEandTHIRD-PARTY-NOTICESunder<prefix>/dpi/share/doc/<package>/(one directory per package, so no path has two owners).make install, the ZIP installer andinstall.sh(for a pinned tag whose Makefile predates this) lay down the same files, and the install manifest records them, somake uninstall/install.sh --uninstallremove them. The RPM main%filesnames its libraries instead of globbing/opt/mmt/*, because the glob plus%excludestill generated build-id links for the engine libraries in the main package._rpmfilenameuses%%{NAME}because a plain%{NAME}expands to the main name and the security RPM overwrote it.tools/ci/check-package-split.sh(run bybuild-package.shon every matrix row, and by the installer suite on the.deb) checks the licence files, the split and each.rpm’s%{LICENSE}. The release workflow expects the two packages per row and writes an SBOM for each; the vendored components are added to themmt-dpiSBOM only. Open question, not resolved here: the S1AP/NGAP codecs undersrc/mmt_mobile/asn1c/{s1ap,ngap}are asn1c output generated from 3GPP ASN.1 modules (TS 36.413, TS 38.413;src/mmt_mobile/asn1c/support/README), and nothing in this repository records the terms of those specifications. The expressions above therefore make no claim about them, andTHIRD-PARTY-NOTICESsays so. Adding aLicenseRef-term needs the maintainer’s licence review (the #475 audit) and goes throughtools/ci/vendored-components.jsonandnotices. The issue’s AC names an “Apache-2.0-only assertion at tests/installer/run_tests.sh:154-155”; no such assertion exists onmain, so the suite gains licence-field assertions and none is removed. No CHANGELOG line: the topmost section is the released 1.9.1. Source:LICENSE,README.md(License),src/mmt_security/*.c(headers),src/mmt_fuzz_engine/*,tools/ci/vendored-components.json,tools/ci/vendored-components.py(notices),THIRD-PARTY-NOTICES,LICENSES/,sdk/Makefile(PKG_LICENSE, install,--private-prepare-build-dir, deb, rpm, zip, clean),rules/common-linux.mk(-z,defs note),tools/ci/check-package-deps.sh,tools/ci/check-package-split.sh,tools/ci/build-package.sh,tools/ci/check-reproducible-build.sh,.github/workflows/release-packages.yml,install.sh,dist/ZIP/install.sh,tests/installer/run_tests.sh,tools/ci/tests/test-vendored-components.py. - Q: Issue #498 (plan task 2.5, F-CI-112/F-UX-005) — how does
curl -fsSL https://github.com/Montimage/mmt-dpi/releases/latest/download/install.sh | shinstall the native package verifiably, without cutting a release to test it? A: (1) The release job runstools/ci/make-release-bootstrap.sh "$GITHUB_REF_NAME" releasebeforeSHA256SUMSandattest-build-provenance: every versioned package gets a byte copy under the stable alias<package>_<distro>_<amd64|arm64>.<ext>,manifest.jsonlists distro, arch, package, format, alias, versioned source and sha256, andinstall.shistools/ci/bootstrap-install.shrendered for the tag with the same rows embedded (one source for both). The generator fails closed on an unparseable name, a version other than the tag’s, a distribution the bootstrap does not map, a wrong format, a duplicate alias, a security package without its SDK package, or existing outputs. The attestation step’sbundle-pathis published asmmt-dpi.intoto.jsonl; it is the one assetSHA256SUMSdoes not list, because it is signed itself.publish-release.shis unchanged (it uploadsrelease/*; idempotency stays with #595). (2) The bootstrap is POSIXsh(dash has nopipefail, so digests are compared as values). It maps/etc/os-releaseto a matrix distro (Ubuntu 22.04/24.04, Debian 12, Rocky/Alma/RHEL 9 →rocky-9, CentOS Stream 9), downloads, checks every sha256 before anything else, and then verifies provenance offline:gh attestation verify <pkg> --bundle mmt-dpi.intoto.jsonl --repo montimage-projects/mmt-dpi --signer-workflow …/release-packages.yml --source-ref refs/tags/<tag> --deny-self-hosted-runners, in a scrubbed environment (no token,GH_HOST,GH_REPO;HOME/XDG dirs in the temp dir). Only then does it runapt-get update+apt-get install, ordnf install, so dependencies and the loader drop-in come from the package. There is no skip option.MMT_BOOTSTRAP_BASE_URLmay point at a mirror or afile://copy: the digests are embedded and the provenance is checked against Sigstore, not the mirror. A customMMT_BASEis refused with a pointer to the source installer. Trust anchor: an unverifiedcurl | shtrusts the release’sinstall.shover TLS; the verify-first path (gh attestation verify install.sh) is documented in README. (3) The GitHub CLI is the verifier, not cosign: the--bundlecheck needs no login (probed on v1.9.1: rc 0 for the released.deb, rc 1 for a modified file and for--source-ref refs/tags/v1.9.0), and its tarball is ~15 MB against ~135 MB for cosign. The pin iscli/cliv2.101.0 (2026-09-15),gh_2.101.0_linux_amd64.tar.gz9bca2d1c…072b8 and_arm64b57e8063…5640f, taken fromgh_2.101.0_checksums.txtand checked against the API asset digests andgh attestation verify -R cli/cli. The maintainer bumps it by editingGH_VERSION/GH_SHA256_*intools/ci/bootstrap-install.shafter the same three checks. The pin is recorded here rather than in a manifest lint (no existing lint tracks downloaded release binaries). (4) Testing without a release:tools/ci/tests/test-release-bootstrap.sh(release_gates suite, offline) covers the generator and the bootstrap’s detection, lookup, digest check, refusals and identity flags.bootstrap-dry-runinrelease-packages.yml(behindpackages-gate) renders the set from the PR’s full package matrix..github/workflows/bootstrap-smoke.ymlbuilds a fixture from the latest published release’s real packages and real Sigstore bundle (tools/ci/make-bootstrap-fixture.sh) and runstools/ci/smoke-bootstrap.shin ubuntu:24.04, debian:12 and rockylinux:9: three tampered legs must exit with the sha256 or attestation refusal and install nothing (package changed after rendering; changed before rendering; bootstrap pinned to another tag), then the one-liner installs,ldconfig -plistslibmmt_core, and the first run matches withLD_LIBRARY_PATHunset, starting from cold apt metadata. Scheduled and post-release runs use the published one-liner once the latest release is newer than v1.9.1. For such a release a missing bootstrap asset fails the run, and a failure opens the “Bootstrap smoke failing” issue. (5) First-run prerequisite (F-UX-005):docs/_includes/first-example.mdnames them in prose —tests/docs_onboardingrequires exactly three displayed commands. The commands aresudo apt-get install gcc libpcap-devandsudo dnf --enablerepo=crb install gcc libpcap-devel(Rocky/Alma/CentOS Stream 9; RHEL 9 enablescodeready-builder-for-rhel-9-$(arch)-rpmsviasubscription-manager). The hero step-3 comment names gcc and libpcap-dev / libpcap-devel. The prerequisite list is a user-facing first-run line, not a build-dependency list, so it stays out oftools/ci/build-deps.txt. The issue’s v1.9.2 AC (gh release view v1.9.2lists the assets) can only be checked at the next release; the release checklist step 4 now names the bootstrap assets. The exact asset count stays with #603. Source:tools/ci/make-release-bootstrap.sh,tools/ci/bootstrap-install.sh,tools/ci/make-bootstrap-fixture.sh,tools/ci/smoke-bootstrap.sh,tools/ci/tests/test-release-bootstrap.sh,tests/release_gates/run_tests.sh,.github/workflows/release-packages.yml(release, bootstrap-dry-run, packages-gate),.github/workflows/bootstrap-smoke.yml,tools/ci/check-release-verification.sh,docs/_includes/first-example.md,docs/index.html(hero step 3),README.md,docs/Prepare-for-a-new-released-version.md.
2026-10-22
-
Q: Issue #517 (plan task 6.4, F-DEP-007/F-DEP-006) — Ruby 3.3, which builds the documentation site in the PR gate and on Pages, is security-only until 2027-03-31; ten gems of the Jekyll 4 graph have had no release in three years or more. Which Ruby runs the docs toolchain now, and are the unmaintained gems replaced or accepted? A: (1) F-DEP-007: Ruby 3.4 (4.0 is out of scope). The three
ruby/setup-rubysteps —c-cpp.ymlverify-helpers and site-onboarding,pages.ymlbuild — sayruby-version: "3.4", andscripts/validate-agent-environment.shnow fails when any workflow’sruby-version:differs from the releasedocs/AGENT_ENVIRONMENT.md§1 states.bundler-cache: truekeys its cache on the Ruby version, so the first 3.4 run misses the 3.3 cache andbundle installcompiles eventmachine 1.2.7’s native extension against the 3.4 ABI in the same job, as every later lock change does. Migration review against the Ruby 3.4 release notes: the gems 3.4 moves from default to bundled (base64,bigdecimal,csvamong them) are already resolved indocs/Gemfile.lock(Jekyll 4.4 declaresbase64/csv, google-protobufbigdecimal), so Bundler loads them without a warning; chilled string literals only warn under-W:deprecated; the Prism default parser, theHash#inspectformat and the quoting change in error messages do not reach the site output. Evidence,ruby:3.4(3.4.11) andruby:3.3(3.3.12) containers on this commit’s tree:bundle lockunder 3.4 with the locked Bundler 2.6.9 rewritesdocs/Gemfile.lockbyte-identically (the graph has no Ruby-version-dependent resolution, so the regenerated lock is the committed one);bash tools/ci/build-docs-site.shunderBUNDLE_FROZEN=truepasses on both (Jekyll 4.4.1, 57 pages, 78 files). The twosite_sha256values differ only throughassets/css/style.css.map, whosesourcesname the random temporary directory jekyll-remote-theme unpacks cayman into; every other file is byte-identical, so the digest moves on any two builds and a change to it is read file by file, never as a renderer change. (2) F-DEP-006 accepted, not replaced: forwardable-extended 2.6.0 (2016), colorator 1.1.0 (2016), eventmachine 1.2.7 (2018), pathutil 0.16.2 (2018), safe_yaml 1.0.5 (2019), jekyll-watch 2.2.1 (2019), kramdown-parser-gfm 1.1.0 (2019), mercenary 0.4.0 (2020), em-websocket 0.5.3 (2021) and rb-fsevent 0.11.2 (2022) — last releases per the RubyGems API on 2026-10-22, each the newest published version — are all required by Jekyll 4.4.1 itself (directly, or through em-websocket, listen and pathutil), which has no successor (4.4.1 is the latest Jekyll). The risk is bounded: the gems run only in the docs build, on trusted input (this repository’s Markdown and the pinned cayman theme), never in the SDK or its packages; eventmachine/em-websocket serve onlyjekyll serve --livereload, which CI never runs, and rb-fsevent is macOS-only. Trigger to revisit: a Jekyll 5 release (or a Jekyll 4.x release that drops one of these dependencies) — then move the Gemfile to it and re-run this review; a published advisory against any of the ten is caught earlier bytools/ci/check-dependency-advisories.sh(gems surface). Source:.github/workflows/c-cpp.yml(verify-helpers, site-onboarding),.github/workflows/pages.yml,docs/AGENT_ENVIRONMENT.md§1 (Documentation-site toolchain),scripts/validate-agent-environment.sh(build/test contract),tools/ci/build-docs-site.sh,docs/Gemfile.lock, https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/, https://www.ruby-lang.org/en/downloads/branches/. -
Q: Issue #519 (plan task 7.1, F-DEP-004) — the docs graph locked
public_suffix6.0.2 althoughaddressable (2.9.0)already allows< 8.0. Does 7.x need a migration, and what does it change in the built site? A: No migration; nothing in the site changes. Spike, from the upstream CHANGELOG (weppos/publicsuffix-ruby) 6.0.2 → 7.0.5: 7.0.0 (2025-11-17) raises the minimum Ruby to 3.2 and updates the list definitions — its only breaking change, met by the Ruby 3.4 of #517; 7.0.1 and 7.0.3 update the definitions; 7.0.2 drops symlinks and unneeded files from the gem package; 7.0.4/7.0.5 fix the release workflow and Rakefile (7.0.3 and 7.0.4 were never published to RubyGems, which lists 7.0.0, 7.0.1, 7.0.2, 7.0.5). No public API is removed or renamed.bundle lock --update public_suffix --conservative(Bundler 2.6.9,ruby:3.4) changes one lock line,public_suffix (6.0.2)→(7.0.5); no other gem moves. The only consumer is addressable (URI handling in Jekyll and jekyll-remote-theme). Two frozenbash tools/ci/build-docs-site.shruns on the same commit, one per lock, produce byte-identical sites exceptbuild-manifest.json(it records the lock digest) andassets/css/style.css.map, whose only difference is the random jekyll-remote-theme unpack directory (#517 entry). So thesite_sha256change this PR shows comes from that map and, across commits, fromsite.github.build_revision— the source commit stamped into every page’sstyle.css?v=— not from public_suffix. Source:docs/Gemfile.lock,tools/ci/build-docs-site.sh, https://github.com/weppos/publicsuffix-ruby/blob/main/CHANGELOG.md, https://rubygems.org/gems/public_suffix/versions. -
Q: Issue #520 (plan task 7.2, F-DEP-005) —
BUNDLED WITH 2.6.9pins the Bundler thatruby/setup-rubyinstalls for the docs jobs while 4.0.x is current. What does Bundler 4 remove or change for this toolchain, and does the frozen install still hold? A: Bundler 4.0.23 (2026-10-14, the latest 4.0.x), set withbundle update --bundler=4.0.23underruby:3.4: the only lock change is theBUNDLED WITHline; no gem moves. Spike, from the RubyGems/Bundler 4.0.0 CHANGELOG (ruby/rubygems, Bundler “Breaking changes”; the repository’sdoc/UPGRADING.mdholds only the upgrade recipe): every remembered CLI flag is removed (bundle install --path/--deployment/--frozen/--without/...— this repository passes none:build-docs-site.shsetsBUNDLE_FROZEN=truein the environment and runs plainbundle check/bundle install/bundle exec, andruby/setup-rubyv1.332.0 usesbundle config set --local path|deployment, which Bundler 4 keeps);bundle viz/bundle inject, theallow_offline_installsetting, multiple global sources and the Capistrano/Vladdeploymententrypoints are removed (none used);cache_allandlockfile_checksumsdefault to true and the patchlevel is hidden fromRUBY VERSION; frozen mode now fails when aCHECKSUMSsection has an empty registry checksum; the default install path and global cache changes were deferred to Bundler 5. Lockfile:lockfile_checksumswrites aCHECKSUMSsection only into a newly generated lock — updating an existing one, as here, adds none, so the lock keeps its form andtools/ci/check-dependency-advisories.sh’s parser (which skips that section anyway) is unaffected; adding checksums (bundle lock --add-checksums) is a separate integrity decision, not taken here. Bundler 4 requires Ruby ≥ 3.2 (ruby/setup-rubyfalls back to Bundler 2 below that), met by #517’s Ruby 3.4. Verified inruby:3.4withBUNDLE_FROZEN=true: theruby/setup-rubysequence (gem install bundler -v 4.0.23,bundle config set --local path/deployment true,bundle install --jobs 8, eventmachine compiled natively) followed bybash tools/ci/build-docs-site.shpasses with the manifest reporting Bundler 4.0.23; with the image’s default Bundler 2.6.9,bundle installinstalls 4.0.23 and restarts with it.docs/AGENT_ENVIRONMENT.md§1 names the Bundler major, andscripts/validate-agent-environment.shfails when it differs from the lock’sBUNDLED WITH. Source:docs/Gemfile.lock,docs/AGENT_ENVIRONMENT.md§1,scripts/validate-agent-environment.sh,tools/ci/build-docs-site.sh,.github/workflows/c-cpp.yml,.github/workflows/pages.yml, https://github.com/ruby/rubygems/blob/master/CHANGELOG.md (4.0.0),ruby/setup-rubybundler.jsatb1da4809(v1.332.0). -
Q: Issue #514 (plan task 6.1, F-DEP-301/F-DEP-307) — GCC 15 (ubuntu-26.04) defaults to C23 while GCC 11–14 default to gnu17, and no CI job built the SDK on a compiler newer than GCC 13. How is the C dialect pinned, how is C23 still exercised, and what did GCC 15 break? A: (1) The pin is
CFLAGS += -std=gnu17inrules/arch-linux-gcc.mk(rules/arch-linux.mkis a symlink to it), placed afterinclude $(RULESDIR)/common-linux.mkbecauserules/common.mk:30resetsCFLAGSwith:=, and followed byCFLAGS += $(MMT_EXTRA_CFLAGS)so the caller’s last-stdwins (make -C sdk ENABLESEC=1 MMT_EXTRA_CFLAGS=-std=gnu2xbuilds as C23). It goes intoCFLAGSrather thanCCso it survives a command-lineCC=override and leaves the #508 compiler-identity probe (which runs$(CC)on empty input) untouched. It is C-only (C++ keepsCXX := g++ -std=c++11) and GCC-only (arch-linux-clang.mk/arch-linux-icc.mkare unchanged).tools/ci/tests/test-hardening-identity.shasserts the last C-stdis gnu17 (also for an absoluteCC), thatCXXFLAGScarries no gnu17, and thatMMT_EXTRA_CFLAGS=-std=gnu2xcomes after the pin; it evaluates make without a job-levelMMT_EXTRA_CFLAGS. (2) The ceiling is thetoolchain-ceilingjob inc-cpp.yml: a nativeubuntu-26.04runner (GCC 15) withMMT_EXTRA_CFLAGS=-std=gnu23buildsENABLESEC=1and runs the full suite; make imports the variable from the environment, so every SDK-building suite also builds the SDK as C23, while the suites’ own test programs keep the-stdtheirrun_tests.shpins (GCC 15’s C23 default where none is pinned) and get the GCC 15 diagnostics. A native runner rather than a digest-pinnedubuntu:26.04container: no root-in-container artefacts in the checkout and no overlap with theubuntu:26.04pins of #515.ubuntu-26.04is a GitHub preview runner label — that risk is accepted and disclosed in the job comment,.github/required-checks.txtanddocs/AGENT_ENVIRONMENT.md§1; the floor job is unchanged. (3) GCC 15 fallout:tests/mmt_utils/test_attr_snprintf.ccalledmmt_attr_snprintfwith no prototype (no public header declares it) and GCC ≥ 14 rejects implicit declarations, so it declares it locally liketests/core_engine/test_core_engine.c. Therule_enginelibxml2 heap-balance check (tests/rule_engine/test_fuzz_engine.c) failed because libxml2 2.15 grows its own heap over its first ~35 parse cycles (measured 15280 → 17648 B, then flat through 1024 cycles; a libxml2-onlyxmlParseFile/xmlFreeDocloop reproduces the whole growth, and the SDK loop after it is flat) — parser settling, not an SDK leak. The baseline now follows 64 warm-up cycles instead of 1; the 64 measured cycles and the64 * 16B budget are unchanged, and a rules set leaked per cycle still fails it. (4)toolchain-ceilingis listed as a required context, but live branch protection is not changed here: an admin applies the list after merge (CONTRIBUTING.md, “Required checks and review”). Source:rules/arch-linux-gcc.mk,rules/common.mk:30,tools/ci/tests/test-hardening-identity.sh,.github/workflows/c-cpp.yml(toolchain-ceiling,toolchain-floor),.github/required-checks.txt,tests/mmt_utils/test_attr_snprintf.c,src/mmt_core/src/packet_processing.c(mmt_attr_snprintf),tests/rule_engine/test_fuzz_engine.c,docs/AGENT_ENVIRONMENT.md§1–§2. -
Q: Issue #515 (plan task 6.2, F-DEP-203) — the release matrix built only the previous distribution generation. Which current-generation legs join it, from which images, and what did they need? A: (1) Four legs join the
buildmatrix of.github/workflows/release-packages.ymlon both architectures:ubuntu-26.04anddebian-13(.deb),rocky-10andcentos-stream10(.rpm). Each image is pinned by its multi-arch index digest (amd64 and arm64 checked withdocker buildx imagetools inspect) and recorded intools/ci/base-images.txt. Rocky Linux 10 comes fromrockylinux/rockylinux:10, because the Docker Hub officialrockylinuxrepository stops at 9 (docker.io/library/rockylinux:10: not found); its index digest is the onequay.io/rockylinux/rockylinux:10serves. Thereproducibilityjob gains anubuntu-26.04deb leg (GCC 15, libxml2 2.15) beside the existingubuntu-24.04androcky-9legs. (2) Bootstrap manifest: theFORMATtable oftools/ci/make-release-bootstrap.shanddetect_distrointools/ci/bootstrap-install.shmap the four distributions (Rocky, AlmaLinux and RHEL 10 →rocky-10, CentOS Stream 10 →centos-stream10).tools/ci/tests/test-release-bootstrap.shnow requires theFORMATtable to equal the build matrix’s legs and formats, so a leg cannot be added to one and not the other. (3) Ubuntu 26.04 ships libxml2 2.15, whose soname islibxml2.so.16, in the packagelibxml2-16; there is nolibxml2package. The derivedDepends: libxml2mademmt-dpi-securityuninstallable there (apt-get“Depends: libxml2 but it is not installable”).tools/ci/shlib-deps.shnow mapslibxml2.so.2tolibxml2andlibxml2.so.16tolibxml2-16, and leaves every other libxml2 soname unmapped (exit 2) instead of guessing;tools/ci/tests/test-shlib-deps.sh(release_gates suite) pins the mapping. The rpm side keepslibxml2, because EL10 shipslibxml2.so.2. EL10 keepslibpcap-develin CRB, whichtools/ci/install-build-deps.shalready enables. (4) The weekly advisory gate mapsubuntu:26.04to the OSV ecosystemUbuntu:26.04:LTSandrockylinux/rockylinux:10toRocky Linux:10(both answer OSV queries), and listscentos:stream10as Not Assessed like Stream 9 (no feed). An unmapped image would fail that gate. Its probe reads the runtime package names of each image, soubuntu:26.04probeslibxml2-16(PKG_RENAMES). A local native scan on 2026-10-22 found twelve blocking records ondebian:13, all unfixed in trixie (gcc-14, glibc, libxml2): eleven of the advisories #492 dispositioned fordebian:12, plus CVE-2026-86139. They get the same time-boxedunfixeddispositions intools/ci/advisory-dispositions.txt, expiring 2026-12-31. After that, the native surface reports no blocking record. (5) Not extended yet:bootstrap-smoke.ymlbuilds its fixture from the latest published release, which has no current-generation packages before the next tag;install-smoke.yml’s published path builds the pinnedv1.9.1tag, which predates the gnu17 pin of #514 and was never built with GCC 15. Both gain the new distributions after the first release that ships them. Source:.github/workflows/release-packages.yml(build,reproducibility),tools/ci/base-images.txt,tools/ci/make-release-bootstrap.sh,tools/ci/bootstrap-install.sh,tools/ci/shlib-deps.sh,tools/ci/tests/test-shlib-deps.sh,tools/ci/tests/test-release-bootstrap.sh,tools/ci/check-dependency-advisories.sh(DISTROS),README.md(“Pre-built packages”). -
Q: Issue #516 (plan task 6.3, F-DEP-103/F-DEP-205/F-DEP-206/F-DEP-207) — the
toolchain-floorjob ran on theubuntu-22.04runner image (deprecated 2026-09-17, removed 2027-04-17), CentOS Stream 9 (EOL 2027-05-31) and Ubuntu 22.04 (standard support ends 2027-06-01) are release legs, and the asn1c gate ran onbuildpack-deps:bookworm. Where does the floor job run now, when do the old legs go, and does the toolchain floor move? A: (1)toolchain-floorkeeps its name — the required context in.github/required-checks.txtis unchanged — and now runs onubuntu-24.04in theubuntu:22.04container, pinned to the digest the release leg already uses (GCC 11.4, glibc 2.35). It installs git beforeactions/checkout, so the checkout is a real clone and not a tarball. It then installs the release containers’ dependency set (tools/ci/install-build-deps.sh ubuntu-22.04 deb) plusjq,pkg-configandcurl, which the hosted image used to provide (docs_onboardingand the release-bootstrap self-test need curl). The build and the suites run as an unprivilegedflooruser throughrunuser, as on a hosted runner: run as root, the installer suites skip their non-root checks. A local run of these steps (arm64) printed GCC 11.4.0 / glibc 2.35, built the SDK and passed 30/30 suites. (2) The asn1c gate runs onbuildpack-deps:trixie, pinned by index digest (host GCC 14.2). The regeneration recipe in that container reproduces the committedsrc/mmt_mobile/asn1c/byte for byte (git diff --cached --statempty), and a control run on the old Debian 12 image (GCC 12.2) gives the same tree. Both runs were on arm64; CI runs amd64. No workflow names a bookworm image or runs onubuntu-22.04any more, andtools/ci/tests/test-image-pins.shasserts both. (3) Removal dates: theubuntu:22.04image (release leg, install-smoke leg, floor container) and thequay.io/centos/centos:stream9image (release and install-smoke legs) retire on 2027-04-30, a month before their distributions’ end dates above. Each line intools/ci/base-images.txtcarries# retire-by: 2027-04-30 (#516).tools/ci/check-image-digests.sh, a blocking step of the requiredverify-helpersjob (push, pull request and its weekly schedule;base-image-refresh.ymlruns it only in itsrepinjob, after a drift), warns from 60 days ahead (2027-03-01) and fails from that date until the image’s workflow legs and its line are gone. The release jobs’ “Verify pinned base image is recorded” steps strip trailing comments before their whole-line match, so the annotation never fails a leg. The fix is removal; moving a date needs a new entry here.refresh-base-images.sh --writekeeps the comment when it repins (tested). (4) Debian 12 stays: it is in Debian LTS until 2028-06-30, and its open glibc/libxml2 advisories are dispositioned until 2026-12-31 intools/ci/advisory-dispositions.txt(#492), to be decided again then. Only the asn1c tooling image, which ships nothing, moved to Debian 13. (5) The floor does not move.MMT_GCC_MIN := 11,MMT_GLIBC_MIN := 2.34andMMT_LIBSTDCXX_MIN := $(MMT_GCC_MIN)(rules/common.mk) stay, and so do the shlib floorstools/ci/shlib-deps.shderives from them (libc6 (>= 2.34)/glibc >= 2.34,libstdc++6 (>= 11)/libstdc++ >= 11). Rocky 9 (GCC 11.5, glibc 2.34, EOL 2032-05-31) stays in the matrix and still carries that exact combination, so retiring Stream 9 and Ubuntu 22.04 removes no leg the floor depends on. Whenubuntu:22.04retires, the floor job moves to the pinnedrockylinux:9image (GCC 11.5 on glibc 2.34, exactly the declared floor) with the same GCC-major assertion. The floor next moves when Rocky 9 itself retires. Source:.github/workflows/c-cpp.yml(toolchain-floor),.github/workflows/asn1c-regen.yml,tools/ci/base-images.txt,tools/ci/check-image-digests.sh,tools/ci/tests/test-image-pins.sh,rules/common.mk(MMT_GCC_MIN,MMT_GLIBC_MIN,MMT_LIBSTDCXX_MIN),tools/ci/shlib-deps.sh,tools/ci/advisory-dispositions.txt,docs/AGENT_ENVIRONMENT.md§1. -
Q: Issue #518 (plan task 6.5, F-DEP-306/F-CI-011) — cppcheck was pinned to 2.13 (ubuntu-24.04’s package, Dec 2023) and the findings ratchet stood at 24 while the scan measured 13. Where does the newer release come from, what is the ratchet now, and what happened to the findings it adds? A: (1) The release is the one the issue names, 2.22 (2.22.0, published 2026-09-19). No distribution package carries it, and an apt/pacman package would move under the ratchet at the next archive refresh, so
tools/ci/install-cppcheck.shbuilds it from the upstream tag tarball (github.com/cppcheck-opensource/cppcheck, the project’s current home —danmar/cppcheckredirects there) pinned by sha256d74945de…ece57b, with upstream’s release options (MATCHCOMPILER=yes, no_GLIBCXX_DEBUG), and refuses a binary whose--versionis notCppcheck 2.22.0. Thelintjob (name, and so the required check, unchanged) now runs in the digest-pinnedubuntu:24.04container already recorded intools/ci/base-images.txtand builds it there; shellcheck comes from that container’s apt (0.9, as on the runner).CPPCHECK_PINNED_VERSIONis2.22, andtools/ci/tests/test-cppcheck-version.sh(release_gates suite) fails when the installer’s major.minor differs from the pin, the tarball is not sha256-pinned, the lint job’s container is not digest-pinned, or the job installs a distribution cppcheck. (2) The gate passes--library=gnuin both passes: the SDK is GNU C built by GCC only, and gnu.cfg defines__builtin_expectand kernel-stylelikely()/unlikely(). cppcheck receives no-I, so the project’s definitions (mmt_utils.h,branch_optimization.h) are invisible to it. Without the library everyif (unlikely(p == NULL)) returnguard is opaque, and 2.22 reported the dereference behind it (all 8memory.carena findings, one of them error-severity). (3) On the unchanged tree 2.22 reported 38 findings (2 error-severity, which would have failed the error gate); 2.13 reported 13, 12 of them among the 38 (its 13th,tips_xml.c:602, 2.22 no longer reports). Fixed in code (no behavior change): thehash_utils.cpptimeout-ring “leak” (return the pointer instead of areinterpret_castcppcheck cannot follow),str_combine()’s branch conditions (mmt_utils.c), the unreachable inneroffset >= lentest inmmt_path_snprintf()’s proto-path loop (packet_processing.c), three deadptr = NULLstores afterfree(ndn.c,proto_ip_frag.c,tcp_segment.c), three duplicated bound tests that repeat the test on the line above inproto_ssl.c,%ufor theuint32_tprotocol id in two examples, and anunsigned longcast fortv_usecunder%06luin thetips_*engines. Suppressed inline, each with its reason beside it:uninitMemberVarNoCtoronmmt_oa_table/mmt_int_map(malloc’d C-layout structs, never constructed), thetcp_segment.ccarve path (cppcheck loses the grow branch’sb = nb),nas_msg.c(it does not follow the decoder macro’swhile (buffer == NULL) returnguard) and the conversation-proto OR inmmt_tcpip_plugin_internal.h(the OR is the value returned, not a truth value). (4) The ratchet is the measured count, 0: any finding 2.22 reports is now a CI failure until fixed or suppressed with a reason. The phase0 classification fingerprint is unchanged. Source:tools/ci/install-cppcheck.sh,tools/ci/run-cppcheck.sh(CPPCHECK_PINNED_VERSION,LIBRARIES),tools/ci/cppcheck-ratchet.txt,tools/ci/tests/test-cppcheck-version.sh,.github/workflows/c-cpp.yml(lint),tools/ci/base-images.txt,docs/AGENT_ENVIRONMENT.md§1, the source files named above, https://github.com/cppcheck-opensource/cppcheck/releases/tag/2.22.0. -
Q: Issue #521 (plan task 7.3, F-DEP-302 part 2 of 3, spike) — the asn1c pin was held at
mouse07410/asn1c @ dbd0ed09(0.9.29) because the recipe’s-gen-PERflag was removed upstream. What does moving to v1.5.3 take: which flags replace-gen-PER, what changes in the generated skeletons, and is the output reproducible? A: (1) Pin: tagv1.5.3is commite6c2799ac9e64702dd425b47d838aa27b2495e7b(2026-10-07);ASN1C_VERSIONrecords it with the GitHub archive tarball’s sha256 (51da7f83…, identical over two downloads). (2) Flags: v1.5.x split PER at b5ed2c1f into-gen-UPER/-gen-APERand generates every codec (BER, XER, OER, UPER, APER, JER, CBOR, print, random-fill) unless told otherwise; the-gen-*options only add to that default. The dissectors decode aligned PER only (aper_decode,aper_encode_to_buffer; XER only behindXER_FPRINTunderDEBUG), so-gen-PERmaps to-gen-APERplus-no-gen-UPER -no-gen-JER -no-gen-CBOR(ASN1C_CODECSin the recipe): UPER is what 0.9.29’s-gen-PERemitted besides APER and nothing calls it; JER and CBOR are new. BER, XER, OER, print and random-fill stay. The generator writes those choices tocommon/asn_config.h(ASN_DISABLE_UPER_SUPPORT, …), which the runtime headers include, so the SDK build needs no extra-D.ASN1C_PREFIX(the ngap/ naming) and the s1ap/ngap file sets are unchanged (713 and 1,130 files, same names). (3) Version string: v1.5.x computes it at autoreconf time fromgit describeand the commit date and falls back toNOGIT-<build date>without git metadata — a tarball build on 2026-10-22 reportedNOGIT-2026-10-22, and every generated header embeds it, so the gate could never be byte-stable. The recipe stampsASN1C_VERSION_STRING=v1.5.3-0-ge6c2799a-2026-10-07(whatgit describe --tags --longplus%adof the tag reports in a clone) andASN1C_BUGURL(upstream’s tarball fallback) intoconfigure.acbeforeAC_INIT, andasn1c-regen.ymlrequiresasn1c -vto print exactly that pair. A tarball keeps the sha256 integrity check; a git clone would make the string depend on the clone’s abbreviation length. (4) Skeletons: the runtime is split per codec (INTEGER_aper.c,OPEN_TYPE_aper.c,aper_*,*_ber.c,*_xer.c, …), and both #513 advisories are fixed upstream —INTEGER_decode_aper()rejectsrange_bitswider than itsuintmax_taccumulator and a determinant abovemax_range_bytesbefore aligning (ce45145ad4),OPEN_TYPE_aper_get()fails a selector result without a descriptor or pastelements_countand allocates or fails an unallocated member (e9600cf7f2); both commits are ancestors of the tag. The #513 patch no longer applies (2 out of 2 hunks FAILEDoncommon/INTEGER.c), as designed.ANY_decode_aper()now reads the general length determinant (aper_get_length(pd, -1, -1, -1, &repeat), a five-argument signature), which is the body the #427 load-time override carried. Unknown-extension handling changed upstream from fail to skip (ASN_REJECT_UNKNOWN_EXTENSIONSrestores it); the only path S1AP/NGAP reach is an APER ENUMERATED extension index past the map, which 0.9.29 already accepted (it substituted the first enumerator), so the strict macro is not defined — defining it would make the decoders stricter than before. (5) Layout: v1.5.3 holds many members by pointer that 0.9.29 embedded — its recursion breaker adds a deeper cycle search and makes-findirect-choicecover every CHOICE alternative, including the NGAP IE value unions’ primitives. Examples: theS1AP-PDUalternatives,E-RABLevelQoSParametersand its ARP,UE-S1AP-IDs.uE-S1AP-ID-pair, every NGAPprotocolIEsand IE value.-fcomplex-threshold=500(the maximum) and-fprefer-import-sourcedo not change it, and dropping-findirect-choiceonly mixes embedded and pointer members, so the flags stay and the dissector glue adapts (#522). NGAPprotocolIEsare declared asstruct NGAP_ProtocolIE_Container *— a forward-declared name no header defines — while the descriptor (ATF_POINTER,asn_DEF_NGAP_ProtocolIE_Container_124Pn) allocates the parameterized instance; the glue reads it through asn1c’sA_SEQUENCE_OFview. (6) Measured: run in the pinnedbuildpack-deps:trixieimage with the workflow’s own steps, the regeneration differs from the 0.9.29 tree in 1,988 generated files, +104,024/−33,264 lines (common/ 145 files: 72 added, 2 removed (BOOLEAN.c/.h), 71 modified; s1ap/ 713 and ngap/ 1,130 modified). A second regeneration in a fresh tree was byte-identical. Source:src/mmt_mobile/asn1c/ASN1C_VERSION,src/mmt_mobile/asn1c/Makefile(ASN1C_CODECS),.github/workflows/asn1c-regen.yml, mouse07410/asn1c v1.5.3 (configure.acversion m4,asn1c/asn1c.coption parsing and default flags,libasn1compiler/asn1c_C.cexpr_break_recursion,skeletons/INTEGER_aper.c,skeletons/OPEN_TYPE_aper.c,skeletons/ANY_aper.c,ChangeLogv1.5.3 and the v1.5.2 upgrade notice). -
Q: Issue #522 (plan task 7.4, F-DEP-302 part 3 of 3) — with the generator pinned at v1.5.3 (#521), what does committing the regenerated tree take: are the #513 backport patches still needed, what must the handwritten dissector glue change, and does any verdict move? A: (1) The tree under
src/mmt_mobile/asn1c/{common,s1ap,ngap}is the regeneration recipe’s output, copied unmodified from a run of theasn1c-regen.ymlsteps in its pinnedbuildpack-deps:trixieimage (measurements in the #521 entry). (2) The patches are dropped with the recipe’sapply-patchesstep and thepatches/directory: v1.5.3 carries both upstream fixes (#521 entry), and thes1ap-integerfixture ofparser_boundaries(test_s1ap_integer_length.c, unchanged checks) passes against the unpatched v1.5.3 runtime, underSANITIZE=asantoo. (3) Glue, outside the generated tree.s1ap_common.c: theS1AP-PDUalternatives,E-RABLevelQoSParameterswith its ARP, anduE-S1AP-ID-pairare read through their pointers, each NULL-checked (a NULL PDU alternative fails the decode); the #427 constructor that patchedasn_OP_ANY.aper_decoderis removed, because v1.5.3’sANY_decode_aper()has the same body and the old one no longer compiles (aper_get_length()gained an argument);<arpa/inet.h>is included forntohl(), which the oldasn_system.hpulled in through<netinet/in.h>.ngap.c: the IE container is read through_NGAP_IE_COUNT/_NGAP_IE_AT, which view the allocatedNGAP_ProtocolIE_Container_124Pnas its leadingA_SEQUENCE_OF(the header’sstruct NGAP_ProtocolIE_Container *names no defined type); every IE value and message alternative is a pointer, soRAN-UE-NGAP-IDgoes through a NULL-safe_get_set_ran_ue_ngap_id()and the AMF-ID and NAS-PDU helpers return on NULL. GCC 13 only warns on these mismatches (GCC 14+ errors), so the glue was rebuilt with-Werror=incompatible-pointer-types -Werror=int-conversion -Werror=implicit-function-declarationuntil clean. Therules/common.mk#443 comment and atests/s1ap_ngap_decode/run_tests.shcomment that described the removed constructor are reworded on the same lines. (4) Gate:asn1c-regen.ymlnow also runs on pull requests that touchcommon/,s1ap/orngap/, so a hand edit to the generated tree fails the PR instead of the next weekly run.tests/s1ap_ngap_decode/run_tests.shgains a step 0 that fails when a generated s1ap/ngap source does not name the generatorASN1C_VERSIONpins, whencommon/holds another generator’s output, or when the recipe applies a patch again. (5) Tests:s1ap_ngap_decodebuilds its S1AP item and NGAP InitialUEMessage through the new pointers and adds three checks — ARP priority level extracted through the two pointer levels, RAN-UE-NGAP-ID read (GET) and rewritten byencode_ngap()(SET) through the pointer IE value. (6) Verdicts: the phase0 classification fingerprint and precision/recall metrics match the committed baselines unchanged. No CHANGELOG line: the topmost section is the released 1.9.1, as for #518. Source:src/mmt_mobile/asn1c/Makefile,src/mmt_mobile/asn1c/common/(INTEGER_aper.c,OPEN_TYPE_aper.c,ANY_aper.c,asn_config.h),src/mmt_mobile/s1ap/s1ap_common.c,src/mmt_mobile/ngap/ngap.c,.github/workflows/asn1c-regen.yml,tests/s1ap_ngap_decode/run_tests.sh,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c,tests/parser_boundaries/test_s1ap_integer_length.c,tools/phase0/ci/check_classification.sh,tools/phase0/ci/check_precision.sh.
2026-10-26
- Q: Issue #523 (plan task 7.5, F-DEP-303 part 1 of 2) — the decoders were generated from S1AP r10.5.0 and NGAP r15.2.0 while the r16.1.0 modules sat unused in
src/mmt_mobile/asn1c/support/. Can the recipe generate from r16.1.0 without rewriting the dissectors, and what does r16.1.0 add? A: Yes, fingerprint-neutral. (1) NGAP:gen-ngaptakessupport/ngap-r16.1.0/38413-g10.asnwith the same flags. Every type, member andvalue_PRname the glue uses is unchanged; r16.1.0 only adds IEs and alternatives. asn1c names the parameterized IE-container instances after the source line ofProtocolIE-Container, soNGAP_ProtocolIE_Container_124Pnbecame…_6976Pn: thengap.ccomment and the one test that names an instance follow, andtest_s1ap_integer_length.creads the IE member array throughasn_DEF_NGAP_UEContextReleaseCommand_IEs.elementsinstead of the numberedasn_MBR_…_169. (2) S1AP:s1ap_common.cdecodes the OAI-style schema of the r10.5.0 inputs (moved fromsrc/mmt_mobile/s1ap/asn1_R10.5in 7896937a) —S1ap-types, each message aSEQUENCE OF S1ap-IEwhosevalueis anANYdecoded per IE id — while 36413-g10.asn is the class-based 3GPP module, whose typed open types would need a dissector rewrite (what d0274d95 generated in 2020 and 9e5b76da reverted).src/mmt_mobile/asn1c/s1ap-simplify.pyapplies that simplification mechanically instead of by hand: it drops the classes, object sets and parameterized containers; turns each message’sProtocolIE-Containerintos1ap-<Msg>-ies SEQUENCE (SIZE (0..s1ap-maxProtocolIEs)) OF S1ap-IE, eachProtocolIE-SingleContainerintoS1ap-IE, each container list intoSEQUENCE (SIZE (lb..ub)) OF S1ap-IEand eachProtocolExtensionContainerintoS1ap-IE-Extensions; prefixes typesS1ap-and valuess1ap-; and lists theid-*constants as named numbers ofS1ap-ProcedureCode/S1ap-ProtocolIE-ID. The encodings agree: a ProtocolIE-Field is an id, a criticality and an open type, which APER reads back asANY.gen-s1apwrites the four derived modules tosupport/s1ap-r16.1.0/simplified/(committed, so the regen gate also proves the derivation) and generates from them; python3 is now an explicit dependency of the gate’s container (buildpack-deps already carried it through mercurial). Tens1ap_common.hincludes follow r16.1.0 renames (e.g.tunneling→tunnelling,Synchronization→Synchronisation, the MDT types →M1…); noS1ap_*identifier the glue uses changed. Incommon/only the S1AP output the recipe leaves there changes (S1AP-PDU.[ch],asn_constant.h); the runtime skeletons are byte-identical. (3) Inventory:support/DELTA-r16.1.0.md, written bysrc/mmt_mobile/asn1c/delta-inventory.pyfrom the constants and object sets: S1AP +15 procedures, +131 protocol IEs, 2 procedure and 1 IE constant renamed (codes unchanged), +245 type definitions; NGAP +3 procedures, +41 protocol IEs, 1 IE constant renamed (id-CoreNetworkAssistanceInformation→…ForInactive, id 18), +68 types. Each new IE lists the messages or IE types that carry it, the families task 17.5 (#574) maps. It also lists what changed in place: IEs retyped in an object set both releases define (NGAPid-AdditionalUL-NGU-UP-TNLInformation→UPTransportLayerInformationList,id-QosFlowToReleaseList→QosFlowListWithCause, both inside OCTET STRING transfer containers the dissector does not decode), types whose root before the extension marker differs (S1AP:CauseRadioNetwork, whose r10.5.0 enumeratorinvals1ap-id-qos-combinationwas a prefixing accident of the OAI schema,TraceDepth’ss1ap-maximum,ImmediateMDT,ENB-StatusTransfer-TransparentContainer; NGAP: 13 types), and types that only gained extension additions. No renamed enumerator is used by the glue. The r10.5.0 and r15.2.0 inputs stay for that inventory. (4) Tests:s1ap_ngap_decodestep 0 fails when a generated s1ap/ngap source was found in another input, when the derived schema or the inventory is stale;test_rel16_generationchecks r16.1.0 constants, round-trips NRUESecurityCapabilities (IE 269) throughS1ap-IE’sANY, and hasdecode_ngap()read a SecondaryRATDataUsageReport (procedure 52) carrying HandoverFlag (IE 143).test_s1ap_rel16_independent_vectorchecks the derivation against an encoder that does not share it: a 129-octet InitialContextSetupRequest encoded by asn1c v1.5.3 run on the unmodified, class-based 36413-g10.asn (ASN1C_PREFIX=S1AP_ -findirect-choice, the recipe’s codec flags), with Rel-16 content in each rewritten container — the E-RAB item’s iE-Extensions (BearerType, id 233), its QoS parameters’ iE-Extensions (Packet-LossRate, id 273) and the message-level NRUESecurityCapabilities (id 269). The derived codec consumes all of it, every IE and extension value decodes, ands1ap_decode()extracts QCI, ARP, TEID and gateway. (5) Verdicts: the phase0 classification fingerprint and precision/recall metrics match the committed baselines unchanged; the S1AP/NGAP suites pass underSANITIZE=asanand the mobile pcap harness replays its 28 captures cleanly. Source:src/mmt_mobile/asn1c/Makefile,src/mmt_mobile/asn1c/s1ap-simplify.py,src/mmt_mobile/asn1c/delta-inventory.py,src/mmt_mobile/asn1c/support/README,src/mmt_mobile/asn1c/support/DELTA-r16.1.0.md,src/mmt_mobile/s1ap/s1ap_common.h,src/mmt_mobile/ngap/ngap.c,.github/workflows/asn1c-regen.yml,tests/s1ap_ngap_decode/run_tests.sh,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c,tests/parser_boundaries/test_s1ap_integer_length.c,tools/phase0/ci/check_classification.sh,tools/phase0/ci/check_precision.sh.
2026-10-27
-
Q: Issue #641 — quay.io garbage-collected the pinned
quay.io/centos/centos:stream10digest (6f8d6188…) when thestream10tag moved to99b8fe27…, so thecentos-stream10 (amd64/arm64)release legs andpackages-gatefailed withmanifest unknownon PR #639, a day after #638/#640 fixed the same failure forstream9. How is a garbage-collected quay.io CentOS Stream pin caught before it breaks PR CI? A: (1) Repin:bash tools/ci/refresh-base-images.sh --write --registry quay.iomovedstream10tosha256:99b8fe27dd4958b5dc2630ce35f5f6a7ff7bf9b2b1a72078102fde50d3277550(an index covering linux/amd64 and linux/arm64) intools/ci/base-images.txtand.github/workflows/release-packages.yml, the only two files quoting it;stream9wasok. The same day’s full--checkalso reporteddrift(notmissing: the old digests still pull) forubuntu:22.04,ubuntu:24.04andubuntu:26.04; as in the #491 entry above they are not repinned here — the daily run proposes them. (2) Measured, not assumed: quay.io keeps no dated tag for CentOS Stream (onlystream10,stream10-minimaland the 2024-developmenttags), and the superseded manifest 404s as soon as the tag moves (6f8d6188…already 404s less than two hours after the 01:05 UTC retag; the earlierb6456f91…404s as well). Thestream10tag moved on 10-07, 10-14, 10-20, 10-22 and 10-27, at 01:05–17:10 UTC, so a GC break can start at any hour. No polling cadence can come before a GC that happens at retag; what a cadence controls is how long CI stays broken afterwards. The daily'41 5 * * *'run has in fact started between 09:46 and 11:31 UTC (10-21 to 10-26), so the old bound was up to about a day plus the repin time. (3) Cadence:.github/workflows/base-image-refresh.ymlkeeps the daily full check and adds an hourly'17 * * * *'run that checks only the quay.io pins (--registry quay.io, a new option ofrefresh-base-images.shthat limits--checkand--writeto entries whose name starts with<host>/; a host no entry uses is exit 2). It is selected bygithub.event.scheduleequal to the workflow’sQUAY_HOURLY. The hourly run makes no Docker Hub request (rate limits) and does not fail every hour on a Docker Hub tag that moved while its old digest still pulls. Any violation it finds starts the same full--writerepin job. The bound is best-effort — about an hour after the retag plus the repin time — because GitHub delays scheduled runs under load. (4) The hourly cadence exposed two defects in the repin job, fixed in the same change. First, its issue lookupgh issue list --author app/github-actionsmatched nothing, so every failing run opened a new “Base image pins out of date” issue (#611, #631, #634, #635, #636 are duplicates, none ever edited). It now searches by title and keeps the oldest open issue whose author is theapp/github-actionsbot. Second, withBASE_IMAGE_REFRESH_TOKENset it would have force-pushed a new commit every hour while a pin stays missing, restarting the repin PR’s CI; it now skips the push whenci/base-image-refreshalready carries the same tree. Concurrency is one group per scope (an hourly run can never replace a pending daily or dispatched full check) plus one shared group for the repin job. (5) Rejected: mirroring the CentOS Stream images to GHCR so a pin is never collected — it needspackages: write, a maintainer decision on package visibility and cannot be verified from a PR; pulling the floating tag when the pinned digest is gone — it gives up digest pinning (F-SEC-007). The mirror is still the only way to close the retag-to-repin window entirely. Closing the five duplicate issues is a maintainer step. Source:tools/ci/refresh-base-images.sh(--registry),.github/workflows/base-image-refresh.yml(schedule,QUAY_HOURLY,concurrency, repin job),tools/ci/base-images.txt,.github/workflows/release-packages.yml(centos-stream10matrix row),tools/ci/tests/test-image-pins.sh. -
Q: Issue #644 — the weekly dependency-advisories gate (
.github/workflows/dependency-advisories.yml, run 40459748819) ended NOT ASSESSED, exit 2, with no scanner failure. What made it inconclusive, and how are the two causes it could be — the debian:13 glibc records and the CentOS Stream legs — handled? A: (1) The cause was two affected records ondebian:13@sha256:4c25275…for glibc2.41-12+deb13u4:DEBIAN-CVE-2026-6368andDEBIAN-CVE-2026-6791(aliasesCVE-2026-6368/CVE-2026-6791), with no rating in any source (ratingsempty, severity null) andunfixedin trixie, soapply_policymarks eachNOT ASSESSED (no rating)(tools/ci/check-dependency-advisories.sh:1090) and the verdict turns incomplete (:1064). They are the same upstream glibc CVEs dispositioned fordebian:12(tools/ci/advisory-dispositions.txt:43-44) on the same evidence, so the debian:13 entries take that pair’s expiry (2026-12-31) and #492 tracking (tools/ci/advisory-dispositions.txt:68-73) rather than #515’s. The #515 measurement of 2026-10-22 (entry above) counted the twelve blocking debian:13 records and missed these two unrated ones; that entry stays as written. (2) CentOS Stream 9 and 10 were not the cause: they map to no OSV ecosystem (tools/ci/check-dependency-advisories.sh:154-157) and are only appended to Not Assessed (:990), never to the failures, so a no-feed target never sets the exit code — a PASS carries a “(N target(s) Not Assessed)” suffix (:1069); only blocking/expired advisories (exit 1) or failures/unrated advisories (exit 2) change it. That policy is now stated in the script header (:52-57, which named only Stream 9). The Stream 9 leg retires by 2027-04-30 (tools/ci/base-images.txt:41, #516); Stream 10 has no retire-by date. (3) Verified locally:--only nativeagainst a tree holding thedebian:13and both CentOS Stream pins (ROOT_DIR) exits 2 with the two recordsNOT ASSESSED (no rating)before the entries and exits 0 after,PASS … (2 target(s) Not Assessed …). A full local native run also failsubuntu:22.04,ubuntu:24.04anddebian:12withexec format erroron an aarch64 host whose cache holds their amd64 variants; that is the host, not the gate. The fixture self-test adds an unrated record without and with a disposition and the two Stream images (tools/ci/tests/test-dependency-advisories.py:233-258). Source:tools/ci/check-dependency-advisories.sh(header,DISTROS,NO_FEED_REASON, native loop,measureverdict,apply_policy),tools/ci/advisory-dispositions.txt,tools/ci/base-images.txt,tools/ci/tests/test-dependency-advisories.py,tools/ci/tests/dependency-advisories-feeds.json,.github/workflows/dependency-advisories.yml. - Q: Issues #528 (plan task 8.5, F-TEST-010) and #552 (plan task 13.3, F-CI-007/F-CI-009/F-CI-015) — the
-fsigned-charleg is a no-op on x86-64, so ARM’s unsigned plaincharwas never tested; the lint job scanned the tree twice; docs-only PRs ran every C job;enablesecre-ran therule_enginesuiteunit-testsalready runs. How are both done without a PR that waits on a context it removed? A: (1) Two new single-context jobs,unit-tests-arm(full suite on the nativeubuntu-24.04-armrunner) andunit-tests-unsigned-char(full suite on x86 withEXTRA_CFLAGSandMMT_EXTRA_CFLAGSset to-funsigned-char), each asserting__CHAR_UNSIGNED__first. Addingrunner/flag keys to theunit-testsmatrix was rejected: it renames the two requiredunit-testscontexts. The-fsigned-charleg stays — removing a required context deadlocks the PR that removes it — and is a candidate for removal in a follow-up that also edits protection. The bootstrap apt cache key now includesrunner.arch. (2)tools/ci/run-cppcheck.shruns one--enable=warningscan and gates error severity on its XML report: error-severity checks are always enabled, so the dropped error-only rescan (16.5 min of the 33.8 min lint run 40448488680) could only repeat what the report holds. The lint job also restores a--cppcheck-build-dirwithactions/cache(keyed on the installer and the gate script), so cppcheck reanalyses only changed files; a cold cache costs one full scan (~16 min there). (3) Achangesjob (tools/ci/classify-changes.sh, allowlist:docs/**and root-level*.md; empty diff = code) gates the C jobs ofc-cpp.ymlandphase0-baseline.yml. A job skipped byif:reports success, so single-context jobs skip at job level, with!cancelled()so a failedchangesruns them (fail-closed). A skipped matrix job reports only its bare name and would leave each leg pending, sounit-tests,sanitizer-testsandresource-budgetsalways start and skip their steps;tools/ci/check-required-checks.shnow rejects a skippable job-levelif:on a matrix job a required context names, andharness-gateaccepts a skipped harness matrix only whenchangessucceeded withcode=false.buildstays unfiltered (its protocol-count check readsREADME.md,docs/index.html,docs/_config.yml) anddoc-validatorsrunsdocs_lifecyclewhenunit-testsskips. (4)enablesecnow only buildsENABLESEC=1. No required context is removed or renamed;unit-tests-armandunit-tests-unsigned-charare added to.github/required-checks.txtand need the maintainer protection update after merge. Source:.github/workflows/c-cpp.yml(changes,unit-tests-arm,unit-tests-unsigned-char,lint,enablesec,doc-validators),.github/workflows/phase0-baseline.yml(changes,harness-gate),.github/actions/bootstrap-deps/action.yml,.github/required-checks.txt,tools/ci/classify-changes.sh,tools/ci/run-cppcheck.sh,tools/ci/check-required-checks.sh,tools/ci/tests/test-classify-changes.sh,tools/ci/tests/test-cppcheck-version.sh,tools/ci/tests/test-required-checks.sh, GitHub Actions docs (“Using conditions to control job execution”: a skipped job reports success). - Q: Issue #529 (Task 8.6) — which vestigial build and doc files go, how is the vendored-source list parsed once, and what threshold does the commented-out code lint use?
A: (1) Deleted:
rules/project.mk, which nothing includes (sdk/Makefile:17includesrules/arch-$(ARCH).mk, which includesrules/common-linux.mk, which includesrules/common.mk), anddocs/docs/mmt_list_protocols.csv, which no page links;docs/_config.yml:34no longer names*.csvamong the nested assets it excludes. Kept:rules/arch-linux-gcc.mk—rules/arch-linux.mkis a symlink to it (mode 120000), so the pair is one file under two names, not a duplicate. (2)tools/ci/vendor-paths-lib.shis the single shell parser oftools/ci/vendor-paths.txt:vendor_paths_load [FILE](:18-29) fillsVENDOR_PATHSand returns 2 when the list is missing.report-function-shape.sh,lint-markers.sh,lint-commented-code.sh,lint-packet-path-io.sh,count-init-wrappers.sh,check-canonical-init-wrappers.sh(which hands the parsed list to its Python throughVENDOR_PATHS_LINES),run-cppcheck.sh,check-sdk-coverage.shandscripts/validate-doc-drift.shsource it; each script’s output on 340947c5 is unchanged.scripts/validate-doc-drift.sh:221-227now also requires the six metric scripts to source the helper..shellcheckrcsetsexternal-sources=trueso the pre-commit hook, which passes only changed scripts, follows the# shellcheck source=directives instead of reporting SC1091; it disables no rule.tools/ci/vendored-components.pykeeps its own Python reader. (3)tools/ci/lint-commented-code.sh:36lowersMIN_RUNfrom 5 to 2 and gates on a count ratchet rather than on zero (:37-49,:146-157): 121 runs (293 lines) measured on 340947c5, recorded intools/ci/commented-code-ratchet.txt; a rise is exit 1, a drop asks for the baseline to be tightened. Rejected: a per-path allowlist of the 121 runs, and deleting them now — they sit in 49 C files undersrc/, the sweep would churn the files #540–#548 are editing, and a C change needs the phase0 gates. TheCommented-out code lintstep comment in.github/workflows/c-cpp.yml(verify-helpers) now describes the ≥2-line ratchet instead of the old zero-blocks ≥5 gate; it was updated once the PR #649 that also edits that workflow had landed. Source:rules/arch-linux.mk(symlink),docs/_config.yml,tools/ci/vendor-paths-lib.sh,tools/ci/vendor-paths.txt,tools/ci/lint-commented-code.sh,tools/ci/commented-code-ratchet.txt,tools/ci/tests/test-commented-code-ratchet.sh,tests/release_gates/run_tests.sh,scripts/validate-doc-drift.sh,.shellcheckrc,.github/workflows/c-cpp.yml(verify-helpers). -
Q: Issue #524 (plan task 8.1, F-TEST-005/006/007/015) — how does coverage come to measure what runs, per family, with ratcheting floors? A: (1) Harvest fix:
tests/tcp_pending_orderandtests/resource_boundscompiled their objects into amktempdirectory their exit trap deleted, so under--coveragethe.gcdavanished before the runner aggregated them (the gap the #387 entry deferred). Their objects now go to the suite directory, as intests/core_engine(.gitignorecovers*.oand*.gcda); the work dir keeps logs and results.proto_tcp.c,tcp_segment.c,proto_ip_frag.cand the other sources the two suites compile now appear ininstrumented_sources. Three uncovered runs longer than 10 lines appeared with them (tcp_seg_new(),tcp_seg_new_in_arena(), the TCP option extractor’s not-found reset); case I oftests/tcp_pending_orderdrives each with assertions, through a configurableget_packet_offset_at_index()stub intests/resource_bounds/tcp_reasm_stubs.h(default -1, unchanged for resource_bounds). (2) Harness cohort:tools/phase0/run_all_harnesses.sh --profile coveragebuilds oneBUILD=coverageSDK and replays every harness against it, whatever its profile, exceptCOVERAGE_SKIP:run_classified_flow_fastpath_test.sh,run_position_unknown_guard_test.shandrun_session_lookup_perf_test.shassert debug counters armed only by#if !defined(NDEBUG) || defined(MMT_BUILD_ASAN), which the release-DNDEBUGofBUILD=coveragecompiles out, andrun_mt_tsan_test.shrefuses a non-TSan SDK. A skip entry naming no harness exits 2; the option is explicit (never read fromSDK_BUILD_PROFILE), so the--with-harnessesarm and the default invocation are unchanged. A fullbash tests/run_all_tests.sh --coverageruns it after the suites as one extra result entry, harvests the build once, andsdk-coverage.sh report --harness-diraddscohorts.harnessand joins it intocombined; per-suite harvests moved to asuites/sibling so the report does not read the harness harvest as a suite. Measured (aarch64, GCC 13.3): 46 harnesses run, 4 skipped; harness 48.4% (19,236/39,749 lines, 718 files); combined 60.1% (26,588/44,238). (3) Family floors:floor.jsonsdk.family_floorsgates each family on its own denominator;check-sdk-coverage.shexits 2 when a family has no numeric floor and 1 when a measured family (security_fuzz included) is below it. Measured: core 86.38%, tcpip 61.37%, mobile 64.75%, business_app 89.82%, dicom 89.19%, security_fuzz 71.42%, whole SDK 65.53% (22,145/33,793 lines; 46.03% at #388). Each floor is the measurement minus 1, rounded down to 0.1 — for dicom and security_fuzz, whose value matched the pre-change x86-64 CI run (89.19, 71.42) within 0.1, the minimum of the two is the base: core 85.3, tcpip 60.3, mobile 63.7, business_app 88.8, dicom 88.1, security_fuzz 70.4,whole_sdk_line_pct64.5 (was 45.0). (4) Unit re-baseline: the two suites grow the unit denominator, solibrary_line_pctfalls to 74.7% (6,717/8,989 lines; 82.1% when the 80.0 floor was set at #243) while instrumentation widens to 42 files — no source lost coverage. As at #177 and #241, the floor is re-baselined, not lowered to silence a failure:library_line_pct73.7 (measured minus 1),instrumented_files42 (ratcheted up from 29),required_instrumented_filesunchanged. (5) ThecoverageCI job runstools/ci/report-uncovered-runs.shwithout--report-only: the unit tracefile has 0 contiguous uncovered runs longer than 10 lines (1,200 runs in all), and a new one fails the job. Deferred to #554: replaying the golden fingerprint and the accuracy corpus under coverage. The pre-push tier (bash tests/run_all_tests.sh --with-harnesses) was already documented in AGENTS.md anddocs/AGENT_ENVIRONMENT.md§8, so no change was needed there. Source:tests/tcp_pending_order/run_tests.sh,tests/tcp_pending_order/test_tcp_pending_order.c(case I),tests/resource_bounds/run_tests.sh,tests/resource_bounds/tcp_reasm_stubs.h,tools/phase0/run_all_harnesses.sh(COVERAGE_SKIP),tests/run_all_tests.sh:242-272,tools/ci/sdk-coverage.sh(report --harness-dir),tools/ci/check-sdk-coverage.sh(sdk.family_floors),tools/ci/tests/test-sdk-coverage.sh,tests/coverage/floor.json,.github/workflows/c-cpp.yml(coveragejob), measuredbash tests/run_all_tests.sh --coveragerun on 2026-10-27 (31/31 entries passed). -
Q: Issue #525 (plan task 8.2, F-TEST-011) — what counts as a “contract test” for an
MMTAPIfunction, where do the tests live given the 30/30 suite count, and what is “the v1.9.x release libraries” baseline forabidiffwhen the shipped packages carry no DWARF? A: (1) A function is tested only whentests/core_engine/test_api_contracts.chas exactly one compiled entry for it:CONTRACT(fn, behaviour, error)orNO_ERROR_PATH(fn, behaviour, "reason"). Both take&fn, so a misspelled or undeclared name fails to compile; the runner fails an entry whose behaviour or error function makes no assertion and a waiver with an empty reason. A mention in a test file does not count (the issue’s “54 of 234” was a mention count; at HEAD 235 names are declared and 45 were never mentioned).tools/ci/check-api-contracts.shcompares the entries withtools/ci/check-public-decls.sh --listas sets — a missing, stale or duplicate entry fails — and requires the waived names to equaltests/core_engine/api-contract-waivers.txtexactly, so a new waiver is a reviewed diff. The first measurement is 141CONTRACTand 94NO_ERROR_PATHentries: the waived functions dereference a required argument and define no failure value (session and attribute accessors, parameterless calls, total string helpers, unconditional setters), so an error path would have to be invented. (2) The contracts are a second binary of the existingcore_enginesuite (same objects plusmmt_attr_sprintf_compat.c, no--wrap), soDEFAULT_SUITESstays at 30 and no validatedtests/run_all_tests.shcitation moves. (3) The type-level baseline is thev1.9.1tag rebuilt bytools/ci/abi-diff.shwithCC='gcc -g' CXX='g++ -std=c++11 -g'— the release profile (LTO, hardening,-O3) plus DWARF;DEBUG=1is not used because it clearsMMT_RELEASE_BUILDand builds at-O0. A second, symbol-level leg compares the shippedv1.9.1ubuntu-24.04.deb(checksum-verified against the releaseSHA256SUMS) with stripped copies of theHEADlibraries. A local control run found the shipped.deband the rebuilt tag symbol-identical. (4) Theabi-diffjob is report-only and not in.github/required-checks.txtuntil #536. The first report (aarch64):libmmt_coreCHANGED (6 added functions, among themmmt_packet_scratch_adopt),libmmt_tmobileINCOMPATIBLE (removed exported variableerrorCodeDecoder), the other three unchanged. Every non-static symbol is still exported until #533 hides them, so--headers-dirlimits the type report to the public headers. Source:tests/core_engine/api_contract.h,tests/core_engine/test_api_contracts.c,tests/core_engine/api-contract-waivers.txt,tests/core_engine/run_tests.sh,tools/ci/check-api-contracts.sh,tools/ci/check-public-decls.sh(--list),tools/ci/abi-diff.sh,.github/workflows/c-cpp.yml(abi-diffjob),rules/common-linux.mk(MMT_RELEASE_BUILDunderDEBUG),rules/arch-linux-gcc.mk:2-3,tools/ci/tests/test-api-contracts.sh,tools/ci/tests/test-abi-diff.sh -
Q: Issue #526 (plan task 8.3, F-TEST-008/009/014/016) — the RADIUS suite tested a replica of
proto_radius.cplus nine source greps, nothing executed the #99 TCP give-up, the memory-ceiling gate skipped unmeasured pcaps, and three phase0/installer gates asserted source text. Which gates does F-TEST-016 cover, what replaces each check, and which guards cannot be observed? A: (1) F-TEST-016 names three source-text gates, each now an executed assertion: thecount_mulsmultiply count overipv4_session_hash/ipv6_session_hash(a renamed function counted 0 and passed) became pinned golden outputs for fixed IPv4/IPv6 keys plus a “differs from the replaced FNV-1a loop” check insession_lookup_perf_test.c(little-endian values; a big-endian host fails closed); thesignal_handlersed intests/installer/run_tests.shbecame a signal-delivery run —extract_allreads a FIFO the shell holds open, SIGINT/SIGTERM must end it with status 0 and oneclean()pass within 10 s; theinit_extractionawk/configured_protocols.cgrep inrun_oom_no_abort_test.shbecame theoom_init_exit_sweeprun below. The neighbouringstop_flaggrep went with the sed. Thepcap_breakloopgrep stays: the livepcap_looppath needs capture privileges, and offline the flag andpcap_breakloopeach stop the loop alone (libpcap’s offline read checksbreak_loopbefore each record) — mutation runs: removing onlystop_flag = 1keeps the signal test green, removing onlypcap_breakloopis caught by the kept grep, a no-op handler times out, a handler callingclean()crashes, the default SIGINT disposition exits 130. Aprintf/fflushinside the handler is an async-signal-safety hazard, not observable behaviour, and is no longer asserted. The static exit() scan stays as a second layer, fail-closed: its^bool init_extraction(anchor must match once. (2) RADIUS: the suite now builds the SDK (an SDK-building suite, §3 of AGENT_ENVIRONMENT.md) and feeds crafted frames throughpacket_process. Seven of the nine deleted grep patterns map to cases that fail under their own mutation:current_tlv->len < 2(a len-1 attribute misparses the next bytes as User-Name; len 0 hangs the walk, bounded bytimeout), the caplen truncation guard (three truncated attributes),vlen > BINARY_64DATA_LEN(User-Name len 67/255),BINARY_64DATA_LEN - 1(Called-Station-Id len 255),->len < 6(NAS-IP-Address len 2-5),v_remaining < 6(a 4-byte VSA whose vendor-id read crosses into a crafted next attribute) andtlv->len > sub_remaining(over-long sub-attribute). No coverage is claimed for two: the sub-attributetlv->len < 2(proto_radius.c:1992) is masked — every 3GPP extractor re-checks the length (e.g.:1722,:1737) and its mutation leaves the suite green — and the type bounds:1994/:1996duplicate each other; removing both is caught only underSANITIZE=asan(heap-buffer-overflow at:1997on the sub-type 28 case). The suite also exposedread_be32(:49) shifting an int-promoted byte left by 24, undefined for a first octet >= 0x80 (UBSan aborts on 192.168.1.10); it now casts each byte touint32_tbefore shifting (the values GCC produced are unchanged) and the suite reads both 100.64.1.10 and 192.168.1.10 — that cast is the onlyproto_radius.cchange (the other src/ edits are comments inproto_ip.c/proto_ipv6.c). (3) The OOM sweep runs underLD_PRELOADoftests/fault_injection/fi_alloc.c(newfi_set_observerhook) and exportsexit/_exit/_Exit(-rdynamic);dladdron the return address names the caller. A call fromlibmmt_coreorlibmmt_tcpip— the old guard’s scope — or an unresolvable caller fails the gate; calls from other DSOs are reported per DSO. The first runs found none gated and 12-13 runs ending in a pluginexit(0)(src/mmt_mobile/mmt_mobile_plugin.c:20-32,src/mmt_business_app/mmt_business_app.c:16): out of scope here, a maintainer follow-up — return 0 there, then widen the gate to every DSO. A cleaninit_extraction()makes 21,852 allocations from 3,523 distinct call sites (8-frame backtrace); failing the first allocation of each site takes ~11 s on 16 cores, failing every index (--all) 63 s, too slow for a 4-core runner.exit()inserted on the names-map failure ininit_extraction, inregister_attribute_with_protocol(beyond the static scan) and ininit_tcpip_plugineach fail the sweep. (4) The memory-ceiling gate fails (exit 1, naming the pcap) on a missing listed pcap, a failing driver or a non-numericlibrary_rss_kib; the #99 give-up is pinned at packet 41 bytests/tcp_pending_order/test_tcp_classify_giveup.c(shippedproto_tcp.c) and on the SDK path byclassified_flow_fastpath_test.c(asan profile, checker-walk delta per packet). Source:tests/radius_hardening/run_tests.sh,tests/radius_hardening/test_radius_hardening.c,src/mmt_tcpip/lib/protocols/proto_radius.c:49,1983-1997,2037-2038,tests/tcp_pending_order/test_tcp_classify_giveup.c,src/mmt_tcpip/lib/protocols/proto_tcp.c(issue #99 give-up in both pre-classification functions),tools/phase0/tests/classified_flow_fastpath_test.c,tools/phase0/tests/run_memory_ceiling_test.sh,tools/phase0/tests/session_lookup_perf_test.c,tools/phase0/tests/run_session_lookup_perf_test.sh,tests/installer/run_tests.sh,src/examples/extract_all.c:238-300,tools/phase0/tests/oom_init_exit_sweep.c,tools/phase0/tests/run_oom_no_abort_test.sh,tests/fault_injection/fi_alloc.c,src/mmt_mobile/mmt_mobile_plugin.c:20-32,src/mmt_business_app/mmt_business_app.c:16. -
Q: Issue #532 (plan task 9.3, part 2 of the M3 coverage push) — mobile was 65.08% and security_fuzz 71.42% against targets of 70% and 60%. What raises mobile, and which floors move? A: (1)
src/mmt_mobile/ngap/ngap.cmissed 297 of its 400 lines: only InitialUEMessage was decoded by any test, so every other per-message decoder (ngap.c:119-485) and theSET_ACTIONpath ofencode_ngap()never ran.test_ngap_message_decoders()intests/s1ap_ngap_decode/test_s1ap_ngap_decode.c:1379drives 17 vectors (:1314) throughdecode_ngap()andencode_ngap(): nine initiatingMessage, six successfulOutcome and one unsuccessfulOutcome type, plus both UE-NGAP-IDs CHOICE arms. Each vector checks the procedure code, the PDU choice and the UE ids; the DL/UL NAS transport vectors also check NAS-PDU extraction. Each vector then rewrites the ids, decodes the result and checks them again. The IE values come from the library’s own APER encoder. The tests stay in the existing SDK-building suite, so the count holds at 30/30 and the lines land in thesdk_integrationcohort thattools/ci/check-sdk-coverage.shmeasures. (2) Measured withbash tests/run_all_tests.sh --coverage && bash tools/ci/check-sdk-coverage.shon aarch64 with GCC 13.3: mobile 75.33% (1,808/2,400 lines, 65.08% before).sdk.family_floors.mobilemoves from 63.7 to 74.3, measured minus 1 rounded down to 0.1 as in the #524 entry. security_fuzz re-measured unchanged at 71.42% (3,122/4,371): it already met the 60% target, and its 70.4 floor was already measured minus 1, so it does not move. business_app (89.82%) and dicom (89.19%), named in the title, had no threshold and are unchanged. (3) Not touched:whole_sdk_line_pct(66.98% measured, ratchet owned by #554) and the tcpip floor (#531). Source:tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c:1314,1379,src/mmt_mobile/ngap/ngap.c:119-612,tests/coverage/floor.json:18(sdk.family_floors.mobile),tools/ci/check-sdk-coverage.sh(sdk.family_floors), measuredbash tests/run_all_tests.sh --coveragerun on 2026-10-27 (31/31 entries passed). -
Q: Issue #533 (plan task 9.4, part 1) — libmmt_core exported every non-static symbol (487 dynamic: 483
T, 4R). The acceptance criterion capsnm -D --defined-only sdk/lib/libmmt_core.so.*at “the count of MMTAPI declarations + 5”. What counts as an MMTAPI declaration, which symbols stay exported, and how do tests that call core internals still link? A: (1) MMTAPI is the export marker. The core objects are compiled with-fvisibility=hidden, appended at the end ofrules/common.mklike the #443 asn1c block so no cited range moves. Inside the SDK build MMTAPI isextern __attribute__((visibility("default"))), with a plainexternfallback for non-GNU compilers. For consumers it staysextern, because visibility only matters where a symbol is defined. MMTCALL is unchanged. (2) An MMTAPI declaration is a distinct name declared with the MMTAPI token, function or data, insrc/mmt_core/public_include/*.horsrc/mmt_core/private_include/*.h, outside comments and preprocessor lines.scripts/validate-exported-symbols.shfails when the export count exceeds that count + 5, when any export is outside the set (_init/_finiaside), or when a name of the set is not exported — a definition compiled without seeing its MMTAPI declaration is hidden, and the check prints the missing names. It prints both numbers: 279 exports for 279 declarations, a budget of 284. A deliberately leaked definition fails it with exit 1, and so doesmmt_print_infohidden with an.hiddenassembler directive. (3) The export set, measured withcomm -12of every plugin library’snm -D --undefined-onlyagainst the baseline exports, is: 235 MMTAPI functions. 20 utilities declared in installed headers without MMTAPI (19 inmmt_utils.h, plusmmt_print_infoinmmt_core.h); the research counted 21, butnmlists 20. The fourMMT_DPI_PROFILE_*objects, nowMMTAPI const(anexterndeclaration in both modes, so no tentative definition). And the 20 private internals libmmt_tcpip binds to afterdlopen(): 11 inhash_utils.h, 4hashmap_*,mmt_strnstrand the 4mmt_tcp_reasm_stat_*inpacket_processing.h. Their MMTAPI marking says “exported for libmmt_tcpip until #534”. libmmt_tmobile, business_app, tdicom, security and fuzz need no non-MMTAPI core symbol. The 20 utilities are installed API, so they keep MMTAPI with MMTCALL and get contract entries (16 CONTRACT; 4 NO_ERROR_PATH waivers:hex2int,str_compare,mmt_print_info,str_print_array, each with its reason). The checker matches the waiver list exactly, so it can grow in review. The test-only getters become hidden:mmt_tcp_reasm_insert_visits/bytes_*/resident_bytes,mmt_reassembly_*,mmt_classify_*,mmt_caplen_guard_*,mmt_oa_*. 208 symbols leave the table. (4) Tests that call hidden internals linklibmmt_core.athroughtools/phase0/tests/static_core_link.sh, never alongside-lmmt_core. The helper adds-Wl,--whole-archive, which keeps the weak-referenced counters resolvable, plus-rdynamic, which lets plugins and-lmmt_tcpipbind to the executable’s MMTAPI symbols. It adds-lstdc++ -ldl -lpthread -lmand the profile flags read from the archive’s undefined runtime symbols (__asan_,__ubsan_,__tsan_,__gcov_). That detection is used because underrun_all_harnesses.sh --profile coveragea harness’s own build line does not name the prefix’s profile. Moved, by building and linking against the hidden shared core: the phase0 harnesses classified_flow_fastpath, dicom, extraction_caplen_prologue, position_unknown_guard, session_lookup_perf, session_scale and tcp_reassembly_perf (undefined references, or weak counters resolving to NULL), thetests/fault_injectionengine leg, and parser_boundaries’dtls_wire_extent_unit. ip_frag_bounds still links against the shared core:hashmap_walkstays MMTAPI. (5)tools/ci/abi-diff.shreports libmmt_core as INCOMPATIBLE because symbols were removed. That is expected; the check is report-only until #536. No classification logic changed, and the phase0 golden fingerprint is unchanged. Source:src/mmt_core/public_include/mmt_exports.h:5-22,rules/common.mk:589-600,scripts/validate-exported-symbols.sh:151-210,src/mmt_core/public_include/mmt_core.h:834-851,1351,src/mmt_core/public_include/mmt_utils.h:36-276,src/mmt_core/private_include/hash_utils.h:26-66,src/mmt_core/private_include/hashmap.h:117-122,src/mmt_core/private_include/packet_processing.h:791-899,tests/core_engine/test_api_contracts.c:2293-2494,3091-3114,tests/core_engine/api-contract-waivers.txt,tools/phase0/tests/static_core_link.sh,docs/Exported-Symbols.md. -
Q: Issue #534 (plan task 9.5, visibility part 2) — the protocol plugins exported every non-static symbol: libmmt_tcpip 1,750 dynamic symbols (123 of them vendored llhttp), libmmt_tmobile 35, libmmt_business_app 3, libmmt_tdicom 8. The acceptance criteria cap
nm -D --defined-only sdk/lib/libmmt_tcpip.so.*at 10 and ask for a CI check that fails when an exported set changes without an update todocs/Exported-Symbols.md. Which symbols stay exported, how is the set gated, and how do the tests that call plugin internals still link? A: (1) As for the core (#533), MMTAPI is the export marker: the TCPIP, LIBMOBILE, LIBBAPP and LIBDICOM objects are compiled with-fvisibility=hidden(C and C++), in a block appended at the end ofrules/common.mkso no cited range moves; the asn1c objects were already hidden (#443). MMTAPI only carriesvisibility("default")under_MMT_BUILD_SDK, which business_app and dicom did not get, so the same block adds it to them; in their sources it changes nothing else. No new macro and no version script. (2) Kept, all MMTAPI: libmmt_tcpip 5 —init_proto,cleanup_proto,init_tcpip_plugin,cleanup_tcpip_plugin(mmt_tcpip_plugin.h) and the #237 aliasmmt_search_irc_ssl_detect_ninty_percent_but_very_fast, which the #237 note promises to keep until 2.0.0 (proto_irc.c). libmmt_tmobile 6 —init_proto/cleanup_proto(declared inmmt_mobile_internal.h),s1ap_entities_update/_count/_reset(proto_s1ap.h) andupdate_ngap_data, now declared in the installedproto_ngap.hbecause 5Greplay calls it (src/forward/forward_packet.c:240,260, linked-l:libmmt_tmobile.so). libmmt_business_app 2 —init_proto/cleanup_proto(mmt_business_app_internal.h; the plugin has no header declaring a function). libmmt_tdicom 8 — unchanged, the eightdicom.hdeclarations. Hidden, among others:s1ap_decode,init_mobile_plugin,init_proto_ips_data, the llhttp parser and the tcpip classifiers and extractors (still linkable from the static archives). The two installed mobile headers now includemmt_exports.h, becausemmt_mobile_internal.hincludes them beforemmt_core.h. Every symbol the plugins import from the core is still exported by it. (3) Not changed: the 20 core internals libmmt_tcpip binds to (hash_utils.h,hashmap.h,mmt_strnstr,mmt_tcp_reasm_stat_*) stay MMTAPI; dropping them means moving that code into the plugin, which no criterion asks for — deferred. (4) Gate:scripts/validate-exported-symbols.shkeeps the #533 core checks unchanged in behaviour (they now sit underif "core" in libs, and the core table ends at its last row instead of the end of the file) and adds a## libmmt_<name>section per plugin with a| symbol |table. The check fails, naming each+/-symbol, unless the table equalsnm -D --defined-onlyof the library (_init/_fini/_edata/_end/__bss_startaside);--writeregenerates the tables and keeps the prose. A missing plugin library insdk/libis built like the core one (the doc-validators job builds nothing first).MMT_EXPORTS_LIB_DIR,MMT_EXPORTS_DOCandMMT_EXPORTS_LIBSpoint it at a fixture; a missing library there is exit 2. The required doc-validators job already runs everyscripts/validate-*.sh, so no workflow changed. The fixture self-testtools/ci/tests/test-exported-symbols.sh(run by the release_gates suite, builds no SDK) covers match, an unrecorded export, a removed one, a missing section,--writeand the exit-2 cases; it goes red when the validator’s added- or removed-symbol detection is disabled, and the real check fails with+ mmt_search_irc_ssl_detectwhen that function is given default visibility. (5) Tests that call plugin internals link the archive throughmmt_static_plugin_link LIBDIR NAME...intools/phase0/tests/static_core_link.sh:--whole-archive libmmt_NAME.a,-Wl,--exclude-libs,libmmt_NAME.a, the archive’s sanitizer/coverage flags (the detection is now shared withmmt_static_core_link) and-ldl -lpthread -lm, before the core.--exclude-libskeeps the static copy out of the executable’s dynamic symbol table even under-rdynamic, so the plugininit_extraction()loads always binds to its own copy, in every profile (-fno-semantic-interpositionis release-only). Moved: the 31 phase0 harnesses whose sources call tcpip internals (found by comparing each harness object’s undefined symbols with the libmmt_tcpip archive), the parser_boundaries API tests dtls_wire_extent_unit, dtls_wire_extent_api, nfs_rpc_header_bounds and tcp_options_bounds, and nas_ies_tail (tmobile). Before, the harness’s linked libmmt_tcpip.so interposed on the dlopen()ed copy, so one copy held all state; now there are two. sip_methods failed on it: itsinit_proto_sip_struct()returned without filling the static copy’s file-scope bitmasks, because the plugin had registered PROTO_SIP first. The five harnesses that call aninit_proto_*_struct()(dtls_classify_guard, quic_min_len, rtp_bounds, sip_methods, skype_removal) nowunregister_protocol_by_id()the protocol and register it again through the static copy, and check that this returnsPROTO_REGISTERED. (6) Test change:tests/s1ap_ngap_decode/run_tests.shasserted that libmmt_tmobile.so still exportsinit_proto,cleanup_protoands1ap_decodeafter #443 hid asn1c. It now assertsinit_proto,cleanup_proto,s1ap_entities_countandupdate_ngap_data, and thats1ap_decodeis not exported, which is the intended #534 change. (7) Rejected: per-plugin version scripts (a second list that can drift from the headers, and archive objects would stay default-visible, so-rdynamicstatic links would export them, as #533 found for the core); an unhidden test-only build (the tests would stop exercising the shipped libraries, andrun_all_harnesses.shwould need a fourth build); hiding tcpip alone. (8) Downstream: mmt-probe usesinit_tcpip_pluginfrom the static archive only; mmt-security, mmt-reader and mmt-plugin-generator call no plugin internal (plugin-generator’s http2/ndn/quic plugins define names tcpip used to export, so hiding them removes those collisions); 5Greplay keepsupdate_ngap_data.tools/ci/abi-diff.shwill report the four plugins INCOMPATIBLE (symbols removed); it is report-only until #536. No classification code changed; the phase0 golden fingerprint and precision baseline are unchanged. The #533 entry’s citationscripts/validate-exported-symbols.sh:151-210now reads:211-269(entries are append-only). Source:rules/common.mk:602-615,src/mmt_tcpip/include/mmt_tcpip_plugin.h:17-24,src/mmt_tcpip/lib/protocols/proto_irc.c:372-377,src/mmt_mobile/include/proto_s1ap.h:231-234,src/mmt_mobile/include/proto_ngap.h:26-32,src/mmt_mobile/mmt_mobile_internal.h:25-29,src/mmt_business_app/mmt_business_app_internal.h:17-21,src/mmt_dicom/include/dicom.h:111-123,scripts/validate-exported-symbols.sh:272-347,tools/phase0/tests/static_core_link.sh:29-111,tools/ci/tests/test-exported-symbols.sh,tests/s1ap_ngap_decode/run_tests.sh:171-181,docs/Exported-Symbols.md(Protocol plugins). - Q: Issue #657 (CI audit 2026-10, §5.5 R5) — branch protection on
mainrequires branches to be up to date (strict: true), so every merge makes each open PR update and re-run its full CI. Adopt a merge queue and drop strict up-to-date, or keep the current setting? What must the repository provide for a queue, and which required-check set goes with it? A: (1) Decision: adopt, pending the admin settings change (AGENTS.md lists branch-protection work as “Ask first”; the PR that prepared the repository changed no setting). The queue tests each merge result once, so merging one PR no longer makes the other open PRs re-run. (2) Repository side:c-cpp.yml,phase0-baseline.ymlandrelease-packages.yml— the only workflows reporting a context of.github/required-checks.txt— trigger onmerge_group. Theirchangesjobs send every non-pull_requestevent down the run-everything path, so a merge-group run skips neither the docs-only filter’s C jobs nor the package legs: the queue runs the full check set. Each trigger replaced a comment line, so no line cited elsewhere (c-cpp.yml:389-394,407indocs/AGENT_ENVIRONMENT.md, checked byscripts/validate-agent-environment.sh) moved, and theconcurrency:blocks are unchanged: a merge-group run’sgithub.refis its owngh-readonly-queue/main/pr-…branch, so queue runs never cancel one another. The secret-scan job’s gitleaks-action does not handlemerge_groupand fails there; it iscontinue-on-error, and the pinned-binary fallback it already relies on (noGITLEAKS_LICENSE) runs the scan. (3) Enforcement:tools/ci/check-required-checks.sh(verify-helpers, blocking) now fails a required context whose workflow has nomerge_grouptrigger (or one withoutchecks_requestedor excluding main), or whose job-levelif:keeps it off merge-group runs: anevent_namepin that does not namemerge_group,!= 'merge_group', or a value only pull requests carry (github.event.pull_request,github.head_ref,github.base_ref). A job skipped that way would report success without running in the queue.tools/ci/tests/test-required-checks.shpins each case. (4) Settings (admin):strict: falseon the classic required status checks, and a repository ruleset with amerge_queuerule onrefs/heads/main— the classic protection API has no merge-queue setting. Values:SQUASH(the only merge method the repository allows),ALLGREEN, build 5, merge 1–5, wait 5 min, and a 120-minute check response timeout: the longest required job chain ischanges(5) + packagebuild(60) +bootstrap-dry-run(10) +packages-gate(5) = 80 minutes of job timeouts, plus runner queueing. The commands are inCONTRIBUTING.md(“Required checks and review”). (5) Required-check set (overlaps #601): live protection requires 18 contexts, the committed list 30. Applying the committed list, asCONTRIBUTING.mddocuments, makes them equal (issue AC 4) but is a separate maintainer call: the 12 added contexts includetoolchain-ceiling, on theubuntu-26.04preview runner label, andpackages-gate, whose legs flaked in the audit window (docs/ci-audit-2026-10.md). In a queue a flaky required context evicts its entry and, with batching, the entries built with it. Either apply the full list with the queue, or apply the queue with the live 18 and trim.github/required-checks.txtto match in a follow-up;bash tools/ci/check-required-checks.sh --live montimage-projects/mmt-dpireports the drift either way. Source:.github/workflows/c-cpp.yml(on:,changes,secret-scan),.github/workflows/phase0-baseline.yml(on:,changes),.github/workflows/release-packages.yml(on:,changes,build,bootstrap-dry-run,packages-gate),tools/ci/check-required-checks.sh(group_trigger,off_group_if),tools/ci/tests/test-required-checks.sh,.github/required-checks.txt,CONTRIBUTING.md(“Required checks and review”),tools/ci/assert-gitleaks-ran.sh,docs/ci-audit-2026-10.md§5.5 and §8, livegh api repos/montimage-projects/mmt-dpi/branches/main/protection(read-only, 2026-10-27:strict: true, 18 contexts). - Q: Issue #653 (CI audit 2026-10, §4 and §5.1 R1) — the
lintjob’s cppcheck scan checks every#ifdefconfiguration of every file (up to 12, cppcheck’s default--max-configs), 28–30 min on a cold cache. Which configuration does a pull request gate on, where does the full scan still run, and how is the ratchet kept per mode? A: (1)tools/ci/run-cppcheck.shtakesCPPCHECK_MODE:full(the default, so a local run or any caller that sets nothing keeps today’s scan) orpr, which adds--max-configs=1 -DNDEBUG -D_MMT_BUILD_SDK— the defines the default SDK build passes (rules/common.mk:41,rules/common.mk:276). With-D, cppcheck checks only that configuration: a probe with out-of-bounds writes under#ifndef NDEBUGand#ifdef OTHERreported neither inprmode and both infull;--max-configs=1without the defines would check theNDEBUG-undefined branch the build never compiles. Macros a reachable header defines still apply. Any other mode value exits 2. (2)tools/ci/cppcheck-ratchet.txtholds one<mode> <count>line per mode, read for the mode that ran; a missing line, or the old bare integer, exits 2.full 0is unchanged;pr 0was measured with cppcheck 2.22.0 built bytools/ci/install-cppcheck.shin the lint job’s digest-pinnedubuntu:24.04image (722 files, one configuration each, 0 findings, 50 s cold at-j4on a 20-core host) and is confirmed by the PR’s ownlintrun. (3) Thelintjob setsCPPCHECK_MODEfrom the event:pull_request→pr; push tomain, tags,merge_groupand the weekly schedule →full. The job id, itsneeds/if:and the required context stay as they were, and both gates (error severity and ratchet) run in both modes. The results cache is keyed on the mode, so the two modes’ per-file results never mix;mainsaves onlyfullcaches, so a PR’s first run scans cold inprmode. (4) Until the merge queue is enabled the full scan runs after merge (every push tomain) and weekly, not before merge. A newermainpush can still cancel an in-flight one under the workflow’s current concurrency group (issue #660 changes that); the full scan checks the whole tree against its ratchet, so the next completedmainor weekly run reports a finding a cancelled run missed. (5) Thec-cpp.ymledit is line-neutral: the lint job’s header comment was condensed, so thec-cpp.ymlline citations indocs/AGENT_ENVIRONMENT.mddo not move. Source:tools/ci/run-cppcheck.sh(MODE,CONFIG_ARGS, baseline read),tools/ci/cppcheck-ratchet.txt,.github/workflows/c-cpp.yml(lint:env, cache key),tools/ci/tests/test-cppcheck-version.sh(scan-mode cases),docs/AGENT_ENVIRONMENT.md§1,docs/ci-audit-2026-10.md§4.1–§4.2. - Q: Issue #655 (CI audit 2026-10, §3.3 and §5.3 R3) —
phase0-baseline.ymlran eachtools/phase0/tests/run_*.shas its own matrix job (50 jobs, 50 identical SDK builds, queued behind the 20-concurrent-job cap). How many jobs replace them, how is every harness still guaranteed to run, and how is a failure still attributable to one harness? A: (1) Five legs of oneharnessmatrix — the issue’s cap — each running a slice oftools/phase0/run_all_harnesses.sh, which already built one SDK per profile group:asan-1of3toasan-3of3(--group asan --shard K/3, 14 harnesses each),default(--group none,default, 7) andtsan(--group tsan, 1). Main’s per-script legs put an asan harness’s run step at about 70 s, about 42 s of it the asan SDK build, so one asan half would carry roughly 6–7 min of harness time; thirds keep the longest leg near 5 min inside the 10-min wall-clock budget.list-harnessesis gone.profile_ofnow ignores comment lines:run_tcp_reassembly_perf_test.shnamedBUILD=asanonly in its header, so the runner had grouped it with asan although it builds a non-sanitized SDK for meaningful timings (the per-script matrix ran it that way); it now groups default, as its header states. (2) Coverage: the runner enumeratesrun_*.shat run time,--groupselects by the profileprofile_ofreads from each script (exactly one of four), and the K/N shards of a selection are disjoint and cover it, so a new harness lands in exactly one leg with no workflow edit.tools/ci/tests/test-harness-shards.sh(release_gates suite; verify-helpers with PyYAML required) runs every leg’s--listand fails when a harness is missing or in two legs, and proves on a fixture that an added harness is picked up. (3) Attribution:--log-dirkeeps one log per harness and averdicts.tsv; the runner prints a verdict table, wraps each harness in a::group::, emits an::errorannotation naming a failing harness and appends the table to the job summary; each leg uploads its logs asphase0-harness-logs-<leg>. (4)harness-gatekeeps its name, itsneeds: [changes, harness]and its verdict logic, so the required contexts in.github/required-checks.txtare unchanged; the oldharness-run_*.shcontexts were never required. Source:tools/phase0/run_all_harnesses.sh(--group,--shard,--list,--log-dir),.github/workflows/phase0-baseline.yml(harness,harness-gate),tools/ci/tests/test-harness-shards.sh,tests/release_gates/run_tests.sh,.github/workflows/c-cpp.yml(verify-helpers),tools/phase0/README.md(CI gate),docs/ci-audit-2026-10.md§3.3, §5.3. -
Q: Issue #656 (CI audit 2026-10, §5.4 R4 and §6) — the #552 filter only told docs from code, so every other pull request ran the whole suite and harness set. Which tests does a pull request run, how is a test a change needs never left out, and how does every required context still report? A: (1) Five tiers, the highest any changed path reaches:
docs(docs/, root Markdown: the C jobs skip, as since #552);tooling(tools/ci, scripts, non-workflow .github files, root dotfiles, when no workflow, action, runner, tools/phase0, sdk, rules or other non-suite file references them, transitively through tools/ci and scripts: the tooling-tagged delegate suites plus the suites that reference the file, inunit-tests, andlint; the gated legs skip);tests(one suite’s or harness’s files that nothing outside them references: those, the smoke suites and harnesses, every suite leg, the harness legs and the phase0 gates);family(a tcpip dissector, src/mmt_mobile, src/mmt_dicom, src/mmt_business_app: the family-tagged suites and harnesses plus every suite or harness that names the changed file, and every suite a tools/ci or scripts file naming it reaches — a self-test a suite delegates to, such as the one sdk_coverage runs, followed as a tooling change is, so a consumer outside tools/ci, scripts and the suites makes it full —, the smoke set, the gates,codeqlandfuzz);full(everything).tools/ci/classify-changes.shanswerscode,tier,full,gates,suitesandharnesses; the map istools/ci/test-map.txt(path globs, first match wins; tagged suite and harness entries). (2) Full is the default for every doubt: src/mmt_core, any.h/.inc/.defunder src/, the L2–L4 and tunnel dissectors every family rides on (proto_sctp.c, proto_tcp.c, proto_ip.c, …), the shared tcpip helpers (tcp_segment.c, http.c, http2.c, ndn.c, rfc2822utils.c, ip_session_id_management.c), the rest of src/mmt_tcpip and src/, rules/, sdk/, workflows, actions, both runners, the classifier, map and checker, tools/phase0 outside tests/, tools/ci/fuzz/ (read by directory), headers and helpers shared by the harnesses, an unmapped path, an empty list, an unreadable or malformed map, a suite or harness the map lacks. Pushes, tags, the schedule and merge-queue runs feed the classifier no path, so they are always full. (3) Quoted paths: the diff keeps git’s default core.quotePath, so a non-ASCII or control-byte name arrives C-quoted; a path starting with", holding a backslash, a byte outside printable ASCII or a./../empty component is full (the #601 packaging filter failed open on such a path). (4) Fail-closed wiring: every workflow condition on these outputs reads!= 'false'(tier != 'tests'for codeql and fuzz), never== 'true', so a failedchangesjob (empty outputs, under!cancelled()) runs every job on every suite and harness; the classifier writes its six lines only after classifying the whole list, and the step appends them to$GITHUB_OUTPUTonly when it succeeded. (5) Which jobs run where: gates=false (docs, tooling) skips unit-tests-arm, unit-tests-unsigned-char, toolchain-floor, toolchain-ceiling, assertions-live, the sanitizer-tests steps, codeql, fuzz and the phase0 jobs; tests skips codeql and fuzz; full=false skips coverage, root-install, enablesec and abi-diff — coverage because its floors measure every suite and harness, so a subset would fail them; resource-budgets runs its steps on full or when resource_bounds is selected. Job ids,name:s and matrix values are unchanged, matrix jobs keepif: ${{ !cancelled() }}and skip steps, and harness-gate accepts skipped legs ongates=falseas oncode=false, so all 30 required contexts report on every tier. (6) Map completeness:tools/ci/check-test-map.sh(verify-helpers, and the release_gates suite throughtest-classify-changes.sh) fails on a DEFAULT_SUITES suite or run_*.sh without an entry, a stale entry, an unknown tag, an entry whose files load a family’s library or sources without that family’s tag orsmoke(so dicom_test and s1ap_ngap_decode carry tcpip) — an entry’s files include the tools/ci and tools/phase0 files its suite files or run_.sh name, and those each tools/ci file names, transitively, so a suite carries what its delegate loads (sdk_coverage and installed_consumer carry mobile, dicom and business_app; the tooling delegates and business_app carry the families their delegates name), and a family-only entry naming no source of one of its tcpip, mobile, dicom or business_app tags (each needs one; core and security sources are full) — the harnesses that name no dissector source (dns_parser_test, http_session_test, ...) are smoke, and so are the whole-SDK tests that carry a family only through its runtime dependency (dicom_test, s1ap_ngap_decode, nas_ies_tail, rule_engine), so a change to another family still runs them. (7) References: a reference is the file's basename (with its parent directory when two tracked files share it) in any tracked file outside docs/, src/, Markdown, the map and the classifier's self-test; a C file counts as using a C source or header only through an `#include` line. (8) Residual risk: a test that reads a file by directory listing or a computed name, without naming it, is not found by reference; the merge queue's `merge_group` run and the push to main run the full set, so such a miss is caught before or right after merge, never silently. Source: `tools/ci/classify-changes.sh`, `tools/ci/test-map.txt`, `tools/ci/check-test-map.sh`, `tools/phase0/run_all_harnesses.sh` (`--only`), `.github/workflows/c-cpp.yml` (`changes` and every job reading its outputs), `.github/workflows/phase0-baseline.yml` (`changes`, `harness`, `harness-gate`), `tools/ci/tests/test-classify-changes.sh`, `tools/ci/tests/test-harness-shards.sh`, `CONTRIBUTING.md` (*Required checks and review*), `docs/ci-audit-2026-10.md` §5.4, §6. - Q: Issue #654 (CI audit 2026-10) — the SDK-consuming suites each ran
make -C sdk cleanand rebuilt the same SDK, a dozen builds per run. How does one run build the SDK at most once per profile while the suites stay runnable on their own, and what happens to coverage? A: (1) Groups: the runner maps each suite to a shared build (sdk_group_of).default: hashmap, fault_injection (only whenSDK_BUILD_PROFILEis not asan/tsan, since its engine leg, the only SDK consumer in it, is skipped there), citrix_ica_detection, http_header_case, s1ap_ngap_decode, radius_hardening, nas_ies_tail, parser_boundaries, docs_lifecycle, docs_onboarding.enablesec(ENABLESEC=1): rule_engine, installed_consumer. Two groups, not one ENABLESEC=1 superset:make installrefuses a build whose baked plugin directory differs (sdk/Makefile:70-80), so one build serves one prefix, and the default-group suites keep testing the package configuration without the engines, as they did. Theenablesecbuild is incremental on top ofdefaultwhen both are needed:ENABLESEC=1adds only the engine objects and their per-object flags (rules/common-linux.mk:6-12,rules/common.mk:584-587) and recompilesplugins_engine.othrough the plugin-path stamp, so the result equals a clean ENABLESEC=1 build; the installer suite already relied on this. A full run makes 2 builds (1 clean). (2) Eager, before the first suite, not on first use: a failed build fails the run at once with the build log’s tail, so no consumer falls back to building itself, and the build count is visible up front (sdk_build <n>: group=<g> profile=<p> [incremental],sdk_builds=<n>,Shared SDK builds:in the result table). (3) Consumers: run withMMT_SDK_PREBUILT=1andMMT_PREFIX(alsoMMT_FI_PREFIXfor fault_injection), the convention oftools/phase0/run_all_harnesses.sh; they skip clean/build/install, refuse a prefix with no installed SDK, and never remove it. WithoutMMT_SDK_PREBUILTeach suite builds as before, sobash tests/<suite>/run_tests.shstays standalone; hashmap, docs_lifecycle and docs_onboarding readMMT_PREFIXonly in prebuilt mode. Other suites run withMMT_SDK_PREBUILTunset. (4) Own builds kept: installer and sdk_coverage test the build and install mechanics themselves, so they are not consumers; a run therefore still discards an existingsdk/build. (5) Coverage: the shared builds areBUILD=coverageunder--coverage. Right after each one the runner copies the.gcnonotes undersrc/into a per-group snapshot and, after all group builds, deletes them (and any.gcda) fromsrc/, so suites that build nothing still harvest nothing and own-build suites see only their own notes. A consumer is harvested with--gcda-rootthe checkout and--gcno-roota fresh copy of its group’s snapshot, so its per-suite record is its own counters plus that build’s zero-hit objects — what its own build gave before;tools/ci/sdk-coverage.shis unchanged. (6) Two suites depended on state a shared prefix outlives: s1ap_ngap_decode read the asn1c symbol set from the in-tree objects, which an own-build suite may have cleaned or replaced by then; it now reads the asn1c members of the installedlibmmt_tmobile.a(member names are source basenames, unique acrosssrc/mmt_mobile). On a fresh build the set equals the old one restricted to built objects (6327 symbols); the old glob also picked up stale untracked.ofiles with no source. installed_consumer moved a plugin and the security engine out of the prefix and back without a trap; an EXIT trap now restores them. (7) Test:tools/ci/tests/test-shared-sdk-build.sh(release_gates suite, no SDK build) runs a copy of the runner over fake suites with a stubmake. Measured: full default run 103 s, 30/30, against 201 s on the same machine before. Source:tests/run_all_tests.sh:174-186(sdk_group_of),tests/run_all_tests.sh:204-232(consumer environment and harvest),tests/run_all_tests.sh:285-335(shared builds),tests/s1ap_ngap_decode/run_tests.sh:165-175,tests/installed_consumer/run_tests.sh:37-53,tools/phase0/run_all_harnesses.sh(run_group),tools/ci/tests/test-shared-sdk-build.sh,docs/AGENT_ENVIRONMENT.md§3.
2026-10-28
-
Q: Issues #659 and #658 (CI audit R7/R6,
docs/ci-audit-2026-10.md§5.6–§5.7) — which redundant PR jobs can be folded, and which variant legs can leave pull requests for the merge queue, when this change may not edit branch protection or rulesets and every context protection requires today must still report onpull_requestandmerge_group? A: (1) Protection requires 18 contexts (gh api …/branches/main/protection, read 2026-10-28);toolchain-floor,toolchain-ceiling,assertions-live,packages-gate,leak-gate,site-onboardingand bothresource-budgetslegs are not among them. The merge-queue ruleset carries only themerge_queuerule, so the queue waits only for those 18: a leg moved off pull requests whose context is not required would run in the queue but gate nothing. So onlyunit-tests-unsigned-charand the-fsigned-charleg ofunit-tests(both required) leave pull requests now: the job skips at job level, the matrix leg skips its steps (a new matrix key would rename its required context).toolchain-floor,toolchain-ceiling,assertions-live,coverageand the full package matrix stay on pull requests until a maintainer appliesrequired-checks.txtto protection and decides the coverage cadence (audit §8 items 2–4).check-required-checks.shnow enforces this: in an always-on workflow, a job- or step-levelif:testinggithub.event_name != 'pull_request'needs amerge_grouptrigger and a required context of its own or of an aggregate thatneedsit, and--livefails when that context is not live-required. Path-filtered workflows (install-smoke,bootstrap-smoke) are exempt. (2) Folds:enablesec(the shared ENABLESEC=1 SDK buildtests/run_all_tests.shmakes forrule_engine/installed_consumer, andcodeql);ASan/UBSan profile compiles(now asanitizer-tests (BUILD=asan, asan)step: clean,BUILD=asanbuild,nm -D … __asan_init);site-onboarding(now the last step ofverify-helpers, which already builds the site);resource-budgets (ubuntu-24.04)(resource_boundsis inDEFAULT_SUITES, and itsrun_tests.shruns the budget checker and its--self-test). Four runner jobs fewer per code PR. (3)enablesecandASan/UBSan profile compilesare still required by protection, so each keeps anif: falsestub under its name inc-cpp.yml: a skipped job reports success and takes no runner. The contexts move fromrequired-checks.txtto the new.github/retired-checks.txt, which the checker reads (each must name a stub; none may also be required). The asan stub moved out ofphase0-baseline.yml, so the generated gate list intools/phase0/README.mdno longer shows it.check-release-gates.shno longer requiresASan/UBSan profile compileson a tag commit: the stub reportsskipped, and the profile check is inside the requiredsanitizer-testsasan leg. (4) Not folded: therun_leak_regression_test.shharness leg. It feeds the requiredharness-gatewith the ASan/LSan oracle against aBUILD=asanSDK, whileleak-gate(Valgrind, default SDK) is not required. Folding it would stop a leak regression from blocking a merge and drop the ASan/UBSan oracle, and the #216 entry above keeps both oracles deliberately. Source:.github/workflows/c-cpp.yml(changescomment,unit-tests,unit-tests-unsigned-char,sanitizer-tests,verify-helpers,resource-budgets, the retiredenablesec/asan-buildstubs),.github/workflows/phase0-baseline.yml,.github/required-checks.txt,.github/retired-checks.txt,tools/ci/check-required-checks.sh,tools/ci/check-release-gates.sh,tools/ci/tests/test-required-checks.sh,tools/ci/tests/test-classify-changes.sh,tools/ci/tests/test-release-gates.py,tests/run_all_tests.sh:174-186(sdk_group_of),tests/resource_bounds/run_tests.sh:390-395,tools/phase0/tests/run_leak_regression_test.sh:42-47,docs/ci-audit-2026-10.md§5.6–§5.7, §8. -
Q: Issue #530 (F-TEST-013) — how does the SDK get a coverage-guided, in-process fuzz target with a corpus that persists between scheduled runs, when clang cannot build the whole SDK and the target found SDK bugs within seconds? A: (1) Target:
tools/ci/fuzz/packet_fuzzer.creads a classic pcap from memory (either byte order, µs or ns magic; records clamped to the bytes left; no magic = one Ethernet frame), so seeds, regressions and golden captures replay unchanged. Each frame is copied into a heap buffer of exactly caplen bytes, so ASan sees any read past it (phase0_classifyhands libpcap’s larger buffer topacket_process, which hides such reads), and each input gets a fresh handler so a finding reproduces from its own file. (2) Build: a fullARCH=linux-clangbuild stops atsrc/mmt_mobile/nas/util/common.h:16(#errorbecause clang predefines__LITTLE_ENDIAN__), sorun-fuzz.sh --libfuzzerbuilds only thelibmmt_core.a,libmmt_tcpip.aandincludestargets withARCH=linux-clang BUILD=asan CC="clang -fsanitize=fuzzer-no-link -fsanitize-ignorelist=…"and links them statically. Norules/*.mkchange. Every plugin archive definesinit_proto(), so only core and TCP/IP link together; the target callsinit_tcpip_plugin()afterinit_extraction()and runs from a directory with noplugins/. The TCP/IP archive holds every F-TEST-013 dissector. The script cleanssdk/on exit. (3)tools/ci/fuzz/ubsan-ignorelist.txtturns off clang’sfunctioncheck (everyint init_proto_X_struct()is called throughint (*)(void),configured_protocols.c) and itsalignmentcheck (it flags the issue #57memcpyfrom auint32_t *inip_session_id_management.c); both fire on well-formed traffic before any real finding. The gcc gate keeps-fsanitize=undefinedin full. (4) Seeds: no tracked capture carried SMB, NFS, IRC, IMAP, POP, SMTP or NetBIOS, sotools/ci/fuzz/gen_seeds.pywrites one deterministic capture per family intotools/ci/fuzz/seeds/. They stay out oftools/phase0/ci/pcapsso the golden fingerprint cannot move. The run fails with exit 2 when the committed seeds differ from the generator or a seed is no longer classified as its family (MMT_FUZZ_PRINT_PATHS). (5) Verdicts: a newlibfuzzer-{crash,leak,timeout,oom,slow-unit}-*artifact, exit 77/78 (-error_exitcode/-timeout_exitcode) or a sanitizer banner is a finding (exit 1). A real ASan abort exits 1, not 77, and leaves an artifact, and seeds and regressions passed as file arguments leave no artifact, so the exit code alone cannot decide. Any other non-zero exit is harness breakage (2). Each finding gets<artifact>.log, whichtools/ci/fuzz-alert.shlists, and<artifact>.pcap(tools/ci/fuzz/to_pcap.py), the form to commit totools/ci/fuzz/regressions. (6) CI (fuzzjob, same required context): every event replays the seeds and the*.pcapregressions as individual files, so-max_lendoes not truncate them; this part blocks. Other events also replay the cached corpus, butcontinue-on-error, because its content follows the cache, not the commit. The schedule fuzzes 1200 s (-max_len=65536,-rss_limit_mb=2560; a 300 s single-process probe plateaued near 500 MB), minimises with-merge=1, saves underfuzz-corpus-<run_id>(cache keys are immutable) and uploads a 30-dayfuzz-corpusartifact. Every event restores the cache, which keeps the weekly entry from reaching the 7-day eviction. The job timeout went from 60 to 80 minutes. (7) Bugs found: within minutes, before the fixes, the target found ten SDK defects that the gcc gate never reported: caplen over-reads inethernet_classify_next_proto, both TCP pre-classification functions,llc_classify_next_proto(header and SNAP id),ip_classify_next_proto,ip6_classify_next_protoandmmt_check_tpkt; a pointer write one pastpacket_tlvs[0xFF]for RADIUS TLV type 255 (nowRADIUS_TLV_SLOTS= 0x100, which also bounds the reset loop); soulseek’susrlenbound (it omitted the 14 bytes that follow the name); andNULL + 0inllhttp_execute(NULL payload) andip_dgram_update_holes(empty fragment). Each fix is a minimal bounds check. Each reproducer is a committed regression pcap that crashed the unfixed tree under the target and runs clean after the fix. After the fixes, 5 minutes on 16 workers found nothing. Source:tools/ci/fuzz/packet_fuzzer.c,tools/ci/fuzz/gen_seeds.py,tools/ci/fuzz/to_pcap.py,tools/ci/fuzz/ubsan-ignorelist.txt,tools/ci/run-fuzz.sh(libFuzzer mode),tools/ci/tests/test-fuzz-verdicts.sh,tools/ci/fuzz/regressions/manifest.txt,.github/workflows/c-cpp.yml(fuzz),src/mmt_tcpip/lib/protocols/proto_{ethernet,tcp,llc,ip,ipv6,tpkt,radius,soulseek,http,ip_dgram}.c. - Q: Issue #537 (plan task 10.3, F-BUG-010/F-CLEAN-011) — how do the installed headers stop defining
debug/check/log_err/sentinel/likely/unlikely/true/falsefor every consumer and stop compiling the class tables into it, when ~60 library sources use those macros throughmmt_core.h, and doc citations pin line numbers in the touched files? A: (1)dbg.hmoved tosrc/mmt_core/private_include/(no longer copied to$(MMT_INC)) and also holdslikely/unlikely, removed frommmt_utils.h. Library code reaches it through its internal headers —packet_processing.h,mmt_common_internal_include.h,mmt_mobile_internal.h,mmt_business_app_internal.h— plusmemory.c, which includes none of them; a source that missed it would compileunlikely(...)as an implicit function and fail the-Wl,-z,defslink, so a clean build proves coverage.types_defs.hincludes<stdbool.h>instead of definingfalse 0/true 1(C keeps the same values; C++ consumers no longer get a macro over their keywords). (2) The sixget_content_class_*/get_application_class_*bodies moved unchanged tosrc/mmt_tcpip/lib/mmt_tcpip_classes.c;mmt_tcpip.hkeepsMMTAPIdeclarations, so libmmt_tcpip exports them (recorded indocs/Exported-Symbols.md) and a consumer calling them links-lmmt_tcpip— source-compatible, but a link line with only-lmmt_coremust add it. The bodies did not move into libmmt_core: core is protocol-agnostic and its export budget counts only core-header declarations. Classification is untouched (the functions are reporting helpers no dissector calls), so the phase0 fingerprint cannot move. (3) The acceptance pathsrc/mmt_tcpip/public_include/mmt_tcpip.hdoes not exist; the installed header issrc/mmt_tcpip/include/mmt_tcpip.h, now with nostatic inline. (4) “Every installed header” includesdicom/dicom.h, whose source-tree relative includes (../../mmt_core/public_include/…) did not resolve once installed; it now namesplugin_defs.h/mmt_core.hthrough the include path, and the dicom objects (and thedicom_dissectorsuite) get-I src/mmt_core/public_include. (5) Edits tommt_core.h,types_defs.h,packet_processing.h,memory.candrules/common.mkkeep their line count, so existingpath:linecitations (docs_lifecycle,validate-agent-environment.sh,docs/Memory-Management.md) stay valid. (6) Test:tests/installed_consumer/test_header_macros.c, compiled-Wall -Wextra -Werroragainst a generated list of every installed header, once with its owndebug/check/likely/unlikelydefined first and once with none (no internal name may be defined), then calling the six lookups through-lmmt_tcpip. Against the previous headers it fails:"debug" redefined,"check" redefined, anddicom.hdoes not resolve. Source:src/mmt_core/private_include/dbg.h,src/mmt_core/public_include/{mmt_core,mmt_utils,types_defs}.h,src/mmt_tcpip/include/mmt_tcpip.h,src/mmt_tcpip/lib/mmt_tcpip_classes.c,src/mmt_dicom/include/dicom.h,rules/common.mk:249,tests/installed_consumer/run_tests.sh,tests/installed_consumer/test_header_macros.c,docs/Exported-Symbols.md(## libmmt_tcpip). - Q: Issue #539 (10.5, F-DEAD-013 / F-CLEAN-017) — how are the protocol callbacks and TCP reassembly links typed, what does “count
mmt_opaque_t” mean for a--strictratchet over 51 opaque parameters, and what replaces the SDK’s lone C++ TU and its$(CXX)link? A: (1)protocol_t’s six callback fields carry the existingplugin_defs.htypedefs (generic_sessionizer_function,generic_session_data_initialization_function,generic_session_data_cleanup_function,generic_session_context_cleanup_function,generic_proto_context_init_function,generic_proto_context_cleanup_function) and every cast at the call and store sites is gone;mmt_tcp_reasm_t’sseg_head/seg_tail/seg_rootarestruct tcp_seg_struct *(forward-declared;tcp_seg_tis that struct). Same pointer size, so the private layout is unchanged;test_api_contracts.cnow compares the fields with the typed functions, which only compiles while the types agree. (2) The ratchet gains anopaquemetric: anmmt_opaque_t/mmt_const_opaque_tparameter counts unless its name is an allowlisted opaque role, and an unnamed one always counts;--strictand theopaque 0baseline require 0. Allowlisted roles:user,user_args,user_data,args,data,handler_condition,proto_data(caller-owned context the SDK passes back untouched);key,key_1,key_2,value(generic map and scratch-slot payloads);x,y(mmt_realloc/mmt_free/mmt_memcmpraw memory);src(mmt_inet_ntop, theinet_ntopcontract);stack_internal_context(plugin-owned per-stack state);protocol_context— inside the core always aprotocol_instance_t *, but that type is private and every plugin defines its sessionizer/context callbacks with avoid *first parameter, so retyping the public typedefs would expose the private struct and turn each plugin definition into an incompatible-pointer-type error under GCC 14+; it stays an opaque handle the plugin passes back to the core’s session helpers. The allowlist equals today’s parameter names, sotools/ci/tests/test-weak-types.sh(run byrelease_gates) proves the metric can fail: fixture headers with a non-allowlisted name and an unnamed parameter must fail both modes. (3)hash_utils.cppbecamehash_utils.c: the open-addressing tables and the timeout ring are unchanged; the iteration/expiry snapshots are malloc arrays sized by a counting scan before any slot is detached (an allocation failure dispatches nothing and detaches nothing, asreserve()throwing did);std::sortoverpair<milestone, head>isqsortby milestone then head address (milestones in a due set are distinct, so the order is identical); thestd::mapparked-milestone index is a sorted array with binary search, grown by malloc+copy so a failure leaves it intact and returnsMMT_TIMEOUT_NOMEM(0, the value the oldcatch(...)returned). The seed supply, probe bounds and dispatch order are unchanged, so the phase0 fingerprint cannot move. Thetry/catch(...)wrappers had nothing left to catch, and the three insert-failureprintfdiagnostics go throughdebug()(dbg.h), compiled out of release builds —tools/ci/lint-packet-path-io.shscanssrc/mmt_core/src/*.c, which the.cppescaped (issue #246; no test or gate reads those lines); likewise a prose comment ending in;was reworded forlint-commented-code.sh;test_core_engine_new.cpp(an operator-new interposer whosece_set_new_budgetno test called) is deleted, and the four suites that compiled the TU withg++compile it with$CC(test_session_tableandtest_ipv6_hash_boundsare C now).tests/coverage/floor.jsonnameshash_utils.cin bothrequired_instrumented_filesandsdk.original_cohort.sources— the same file under its new name, not a cohort change. (4) The seven.sorecipes link with$(CC) $(CXXFLAGS): CXXFLAGS stays the link-flag carrier (hardening, sanitizer, coverage, LTO), only the driver changes, so libstdc++ (and the implicit-lmofg++, already explicit for libmmt_core and needed by no plugin) leaves NEEDED. LTO is keyed on$(CC)being GCC alone; the #508 CC-vs-CXX same-release check and its “LTO SKIPPED” warning are gone with the$(CXX)link, andtest-hardening-identity.shasserts a mismatchedCXXno longer drops LTO.tools/ci/shlib-deps.shderives Depends from NEEDED, solibstdc++6/libstdc++drop out of the packages by themselves;check-package-deps.shnow rejects a literal libstdc++ entry instead of exempting it.MMT_LIBSTDCXX_MINstays (shlib-deps maps a libstdc++ NEEDED, should one return).g++stays in the toolchain line andtools/ci/build-deps.txt(cppcheck build, hardening self-test). Edits torules/common-linux.mkandrules/common.mkkeep their line count, so thevalidate-agent-environment.shcitations hold; only the:271row changed its pattern ($(CC)). Source:src/mmt_core/private_include/packet_processing.h,src/mmt_core/src/{hash_utils.c,packet_registry.c,packet_session.c},src/mmt_tcpip/lib/protocols/proto_tcp.c,rules/common-linux.mk:77-80,147-175,271,rules/common.mk:487-494,tools/ci/count-weak-types.sh,tools/ci/weak-types-baseline.txt,tools/ci/tests/test-weak-types.sh,tools/ci/check-package-deps.sh,tools/ci/tests/test-hardening-identity.sh,tests/hashmap/test_session_table.c,tests/coverage/floor.json. - Q: Issue #543 (plan task 11.4, F-CLEAN-006/F-CLEAN-004) — how do the 183 per-attribute RADIUS extractors become table-driven without changing any attribute’s output, what does the acceptance grep measure, and what happens to the drift between the twin stats updaters
update_proto_stats_on_packet/_on_new_session? A: (1) The 184 extraction functions ofproto_radius.ccame in 13 body shapes: the header authenticator; a 64-byte-clamped binary copy (12 packet attributes); a 63-byte copy plus NUL (3 packet, 5 3GPP); a big-endian 32-bit read behindlen < 6(20 packet, 2 3GPP); a raw copy of 16 or 8 bytes behindlen < 2 + size(IPv6 addresses, Framed-Interface-Id); a first-byte read behindlen < 3(3GPP RAT type); a pointer to the raw TLV (the 119radius_avpNattributes); and 16 stubs returning 0. They are now fourstaticfunctions:radius_authenticator_extraction(unchanged),radius_tlv_extraction, which readsradius_tlv_desc[extracted_data->field_id](TLV array, type, copy shape, size — 48 entries),radius_avp_extraction, which derives the TLV type from the contiguousRADIUS_AVP1..102/RADIUS_AVP224..240ids (a_Static_assertpins the contiguity), andradius_unsupported_extractionfor the stubs. Dispatching onfield_idneeds no core change:register_extraction_attributesets it on the struct the core hands every extractor (packet_registry.c), as the genericgeneral_*extractors already rely onposition_in_packet. Since #534 the plugin is built with hidden visibility, so the removed globals were not exported anddocs/Exported-Symbols.mdis unchanged. (2) The acceptance grep^static.*radius_.*_extractionreturned 0 before the change, because none of the 183 functions wasstatic; it now counts the four extractors, andgrep -cE '_extraction\(const ipacket_t' proto_radius.c— every extractor definition, static or not — went from 184 to 4. (3) Byte identity is tested, not argued:tests/radius_hardening/test_radius_extraction_golden.cregisters all 187 RADIUS attributes, sends 24 crafted frames twice (every packet type 0..255 but 26 and every 3GPP sub-type 0..27 at value lengths around each guard — 0-8, 14-18, 61-66, 200 — an empty frame, repeated types, mixed lengths) and folds, per attribute, presence and the whole attribute buffer (68 bytes for binary attributes, so clamp, NUL and stale tail all count; for pointer attributes the TLV’s offset and bytes) into an FNV-1a digest.radius_extraction.goldenwas generated by that program against the unchanged parser; the table-driven build reproduces it exactly, and two seeded mutations (3GPP IMSI copied as BIN64, AVP224..240 shifted by one type) changed exactly the IMSI and the 17 AVP lines. (4) The twins had drifted since 2018: the first packet of a session addedp_hdr->original_len - proto_offsettopayload_volume, the othersp_hdr->len - proto_offset, and only the others counted IPv6 (182) fragments. The singleupdate_proto_stats(…, new_session, …)keeps both differences, keyed onnew_session, rather than reconcile them here: the counters are public statistics and the task is a behaviour-neutral clean-up. Which side is right (most likelyoriginal_lenand IPv6 on both paths) is a follow-up for the maintainer.packet_pipeline.cmakes one call and fires the session event afterwards, as before. Source:src/mmt_tcpip/lib/protocols/proto_radius.c(radius_tlv_desc,radius_tlv_extraction,radius_avp_extraction),src/mmt_core/src/packet_stats.c(update_proto_stats),src/mmt_core/src/packet_pipeline.c(proto_packet_process),src/mmt_core/private_include/packet_processing.h,src/mmt_core/src/packet_registry.c(register_extraction_attribute),tests/radius_hardening/test_radius_extraction_golden.c,tests/radius_hardening/radius_extraction.golden,tests/radius_hardening/run_tests.sh. - Q: Issue #546 (plan task 12.2, F-CLEAN-003/016/020/021) — how does the classifier callback get a typed verdict without breaking the ~300 in-tree
intclassifiers or out-of-tree C and C++ plugins, what replaces the-1returned by unsigned public functions, are the never-writtenproto_statistics_tdirection counters written or removed, and how does the misspelled export get a correct name? A: (1)generic_classification_functionreturnsmmt_classify_verdict_tin C. The enum gains a never-returned negative enumerator,MMT_CLASSIFY_VERDICT_INT_ANCHOR_(INT_MIN), so GCC and Clang makeintits compatible type: a classifier declaredint fn(ipacket_t *, unsigned)still converts without a cast or-Wincompatible-pointer-types(an error by default from GCC 14). Without the anchor GCC picksunsigned intand warns. The in-tree classifier definitions therefore stay unchanged. C++ has no conversion between those function-pointer types, so a C++ translation unit keeps theinttypedef under#ifdef __cplusplus. The ABI is the same: the enum is int-sized and the functions areextern "C". A plan challenger raised that C++ break, and the C++ branch closed it.tests/core_engine/verdict_typedef_probe.c, compiled with-Werroras C and as C++ by the core_engine suite, holds both views.check-typed-accessors.shasserts the C typedef line, because_Genericcannot tell an int-compatible enum fromint. Theprotocol_tclassify fields (classify_me,pre_classify,post_classify) use the typedef. The core walk keeps theMMT_CLASSIFY_MATCHED_MASKtest, so binary plugins that return 2 or 3 behave as before, and the golden fingerprint is unchanged. (2) Six unsigned public functions returned-1:get_protocol_id_at_index,get_protocol_index_by_id,get_protocol_index_by_name,get_session_id_from_packet,get_active_session_countandhex2dec. Triage counted three; the two index lookups returned anint retval = -1. They now return named sentinels with the value-1converted to their return type:MMT_NO_PROTO_ID(UINT32_MAX),MMT_NO_PROTO_INDEX(UINT_MAX),MMT_NO_SESSION_IDandMMT_INVALID_SESSION_COUNT(UINT64_MAX), andMMT_HEX2DEC_ERROR(ULONG_MAX). Callers that compare with(type) -1, or that store an index in anintand test it against-1, as the in-tree dissectors do, see no change.check-public-decls.shnow fails when an unsigned-returningMMTAPIdefinition returns-1, either a literal or a local initialised to-1, andtools/ci/tests/test-api-contracts.shcovers both forms. (3) The direction counters are written, not removed.proto_statistics_tis public, and the internal struct is cast to it, so removing the fields would shiftsessions_countand every later field: an ABI break.update_proto_statssplits each packet by the sessionproto_session_management()has just resolved:[0]is the session’s setup direction (uplink, asget_session_ul_packet_count),[1]the other. A layer crossed with no session counts in the totals only.get_children_statsandreset_proto_statscarry the split too. No phase0 baseline reads these fields. (4)is_free_protocol_id_for_registrationis the newMMTAPIfunction, and internal callers use it. The misspelled name stays an exportedMMTAPIwrapper with__attribute__((deprecated)), scheduled for removal in 2.0.0 (CHANGELOG). Both names have API-contract entries. Source:src/mmt_core/public_include/plugin_defs.h(mmt_classify_verdict_t,generic_classification_function,is_free_protocol_id_for_registration),src/mmt_core/public_include/{data_defs.h,mmt_core.h,mmt_utils.h},src/mmt_core/private_include/packet_processing.h(mmt_classify_proto_struct,mmt_classify_next_struct),src/mmt_core/src/{mmt_data.c,mmt_utils.c,packet_session.c,packet_registry.c,packet_stats.c},tools/ci/check-public-decls.sh,tools/ci/check-typed-accessors.sh,tests/core_engine/{verdict_typedef_probe.c,run_tests.sh,test_api_contracts.c}. - Q: Issue #549 (plan task 12.5, F-BUG-012/F-CLEAN-010) — where do the per-protocol analysis/classification switches live once
enable_/disable_protocol_*stop writing the sharedprotocol_t, and how is the 2,000-linepacket_registry.csplit? A: (1) The switches areanalysis_enabled/classify_enabledinprotocol_instance_t, the per-handlerconfigured_protocols[]snapshot:mmt_init_handler()sets both to 1 for every protocol, the four APIs write only the handler they are given, andproto_packet_analyze()/proto_packet_classify_next()read the instance they are handed. Thestatusfields ofmmt_classify_next_structandmmt_proto_data_analysis_structare removed — private structs, not installed — so no code can read a stale global flag. Accesses stay relaxed atomics (proto_status_load/proto_status_store, issue #69): a handler is single-threaded, but a caller may toggle a switch from another thread, and a relaxed load is a plain load. Two behaviours change, both only off the documented path: disabling a protocol on one handler no longer disables it on the others, and a latermmt_init_handler()orinit_protocol_struct()no longer re-enables or resets it for existing handlers. Every handler still starts with everything enabled, so the golden classification and precision fingerprints are unchanged. (2) The split follows the file’s seams, moving functions verbatim:packet_registry.ckeeps the protocol table and its mutex, the name map, protocol stacks, attribute-metadata and name/id lookups andinit_extraction()/close_extraction(), so the OOM static guard (tools/phase0/tests/run_oom_no_abort_test.sh) still anchors there;packet_registry_classify.cholds the classification/analysis/session callback registration;packet_registry_handler.cthe handler lifecycle, the handler bookkeeping map and its mutex (#67), the per-handler switches andsetDataLinkType;packet_registry_attr.cper-handler attribute, attribute-handler and packet-handler registration. The two statics that crossed a seam stay private to their file behind three internal entry points:get_protocol_slot()(the raw descriptormmt_init_handler()snapshots) andinit_handlers_map()/close_handlers_map()(the handler-map halves of extraction init/teardown). The core objects build with-fvisibility=hidden, so none of them is exported.tests/coverage/floor.jsonlists all four files insdk.original_cohort, so that cohort still measures the 30 audited sources’ lines. Source:src/mmt_core/private_include/packet_processing.h(protocol_instance_struct,proto_status_load, thepacket_registry*.cprototypes),src/mmt_core/src/packet_registry.c,src/mmt_core/src/packet_registry_classify.c,src/mmt_core/src/packet_registry_handler.c,src/mmt_core/src/packet_registry_attr.c,src/mmt_core/src/packet_pipeline.c(proto_packet_classify_next,proto_packet_analyze),tests/core_engine/test_core_engine.c(test_per_handler_protocol_switches),tests/core_engine/test_api_contracts.c(AC_STATUS),docs/THREADING.md. - Q: Issue #553 (plan task 13.4, F-CI-008/F-CI-010) — how are SDK builds cached without changing a default build, and how does one local command mirror the pull-request gates without copying them?
A: (1) Cache:
MMT_CCACHEis an opt-in launcher appended last torules/arch-linux-gcc.mk: set, it prefixesCC/CXX(anoverride, so a command-lineCC=is prefixed too), defaultsCCACHE_BASEDIRto the checkout, and stops the build when the launcher is missing; unset,CC/CXXare exactlygcc/g++ -std=c++11. The compiler-identity, FORTIFY, CET and-frandom-seedprobes run before the block, on the bare compiler, so the hardening set is the same either way.BUILD=coverageis never cached: measured, a cached--coverageobject carries the gcov counter path of the build that made it, and thesdk_coveragesuite’s harvest failed 8 checks. The suites inherit the variable from the environment (MMT_CCACHE=ccache bash tests/run_all_tests.sh), sotests/run_all_tests.shis unchanged and no cited range of it moves. (2) Stable compile lines: every object’s command line carried the install prefix (the plugin-directory define) and the commit hash (GIT_VERSION), so the suites’ throwaway prefixes defeated ccache’s direct mode. On 4 cores a warm SDK build took 26.5 s with preprocessor-mode hits against 13.8 s with direct-mode hits (31 s uncached). Both defines now reach only the object that reads them —plugins_engine.o, which already depends on the plugin-directory stamp, andpacket_processing.o(mmt_version()) — through target-specific variables appended torules/common.mk.GIT_VERSIONis captured on the old blank line 29, before thenogitpackage-revision fallback, so a build without git still bakes an empty hash as before. Everysdk/libfile of anENABLESEC=1build is byte-identical to main’s, with an explicitGIT_VERSIONand without git. TheENABLESEC=1security objects keep their per-prefix reaction-directory define, so that group still misses in direct mode. (3) CI:unit-testsandsanitizer-testsrestore a ccache per leg and per profile, and push and schedule runs save one entry per commit. Pull requests and merge-queue runs only read it, which keeps the cache budget of #660. The save condition is written positively (push || schedule) so neither job becomes queue-only (tools/ci/tests/test-classify-changes.sh). (4) Local gates:tools/ci/local-gates.shreads therun:steps of thelint,verify-helpersanddoc-validatorsjobs fromc-cpp.ymland runs them with their env. It skipsuses:steps and three named set-up steps; a set-up name that disappears from the workflow exits 2, and so does any${{ }}expression or stepif:it has no pull-request answer for. The steps run in an image built from thelintjob’s digest-pinnedubuntu:24.04with the pinned cppcheck, PyYAML, gawk, a UTF-8 locale and the locked gems. It runs as the caller, with a linked worktree’s git directory mounted and a freshdocs/.jekyll-cache. Its Ruby is Ubuntu’s 3.2, not CI’s 3.4. (5) Acceptance criterion 1 (a warm second run ≤ 60 % of a cold one) is not met, and no build-system change here can meet it. Since #654 a run builds the SDK twice, not ~150 times, and most of its wall time is script-bound suites and uncached LTO links. Measured withMMT_CCACHE=ccache: 153 s cold → 152 s warm on 20 cores, and 267 s → 234 s (88 %) with 4 CPUs (taskset -c 0-3,JOBS=4). 75 % of compiler calls hit across the two runs, 99.9 % of them in direct mode. The cold run already hits within itself, because the installer suite rebuilds the same sources. (6).pre-commit-config.yamlpins gitleaks to the v8.30.1 tag’s commit (83d9cd68…,# frozen:comment). Source:rules/arch-linux-gcc.mk(issue #553 block),rules/common.mk:29-31and its appended target-specific variables,sdk/Makefile:19-29,src/mmt_core/src/plugins_engine.c:50-60,src/mmt_core/src/packet_processing.c:742,.github/workflows/c-cpp.yml(unit-tests,sanitizer-tests,verify-helpers),tools/ci/local-gates.sh,tools/ci/tests/test-ccache-launcher.sh,tools/ci/tests/test-local-gates.sh,.pre-commit-config.yaml, measured runs on 2026-10-28. -
Q: Issue #527 (plan task 8.4, F-BUG-313) — what does “every classifier registered in the default TCP/UDP chains” count, how is a positive and a negative case per classifier checked when the chains register 143 distinct functions, and what does the “seeded random/length abstention set” record? A: (1) A classifier is a distinct
mmt_check_*function of an uncommentedMMT_INTER_PROTO(PROTO_TCP|PROTO_UDP, fn, weight)row ofsrc/mmt_tcpip/lib/inter_proto_classif_list.def(160 rows, 143 functions; a function registered on both transports counts once). The oracle parses that file, so a registration change moves the requirement with it. (2) Each corpus case may list the functions it exercises inclassifiers; a function is covered when a positive and a negative/ambiguous case name it. Covering all 143 in one change was out of scope, so uncovered functions must sit intools/phase0/ci/accuracy/coverage-pending.txtwith a reason, and the list only shrinks: an entry that is covered or no longer registered fails, as does an uncovered function missing from it; CI passes the base commit (--base HEAD^1), and an entry that commit’s list lacks for a function it already registers fails, so a covered function cannot move back to pending. The first tranche covers the 48 functions of weight 9–40 plus the common weight-50 ones (telnet, RDP, LDAP, BGP, PPTP, MSSQL, IRC, RTSP, SIP, STUN, RTP, SNMP, TFTP, RADIUS, GTP, MGCP, IPP); 95 remain pending. (3) A genuine flow the SDK misses is recorded as anambiguouscase that expects abstention (BitTorrent DHT, MySQL 8 greeting), as the QUIC draft-29 case already was, and a port-only acceptance as anunknown-family case that expects the false accept (acc_unknown_mqtt_port), as the malformed S1AP case already was: a classifier fix then has to update the reviewed expectation. No classifier source changed. (4) The abstention set is regenerated at gate time from a fixed seed (SHA-256 counter stream: payload bytes, ports, server addresses) — 12 lengths × TCP/UDP × 8 flows — and rendered after the labelled metrics ofprecision.txtwith its own unknown rate; it never enters the labelled confusion matrix, so the FTP/HTTP rows are unchanged. Source:tools/ci/tests/check-accuracy-corpus.py(load_chain,load_pending,check_coverage,check_base_ratchet),tools/phase0/ci/accuracy/corpus.json,tools/phase0/ci/accuracy/coverage-pending.txt,tools/phase0/gen_tcpip_pcap.py(ACC_CLASSIFIER_FLOWS,ABSTENTION_SEED,_gen_abstention_pcap),tools/phase0/ci/check_precision.sh(step 4/4),tools/phase0/ci/render_precision.py(abstention_metrics,render_abstention),tools/phase0/ci/baseline/precision.txt. - Q: Issue #535 (plan task 10.1, F-CLEAN-001 part 1, F-CLEAN-002) — which
ipacket_tfields are internal, how is the private part attached without breaking the engine’s hand-out ofipacket_t *, and why doesinternal_packetstay public? A: (1) Eleven of the twelve fields the header marked internal move to the engine-privateipacket_internal_t(src/mmt_core/private_include/ipacket_internal.h): the three embeddedproto_hierarchy_tstores,internal_p_hdr,original_data, the three offset-cache fields,proto_headers_offset_owned,mmt_current_classifierandmmt_classifier_claim. Every packet the engine processes is anipacket_internal_t(the handler’scurrent_ipacket, the reassembly slot’sipacket, the NDN dummy packet), and what it hands out is itspubmember — the first member — soipacket_internal()converts back. (2)ipacket_internal_toverlayspubwith an anonymous struct naming the same 19 fields, each pinned byMMT_PIN_MIRROR(same offset,__builtin_types_compatible_ptype), so code that owns the storage (the engine’s packet set-up, test fixtures) keeps writingpkt.data; accesses through a union member take the union’s alias set in GCC and Clang, so the overlay is alias-safe under-O3 -flto.attribute_internal_tgets the same overlay overattribute_t, and the engine passes&attr->pubwhere it cast the record (itsdata_typemirror is now theenum data_typesofattribute_t, notint). (3)internal_packetstays in the public prefix: it is a pointer to an incomplete type, so its presence leaks no layout, and the TCP/IP plugin dereferences it about 590 times in 139 files — moving it is a mass rename the minimal-diff rule forbids. (4) The public offsets are pinned with absolute LP64 values (amd64 and arm64 are the only shipped targets,PROTO_PATH_SIZE16); C++, pre-C11 and other targets skip the asserts. (5)invalidate_packet_offset_cache()wrote a now-private field from a header inline, so it became an exported function (API-contractNO_ERROR_PATH, waiver added). (6) Test and phase0 fixtures that drive real engine code declareipacket_internal_tand pass&pkt.pub; fixtures whose suite stubs the offset helpers keepipacket_t. Source:src/mmt_core/public_include/data_defs.h(struct ipacket_struct, the_Static_assertblock,invalidate_packet_offset_cache),src/mmt_core/private_include/ipacket_internal.h,src/mmt_core/private_include/packet_processing.h(attribute_internal_struct,mmt_ipacket_slot_t,mmt_handler_struct.current_ipacket),src/mmt_core/src/mmt_data.c,src/mmt_core/src/packet_pipeline.c,tests/core_engine/test_api_contracts.c. - Q: Issue #536 (plan task 10.2, F-CLEAN-001 part 2) — what SONAME does each library carry, where do the runtime links live, what counts as a “recorded” incompatible change for the blocking
abi-diffgate, and what did v1.9.0 change that its notes missed? A: (1)SOVERSION := 1, appended at the end ofrules/common.mk(so no cited line range moves) and independent ofVERSION; all seven links inrules/common-linux.mkpass--soname=$(LIB…).so.$(SOVERSION), soreadelf -d sdk/lib/libmmt_core.so.*showslibmmt_core.so.1(v1.9.1 and earlier: the unversionedlibmmt_core.so). No library NEEDs anotherlibmmt_*(the plugins resolve core symbols from the process), so only consumers record the SONAME. (2)sdk/lib/keeps one regularlib<name>.so.$(VERSION)per library: many scripts globsdk/lib/*.so.*, andinstall -m 0755 $(SDKLIB)/*.so.*would dereference a link into a duplicate file. The runtime linklib<name>.so.1 -> lib<name>.so.$(VERSION)(relative) is laid down by every install route instead —make install(for the libraries installed; recorded in the manifest, souninstallremoves it), the.deb/.rpmstaging (owned by the package rather than left to the postinstldconfig; the security split moves the engines’ links intommt-dpi-security), the offline ZIP (SOVERSIONstamped intommt-install-common.shbymake ziplikeVERSION), andinstall.sh’s manifest records whatever SONAME links the pinned tag’s Makefile laid down. The plugin loader only loads*.sonames (src/mmt_core/src/plugins_engine.c:14), so a.so.1link never loads twice. The unversionedlib<name>.sostays as the development link; moving it to a-devpackage is the Debian track (#538).tools/ci/shlib-deps.shmapslibmmt_*.so*to no package, so the derived Depends/Requires are unchanged. (3) “Recorded”:tools/ci/abi-diff.shturns an INCOMPATIBLE verdict into RECORDED when both SONAMEs are readable (READELF -d) and differ — the bump is what makes the loader refuse a consumer linked against an older SOVERSION, which is the safety the policy buys from SOVERSION 1 on (a consumer linked against v1.9.1 names the unversionedlib<name>.so, which every route still installs as the development link, and plugins are dlopen’ed with no NEEDED onlibmmt_core, so neither is refused: both must be rebuilt, as the CHANGELOG says); an unreadable SONAME or a library missing on one side stays INCOMPATIBLE (fail-closed).--fail-on incompatiblecounts only unrecorded breaks,--fail-on changecounts RECORDED too. A libabigail suppression file was not added: no false positive needs one yet, and a waiver that is not a SONAME bump would leave the old consumer loading the new library. Both legs of theabi-diffjob (the rebuilt v1.9.1 tag with types, the shipped v1.9.1.debsymbols) run with--fail-on incompatible; HEAD passes because every SONAME moved.abi-diffjoins.github/required-checks.txt(check-required-checks.shaccepts it: a non-matrix job whose skipped run, outside the full tier, reports success, and which the merge queue always runs); making it live-required is a branch-protection change for a maintainer.ABI_BASELINEand the script’s defaultbaseline_refmove to each new tag in the release follow-up PR (docs/Prepare-for-a-new-released-version.md), andscripts/validate-release-prep.sh(the requiredversion-agreementjob) fails unless both equalinstall.sh’sRELEASE_TAG, so the move cannot be skipped. Until a release carries SONAME.so.1, every library is RECORDED against v1.9.1 and the live gate cannot fail: that is the policy, not a hole — no released library has SOVERSION 1 yet, so any further break before that release is covered by the same unreleased bump; from the first.so.1release on, an incompatible change needs SOVERSION 2. The failure path is exercised by thetest-abi-diff.shfixtures until then. (4) v1.9.0 widenedipacket_t.ipv6_ext_headers_offsetfromuint16_ttouint32_t(#201) and appendedproto_headers_offset_owned(#199),mmt_current_classifierandmmt_classifier_claim(#252): compiled against the v1.8.0 and v1.9.0 headers on LP64,sizeof(ipacket_t)is 648 and 704, andipv6_ext_headers_len,nb_reassembled_packets,proto_hierarchy,sessionanddatasit at 112/184/456/480/560 and 144/216/488/512/592 — recorded in the Unreleased CHANGELOG section with the policy, since the v1.9.0 section is released. Source:rules/common.mk(SOVERSION),rules/common-linux.mk(--soname),sdk/Makefile(install,MMT_SONAME_LIBS,--private-prepare-build-dir,zip),dist/ZIP/install.sh,dist/ZIP/mmt-install-common.sh,install.sh(write_manifest),tools/ci/abi-diff.sh,tools/ci/tests/test-abi-diff.sh,tests/installer/run_tests.sh,.github/workflows/c-cpp.yml(abi-diff),.github/required-checks.txt,git show v1.8.0:src/mmt_core/public_include/data_defs.h,git show v1.9.0:src/mmt_core/public_include/data_defs.h. -
Q: Issue #545 (plan task 12.1, F-CLEAN-013) — what replaces the compiled-out
MMT_LOGand the stdout-writing S1AP macros, which diagnostics move to it, and how is “one logger, off by default, never stdout, with failure counters” met without a public-API change? A: (1) One internal logger,src/mmt_core/private_include/mmt_log.h+src/mmt_core/src/mmt_log.c: levels error/warn/info/debug, thresholdoffunlessMMT_DPI_LOG_LEVEL(off, error, warn/warning, info, debug or 0-4, read once on first use) ormmt_log_set_level()raises it; aSHOWLOG=1(-DDEBUG) build defaults todebug. It writes only to stderr, onefwriteper formatted line (512-byte message, truncated lines stay newline-terminated). Each call site owns a staticmmt_log_site_t: at mostMMT_LOG_SITE_BURST(10) lines per monotonic second, the rest counted and reported as “(N earlier line(s) suppressed)” on that site’s next line.mmt_log_event()counts every call per level before the threshold check, so failures stay countable with logging off;mmt_log_get_stats()returns those counts plus lines written, rate-limited and failed. All shared state uses__atomicbuiltins (the core_engine suite runs the concurrent-writer test under TSan inSANITIZE=tsan). A disabled call evaluates no argument.mmt_log_debug()compiles to nothing withoutDEBUG, so a release build cannot be switched to print the decoded, subscriber-identifying fields the S1AP trace levels carry (F-SEC-016); the SHOWLOG exposure is unchanged except that it now goes to stderr. (2) The five functions areMMTAPIin the private header —libmmt_tmobilecalls them across the library boundary — solibmmt_coreexports 5 more symbols (docs/Exported-Symbols.mdregenerated; an addition, not an ABI break) andcheck-api-contracts.sh, which reads onlypublic_include, needs no entry. No public statistics struct grows:ipacket_tand the handler statistics are pinned by #535/#536, so exposing the counters through the public API is left to a follow-up. (3) Moved to the logger:S1AP_ERROR/S1AP_WARN(werefprintf(stdout)per malformed PDU), the four rawfprintf(stderr)ofs1ap_decode(), the NAS decoder’sLOG, andS1AP_TRAF/INFO/DEBUGanddbg.h’smmt_debug_log()as its debug level.XER_FPRINT(DEBUG only) writes to stderr. One-shot plugin init failures (S1AP’s fourS1AP_ERRORininit_proto_s1ap(), the mobile, business-app and DICOM initfprintf(stderr)) usemmt_stderr_log, the operator channeldbg.hreserves for them: routing them through an off-by-default logger would hide a broken install. Kept as they are:dbg.h’sdebug()/log_err()/log_warn()/log_info()/check()— the unit suites compile those sources standalone without linking the core,debug()is compiled out of release builds and the others sit on allocation/init failure paths — andmmt_stream_printf(caller-suppliedFILE *). (4)MMT_LOG,MMT_LOG_BITTORRENT,MMT_LOG_GNUTELLA,MMT_LOG_EDONKEYexpanded to{}, so their 1,180 call sites (120 files, all undersrc/mmt_tcpip) and the unusedmmt_log_level_t/mmt_debug_function_ptrtypedefs ofmmt_tcpip_internal_defs_macros.hare deleted rather than revived: reviving them would compile 1,180 never-built format strings into hot dissectors. Four sites were the only statement of an unbracedif(proto_irc.ctwice,proto_soulseek.ctwice); theifwent with them (side-effect-free conditions), since deleting only the call would have captured the next statement. Evidence: the default-profilelibmmt_tcpip.so.textdisassembly (addresses normalised) before and after differs only in two__LINE__immediates ofinit_proto_gtp_struct, and.rodatais byte-identical, so the fingerprint cannot move. (5)tools/ci/lint-packet-path-io.shalso scanssrc/mmt_mobile(minus the generatedasn1c/),src/mmt_business_appandsrc/mmt_dicom, and adds a rule the old macro-definition exemption hid: no macro definition in those trees,src/mmt_core/src,src/mmt_tcpip/liborsrc/mmt_core/private_includemay write to stdout (printf(,puts(,fprintf(stdout,xer_fprint(stdout); it flags the pre-#545s1ap_common.h. Source:src/mmt_core/private_include/mmt_log.h,src/mmt_core/src/mmt_log.c,src/mmt_core/private_include/dbg.h,src/mmt_mobile/s1ap/s1ap_common.{h,c},src/mmt_mobile/proto_s1ap.c,src/mmt_mobile/nas/util/decoder.h,src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h,tools/ci/lint-packet-path-io.sh,tests/core_engine/test_mmt_log.c,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c,docs/Exported-Symbols.md. -
Q: Issue #551 (plan task 13.2, F-BUG-215 part 2 of 2 and F-BUG-011) — how does the security engine’s process-global state move per handler without threading an engine argument through ~6,000 lines of legacy loader/evaluator/reporter code, and how are hash-table seeds made unpredictable without making the golden fingerprint, the precision baseline or the fixed-seed resource budgets nondeterministic? A: (1) Engine: every global and static that held one engine’s state —
op,top_rule,packet_count,p_meta/a_utime,token2/token3(tips.c), the loader’sbot_rule/root_rule/top_father/bot_father/expr_root/expr_text(tips_xml.c) andcorr_mess(tips_report.c) — is a field ofmmt_sec_engine_t(tips_internal.h), allocated by eachinit_sec_lib()and passed as the packet handler’s argument. The units reach it through the thread-localsec_cur, bound by each entry point (load,analyse_incoming_packet(),close_sec_lib(), the summaries) for its own duration and restored on return; outside them it points to a zeroed, never-registered engine, so the internal functions the suites call directly (tokenize(),xml_summary(),get_data_from_pcap()) behave as on the zeroed globals. An explicit engine parameter was rejected for this change: the loader alone would change ~15 signatures and the evaluator already threadsverify_ctx_tthrough every call; the binding gives the same isolation — two engines on two threads, or interleaved on one, never share state — with a mechanical diff. (2) #512’s process-wideengine_stateCAS became a mutex-guarded registry of live engines keyed by handler: one engine per handler (a secondinit_sec_lib()on it is still Error 105, and of two racing calls exactly one loads —register_packet_handler()returns success for an id already registered, so the claim cannot rely on it), any number per process. New internal entry pointsmmt_sec_engine_of()(the suites read an engine’s rule counters through it) andclose_sec_lib()(unregisters packet handler 1, eliminates live instances, frees rules, options and tokens). The plan’s independent challenge (sensitive-change gate) added four guards: an engine is published (loaded, under the registry lock) only once its load succeeded, sommt_sec_engine_of(),close_sec_lib()and the summary fallback never see a half-built or failing engine; a registry entry is keyed by the handler’s address, so an entry whose handler was closed withoutclose_sec_lib()is recognised — the live handler’s packet handler 1 is notanalyse_incoming_packetwith that engine as argument — and freed when a later handler reuses the address, instead of answering Error 105 for it;init_sec_lib()refuses (Error 42) a handler whose packet handler 1 is already taken, sinceregister_packet_handler()would report success without registering and leave the engine unfed; andclose_sec_lib()unregisters id 1 only once that check proved it is the engine’s.print_summary()/xml_summary()keep their argument-less signatures and report the engine bound on the calling thread, else the most recently loaded live engine — the one engine #512 allowed. Kept process-wide on purpose:counter_detectionnamesdetection_<n>.datafiles in the one reaction folder, so it stays shared but is claimed with an atomic add whose valuegenerate_command()now uses (it re-read the global); the embedded-functiondlopenhandle is shared, its first open serialised by a mutex;xallocated_memory_sizeis an atomic statistic. Removed as write-only:temptemp(tips_eval.c) andOutputFile(tips.c). libmmt_security is default-visibility and outside the ABI diff and the export doc, so dropping the exportedop/top_rule/packet_count/p_meta/a_utime/token2/token3data symbols touches no gate. (3) Seeds: the per-table counter of #379 now starts from a base drawn once per process (pthread_once, first table creation) withgetrandom(GRND_NONBLOCK), falling back to a time/pid/address/clock mix; one draw per process rather than per handler because every table’s seed is already a distinct step of the counter — a per-handler draw would cost a syscall per handler and change nothing an attacker can observe.MMT_DETERMINISTIC_SEEDset to a non-empty value other than0keeps the legacy base0x243F6A8885A308D3, so the sequence is exactly the pre-#551 one; a set-uid/set-gid process (getauxval(AT_SECURE)) ignores it.check_classification.sh,check_precision.shandtests/resource_bounds/run_tests.shexport it, so their committed baselines stay reproducible by construction rather than by the observation that no output depends on table order (the only seeded-table iterations are teardown frees anditerate_through_mmt_handlers).mmt_oa_table_seed()exposes a table’s seed to the hashmap suite without an export (core is-fvisibility=hiddenand it is not MMTAPI);test_session_table seedprints the first two seeds,run_tests.shrequires two runs to differ and twoMMT_DETERMINISTIC_SEED=1runs to agree, and the binary asserts the legacy values under the variable (its exit status fails the suite). Source:src/mmt_security/tips_internal.h(mmt_sec_engine_t,sec_cur,sec_bind),src/mmt_security/tips.c(analyse_incoming_packet,init_options,init_sec_lib,close_sec_lib,mmt_sec_engine_of,find_engine_locked,engine_is_registered,free_engine,with_summary_engine),src/mmt_security/tips_xml.c,src/mmt_security/tips_report.c(open_detection_file,generate_command,print_engine_summary,xml_engine_summary),src/mmt_security/tips_extract.c(embedded_funct_resolve),src/mmt_security/tips_eval.c,src/mmt_core/src/packet_registry_attr.c(register_packet_handler),src/mmt_core/src/hash_utils.c(mmt_oa_seed_init,mmt_oa_next_seed,mmt_oa_table_seed),tools/phase0/ci/check_classification.sh,tools/phase0/ci/check_precision.sh,tests/resource_bounds/run_tests.sh,tests/hashmap/{run_tests.sh,test_session_table.c},tests/rule_engine/{run_tests.sh,test_rule_engine.c,test_rule_eval.c}(two-engines,engine-lifecycle),docs/THREADING.md. -
Q: Issue #658 (ci audit R6) — which variant legs leave the pull-request path for the merge queue while branch protection does not yet require
toolchain-floor,toolchain-ceiling,assertions-liveorpackages-gate, and is checking the coverage floors once per merge acceptable (ci audit §8 item 4)? A: The merge queue waits only for live-required contexts, so a leg leaves the pull-request path only when a live-required context still fails with it. (1)coverageis live-required: it skips on pull requests and gates the queue itself. Its floors are whole-repo metrics (tests/coverage/floor.json) and it already ran only on thefulltier, so one check per merge, before the change reachesmain, is the cadence chosen; a contributor reads the numbers from the queue run’sunit-suite-coverageartifact. (2)toolchain-floorandassertions-liveskip on pull requests and are needed bybuild, which is live-required:buildruns under!cancelled()(a job skipped by a failed need reports success) and its first step fails unless each leg succeeded, a skip being accepted on a pull request only.buildis the natural aggregate — both are variant builds on the standardubuntu-24.04runner — and it costs the queue its own run after the slower leg (1.2 min median indocs/ci-audit-2026-10.md§3). This makes the two legs merge-blocking in the queue before their contexts are required live, which is what the issue asks (“nothing merges without them”); a flake in either now evicts its queue entry.tools/ci/check-required-checks.shrefuses an aggregate whose job-levelif:is not exactlyalways()or!cancelled()or that never reads the need’s result, andtools/ci/tests/test-classify-changes.shrunsbuild’s gate step over every event and result. (3)toolchain-ceilingstays on pull requests: it runs on theubuntu-26.04preview label, whose required-context status the #657 entry above leaves to a maintainer; throughbuild, a stalled or retired preview runner would hold every queue entry until the 120-minute response timeout. (4) The package matrix stays on pull requests:packages-gateis in another workflow, so no live-required job can need it, and until a maintainer requires it a failed package leg in the queue would merge. Requiringtoolchain-ceilingandpackages-gate(therequired-checks.txtapply command inCONTRIBUTING.md) is the prerequisite for moving them, the latter keeping one deb, one rpm and one reproducibility leg on pull requests. Source:.github/workflows/c-cpp.yml(build,coverage,toolchain-floor,toolchain-ceiling,assertions-live),.github/required-checks.txt,tools/ci/check-required-checks.sh(aggregate_flaw),tools/ci/tests/test-required-checks.sh,tools/ci/tests/test-classify-changes.sh,CONTRIBUTING.md(Required checks and review),docs/ci-audit-2026-10.md§5.6, §8,gh api repos/montimage-projects/mmt-dpi/branches/main/protection(live contexts, 2026-10-28). - Q: Issue #531 (plan task 9.2) — the tcpip family already measured 61.37% when #524 set its floor at 60.3, so the first acceptance criterion (≥ 60%) held before this issue; what does “raise tcpip coverage on the dissectors that actually classify” add, and where do the tests live?
A: (1) The criterion is met by #524, but the issue’s subject is the classifier bodies, so the issue ships tests rather than a bare re-statement of #524’s number. Ranking
tests/coverage/coverage-combined.infoby uncovered lines per function put the nDPI-derived classifiers first:search_ddl_domains()(444 lines, a generated Host-suffix matcher), then MSN, IMAP, PPLive, Gnutella, Yahoo, BitTorrent, Gadu-Gadu, RTP, NetBIOS, Soulseek, QQ, Jabber, DirectConnect, Oscar, iMesh, AIMini, Zattoo, STUN and SopCast. (2) The tests are one packet/API-path fixture,classify, in the existingtests/parser_boundariessuite (which already builds the SDK and holds theclassifier-auditsweep), not a new suite, soDEFAULT_SUITESstays at 30.test_tcpip_classify_api.creplays 33 opening exchanges (TCP handshake first) plus 71 direct-download Hosts throughmmt_init_handler+packet_process, one host pair per case because classifiers keep per-IP state, and registers and reads back every attribute of each protocol. Port-based classification is off by default (src/mmt_core/src/packet_registry.c:1000), so each case only passes through its payload checks; payloads steer clear of the earlier classifiers that claim them first (FTP forUSER, DICOM for a leading 0x01, DNS for query-shaped headers). (3) UnderSANITIZE=asanthe NetBIOS cases exposednetbios_classify_next_proto()overlaying a struct ending in a pointer (8-byte aligned) on the packet — a UBSan misaligned access — and readingsource_port(bytes 8-9) without a caplen check. It now reads the two fields byte-wise after anoffset + 10 <= caplenguard; the result depended only on those two fields, so classification is unchanged (golden fingerprint and precision gates pass). (4) Measured (aarch64, GCC 13.3, fullbash tests/run_all_tests.sh --coveragethenbash tools/ci/check-sdk-coverage.sh): tcpip 66.21% (17,332/26,174 lines; 61.44% re-measured at the parent commit, 61.37% at #524), whole SDK 70.66% (23,883/33,796). The tcpip floor moves to measured minus 1, rounded down to 0.1: 60.3 → 65.2.whole_sdk_line_pctstays 64.5 because this issue ratchets the family it targets; M3’s whole-SDK push owns that floor. (5) The fix deleted two commented-out lines, sotools/ci/commented-code-ratchet.txtbanks 121 → 120 blocks. Source:tests/parser_boundaries/test_tcpip_classify_api.c,tests/parser_boundaries/run_tests.sh(classify),src/mmt_tcpip/lib/protocols/proto_netbios.c(netbios_classify_next_proto),tests/coverage/floor.json(sdk.family_floors.tcpip,sdk.note),docs/AGENT_ENVIRONMENT.md§3,tools/ci/commented-code-ratchet.txt.
2026-10-29
-
Q: Issue #475 — how does the Debian source package (
debian/) lay out the SDK, and how does it coexist with the upstreammake debpackage thattools/ci/build-package.shships to GitHub Releases? A: (1) Two packagings, two jobs.make -C sdk deb(unchanged) builds the upstream release asset: onemmt-dpipackage (plusmmt-dpi-securitywithENABLESEC=1, #497) installing under/opt/mmtwithmake install’s layout and loader drop-in.debian/is what a Debian archive builds itself:dpkg-buildpackagerunsmake -C sdkandmake -C sdk install-fhs(debian/rules) and splits the result intolibmmt-dpi1(/usr/lib/<triplet>/libmmt_*.so.1and.so.1.9.1, plus/usr/lib/<triplet>/mmt-dpi/plugins/*.so, relative links to those libraries) andlibmmt-dpi-dev(/usr/include/mmt-dpi, thelibmmt_*.sodevelopment links,pkgconfig/mmt-dpi.pc, the examples under/usr/share/doc/libmmt-dpi-dev/examples). The security and fuzz engines are not built for Debian. The two never share a file name or a path, so neither changes the other. (2)install-fhs(end ofsdk/Makefile) is a separate target, not a mode ofinstall: it writes underDESTDIRat theMMT_LIB/MMT_INC/MMT_PLUGINS/MMT_EXAMSthe caller names (it refuses the/opt/mmtdefaults), never compiles (--check-builtrefuses a build whose baked-in plugin directory differs, as forinstall), and writes no loader drop-in, no install manifest and no licence files — the package manager owns those.install,uninstalland theMMT_BASEcontract are untouched. (3) The 2026-09 version of this work carried an opt-inSOVERSION ?=and its ownMMT_EXTRA_CFLAGS; on rebasing over main both were dropped in favour of main’s: every build linkslib<name>.so.$(SOVERSION)since #536 (SOVERSION := 1, whichdebian/rulesno longer overrides, so the package follows upstream’s ABI number), and #514 already appendsMMT_EXTRA_CFLAGStoCFLAGS, whichdebian/rulesfills fromdpkg-buildflags. The plugin libraries keep main’s link (noDT_NEEDEDonlibmmt_core, #533/#534 export maps unchanged);debian/rulespointsdh_shlibdepsat the core with-l. (4) The tag gate’sdebian/changelogcheck is not added totools/ci/check-release-tag.sh:scripts/validate-release-prep.shalready requires the firstdebian/changelogentry’s upstream version (epoch, revision and+ds/+dfsgremoved) to equalVERSION, on every pull request (version-agreement) and inverify-tag. (5) CI: thedebian-packagejob ofrelease-packages.yml(amd64 and arm64,debian:13pinned intools/ci/base-images.txt) runstools/ci/build-debian-package.sh—dpkg-buildpackage -b,lintian --fail-on error, install, thendebian/tests/installed-consumer— and sits behindpackages-gate; its amd64 leg also builds the byte-reproducible source tarball (tools/ci/build-source-tarball.sh --verify), which thereleasejob publishes beside the packages soSHA256SUMSand the attestation cover it. The Debian.debs themselves are never published. Not resolved here: the licence-provenance blockers ofdebian/license-audit.md, the ITP bug number and theUNRELEASEDdistribution indebian/changelog— #475 stays open for the official-channel submission; #538 and #550 build on this layout. Source:debian/rules,sdk/Makefile(install-fhs),rules/common.mk(#536 block),rules/arch-linux.mk:20-21,scripts/validate-release-prep.sh:75-81,.github/workflows/release-packages.yml(debian-package),tests/installer/run_tests.sh(sections 5b and 7b). -
Q: Issue #527, second tranche — which pending classifiers get cases now, how is a classifier recorded when no genuine flow can reach it, and what happens to the pending checkers issue #540 may move out of the default chains? A: (1) This tranche covers 20 classifiers of services still in use, chosen ahead of the defunct-service checkers:
mmt_check_usenet,mmt_check_http_application_activesync,mmt_check_icecast,mmt_check_shoutcast,mmt_check_ndn_http,mmt_check_dcerpc,mmt_check_afp,mmt_check_citrix,mmt_check_flash,mmt_check_stun_tcp,mmt_check_iax,mmt_check_eclipse_tcf,mmt_check_mqtt,mmt_check_xdmcp_tcp,mmt_check_xdmcp_udp,mmt_check_teamviewer_tcp,mmt_check_teamviewer_udp,mmt_check_steam,mmt_check_worldofwarcraftandmmt_check_xbox(registered on both transports, detected over UDP only); Steam, Xbox and World of Warcraft use legacy signatures, and if #540 moves a covered classifier out of the default chains its cases must name it no longer (the oracle fails on a case naming an unregistered classifier); 68 of 143 are covered and 75 remain pending. Each case is built from the protocol’s specification (or, for proprietary protocols, the published reverse-engineered layout, said so in its review notes) and also meets what the classifier’s code requires; where the two differ only the conformant variant is used, and the difference is written into the case: the SHOUTcast source password must start with123456(proto_shoutcast.c:27), RTMP’s C0+C1 is sent as one 1537-byte PSH segment, because the generator always sets PSH andproto_flash.c:44-63otherwise needs non-PSH partial segments, NDN is detected over UDP only becauseproto_ndn_http.c:218excludes the protocol on the payload-less TCP SYN, and STUN over TCP only with RFC 4571 framing (proto_stun.c:125-126). (2) The MQTT negative is a genuine SOCKS5 greeting on 1883, whose first byte carries the reserved MQTT packet type 0 (proto_mqtt.c:22), so it exercises only that rejection branch; plain text on 1883 stays the known false acceptacc_unknown_mqtt_port. (3) A classifier no genuine flow can reach stays pending, with the cause as its reason, rather than getting a case shaped to the bug:mmt_check_vnc(proto_vnc.c:52) andmmt_check_tpkt(proto_tpkt.c:67) exclude themselves on the TCP handshake,mmt_check_tdsis shadowed bymmt_check_mssqlearlier in the chain, which claims every conformant TDS header (Window 0) off port 102 (proto_mssql.c:41-51), framedmmt_check_rtp_tcpruns only after STUN is detected (proto_rtp.c:822-831) and the pipeline then dispatches the flow tommt_check_stun_tcpalone (src/mmt_core/src/packet_pipeline.c:740-758), its only other route being a defunct Yahoo framing (proto_rtp.c:811-817),mmt_check_spotifyneeds Spotify’s own 78.31.8.0/22 range andmmt_check_direct_download_linkreal hoster names, which the corpus may not carry. (4) F-BUG-311’s list of the 49 defunct checkers is not in the repository, so the remaining “no reviewed case yet” entries are deferred until #540 settles which checkers leave the default chains; an entry #540 removes from the chains must then leave the pending list too (the oracle fails on a pending entry the chains no longer register). Source:tools/phase0/gen_tcpip_pcap.py(ACC_CLASSIFIER_FLOWS),tools/phase0/ci/accuracy/corpus.json,tools/phase0/ci/accuracy/coverage-pending.txt,tools/ci/tests/check-accuracy-corpus.py(check_coverage),tools/ci/tests/test-accuracy-corpus.py. -
Q: Issue #538 — should the Debian/Ubuntu release legs now publish the
debian/FHS packages (libmmt-dpi1,libmmt-dpi-dev) in place of themake deb/opt/mmtpackages, how is the install layout de-duplicated, and how is the source tarball signed when no release key exists yet? A: (1) Not switched, conservatively. Every Debian/Ubuntu distribution of the release matrix (Ubuntu 22.04, 24.04, 26.04, Debian 12, 13; amd64 and arm64, the build matrix’s pinned digests) now runstools/ci/build-debian-package.sh—dpkg-buildpackage -b,lintian --fail-on error, install,debian/tests/installed-consumer— in thedebian-packagejob, which keeps its id (sopackages-gate,releaseandrelease-alertare unchanged) and gains adistromatrix; this supersedes item (5) of the #475 entry above, whose job built ondebian:13only. It stays a separate job, not a step of thebuildlegs, so a slow apt or lintian run cannot push amake debleg past its 60-minute cap. Its.debs are still not published: the release assets,make-release-bootstrap.sh(whose name pattern accepts onlymmt-dpi*_…packages) and the bootstrap installer stay on the upstreammake debpackages, so the bootstrap keeps installing on ubuntu:24.04 and debian:12 exactly as before. Publishing the FHS packages and moving the bootstrap to them changes the installed layout of every bootstrap user (/opt/mmt→/usr/lib/<triplet>) and has nommt-dpi-securitycounterpart (debian/builds no ENABLESEC engines), so it is left to the maintainer as release work; #538 stays open for it. (2)sdk/Makefiledefines the install layout once —MMT_LAYOUT_PLUGINS,MMT_LAYOUT_LIBS(core + plugins) andMMT_LAYOUT_SEC_LIBS— andinstall(dev and SONAME links, plugins), the manifest anduninstalllists (MMT_SONAME_LIBS,MMT_LIB_LINKS,MMT_PLUGIN_FILES),SEC_ENGINES_BUILT, the deb/rpm staging, the rpm%filesandinstall-fhs(FHS_LIBS/FHS_PLUGINS) iterate it. The engines are named literally there becauserules/common.mkdefinesLIBSECURITY/LIBFUZZonly underENABLESEC, whileinstalland the package split test for the engine files at run time: anENABLESEC=1build installed or packaged by a plainmake install/make debmust keep its engine links. AnENABLESEC=1install, an uninstall andmake deb(with and withoutENABLESEC) were compared file by file with the previous Makefile and are identical; the generated rpm spec differs only in trailing whitespace. The installer suite fails on a second hard-coded plugin/engine list (with a negative fixture). (3)debian/watchnow finds the release assetmmt-dpi-<ver>.tar.gzthrough the GitHub releases API (searchmode=plain,repacksuffix=+ds,dversionmangle=auto) instead of GitHub’s unsigned tag archives. No signing key was created:debian/upstream/signing-key.ascand theMMT_RELEASE_SIGNING_KEYsecret must come from the maintainer.tools/ci/sign-source-tarball.shis wired in so it activates once they exist —--check(run byscripts/validate-release-prep.sh) requires the committed key andpgpsigurlmangleindebian/watchtogether; the tag-onlyreleasejob signs every tarball beforeSHA256SUMSand the attestation, verifies the.ascwithgpgvagainst the committed key alone, warns and ships unsigned while neither exists, and fails when only one half (key or secret) is present. Source:sdk/Makefile(MMT_LAYOUT_*,install,--private-prepare-build-dir,rpm,install-fhs),rules/common.mk:225-228,.github/workflows/release-packages.yml(debian-package,release),tools/ci/sign-source-tarball.sh,tools/ci/tests/test-source-signing.sh,debian/watch,debian/README.source,tools/ci/make-release-bootstrap.sh:59-62,tests/installer/run_tests.sh(section 4c). - Q: Issue #550 — how does the RPM recipe build from the source tarball, how does every install route ship
mmt-dpi.pc, and aremake deb/make rpm,tools/ci/shlib-deps.sh,tools/ci/check-package-deps.shand the offline ZIP retired? A: (1)mmt-dpi.spec(repository root) is the distribution recipe, the RPM counterpart ofdebian/:Source0is the reproducible release tarball oftools/ci/build-source-tarball.sh,%build/%installpass one variable set (MMT_LIB=%{_libdir},MMT_INC=%{_includedir}/mmt-dpi,MMT_PLUGINS=%{_libdir}/mmt-dpi/plugins,MMT_EXAMS,GIT_VERSION) tomake -C sdkandmake -C sdk install-fhs, the distribution flags go throughMMT_EXTRA_CFLAGSand an environmentLDFLAGS(a command-lineLDFLAGSwould override the-Wl,-z,defsrules/common-linux.mkadds to libmmt_core),SOURCE_DATE_EPOCHcomes from the%changelog,%checkruns the compiler-only suitesdebian/rulesruns, and the packages aremmt-dpi(libraries, plugins) andmmt-dpi-devel(headers, links,mmt-dpi.pc, examples); no ENABLESEC engine is built (their licence differs, as indebian/). Requires/Provides come from rpm’s own dependency generators. The newrpm-packagejob ofrelease-packages.ymlrunstools/ci/build-rpm-package.shon the four EL images of the build matrix (Rocky 9/10, CentOS Stream 9/10), amd64 and arm64:rpmbuild -ba,rpmlinton the spec, SRPM and RPMs (an error fails; measured 0 errors), install,pkg-configwith noPKG_CONFIG_PATH, then the installed consumer. rpmlint is in EL9’s AppStream but only in EPEL on EL10, so the script installs the distribution’sepel-releasethere. No Fedora leg: the release matrix pins no Fedora image. (2) Not switched, conservatively, as #538 left the Debian side: the spec keeps the Namemmt-dpibecause it is the successor of themake rpmpackage, so the two are alternatives (incompatible layouts, unordered Release fields) and must not be published side by side; the job uploads nothing, since thereleaseandbootstrap-dry-runjobs collect every*.rpmamong the artifacts. Retiringmake deb/make rpm,shlib-deps.shand most ofcheck-package-deps.shmeans switching the published assets and the verified bootstrap (tools/ci/make-release-bootstrap.sh) to thedebian/and spec packages, which is the maintainer’s call; it stays open on #550. (3)mmt-dpi.pccomes from one template insdk/Makefile(mmt_write_pc) written bymake install($(MMT_LIB)/pkgconfig, recorded in the install manifest, removed byuninstall), byinstall-fhsand by themake deb/make rpmstaging, which also ships a/usr/share/pkgconfig/mmt-dpi.pclink so a root-installed package is found withoutPKG_CONFIG_PATH. For the /opt-style routes itsrpathvariable puts-Wl,-rpath,${libdir}inLibs, so a consumer runs withoutLD_LIBRARY_PATH; install-fhs leaves it empty.tools/ci/tests/run-installed-consumer.shnow compiles throughpkg-config --cflags --libs mmt-dpi(the install’s own.pcfirst onPKG_CONFIG_PATH, its libdir/includedir/plugindir checked against the install under test) and drops the rpath on the--root-installleg so that leg still proves the loader cache;pkg-configjoined the release containers’ build dependencies (tools/ci/build-deps.txtrolepkgconfig). The spec’s ownBuildRequires:(gcc, make) is not abuild-deps.txtlist: therpm-packagejob builds the spec in each EL container, which also carries the job’s own tools, so it shows the list suffices there (a minimal-buildroot check such as mock is not run). (4) The offline ZIP is retired: no workflow built or published it (no release carries one), sodist/ZIP/and theziptarget are deleted andinstall.shno longer sourcesdist/ZIP/mmt-install-common.sh— its ownvalidate_mmt_base/prefix_writable, which the installer suite had kept byte-identical to the shared copies, are now the only definitions; the version-agreement check readsmmt-dpi.spec’sVersion:in place of the ZIP fallback. (5)MMT_EXAMPLES_SRCnamedhtml_integration.c,html_integration.handreconstruct_body.c, which do not exist, andgoogle-fr.pcap, which no rule copies (only.cfiles have one) and whose redistribution terms are unrecorded (debian/license-audit.md); it now names exactly thesrc/examples/*.cprograms,mmt_export_info.cincluded (tests/coverage/floor.jsonalready called it installed). Source:mmt-dpi.spec,tools/ci/build-rpm-package.sh,.github/workflows/release-packages.yml(changes,rpm-package,packages-gate,release),sdk/Makefile(mmt_write_pc,install,MMT_LIST_INSTALLED,--private-prepare-build-dir,rpm,install-fhs),rules/common-linux.mk:247,rules/common.mk(MMT_EXAMPLES_SRC),install.sh,tools/ci/tests/run-installed-consumer.sh,tools/ci/build-deps.txt,tools/ci/install-build-deps.sh,scripts/validate-release-prep.sh,tests/installer/run_tests.sh,git ls-files dist. - Q: Issue #542 (F-CLEAN-012) — which
src/mmt_tcpip/lib/protocols/*.cfiles are registration-only stubs, what row form replaces them inproto_init_list.def, and how is the change shown to be fingerprint-neutral? A: A stub is a file whose whole content is the four includes, the empty “PROTOCOL INTERNAL CODE” markers andint init_proto_<x>_struct()callinginit_protocol_struct_for_registration(PROTO_<X>, PROTO_<X>_ALIAS)thenregister_protocol(…, PROTO_<X>). 502 tracked files match that template byte for byte with the names substituted; four more (proto_afreeca.c,proto_free.c,proto_ip_in_ip.c,proto_ctp.c) differ only in trailing whitespace, a missing final newline or one commented-out line, so 506 files went (657 → 151). Every one of them was named by exactly oneMMT_PROTO_INITrow and called from nowhere else, and every alias is the id’s_ALIASmacro (even where the file name differs from the protocol, e.g.proto_lockerz.cregisteredPROTO_LEMONDE); the ids and aliases were read from the files, not derived from the row’s display name. Each such row becameMMT_PROTO_SIMPLE(PROTO_<X>, PROTO_<X>_ALIAS, "<display name>")in place, so the table order — and with it the registration and classifier-chain order — is unchanged. The display name is kept as a third argument (the issue’s sketch was(id, alias)) so the init-failure message andtools/gen-protocol-list.sh, which now reads both row forms, stay byte-identical:docs/PROTOCOLS.mdregenerates unchanged at 650 initializers.configured_protocols.c’sproto_init_table[]gainedid/aliasfields and a row with no init function goes to the file-staticmmt_register_simple_protocol(), the stubs’ body verbatim;mmt_common_internal_include.hexpands the new rows to nothing. The init symbols were already hidden by #534’s-fvisibility=hidden, sonm -Doflibmmt_tcpip.soanddocs/Exported-Symbols.mdare unchanged; the library shrinks from 1,212,328 to 1,097,296 bytes (default profile).mmt_export_infooutput (every protocol and attribute with its id) is identical before and after (670 protocols, 7,450 attributes), and the phase0 classification and precision gates pass against the committed baselines.docs/Add-New-Protocol.md’s lemonde walk-through — itself a stub — now adds aMMT_PROTO_SIMPLErow instead of a file, andtools/ci/test-map.txtdrops its eight entries for deleted tunnel stubs (configured_protocols.cand the list are alreadyfull). Theregistrationfixture oftests/parser_boundaries(test_simple_registration_api.c) expands the list’sMMT_PROTO_SIMPLErows and checks each against the registry afterinit_extraction(). Coverage: every stub was 5 executable lines with 4 hit (only the never-takenelse return 0missed), so deleting them removed 2,530 lines, 2,024 of them hit, from the tcpip family denominator oftools/ci/check-sdk-coverage.sh. A--coveragerun on this branch measured tcpip 64.79% (14,690/22,670), against 66.32% (16,708/25,191) on main on the same aarch64 GCC 13.3 machine, below the 65.2 floor; x86-64 CI main measured 66.32% (16,710/25,196) and projects 64.79% (14,686/22,666) with the stub records removed, so the floor below holds there too. Uncovered tcpip lines fell from 8,483 to 7,980, so nothing that was exercised lost its tests;sdk.family_floors.tcpipis re-baselined to 63.7 (measured minus 1, the rule the floor note states), recorded in the note. Whole SDK (70.36%), the original 30-file cohort (90.35%) and the unit floor (79.9%) still hold. Source:src/mmt_tcpip/lib/proto_init_list.def,src/mmt_tcpip/lib/configured_protocols.c(mmt_register_simple_protocol,init_tcpip_plugin),src/mmt_tcpip/lib/mmt_common_internal_include.h,tools/gen-protocol-list.sh,docs/Add-New-Protocol.md,tools/ci/test-map.txt,tests/parser_boundaries/{run_tests.sh,test_simple_registration_api.c},src/examples/mmt_export_info.c,tests/coverage/floor.json(sdk.family_floors.tcpip),tools/ci/check-sdk-coverage.sh. - Q: Issue #548 (plan task 12.4, F-CLEAN-008 part 2) — how are the remaining over-200-line functions of the security engine, DICOM and NDN split without a behaviour change, what replaces the NAS
CHECK_*DECODERmacros that hidreturn, and what holds the result whiletools/ci/report-function-shape.shstill needs explicit files? A: (1) Each function became a dispatcher overstatichelpers; no exported symbol or prototype changed.store_history(src/mmt_security/tips_report.c:619, was 413 lines at depth 7) writes through thehistory_json_t/history_attr_tcontexts;create_boolean_expression(tips_xml.c:925) keeps the operators and hands constants, attributes and function calls to parsers;compare_values(tips_extract.c:879) dispatches per type family,get_data_from_pcap(tips_extract.c:1296) per operand kind;_extraction_att(src/mmt_dicom/dicom.c:410) per PDU type over adicom_att_ctx_t;ndn_session_data_analysis(src/mmt_tcpip/lib/protocols/ndn.c:2119) per step, andndn_name_components_at_index(ndn.c:639, depth 7) lost a level tondn_name_component_string. Existing quirks are kept (the date GT/GTE year test, the r2 SKIP marking v1, NDN’s leak paths).compare_valueswas 60/168 lines covered, so 49 characterisation checks intests/rule_engine/test_overflow_family.cpin it per type family before the split. (2) The NAS checks arestatic inlinefunctions that only check —nas_check_pduandnas_check_length(src/mmt_mobile/nas/util/decoder.h:121-137) — and each call site returns their negative result itself;CHECK_RESULT_DECODERbecame an explicitif (ret < 0) return ret; decoded += ret;. The log lines stay in two do/while(0) macros expanded at the call site (NAS_LOG_PDU_CHECK,NAS_LOG_IEI_MISMATCH,decoder.h:139-155), becausemmt_log_warnrecords__FILE__/__LINE__and one rate-limit state per expansion (src/mmt_core/private_include/mmt_log.h:87-93): moving them into a header function would have nameddecoder.hin every NAS diagnostic and merged the per-site rate limits (a plan-challenge finding). The operands areint64_t: every argument is evaluated in its own type and converted losslessly, and-Wsign-compareshowed the only mixed comparisons have a non-negative signed side, so every comparison result is unchanged.tests/nas_ies_tailpins the return codes, the unsigned-wrap and negative-remainder cases and the caller file in the log line.RETURN()andCHECK_MESSAGE_TYPE(205 uses) are out of scope. With pinned cppcheck 2.22 thenullPointerRedundantChecksuppression innas_msg.cis no longer needed, so it went with its comment; the ratchet stays 0 in both modes. (3) Theverify-helpersjob runs the shape report in gate mode (≤200 lines, depth ≤6) oversrc/mmt_security/*.c,src/mmt_dicom/*.c,ndn.cand the NAS sources (.github/workflows/c-cpp.yml:600), a blocking step that holds the acceptance criterion until issue #547 re-aims the report at all ofsrc/.tools/ci/function-shape-tips.txtandparam-count-tips.txtwere regenerated. The phase0 classification and precision baselines are unchanged. Source:src/mmt_security/{tips_report,tips_xml,tips_extract}.c,src/mmt_dicom/dicom.c,src/mmt_tcpip/lib/protocols/ndn.c,src/mmt_mobile/nas/util/decoder.h,src/mmt_mobile/nas/{nas_msg.c,util/octet_string.c,ies/*.c,emm/*.c,esm/*.c},tests/rule_engine/test_overflow_family.c,tests/nas_ies_tail/test_nas_ies_tail.c,.github/workflows/c-cpp.yml(verify-helpers),tools/ci/{function-shape-tips,param-count-tips}.txt. - Q: Issue #540 (F-BUG-311, F-DEAD-003/004/005/012) — which classifiers count as defunct-service checkers, how are they taken out of the default chains while staying reachable, and which never-reached paths go?
A: (1) F-BUG-311’s list of 49 registrations is not in the repository (it was an audit artifact, as the #527 entry above notes), so it was reconstructed with one conservative rule: a checker leaves the default chains only when the service or client protocol it matches is unequivocally retired. That gives 38 rows of
src/mmt_tcpip/lib/inter_proto_classif_list.def, 35 functions: TCP —fasttrack,msn_tcp,yahoo_tcp,oscar,filetopia,manolito_tcp,imesh_tcp,mms,pando,tvants_tcp,tvuplayer_tcp,ppstream_tcp,zattoo_tcp,feidian_tcp,i23v5,socrates_tcp,pcanywhere,veohtv_tcp,openft,stealthnet,meebo,aimini_tcp,world_of_kung_fu(23); UDP —msn_udp,yahoo_udp,oscar,manolito_udp,imesh_udp,pando,tvants_udp,tvuplayer_udp,ppstream_udp,zattoo_udp,feidian_udp,socrates_udp,pcanywhere,veohtv_udp,aimini_udp(15) (eachmmt_check_prefixed);zattoo_*match Zattoo’s retired P2P client protocol, not its current streaming service. A first cut also took 11 rows (9 functions) of borderline services; review moved them back to the default chains, in place, because disabling still-live protocols by default would be a recall loss on real traffic: Gnutella (gnutella, TCP and UDP — the decentralized network still runs and gtk-gnutella is maintained), NetEase POPO (popo, TCP and UDP — still offered as an enterprise IM), SopCast (sopcast_tcp,sopcast_udp— its P2P network still carries live streams), Kontiki (kontiki— the technology continues as Kollective’s enterprise ECDN), PPLive/PPTV (pplive_tcp,pplive_udp— PPTV still operates), WinMX (winmx— a community-run peer network is still online) and AppleJuice (applejuice— community clients and servers are still distributed). Checkers of services still operated stay in the default chains even where their signature is old: eDonkey, DirectConnect, Soulseek, Gadu-Gadu, QQ, Thunder, Second Life and the games (Warcraft III, Florensia, MapleStory, Dofus, Fiesta, CrossFire, Guild Wars, Half-Life 2, Quake, Battlefield, Armagetron), as do Steam, Xbox and World of Warcraft, which have accuracy-corpus cases. (2) Mechanism: the rows becomeMMT_INTER_PROTO_LEGACY(parent, fn, weight)in place, so registration order and weights — and with them the chain order under the legacy profile — are unchanged.init_tcpip_plugin()registers them as before and then marks their chain node (mmt_classify_proto_t.legacy) throughmmt_classifier_mark_legacy(), a static inline of the privatepacket_processing.h, so libmmt_core gains no export (the exported-symbol list, the API contracts and the ABI diff are unchanged).proto_packet_classify_next()skips a legacy node unless the handler’s newlegacy_classifylever is set; a skipped node is not counted as a checker call. (3) The lever has no field in the publicmmt_dpi_profile_t(adding one would change the struct a caller builds by value): it is set only by named profiles — the predefinedlegacyprofile (thedefaultlevers plus the lever;MMT_DPI_PROFILE=legacyworks too) and a custom profile with an optional sixth column of 1 — whilemmt_apply_dpi_profile()with any struct, and every other named profile, clears it, so each application fully determines the handler’s levers. (4) MSN no longer re-inspects flows already classified SSL (thePROTO_SSLbranches ofmmt_search_msn_tcp(), the entry condition ofmmt_check_msn_tcp()and the SSL bit of its detection mask go, and with them the unusedmsn_ssl_ftflow bit-field). (5) Never-reached paths deleted:init_http_proto_struct()(nothing registered it;proto_http.cowns HTTP) and the undefinedinit_http_proto_struct_new()declaration, the three#ifdef PROTO_WINDOWS_UPDATEblocks ofhttp.c(the macro is defined nowhere) andtcp_seg_new()(no caller; reassembly carves segments from the segment store or the flow arena). The legacy HTTP session parserinit_http_proto_struct()used to register (http_session_data_analysis()and its helpers) is still pinned by three phase0 harnesses (http_session,http_method_classification,http_scanner) and is left for a follow-up, as are the always-true#ifdef PROTO_*guards (192 at this commit;PROTO_WINDOWS_UPDATEwas the only guard macro left undefined) and the test-only hostname matchers the issue mentions, which no acceptance criterion names. (6) Classification impact: the CI golden fingerprint (tools/phase0/ci/baseline/classification.txt) and the precision/recall baseline (precision.txt) are unchanged — none of their flows was won by a legacy checker — so neither baseline is regenerated. Over the full mmt-test golden set (tools/phase0/golden_pcaps.txt) the fingerprint is also unchanged; on the throughput captures,smallFlows.pcapmoves 296 packets of genuine 2010-era MSN Messenger sessions (port 1863) fromtcp.msntotcp.unknown, andbigFlows.pcapmoves 20 packets of Yahoo Messenger YMSG keep-alives (port 5050) fromtcp.yahoototcp.unknown(its other 841tcp.yahoopackets are Yahoo web traffic attributed by hostname, which stays); underMMT_DPI_PROFILE=legacyevery capture classifies exactly as on main. (7) Tests: thedpi_profilessuite pins the profile (by name, environment and file column, and thatfullleaves the lever off), the walk gate and the marker on a fake chain; theclassifyfixture ofparser_boundariesreplays the 8 cases of defunct-service protocols twice — not classified by a default handler, classified by alegacyone — against the real plugin; the accuracy oracle drops the 35 functions fromcoverage-pending.txt(its chain parser never matchedMMT_INTER_PROTO_LEGACY, now said so and self-tested), and the 33 remaining entries deferred to #540 (the 9 functions moved back among them) now say the checker stays in the default chains. Source:src/mmt_tcpip/lib/inter_proto_classif_list.def,src/mmt_tcpip/lib/configured_protocols.c(init_tcpip_plugin),src/mmt_core/private_include/packet_processing.h(mmt_classify_proto_struct,mmt_classifier_mark_legacy,legacy_classify),src/mmt_core/src/packet_pipeline.c(proto_packet_classify_next),src/mmt_core/src/dpi_profiles.c,src/mmt_tcpip/lib/protocols/{proto_msn.c,http.c,http.h,tcp_segment.c},src/mmt_tcpip/lib/tcp_segment.h,tests/dpi_profiles/test_dpi_profiles.c,tests/parser_boundaries/test_tcpip_classify_api.c,tools/phase0/ci/accuracy/coverage-pending.txt,tools/ci/tests/{check,test}-accuracy-corpus.py,docs/DPI-Profiles.md.
2026-10-30
-
Q: Issue #547 (plan task 12.3, F-CLEAN-008 part 1, F-CLEAN-018) — how are the over-200-line functions of
src/mmt_tcpipsplit without a classification change, why is the direct-download host list not moved intodoted_host_names, and what holds the result over all ofsrc/? A: (1) At 8fa3a816, 14src/mmt_tcpipfunctions were over 200 lines (ndn_session_data_analysiswas already split by #548). Three were data, not logic:get_application_class_by_protocol_id(656-line switch) reads the designated-initializer tableapplication_class_by_protocol_id[PROTO_MAX_IDENTIFIER]inmmt_tcpip_classes.c(an id outside the table, or unlisted, isPROTO_CLASS_UNKOWNas the switch’sdefaultwas; old and new agree for every id from -50 to 4,999);mmt_http_init_detection_bitmasklost its 380-linehttp_detected_protocolslist to file scope inhttp.c;search_ddl_domains(proto_direct_download_link.c) keeps its GET/POST, length, request-line and:portpreconditions and replaces the generated suffix trie withddl_host_suffixes(76 rows, one per accepting branch, in the trie’s order) and the matcherddl_host_matches(): a row matches when the host ends with it and the byte before it is ‘ ‘ or ‘.’, which is the test every accepting branch made. Parsing the trie gave the rows; a differential harness ran the old trie and the new matcher on 3.2M hosts (every suffix of every row, one-byte mutations and deletions, cross-row concatenations under 10 prefixes, and random strings over the trie alphabet) under ASan/UBSan with no difference. The issue’s sketch was to move the hosts intodoted_host_names; that is a different mechanism (the hostname trie ofmmt_tcpip_classif_utils.c, run at another point of the chain, with its own exact/suffix rules), so it would change which flows become DDL and when — rejected as not fingerprint-neutral. The other 11 functions (mmt_search_msn_tcp,mmt_int_search_bittorrent_tcp_zero,mmt_classify_gnutella,mmt_check_pplive_tcp,mmt_classify_imap,_extraction_int_report_att,_mmt_parse_packet_line_info,mmt_search_yahoo_tcp,mmt_search_gadugadu_tcp,mmt_classify_jabber_tcp,mmt_check_netbios_udp) became dispatchers overstaticstage helpers whose moved text is unchanged apart from indentation; each file states its convention for the formerreturn;/gotoexits (a file-local enum or the original return value with 0 as fall-through), and quirks are kept (MSN’s duplicated “asym (1)” block runs twice on a first packet as before). No exported symbol or prototype changed. (2)tools/ci/report-function-shape.shandtools/ci/report-param-count.shtake an optional FILE list: without one they cover every trackedsrc/C source except generated asn1c (src/mmt_mobile/asn1c/) andtools/ci/vendor-paths.txt, and gate (≤200 lines, depth ≤6; ≤6 parameters) againsttools/ci/function-shape-ratchet.txt(6 depth-only rows) andtools/ci/param-count-ratchet.txt(3 rows). A recorded function passes at no more lines/depth/parameters than its row; an unrecorded or grown offender fails, and so does a row whose function is within the limits or gone, or that records more than today’s measure, so a fix must delete or tighten its row in the same change (stricter than the count ratchet oflint-commented-code.sh, which only notes a drop: a per-function row left loose would re-allow the regression). A row of a file outside an explicit FILE list stays dormant; same-named functions of one file share a row.--emit-ratchetprints the rows. Theverify-helpersstep of.github/workflows/c-cpp.ymlthat #548 scoped to the engine, DICOM, NDN and NAS sources now runs both scripts with no argument, and the advisoryproto_irc.cshape entry went (the src/-wide gate covers it).tools/ci/classify-changes.shdoes not read the two ratchet files as references — they namesrc/functions as data, like the test map, and verify-helpers runs the gate on every tier — so a source they name keeps its family tier instead of turning a pull requestfull. Scope is.csources: thestatic inlinebodies ofsrc/headers are not measured.tools/ci/tests/test-shape-ratchet.sh, run by therelease_gatessuite, pins the modes on a fixture repository. (3) Verified:report-function-shape.sh --report-onlyshows nosrc/mmt_tcpipfunction over 200 lines; the default build is green with the same warnings; every tracked pcap (195) classifies identically to main under the default and thelegacyprofile; the phase0 classification and precision gates pass against the unchanged baselines; the split IMAP/Jabber/NetBIOS/INT functions were also run side by side with the HEAD copies on generated packet sequences with identical state and output. Source:src/mmt_tcpip/lib/mmt_tcpip_classes.c,src/mmt_tcpip/lib/mmt_tcpip_utils.c,src/mmt_tcpip/lib/protocols/{http.c,proto_direct_download_link.c,proto_msn.c,proto_yahoo.c,proto_gadugadu.c,proto_bittorrent.c,proto_gnutella.c,proto_pplive.c,proto_imap.c,proto_jabber.c,proto_netbios.c,proto_int.c},tools/ci/{report-function-shape.sh,report-param-count.sh,function-shape-ratchet.txt,param-count-ratchet.txt},tools/ci/tests/test-shape-ratchet.sh,tests/release_gates/run_tests.sh,.github/workflows/c-cpp.yml(verify-helpers),docs/Add-New-Protocol.md. -
Q: Issue #541 (11.2, F-DEAD-007/006/018) — how is section-level reachability measured so
--gc-sectionsstops hiding dead code, which unreachable code is deleted and which stays, what becomes of the “never wired” HTTP/2 packet-modification API, and which public functions are deprecated when the external consumers (mmt-probe, mmt-security, 5Greplay) cannot be asked? A: (1) Probe:tools/ci/report-unreachable-sections.shcopies the working tree to a temporary directory, builds the default SDK there withDEBUG=1(-O0),MMT_EXTRA_CFLAGS=-ffunction-sections -fdata-sectionsandLDFLAGS=-Wl,--gc-sections -Wl,--print-gc-sections, and attributes each removed section to its tracked source. -O0 is deliberate: the release -O3 inlines hidden globals into their callers, so a non-LTO -O3 probe reported 322 handwritten sections, out-of-line copies of functions the source still calls (ip_dgram_init,init_sctp_proto_struct, …), while -O0 reported 172, the audit’s figure. Since #533/#534 the MMTAPI exports are the only GC roots, so every reported section is non-public (checked: none of the 839 removed.textnames is innm -Dof the built libraries). Generated asn1c and vendored sources are out of scope, and so are anonymous sections and function-local statics. The ENABLESEC engines (default visibility) and the business_app and DICOM plugins report nothing. What remains is gated againsttools/ci/unreachable-sections-allowlist.txt, which has 79 rows: 62test(counters, seeds, dumps and code under test that unit suites or phase0 harnesses reach through the static archives, plus their static helpers, e.g.mmt_caplen_guard_*,tcp_seg_reassembly,http_session_data_analysisand its parser), 8consumer(the HTTP/2 rewrite path below), 3config(the_aper_*codec contexts used only underBUILD=asan, anddummy_estimation()used only without_MMT_BUILD_SDK), 5generated(ASN__STACK_OVERFLOW_CHECKfromasn_internal.h) and 1folded(MMT_ARENA_HDR). AC1’s “0 unreachable non-public sections” is therefore read as 0 outside the allowlist: those rows stay because something outside the shared libraries reaches them, and the tool prints the allowlisted count beside the 0. The gate also fails on a stale row. It runs as a blockingverify-helpersstep, and it was measured both locally and in the digest-pinnedubuntu:24.04image withCI=true(GCC 13.3, GNU ld 2.42, the runner’s toolchain): the same 79 rows. The temporary copy has no.git, so the probe passesGIT_VERSIONandSOURCE_DATE_EPOCHexplicitly, which keeps the no-git-history guard ofrules/common.mkquiet underCI=true. (2) Deleted: 71 hidden functions and 8 data tables with no reference insrc/(every#ifdefbranch),tests/,tools/orsrc/examples/, with their private prototypes. Code that a kept function still calls stays, even when the shared library never reaches it (ignore_starting_crlf,is_space_or_htaband the HTTP header parser under the harness-reachedhttp_session_data_analysis). A repository-wide grep of each deleted name is empty, apart from the ratchet row of_mmt_check_for_email_address, which is removed too. The default,ENABLESEC=1,SHOWLOG=1,NDEBUG=1andBUILD=asanbuilds are green with the warnings unchanged, no library gains an undefined symbol, and the phase0 harnesses, which link the static archives, pass. (3) F-DEAD-006 is refuted by the consumer check: 5Greplay (src/forward/forward_packet.c:244,267) declaresextern int update_http2_data(...)and calls it next toupdate_ngap_data, and it links-l:libmmt_tcpip.ain both of its build modes (itsMakefile,LIBS). The HTTP/2 rewrite path (update_http2_data,modify_get,inject_http2_packet,update_stream_id,update_window_update,fuzz_payload,restore_http2_packet,http2_can_write) is therefore wired, just not from the shared library, so it stays. It stays hidden too: the static archive is unaffected by visibility, so #534 did not break 5Greplay and no export is added. Its rows carry theconsumertag, and it is not deprecated, since it has a caller. (4) F-DEAD-018: the audit’s list of 28 was not committed, so the criterion is recorded instead. A public function is deprecated when it is an MMTAPI declaration of an installedlibmmt_coreheader with no caller insrc/orsrc/examples/, no mention indocs/*.mdorREADME.md(Exported-Symbols.mdand this file excepted), no use in the publicmainbranches of mmt-probe (982dd09, 2026-07-20), mmt-security (c6d154c, 2026-07-20) or 5Greplay (ac4e28d, 2025-11-20), or in the local mmt-probe and mmt-security checkouts, and is not a 2026 addition (disable_port_classify_payload_confirm,set_tcp_reassembly_limit). Tests do not count, sincetest_api_contracts.ccalls every export. 30 functions qualify; they get__attribute__((deprecated("no known caller (issue #541); removal in 2.0.0"))). The threemmt_utils.hfunctions already deprecated for their_nvariants (str_hex2int,str_sub,str_get_indexes) now name 2.0.0 too. No SDK source calls any of them, so the build gains no warning. Pending: the check could read only public code, so the maintainers of mmt-probe, mmt-security and 5Greplay still have to confirm that their private or unpublished code does not use these 33 functions. The 2.0.0 removal waits for that confirmation, and a function a consumer reports as used gets its deprecation dropped. Source:tools/ci/report-unreachable-sections.sh,tools/ci/unreachable-sections-allowlist.txt,tools/ci/tests/test-unreachable-sections.sh,tests/release_gates/run_tests.sh,.github/workflows/c-cpp.yml(verify-helpers),src/mmt_tcpip/lib/protocols/http2.c(update_http2_data), 5GreplayMakefileandsrc/forward/forward_packet.c,src/mmt_core/public_include/{extraction_lib.h,data_defs.h,mmt_core.h,mmt_utils.h},docs/Exported-Symbols.md(#541 note),CHANGELOG.md(2.0.0 removals). -
Q: Issue #554 (13.5, M3 part 3) — after the P3 refactors, what do the unit cohort and the whole SDK measure, which tests close the gap to the M3 targets (unit ≥ 81.9%, whole SDK ≥ 71.02%), and how is “every family floor ratcheted” read when measured minus 1 would lower a floor? A: (1) Measured on
mainat f1230d6d (aarch64, GCC 13.3,bash tests/run_all_tests.sh --coveragethenbash tools/ci/check-sdk-coverage.sh): unit 81.5% (7,222/8,862 lines, 47 files), whole SDK 71.46% (21,020/29,414); the x86-64coveragejob of the same commit (run 40991884631,unit-suite-coverageartifact) measured unit 81.3% (7,204/8,862), whole SDK 71.46% (21,024/29,420). The whole-SDK target already held, the unit one did not. (2) Rankingtests/coverage/coverage.infoby uncovered lines putsrc/mmt_tcpip/lib/protocols/ip_session_id_management.csecond (251 of 295 lines unhit: only the IPv6 interning theresource_boundsipv6-hash fixture drives ran).tests/core_engine/test_ip_session_ids.cincludes it (theipv6_addr_fns.cconvention) and links the suite’shash_utils.oandmemory.o;-Wl,--wraponmalloc,mmt_malloc,mmt_free,insert_key_valueandinsert_session_into_protocol_contextfails each allocation and insertget_session()makes, and counts id allocations so each test asserts what it created was freed. It asserts the IPv4 address store (comparator/hash agreement, misaligned keys of issue #57, cleanup and NULL contexts), the IPv4 and IPv6 session lifecycle (interned key ids, same key returns the same session, shared ids reference-counted,free_session_data()unlinking head, middle and tail of an expiry list and freeing an id with its last session), every rollback path of issue #201 (session allocation, id-map insert, lower and higher id allocation, session-map insert) for both IP versions and the seven per-protocol counters — 90 checks, also underSANITIZE=asanandtsan. The file went from 44 to 295 of 295 hit lines; re-measured on aarch64: unit 84.35% (7,475/8,862), whole SDK 71.66% (21,081/29,414), core 93.44%, tcpip 66.14%, mobile 74.92%, business_app 89.82%, dicom 89.7%, security_fuzz 75.24%; 0 uncovered runs longer than 10 lines. (3) Floors are min(aarch64, x86-64) minus 1 rounded down to 0.1 (the #524 rule; the 1-point margin covers gcc-version and architecture attribution differences). The x86-64 side is the f1230d6d CI measurement plus the lines the new test adds (253 unit, about 60 tcpip), a projection, not a run: unit 84.14%, whole SDK about 71.66%, tcpip about 66.13%. Result:library_line_pct73.7 → 83.1,instrumented_files42 → 47,whole_sdk_line_pct64.5 → 70.6, core 85.3 → 92.4, tcpip 63.7 → 65.1, dicom 88.1 → 88.7, security_fuzz 70.4 → 74.1 (x86-64 75.11). Mobile (74.92 − 1 = 73.9 < 74.3) and business_app (89.82 − 1 = 88.8, unchanged) keep their floors: a floor is never lowered, so “every family floor ratcheted” is read as max(committed, measured − 1). Theoriginal_cohortfloor stays 82.9, the audit figure it pins. (4) The rollback test found thatget_session()raises both id counts before the session-map insert and, on its failure, frees the new ids but leaves a pre-existing id’s count one too high, so that id is never released; the issue is coverage, so the source is not changed here — the check asserts the NULL return and the freed new id only, and the fix is #707. Source:tests/core_engine/test_ip_session_ids.c,tests/core_engine/run_tests.sh,src/mmt_tcpip/lib/protocols/ip_session_id_management.c(get_session),tests/coverage/floor.json,tools/ci/check-coverage-floor.sh,tools/ci/check-sdk-coverage.sh,docs/AGENT_ENVIRONMENT.md§3. -
Q: Issue #503 (plan task 3.5, F-BUG-005/F-BUG-006/F-BUG-208) —
load_plugins()dlopen()ed every*.soof a CWD-relativeplugins/(withRTLD_GLOBAL, running its constructor andinit_proto()) before the compiled-in directory, ignored everyload_plugin()/init_proto()result, and the mobile and business-appinit_proto()calledexit(0)on failure. Where may plugins come from now, how does a failure surface, and what replaces the CWD lookup for callers that relied on it? A: Plugins load only fromPLUGINS_REPOSITORY_OPT—$(MMT_PLUGINS), i.e.$(MMT_BASE)/plugins, baked in byrules/common.mk:630— or, when the environment variableMMT_DPI_PLUGINS_DIRis set and non-empty, from that directory; thePLUGINS_REPOSITORY "plugins"macro is gone and the working directory is never scanned (src/mmt_core/src/plugins_engine.c:48-60). The override is the replacement for a relocated plugin set (an environment variable rather than a new public API, so no exported symbol is added; the name follows the existingMMT_DPI_*variables). It is read withsecure_getenv(), so a setuid/setgid host ignores it, and it must be absolute: a relative value would bring the CWD lookup back, so it fails the load. A set override that cannot be read also fails, while a missing compiled-in directory still means “run without protocol plugins” (success), as before, for core-only use such as thecore_enginesuite. Failures propagate:load_plugin()returns 0 wheninit_proto()returns 0 or a negative value (init_dicom_proto_struct()returns -1),load_plugins()stops at the first plugin that fails to load or initialise (the remaining directory entries are only freed), andinit_extraction()now checksinit_plugins()and returns false (src/mmt_core/src/packet_registry.c:658). A plugin whoseinit_proto()failed stays on the handler list soclose_plugins()still runs itscleanup_proto()anddlclose()s it — protocols it registered may hold its function pointers. The fourexit(0)calls ininit_mobile_plugin()and the one in the business-appinit_proto()return 0 instead (the remaining engineexit()calls are task 5.4). Kept deliberately:RTLD_GLOBAL(the mobile and DICOM plugins resolve tcpip/core symbols through the global scope, and the issue’s threat is the CWD path, not the flag) and the alphabetical load order that loadslibmmt_tcpip.sobefore the plugins that classify over its protocols. Tests: the installed-consumer driver now replays the first fixture from a directory holding aplugins/evil.sowhose constructor creates a sentinel file (tools/ci/tests/hostile_plugin.c) and fails if the sentinel exists — so every release package row runs it too; thefault_injectionengine leg addstest_fi_plugin_init.cwith a stub plugin (fi_plugin.c) whoseinit_proto()fails or is missing, a relative and a missing override, and a failing./pluginsthat must be ignored. The source-compiledcore_engineanddpi_profilessuites now run withMMT_DPI_PLUGINS_DIRset to an empty scratch directory: theirplugins_engine.cis built without-DPLUGINS_REPOSITORY_OPT, so it defaulted to/opt/mmt/plugins— on a host with an install there, those plugins fail to resolve core symbols against the static test binary, a failure that used to be ignored and now failsinit_extraction(). Scripts and docs that ran consumers from the install prefix “for the relative plugins lookup” keep working, because the prefix they install into is the compiled-in directory; the statements above that describe the CWD-relative lookup (the #374 entry,tools/phase0/README.md,docs/USER_GUIDE.md§3) record the old behaviour and were superseded where they are not append-only. No CHANGELOG line: the topmost section is the released 1.9.1 andscripts/validate-release-prep.shties it toVERSION(as for #494 and #496). Source:src/mmt_core/src/plugins_engine.c,src/mmt_core/private_include/plugins_engine.h,src/mmt_core/src/packet_registry.c(init_plugins,init_extraction),src/mmt_mobile/mmt_mobile_plugin.c,src/mmt_business_app/mmt_business_app.c,tools/ci/tests/run-installed-consumer.sh(step 4),tools/ci/tests/hostile_plugin.c,tests/fault_injection/{run_tests.sh,test_fi_plugin_init.c,fi_plugin.c},tests/core_engine/run_tests.sh,tests/dpi_profiles/run_tests.sh,docs/USER_GUIDE.md§3,docs/AGENT_ENVIRONMENT.md§4,tests/docs_lifecycle/run_tests.sh. -
Q: Issue #675 — after #533, the optional STATIC_LINK mode of 5Greplay and NetworkFuzzer (
-Wl,--export-dynamic ... -l:libmmt_core.a -l:libmmt_tcpip.so -l:libmmt_tmobile.a ... -l:libmmt_tcpip.a, theirMakefile:37-43) no longer links onhex2intandstr_get_indexes_n. Export the helpers or move them into the tcpip plugin? A: (1) Reproduced onmainat fcb5964c (aarch64, GCC 13.3, binutils 2.42) with a consumer that calls onlyinit_extraction(),mmt_init_handler(),mmt_close_handler()andclose_extraction(), linked in that order with--no-as-needed: ld reportslibmmt_tcpip.so: undefined referencetohex2int,str_get_indexes_n,str_hex2str,str_sub_n,str_combineandstr_copy. Linked with Ubuntu’s default--as-needed(the consumer references nothinglibmmt_tcpip.soexports since #534, so it is dropped) the link succeeds, but the run fails: the dlopen()edlibmmt_tcpip.soandlibmmt_tmobile.sostop onundefined symbol: str_hex2str/mmt_log_write. (2) Cause: all eight are MMTAPI and exported, so the export list is not what is missing. A static consumer holds only thelibmmt_core.amembers its own references pull, and no core object calls these functions — only the plugins do (mmt_utils.ofor libmmt_tcpip,mmt_log.o’smmt_log_event/mmt_log_writefor libmmt_tmobile, since #545) — so neither member is in the executable the plugins bind to. 5Greplay’ssrc/main.c:19-22callsstr_hex2str(NULL, 0, 0)for exactly this reason, which pullsmmt_utils.obut notmmt_log.o. Why the reported pair alone was missing was not established; the downstream builds were not run here (they need staticlibsctp/liblzma, which this host lacks). (3) Fix: keep the core functions exported, on purpose, and reference them fromsrc/mmt_core/src/mmt_init.c, whosepackage_dependent_init()everyinit_extraction()calls: ausedtable of their addresses, so every static consumer pulls both members. The table is compiled only under_MMT_BUILD_SDK, because the core_engine, dpi_profiles and resource_bounds suites compilemmt_init.cbeside a core subset withoutmmt_utils.c/mmt_log.c; it is a section the shared library’s--gc-sectionsdrops, sotools/ci/unreachable-sections-allowlist.txtlists it asconsumer. No export, ABI or classification changed. (4) Rejected: tcpip-private copies of the two helpers (the issue’s second option) — it fixes two of the eight symbols, leaves libmmt_tmobile’s logger imports, and duplicates public API that stays until 2.0.0; a documented link recipe for the downstream Makefiles — it moves the fix to two repositories and breaks again on the next plugin import. (5) Check:tools/ci/check-static-link.sh PREFIXlinks the consumer above in the downstream order with--no-as-neededand the archive’s profile flags, requires every core symbol aPREFIX/plugins/*.soimports to be in the executable’s dynamic symbol table, and runs it from an empty directory (the engine scans./pluginsfirst); theinstallersuite runs it against its installed SDK, so the unit-tests and sanitizer jobs run it. Red before the fix (the six undefined references), green after. Source:src/mmt_core/src/mmt_init.c,src/mmt_core/src/packet_registry.c(init_extraction),tools/ci/check-static-link.sh,tests/installer/run_tests.sh(section 6b),tools/ci/unreachable-sections-allowlist.txt,docs/Exported-Symbols.md, 5GreplayMakefile:37-43andsrc/main.c:19-22. -
Q: Issue #555 (plan task 14.1, F-PERF-010) — what does the fetch-all benchmark mode fetch, where does the CI instruction-count gate run, and which numbers does
tools/phase0/baseline/perf/throughput.txtrecord when this host does not reproduce the audit’s 3,106,798 pps / 21,428 KiB? A: Fetch-all (PHASE0_MODE=all) registers every attribute of every registered protocol (7,450 on this tree) and its packet handler fetches, for each layer of the packet’s protocol path, every attribute of that layer’s protocol withget_attribute_extracted_data_at_index()(tools/phase0/phase0_throughput.c,read_all_cb). Fetching all 7,450 for every packet measured 19,559 ns/pkt on bigFlows — almost all of it misses for protocols absent from the packet — while the per-layer fetch measures 1,780 ns/pkt, against the audit’s 1,704 ns/pkt the dependent issues (#556, #584) measure against; so the per-layer fetch is the audited workload. The gate counts instructions, not time: callgrind with--collect-atstart=noand the replay bracketed byCALLGRIND_TOGGLE_COLLECTclient requests (--toggle-collect=<function>was tried first and on aarch64 kept counting past the function’s return, intoclose_extraction()); withMMT_DETERMINISTIC_SEED=1a pcap’s count repeats within a few tens of instructions (the residue moves with the environment and paths, through stack alignment), so the gate relies on its tolerance, not on exact equality. Counts depend on the architecture, so the baseline is measured on this aarch64 Ubuntu 24.04 / GCC 13.3 host and theinstruction-gatejob runs onubuntu-24.04-arm; the tolerance is +2 % per mode, an improvement past it passes and asks for the baseline to be ratcheted, and another architecture exits 2. The perf file records what this host measured at 200 iterations (bigFlows bare 3,461,380 pps, library RSS 33,148 KiB) and quotes the audit’s figures in its header as the M4 reference:library_rss_kibis the peak over every iteration and grows with the iteration count (22,128 KiB at 40 iterations, the post-close RSS staying near 20 MB), so the 21,428 KiB figure is not reproduced at 200 iterations and is left for #584 to settle. Source:tools/phase0/phase0_throughput.c,tools/phase0/ci/check_instructions.sh,tools/phase0/ci/baseline/instructions.txt,tools/phase0/capture_perf.sh,tools/phase0/baseline/perf/throughput.txt,tools/phase0/tests/run_throughput_attrs_test.sh,.github/workflows/phase0-baseline.yml(instruction-gate),tools/phase0/README.md.
2026-10-31
- Q: Issues #559 (plan task 14.5, F-DOCS-010/011/012) and #578 (plan task 18.4, F-UX-010..013) — the heuristics catalogue’s 14
file:linelinks had drifted,docs/PROTOCOLS.mdclaimed 650 initializers, and the landing page carried claims nothing measured (“track sessions at line rate”, “5+ Linux distros”, “+ 640 more”, “drop it in — no changes to the core engine”). Which number is right, which claims are linked and which reworded, and how is drift caught next time? A: (1)tools/gen-protocol-list.shmatchedMMT_PROTO_INIT(/MMT_PROTO_SIMPLE(anywhere insrc/mmt_tcpip/lib/proto_init_list.def, so the header comment’s two example rows (proto_init_list.def:7,10) were listed as a protocol nameddisplay_name— since #148 (6545f3bd), so the 649 quoted in the #248 entry above was 648 real rows and #262’s “649→650” was 649 real rows. The pattern is now anchored at line start; the list has 649 rows (grep -cE '^MMT_PROTO_(INIT|SIMPLE)\(' proto_init_list.def), all distinct, anddocs/PROTOCOLS.mdis regenerated at 649. (2) The headline 670 is a different metric and stays: the run-time total of every installed plugin, whichtools/ci/check-runtime-protocol-count.shmeasures in CI (c-cpp.yml:811) and printed670 protocols, 7450 attribute registrationsagainst a build of this branch installed into a scratch prefix.PROTOCOLS.mdnow says so, and the chip that opens it is worded from the listing it opens: “All 649 TCP/IP-plugin protocols”.tools/ci/check-protocol-count.shgains checks 6–7 — the committed listing equals a fresh generator run and its count equals the list’s rows, and the chip quotes that count. That helper also had a stale premise: since #503 the loader never scans the working directory (src/mmt_core/src/plugins_engine.c,plugins_directory), socheck-runtime-protocol-count.sh’s stagedplugins/was ignored and the count came from the compiled-in directory; it now passes the staged directory throughMMT_DPI_PLUGINS_DIR. (3) Catalogue: every entry re-cited to the current line and its status re-verified. H1’sbest_effortTODO was answered by the DPI profiles (#87) but no confidence score exists (plugin_defs.h:129); H4’s TCP/UDP asymmetry is gone since #99 (proto_tcp.c:982,1113); H5’s gate is always taken on UDP, sincemmt_connection_trackingclears the field per packet (mmt_tcpip_plugin_internal.h:318) and only the TCP sequence check sets it (:440); H7’s return became the namedMMT_CLASSIFY_SKIPverdict (#150); H8 is resolved — #330 kept thememsetwith its justification (proto_tcp.c:942-945,1060-1063). Citations staypath:line(the AGENTS.md convention) andscripts/validate-doc-drift.shguards them with one needle list per entry and file: a link must land on a line holding a needle and each needle must be hit, so moving code needs only the doc’s line numbers updated while changing the cited code fails the requireddoc-validatorsjob. (4)docs/Add-New-Protocol.mdalready used the row form (#542); it now states both forms as the list’s header comment does and says to regenerate the listing and the chip. (5) Landing page: “line rate” is reworded to “track per-flow sessions” in both meta descriptions — meta tags carry no link, and no benchmark measures a line rate. The measured figure it stood for goes in the “What exactly is MMT-DPI?” FAQ, linked to the #555 benchmark (PR #712, merged into this branch): the committed replay referencetools/phase0/baseline/perf/throughput.txt(bigFlows.pcap 3,461,380 pps bare, 3,009,605 pps with eight attributes, one thread —phase0_throughput.cstarts none — on one aarch64 host) and theinstruction-gatejob of.github/workflows/phase0-baseline.yml, which fails a rise of more than 2% in instructions per packet (tools/phase0/ci/check_instructions.sh,INSTR_TOLERANCE_PCT). The pps figures are a same-host measurement, so the FAQ names the host; wall-clock pps is not gated in CI, the instruction count is. The distro stat becomes “6 Linux distros smoke-tested”, the number of distinct distributions on thesupportedtier of.github/workflows/install-smoke.yml(Ubuntu, Debian, Rocky Linux, CentOS Stream, Fedora, openSUSE; seven legs, Ubuntu twice), and it and the platform FAQ link that workflow. The plugin FAQ now names both routes, neither of which editssrc/mmt_core: a row in the bundled TCP/IP plugin (the guide’s walk-through, which rebuilds that plugin) or an own shared library exportinginit_proto()(PLUGIN_INIT_FUNCTION_NAME,plugins_engine.h:29), loaded from the plugins directory orMMT_DPI_PLUGINS_DIR(PLUGINS_DIR_ENV,plugins_engine.h:27; stub plugins loaded that way are exercised bytests/fault_injection/run_tests.sh). The validator checks each of these against its source. Source:tools/gen-protocol-list.sh,src/mmt_tcpip/lib/proto_init_list.def,docs/PROTOCOLS.md,tools/ci/check-protocol-count.sh,tools/ci/check-runtime-protocol-count.sh,docs/Phase2-Heuristics.md,docs/Add-New-Protocol.md,docs/index.html,.github/workflows/install-smoke.yml,src/mmt_core/private_include/plugins_engine.h,src/mmt_core/src/plugins_engine.c,tools/phase0/baseline/perf/throughput.txt,tools/phase0/ci/check_instructions.sh,.github/workflows/phase0-baseline.yml,scripts/validate-doc-drift.sh. - Q: Issue #566 (plan task 16.2, F-BUG-310) — where does the hostname-suffix table live, how is it updated, and which labels replace the livemail mapping #82 gave the Microsoft 365 suffixes?
A: The source is
data/hostnames.txt, one<suffix> <PROTO_ID>line per entry under a# version: YYYY-MM-DDheader (the date of the last change is the version);tools/gen-hostname-table.pygeneratessrc/mmt_tcpip/lib/mmt_tcpip_classif_doted_host_names.incfrom it, computing the lengths the hand-written table carried and refusing a missing or malformed version line, a duplicate suffix, an undefined or zeroPROTO_*id and an uppercase or dotless suffix. The.incstays committed, so the build needs no Python;python3 tools/gen-hostname-table.py --checkis the drift gate thecore_enginesuite runs (tests/core_engine/check_hostname_table.sh). The 1,166 entries were converted in file order and the generated table differs from the hand-written one only in the 11 relabelled rows. Relabels:.teams.microsoft.comand.sfbassets.com(Teams / Skype for Business web assets) → newPROTO_MS_TEAMS(664,ms_teams, conversational);.sharepoint.com,.sharepointonline.com→ newPROTO_SHAREPOINT(665,sharepoint, cloud storage);.office.com,.office.net,.office365.com→ newPROTO_OFFICE365(666,office365, web);.onedrive.com→PROTO_SKYDRIVE(OneDrive’s former name, which.skydrive.comand.storage.live.comalready carry);.microsoftonline.com,.login.microsoftonline.com(Entra ID sign-in) →PROTO_AZURE, as #82 already labelled.sso.microsoftonline.com,.msauth.netand.msftauth.net;.live.net→PROTO_LIVE, the label of.live.com. Webmail suffixes (.outlook.com,.mail.live.com) stayPROTO_LIVEMAIL. New ids rather thanPROTO_MICROSOFTkeep Teams, SharePoint and Office distinguishable. Both phase0 gates are unchanged (no golden or labelled capture carries these host names); the accuracy corpus gainsacc_tls_sni_teamsandacc_tls_sni_sharepoint, attributedms_teamsandsharepoint. The three registrations raise the headline count to 673 protocols and 7,480 attribute registrations (tools/ci/check-runtime-protocol-count.sh). Source:data/hostnames.txt,tools/gen-hostname-table.py,src/mmt_tcpip/include/mmt_tcpip_protocols.h,src/mmt_tcpip/lib/proto_init_list.def,src/mmt_tcpip/lib/mmt_tcpip_classes.c,tests/core_engine/test_core_engine.c,tools/phase0/ci/accuracy/corpus.json,docs/Add-New-Protocol.md§3. - Q: Issue #567 (plan task 16.3, F-BUG-306) — the issue asks for the method to be “set at each
set_classified_protosite”; where is it actually recorded, which verdict does a session’s method describe, and how are the methods ordered? A: Most of the 45set_classified_proto()sites are link/network/transport layers, and the TCP/IP application verdict is decided before the path is written — in the flow-protocol funnel oflibmmt_tcpip(mmt_internal_add_connection→mmt_change_internal_flow_protocol_by) and in the TCP/UDP post-classification fallbacks. So the method is recorded there: the funnel mapsMMT_REAL_PROTOCOLtodpiandMMT_CORRELATED_PROTOCOLtocorrelated, a newmmt_internal_add_connection_by()lets the HTTP/TLS hostname-table lookups recordhostnameand the HTTP/TLS/RTP/SIP/STUN IP-range lookups recordip, and the fallbacks recordip,portornone; the classifiers that decide on a hard-coded address range withMMT_REAL_PROTOCOL(WhatsApp, Viber, Gameforge inproto_ssl.c, Viber, Tango and LINE inproto_stun.c, Ustream, Spotify, NetEase POPO) recordiptoo, without changing their stack placement. In the core, only a claim made by a classifier inside the classify walk (mmt_current_classifierset) above the session’s transport layer (index > session_protocol_index + 1) recordsdpi— the DICOM, S1AP, QUIC and HTTP/2 dissectors; the TCP/UDP/SCTP claim beneath IP is excluded because it is re-asserted on every packet and would overwrite a hostname or correlated verdict (a TLS flow attributed to google from its SNI readdpion its next packet before the restriction); claims of non-application layers above the transport (SCTP chunks, tunnel headers) still recorddpi, documented indocs/MMT-Attributes.md. The method describes the protocol at the top of the flow stack, the one consumers report: a change that puts a new protocol there replaces the method whatever the order (HTTP by DPI then a service from itsHostheader ishostname), re-asserting the top protocol only raises it, and a real protocol inserted beneath a correlated one leaves it alone. The values are ordered none < port < ip < correlated < hostname < dpi, the issue’s order, as ascending confidence. The field is a privateuint8_tin the padding beforetcp_reasm(no size change); the public surface is the appendedMETA_CLASSIFICATION_METHODattribute, theMMT_CLASSIFICATION_METHOD_*defines and two additive exports, so the ABI change is additive. On the labelled precision set every verdict isdpi(1,203 of 1,203);port/ip/hostname/correlated/noneare pinned by theclassification-methodfixture ofparser_boundarieson accuracy-corpus captures (ip on a crafted flow, the corpus using documentation addresses only). The newPROTO_METAattribute raises the runtime attribute counttools/ci/check-runtime-protocol-count.shcompares with the landing page from 7,480 to 7,481. Source:src/mmt_core/public_include/data_defs.h,src/mmt_core/public_include/proto_meta.h,src/mmt_core/src/proto_meta.c,src/mmt_core/src/mmt_data.c,src/mmt_core/src/packet_pipeline.c,src/mmt_core/private_include/packet_processing.h,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c,src/mmt_tcpip/lib/protocols/proto_tcp.c,src/mmt_tcpip/lib/protocols/proto_udp.c,src/mmt_tcpip/lib/protocols/http.c,src/mmt_tcpip/lib/protocols/proto_ssl.c,tools/phase0/phase0_precision.c,tools/phase0/ci/render_precision.py,tests/parser_boundaries/test_classification_method_api.c. - Q: Issue #573 (plan task 17.4, F-BUG-204/205/206/219) — how should the EPS QoS decoder treat a content length between the spec’s 1, 5, 9 and 13 octets, which unit does
encode_ngap()return, and where is the IPv4 of an IPv4v6 PDN address? A: (1) TS 24.301 §9.9.4.3 lays the EPS QoS contents out as the QCI then up to three groups of four rate octets (bit rates, extended, Rel-11 extended-2), and its length octet counts the contents only; the decoder’s thresholds (ielen > 2and> 6, plus 1 with an IEI) did not match those group boundaries and it returned the octets it had read, so ielen 3-4 and 7-8 failed while ielen 6 and 10-13 returned fewer octets than the IE held and the caller resumed inside it. A group is now decoded when the length holds it whole, the newbit_rates_ext2holds the extended-2 group, and the decoder returns the whole IE (header plus length) for every length, so octets past the last whole group are skipped rather than read as the next IE; a length the buffer cannot hold is still an error. (2)aper_encode_to_buffer()reports bits (asn1c/common/aper_encoder.h), andencode_ngap()passed them on whilengap.hand theupdate_ngap_data()comment ininclude/proto_ngap.hsaid bytes: it now returns(bits + 7) / 8, the documented unit, so the exportedupdate_ngap_data()(5Greplay) returns bytes too — the docs stand and the code moved, since a second byte-returning function would leave the export to pick a unit anyway. (3) TS 24.301 §9.9.4.9 puts the 8-octet IPv6 interface identifier before the IPv4 address of an IPv4v6 PDN address;nas_pdn_address_get_ipv4()(nas/ies/pdn_address.c) reads it there ands1ap_common.cuses it fors1ap.ue_ipv4. (4) TS 24.501 §9.3.1 security header types 1 and 3 are integrity protected and not ciphered, sonas_5g_message_type()(nas_5g/nas_5g.c) unwraps both, reading the type from octet 2’s low nibble rather than the header bitfield;nas_5g.security_typeand the MAC/sequence-number attributes still read the bitfield, which is that low nibble under GCC (__LITTLE_ENDIAN__undefined in those units) and is left to a separate change. Extracted values change, verdicts do not: both phase0 baselines are unchanged. Source:src/mmt_mobile/nas/ies/eps_quality_of_service.c,src/mmt_mobile/nas/ies/pdn_address.c,src/mmt_mobile/s1ap/s1ap_common.c,src/mmt_mobile/ngap/ngap.c,src/mmt_mobile/nas_5g/nas_5g.c,src/mmt_mobile/proto_nas_5g.c,tests/nas_ies_tail/test_nas_ies_tail.c,tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c. - Q: Issue #563 (plan task 15.4, F-PERF-106, F-PERF-009) — how does a handler stop keeping every FTP control session it ever saw, and how is TCP reassembly memory bounded per handler rather than only per flow?
A: (1) FTP. The per-handler state (the FTP protocol instance’s
args) is now anftp_context_t(ftp.h) holding two circular, sentinel-headed, doubly linked lists of control sessions:live(control flow still open, in arrival order) andretired(control flow expired while a data flow still references the control session’s data session). A new control session is appended at the live tail in O(1) (ftp_context_link), which replaces the O(N) tail walk; FTP now registers a session-data cleanup,ftp_session_data_cleanup, which the core calls for each expiring flow. A control flow’s expiry unlinks its session fromlivein O(1) and frees it, or parks it onretired; a data flow’s expiry drops its reference. Each control session counts the flows referencing it (refs: its control flow plus every data flow whosesession_datapoints at itscurrent_data_session, maintained byftp_data_attachwherever a data flow attaches, switches or detaches) and is freed at 0, so a data flow that outlives its control flow never reads freed memory (the #487 rule that the data session lives as long as its control session still holds).ftp_control_session_tandftp_data_session_tstart with akindtag, because the cleanup has only the session and must tell which of the two the slot holds. The issue named a hash keyed by the control tuple; it is not needed: the flow’s own slot already points at its node, so the intrusive list unlinks in O(1) without a lookup, and data-connection matching (ftp_compare_tuple6, with wildcard address/port modes) cannot use an exact-key hash anyway — the data lookups stay a walk, but over live control sessions only, so a lookup after expiry visits none. Handler teardown frees what is left one iteration per session (ftp_free_context;free_ftp_control_sessionno longer recurses on->next, which took one stack frame per session). A data connection that opens after its control flow expired is no longer matched to it; before, expired control sessions stayed matchable until handler close. The analysis also stopped leaking its packet tuple: the new-data-flow branch returned without freeing it when no control session existed, and every return released it withfree(), which left an IPv6 tuple’s two 33-byte address buffers behind on every packet — all now usefree_ftp_tuple6(). (2) TCP reassembly.set_tcp_reassembly_budget(handler, bytes)(newMMTAPI, additive; 0 = no budget, the default, so nothing changes unless it is set) bounds the sum over the handler’s flows of each flow’s commitment,reserved + owed[0] + owed[1](#380’s quantities). The commitment, notreservedalone, is budgeted so that the #380 guarantee survives: a flow can always flatten what it admitted, because the image growth it owes is held in the handler budget too. Each offer and each drain runs undertcp_reasm_flow_limit()= min(per-flow limit, budget − the other flows’ commitments), so the unchanged #380 admission and clamping code refuses (drops and counts inmmt_tcp_reasm_bytes_dropped()) what would overflow the budget, and the operation then charges its net change tommt_handler.tcp_reasm_committed;clean_session_payload()credits the flow’s commitment back. Refusal was chosen over eviction: evicting another flow’s pending bytes would make a flow’s output depend on unrelated traffic, and the per-flow policy is already drop-and-count. A first version budgetedreservedonly: drains then dropped admitted bytes as soon as the budget was full (the other flows had taken the room owed images needed). Measured with thetcp-memoryfixture’s new case (16 flows × 200 × 1,400-B segments, half drained every 8 offers): with a 1 MiB budget 376 of 3,200 offers are admitted, the walked commitment peaks at or under 1,048,576 B and equals the handler gauge after every operation, no admitted byte is dropped by a drain, a flow’s teardown frees room that is admitted again, and the gauge returns to 0; the same workload without a budget peaks at 11,146,496 B reserved. Theftp-controlfixture: 100,000 control flows open with 0 list visits (the old walk: 4,999,950,000) at exactly 100× the 1,000-flow allocator calls, the lists empty after the flows expire in a shuffled order, 500 retired sessions outlive their control flow and are freed by their data flow’s expiry, and nothing leaks. #380 rejected a new public knob as “no extra guarantee”; this issue asks for the per-handler one it did not give. Source:src/mmt_tcpip/lib/protocols/ftp.h(ftp_context_t,kind,refs),src/mmt_tcpip/lib/protocols/proto_ftp_session.c(ftp_new_context,ftp_free_context,ftp_context_link,ftp_control_release,ftp_data_attach,ftp_session_data_cleanup),src/mmt_tcpip/lib/protocols/proto_ftp.c(ftp_session_data_analysis,setup_ftp_context,cleanup_ftp_context,init_proto_ftp_struct),src/mmt_tcpip/lib/protocols/proto_tcp.c(tcp_reasm_committed,tcp_reasm_flow_limit,tcp_reasm_charge,tcp_reasm_offer,tcp_reasm_drain,clean_session_payload),src/mmt_core/private_include/packet_processing.h(tcp_reassembly_budget,tcp_reasm_committed),src/mmt_core/public_include/mmt_core.handsrc/mmt_core/src/packet_session.c(set_tcp_reassembly_budget),tests/resource_bounds/{test_ftp_control.c,test_tcp_memory.c,budgets.json,run_tests.sh},tests/core_engine/test_api_contracts.c. - Q: Issue #579 (plan task 18.5, F-UX-008/009/017) — how do the ~57 guide pages get site navigation without leaving the pinned cayman theme, what replaces the 17 literal
[TOC]lines, and which link labels and page titles were aligned? A: A localdocs/_layouts/default.htmloverrides the pinned cayman v0.2.0defaultlayout (remote_themeindocs/_config.yml, kept per #213; dropping the theme for a self-contained one was rejected — it re-locksdocs/Gemfile.lockand restyles every page) for everylayout: defaultpage;docs/index.htmldeclares no layout and keeps its design. The copy keeps cayman’s head ({% seo %}, fonts, thesite.github.build_revisionstylesheet cache-busterbuild-docs-site.shsupplies), header and footer, and adds a site bar (site-ID link to/mmt-dpi/,Docsto/mmt-dpi/docs/, GitHub), a breadcrumbMMT-DPI › Docs › <section> › <title>and a footer line linking home and the docs index. The section is not a second hand-kept map: the layout reads the docs index itself ({% include_relative README.md %}, resolved against the page’s directory — every guide sits indocs/), splits it on its## … ##headings and takes the one whose list holds](./<page>.md); a page the index does not list gets no section crumb. Nothing in the layout reads the clock, so the build-manifest site digest stays a function of the commit. The palette is the landing page’s:roottokens through cayman’s own SCSS variables (docs/assets/css/style.scss, which replaces the theme’sassets/css/style.scssand importsjekyll-theme-cayman): header#1A1A1A→#2A2520, site-bar and breadcrumb links in Golden Amber#E9AB34(8.6:1 on#1A1A1A); amber is 2.1:1 on the white guide body, so headings and body links use a darkened amber#8A5A0A(5.9:1). The 17[TOC]lines (Python-Markdown) became kramdown’s* TOC+{:toc};kramdown.toc_levels: 2..3keeps each page’s own title heading and deep levels out of the list. F-UX-017’s five sites: the landing footer’s “Architecture” now opensARCHITECTURE.html(it openedProtocol-Stack.html);Compilation-and-Installation-Instructions.mdis titled “Compilation and Installation Instructions” (was “Before compiling”, which stays as its first section) and the landing’s “install guide” link says so; the shared quick-start fragment keeps its GitHub User Guide link, which README needs, and the landing page rewrites it toUSER_GUIDE.htmlat include time (| replace:), so the fragment is unchanged for the shared-fragment check;FTP-design.mdandTCP-documents.mdare titled “FTP design”/”TCP documents” like their NDN siblings (were “Data structures”/”Documents”). The docs-index pass found more:Add-New-Protocol.mdandPrepare-for-a-new-released-version.mdare retitled (title and H1) to their index labels “Adding a New Protocol”/”Preparing a New Release”, and five index labels were changed to name their page’s title (ARM cross-compiler, Protocol Model, MMT Sessions, Weak classification heuristics, Externally-updatable IP-range / port attribution); the docs index’s quick-start pointer now goes to the landing page’s#quick-start(../#quick-start), the root README kept as the GitHub alternative. The regression guard is intools/ci/check-site-links.sh, which both passes ofbuild-docs-site.shalready run: on the source tree it fails a top-level guide with a[TOC]line, without front matter,layout: defaultor atitle:, and a docs-index[label](./page.md)entry whose label and target title — lowercased, punctuation folded to spaces — are neither equal nor one a whole-word part of the other (so “Threading Model” names “MMT-DPI Threading Model”); on the built site it fails a page rendering<p>[TOC]</p>and any page but the landing page without a link resolving to the site root and one to the docs index. The checker no longer scans_layouts/and_includes/as pages: their Liquid hrefs are verified through the rendered pages of the built-site pass. Source:docs/_layouts/default.html,docs/assets/css/style.scss,docs/_config.yml,docs/README.md,docs/index.html,docs/Compilation-and-Installation-Instructions.md,docs/Add-New-Protocol.md,docs/Prepare-for-a-new-released-version.md,docs/FTP-design.md,docs/TCP-documents.md,tools/ci/check-site-links.sh,tools/ci/build-docs-site.sh,tools/ci/tests/test-site-links.sh(run by therelease_gatessuite: each guard fails on a fixture). - Q: Issue #581 (plan task 19.2, F-DOCS-006/007, F-BUG-018) — how are the docs listings, the shipped examples and the reference-page prototypes kept compiling and current, and against which compiler?
A: (1) Each
docs/Examples.mdlisting is the code of thesrc/examples/file its compile step names, from the first line after the file’s header comment: two hand-kept copies had drifted (the page’s Simple Traffic Reporting still had the unboundedsprintfloop #211 removed from the file).scripts/validate-doc-drift.shfails on any difference; a Jekyll include of files outsidedocs/was rejected because it would need site-build plumbing (tools/ci/build-docs-site.sh, the link checks). (2)tools/ci/compile-doc-listings.shcompiles everyc-fenced listing of the given pages (defaultdocs/Examples.md) with the firstgcccommand of thesh-fenced block under it —/opt/mmtread as the install prefix, only compiler/linker arguments accepted (no-Wno-*,-wor-Wl,/-Wp,/-Wa,) and the strict flags appended after them, so the copied command is checked too and cannot disarm the gate; a C fence tagged other than exactlycis refused, andvalidate-doc-drift.shfails when a compile step naming an example has no listing — and everysrc/examples/*.cwith a default command, against an installed SDK, linking but never running them. The flags are-Wall -Werror=return-typeplus the diagnostics GCC 14 makes errors by default (implicit-function-declaration,implicit-int,int-conversion,incompatible-pointer-types, andreturn-mismatch/declaration-missing-parameter-typewhen the compiler knows them), so CI’s GCC 13 rejects what GCC >= 14 rejects; no-stdis forced. It runs as a blocking step of the requireddoc-validatorsjob (every tier, its own SDK build: a docs-only change can break a listing) and as step [5/5] of thedocs_lifecyclesuite against the runner’s shared SDK, which also proves the gate rejectsreturn;inint main. (3)tools/ci/public-prototypes.pyis the one parser of the public API for docs checks: it maps everyMMTAPI … MMTCALLdeclaration ofsrc/mmt_core/public_include/*.hto a normalised prototype (comments,MMTAPI,MMTCALL,externand__attribute__((…))dropped, whitespace collapsed,()read as(void)) and compares every declaration-shaped statement the pages’cfences show for one of those names; declarations of other names (callbacks the reader writes) are not checked.validate-doc-drift.shruns it over everydocs/*.mdexcept the append-onlydocs/DECISIONS.md, wider than thedocs/MMT-*.mdthe issue names, sincedocs/Protocol-Stack.mdanddocs/Protocol-Statistics.mdhad the same pre-#231 drift; it is importable by path so the citation checks of issue #582 can reuse the header parser. Parameter names count: the pages now show the header’s names, so a renamed parameter is drift too. Source:docs/Examples.md,src/examples/*.c,tools/ci/compile-doc-listings.sh,tools/ci/public-prototypes.py,scripts/validate-doc-drift.sh,tests/docs_lifecycle/run_tests.sh,.github/workflows/c-cpp.yml(doc-validators),docs/MMT-Attributes.md,docs/MMT-Handler.md,docs/MMT-Packet.md,docs/MMT-Protocol.md,docs/MMT-Session.md,docs/Protocol-Stack.md,docs/Protocol-Statistics.md. - Q: Issue #583 (plan task 19.4, F-DOCS-014/016/018/019/021/023) — what do the deployment, architecture and ARM guides say about the run-time environment, the library names, ARM support and the integration branch, and how is it kept true?
A: (1)
docs/DEPLOYMENT.mddocumented one run-time variable; the library reads eight. Its Environment Variables section is now one table, each row cited to itsgetenv()/secure_getenv()call:MMT_DPI_PLUGINS_DIR(plugins_engine.c, through thePLUGINS_DIR_ENVmacro),MMT_DPI_LOG_LEVEL(linked to its single home,docs/AGENT_ENVIRONMENT.md§2),MMT_DPI_PROFILES_FILE/MMT_DPI_PROFILE,MMT_DPI_PORT_MAP_FILE,MMT_DPI_IP_RANGES_FILE,MMT_DETERMINISTIC_SEED(a reproducibility knob that gives up hash-flooding resistance, ignored underAT_SECURE) and theENABLESEC=1-onlyMMT_SEC_REACTION_DIR.scripts/validate-deployment.shderives the names from the calls in trackedsrc/(generated asn1c excluded, a macro argument resolved through its#define, the plugin variable pinned as a floor) and fails a name the guide omits; it also fails a guidepath:linecite past the end of its tracked file, a “no environment variables” claim, alibmmt_<x>name in the deployment guide,ARCHITECTURE.mdorREADME.mdthatrules/common.mkdoes not define, the stale label that called the installed example sources binaries, and a doc naming the integration branch below. (2) The mobile plugin islibmmt_tmobile.so(rules/common.mk:221);ARCHITECTURE.md’s plugin table had a wrong name, gains the DICOM plugin, and says the security and fuzz engines areENABLESEC=1libraries the application links, not plugins (MMT_LAYOUT_PLUGINS,sdk/Makefile:249). (3) ARM: the arm64 support CI proves is native —unit-tests-armonubuntu-24.04-armand the arm64 legs ofrelease-packages.yml— and nothing builds or tests a cross build:rules/arch-linux.mk:3-4setCC/ARwith:=and no sysroot or triplet is wired. The README, the landing page andARCHITECTURE.mdno longer claim cross-compilation, and the ARM guide (file name kept for its links, retitled “Building mmt-sdk for ARM (arm64)” with its two index labels) is a status page; the buildroot recipe and theosx/win32/win64targets it listed are gone (the only targets are the fourrules/arch-*.mk).scripts/validate-arm-cross-compile.shchecks those claims, the guide’s targets againstrules/and the CI anchor, without building. (4) No integration branch other thanmainexists;CONTRIBUTING.mdnow describesmainplus<type>/<issue>-<short-desc>work branches, and the README andinstall.shhelp usemainas the moving-ref example (help text only, the release pin untouched). The 2026-09-13 issue #197 entry above quotes the old example ref; it is append-only and stays as written, so the branch scan skips this file. (5)docs/llhttp-migration.md§1 is marked as the pre-#222 state, names today’s llhttp files, and every cite is re-pointed atmainor anchored ate16f265e~1for the removed http-parser files.docs/USER_GUIDE.md’s layout now callsexamples/the example sourcesmake installcopies (sdk/Makefile:110-113) and cites the path variables atrules/common.mk:3-8. Source:src/mmt_core/src/plugins_engine.c,src/mmt_core/private_include/plugins_engine.h,src/mmt_core/src/mmt_log.c,src/mmt_core/src/dpi_profiles.c,src/mmt_core/src/hash_utils.c,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c,src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c,src/mmt_security/tips_report.c,rules/common.mk,rules/arch-linux.mk,sdk/Makefile,.github/workflows/c-cpp.yml(unit-tests-arm),.github/workflows/release-packages.yml,scripts/validate-deployment.sh(checks 8-12),scripts/validate-arm-cross-compile.sh(checks 6-9). -
Q: Issue #557 (plan task 14.3, F-PERF-102/F-PERF-001) — how is the compiled-in IPv4 range table stored and looked up without changing a verdict, where does #565’s regeneration plug in, and where is the per-flow verdict cached? A: (1) Storage:
data/ip_ranges.txt(the 10,303 entries of the formerproto_ip_address[], same order,<network>/<prefix> <PROTO_ID>under a# version:header) is the source;tools/gen-ip-range-table.pyvalidates it (host bits zero, /1../32, defined non-zero PROTO_* below 65536, no duplicate network/prefix) and flattens the laminar prefixes into a const sorted array of disjoint intervals{start, proto_id, prefix_len}covering the whole space (7,786 intervals, 0 = uncovered), adjacent equal intervals merged. Build time, not init time: the table is rodata, so init allocates nothing for it and the build needs no Python (the.incis committed and--checkis its drift gate, as for #566’s hostname table). Issue #565 regenerates onlydata/ip_ranges.txt(overlapping and nested prefixes are allowed; duplicates of one network/prefix must be resolved by the feed script) and reruns the generator. (2) Semantics: the former forest walked prefix lengths /32 down, probing source then destination at each length, override set first. That is “the longer of LPM(src) and LPM(dst) wins, src wins a tie”, so the lookup keeps the prefix length per interval and compares. External extend rules stay in per-prefix AVL trees (only they are in them now) and are matched beside the table with the built-in match winning a length tie: a tie for one address means the same network/prefix, which is exactly the extend rule the former loader dropped, so the loader no longer needs the pointer-range test. Bitmaps of populated lengths skip empty tree sets, so the default path touches no tree. (3) Memo:mmt_internal_tcpip_session_t.ip_range_verdict[2](proto id + 1, 0 = not computed), one slot per address orientation (saddr > daddras the header holds them): the result depends only on the two addresses and is orientation-dependent only through the tie rule; the slot is derived from the addresses, not fromlast_packet_direction, so it cannot pair a verdict with the wrong orientation. In the tcpip flow struct, notmmt_session_t, to stay out of #562’s session budget; the flow is zeroed at creation and owned by one handler’s thread, and external rules are loaded before flows exist (docs/THREADING.md), so no invalidation or locking is needed. Verified:tests/core_engine/test_ip_range_lpm.c(4,284,468 lookups identical to the rebuilt former forest, with and without 600 external rules, plus the memo cases), both phase0 gates andtools/phase0/tests/run_ext_attribution_test.shunchanged; bigFlows callgrind (aarch64, GCC 13,-fno-inlinebuild for the call counts):_find_proto_id_by_address137,166 -> 24,751 calls for 137,168get_proto_id_from_addresscalls, under the 40,647 address orientations of the capture’s 27,966 IPv4 5-tuples; bare replay 3,881,678,972 -> 3,631,985,686 Ir (release build). The CI-pcap instruction gate moves within its noise (bare 10,532.7 -> 10,510.3 Ir/pkt), so its baseline is not ratcheted. Source:data/ip_ranges.txt,tools/gen-ip-range-table.py,src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c,src/mmt_tcpip/lib/mmt_tcpip_classif_proto_ip_address.inc,src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h,tests/core_engine/test_ip_range_lpm.c,tests/core_engine/check_ip_range_table.sh,tools/phase0/ci/check_instructions.sh. - Q: Issue #558 (plan task 14.4) — the five hot-path changes: how does a public, exported
get_packet_offset_at_index()get inlined without moving the ABI, against which measurement is the ≥ 5 % target read, and what does the fragment-map mixing cost on small maps? A: (1) The export stays:mmt_data.cdefines(get_packet_offset_at_index)— parenthesised so no macro expands it — as a forwarder to the inline twinmmt_packet_offset_at_index()(src/mmt_core/private_include/ipacket_internal.h:118), the same memoized prefix sum on the same cache fields. A function-like macro (ipacket_internal.h:149) points calls at the twin only under_MMT_BUILD_SDK, whichrules/common.mksets for the SDK’s own objects. It is not unconditional because five unit suites (resource_bounds, parser_boundaries, business_app, ndn_dissector, tcp_pending_order throughtcp_reasm_stubs.h) compile a dissector against their ownget_packet_offset_at_index()stub without that define: the redirect would bypass their stub, and would break its definition. (2) The target is read on bigFlows, the AC’s input, in bare mode under callgrind (aarch64, GCC 13.3,MMT_DETERMINISTIC_SEED=1): 3,881,678,972 Ir onmain2ed9a28a, 3,529,997,976 Ir with all five changes (−9.06 %). Per change: stats-node cache −4.75 %, inline offsets −1.40 %, memchr splitter −3.08 %, lazy parser −0.09 %, fragment mixing ±0 (bigFlows carries no fragment). The committed gate input (tools/phase0/ci/golden_pcaps.txt) moves less: bare −2.74 % (10,532.6 → 10,244.1 Ir/pkt onmain’s build), because its largest pcap,tcp_bbc-out-of-order.pcap, spends most of its 5.6 M Ir building the hostname trie once (issue #253), which none of the five changes touches. On top ofmain7b64770a (with #557’s flat IP-range table): bigFlows 3,631,992,563 → 3,281,313,540 Ir (−9.66 %), gate bare 10,510.3 → 10,222.0, attrs8 11,587.7 → 11,301.3, fetch-all 52,068.3 → 51,264.2 Ir/pkt. The baselinetools/phase0/ci/baseline/instructions.txtis ratcheted to that last measurement; the tolerance is unchanged. (3)hashmap_slot_index()(src/mmt_core/private_include/hashmap.h:131, placed after the MMTAPI declarations so the #533 entry’shashmap.h:117-122still holds) runs fmix64 before masking.ip_fragment_key()packssaddr << 32 | daddrand XORs the raw, network-order id, so the oldkey % 256read the first octet of the destination address XOR the id’s high byte: 256 consecutive datagrams between two hosts shared one chain. With 1,024 such datagrams in flight the longest chain falls from 256 to 11 and an insert-plus-three-lookups pass from 2,534,280 to 765,399 Ir. On the gate’s two fragment pcaps, whose maps hold a handful of entries, the finalizer costs about 22 Ir per fragmented packet (+1,170 Ir onip_ping_local_ip_fragmentation.pcap, +52 on the teardrop one): +0.7 Ir/pkt on the bare total, inside its run-to-run residue. (4) The lazy HTTP parser is created just before the session’s first payload is fed, so the parser sees the same bytes: dumping every HTTP attribute event and extracted HTTP attribute on bigFlows (545,518 lines) and on the golden pcaps gives byte-identical output before and after.http_internal_session_data_init()is removed with its registration. (5) The #533 entry’ssrc/mmt_core/private_include/packet_processing.h:791-899now reads799-907: the stats-node cache adds two fields toprotocol_instance_tabove it. Source:src/mmt_core/src/packet_stats.c:295-321,src/mmt_core/private_include/packet_processing.h:585-592,src/mmt_core/private_include/ipacket_internal.h:110-150,src/mmt_core/src/mmt_data.c:4-18,src/mmt_tcpip/lib/mmt_tcpip_utils.c:291-305,src/mmt_tcpip/lib/protocols/proto_http.c:345-354,src/mmt_core/private_include/hashmap.h:126-141,src/mmt_tcpip/lib/protocols/proto_ip.c:615-633,tools/phase0/ci/check_instructions.sh,tools/phase0/ci/baseline/instructions.txt. -
Q: Issue #560 (plan task 15.1, F-PERF-005 part 1) — how is the checker chain frozen into a contiguous array without changing the walk order, when is it frozen given that plugins and embedders may register after init, and where do the per-checker guard inputs #561 needs come from? A: (1) Shape: the weight-sorted registration list (
mmt_classify_proto_t) stays as it is — it is the registration API’s data structure, and its node is the checker’s identity:mmt_session_t.proto_checkers[]and the classifier claim keep storing node pointers, so a re-frozen chain never invalidates a stored pointer (#562 may later store indexes; each frozen entry carries its node, so an index maps back).mmt_classify_chain_freeze()(src/mmt_core/src/packet_registry_classify.c) copies the list, in list order, into one allocation holding two views:entries[], every checker (thelegacyprofile’s walk), anddefault_entries[], the same sequence without the legacy checkers (the default walk), so neither walk tests a flag per checker and the default walk never visits the 23 TCP / 15 UDP defunct-service checkers. Each entry carries the checker function, its node, its legacy flag, its selection mask and the protocol id its excluded bitmask holds. (2) When:mmt_init_handler()freezes every registered protocol’s chain that is not frozen yet, under its own mutex (handlers may be created concurrently from cold, docs/THREADING.md); the chain is published with a release store and read with an acquire load. Any list change after that — a registration,mmt_classifier_mark_legacy()or the newmmt_classifier_set_guard()(both header-inline in the privatepacket_processing.h, so libmmt_core gains no export) — moves the frozen chain onto a per-protocol retired list, freed only at protocol teardown because a worker may still be walking it, and the walk falls back to the list until the nextmmt_init_handler()re-freezes. So a late registration is walked at once, by every handler, in its weight position. A failed freeze allocation is not an error: the walk keeps using the list. The invalidation is an atomic exchange, so two can never retire one chain twice; a registration racing a freeze stays outside the contract (docs/THREADING.md rule 3). A re-initialised slot retires its frozen chain like any other list change, andfree_registered_protocols()frees the chains of unregistered slots too, so none outlives teardown. The registrations ofinit_extraction()retire nothing (nothing is frozen yet). (3) Guard inputs: the selection mask and excluded bitmask of a checker are file-scope statics of its protocol source, set bymmt_init_classify_bitmasks()/_multi(); those helpers now also report (excluded id, selection mask) toinit_tcpip_plugin()throughmmt_tcpip_record_checker_guard(), a weak declaration so a test compiling one protocol source alone still links. The excluded id is unique per source (one helper call each), but the source of a row’s checker cannot be found at run time, sointer_proto_classif_list.defgains a fourth column,excluded_proto, generated from each checker’s source (the last argument of its helper call;PROTO_UNKNOWNformmt_check_http2, which has none —mmt_check_jabber’s isPROTO_UNENCRYPED_JABBER, so the column is not derivable from the name); 159 of the 160 rows carry one. A row naming an id no source recorded failsinit_tcpip_plugin(). The walk does not read the guard inputs yet (#561’s central guard will). One unit’s excluded bitmask holds more than its helper’s id:proto_jabber.caddsPROTO_TRUPHONEafter the call, so jabber’s entries carry onlyPROTO_UNENCRYPED_JABBERand #561 must treat that second id itself;tests/parser_boundaries/check_inter_proto_excluded.py(run by thechainfixture) checks every row’s column against its checker’s source and fails when another unit grows such an extra exclusion. The accuracy oracle’s chain parser accepts the optional fourth column, so a base ref older than this change still parses. (4) Order and verdicts: a startup dump of the TCP and UDP chains (98 and 71 checkers) — the list walk order of origin/main against the frozen views of this change, in both profiles, function names resolved from the plugins’ symbol tables — is identical, and the checkers’ call counts over 30,000 bigFlows packets are identical; thechainfixture ofparser_boundariesasserts on every frozen chain of the loaded plugins that both views are the list in list order and that the TCP/UDP guarded nodes are the.defrows in the file’s weight-sorted order. The classification fingerprint and the precision/recall baseline are unchanged. (5) Measurement (aarch64, GCC 13.3, valgrind 3.22, callgrind over the first 30,000 packets of bigFlows.pcap,baremode): the walk loop’s own instructions (the walk lines ofpacket_pipeline.c,-gbuild) fall from 12.41 M to 9.01 M Ir (−27 %), the replay total from 179.79 M to 176.54 M Ir (−1.8 %). On the 21 golden CI pcaps, mostly short already-converged flows, the instruction gate (against the baseline #558 ratcheted) moves by −0.06 % (bare), −0.04 % (attrs8) and −0.01 % (all), all inside its 2 % tolerance, soinstructions.txtis not ratcheted. The new types and helpers movepacket_processing.hby about 100 lines, so citations into it in earlier entries of this log are off by that much; the guides’ citations are re-pointed. (6) Tests:tests/core_engine/test_classify_freeze.c(both views and the walk order on a fake chain with equal weights and a legacy checker, late registration, the plugins’ list mutators, a failed freeze, a walk running while another thread freezes, concurrent handler creation, both under TSan); themmt_init_handler()allocation sweeps oftest_core_engine.candtests/fault_injection/test_fi_engine.cnow freeze the chains first, since the freeze is a process-wide allocation that lives untilclose_extraction(). Source:src/mmt_core/private_include/packet_processing.h(mmt_classify_entry_struct,mmt_classify_chain_struct,mmt_classify_chain_invalidate,mmt_classifier_set_guard),src/mmt_core/src/packet_registry_classify.c,src/mmt_core/src/packet_registry_handler.c(mmt_init_handler),src/mmt_core/src/packet_registry.c,src/mmt_core/src/packet_pipeline.c(classify_walk_frozen,classify_walk_list,proto_packet_classify_next),src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h,src/mmt_tcpip/lib/configured_protocols.c,src/mmt_tcpip/lib/inter_proto_classif_list.def,tests/core_engine/test_classify_freeze.c,tests/parser_boundaries/test_classifier_chain_api.c,tests/parser_boundaries/check_inter_proto_excluded.py,src/mmt_tcpip/lib/protocols/proto_jabber.c,tools/ci/tests/check-accuracy-corpus.py,docs/THREADING.md. - Q: Issue #562 (plan task 15.3, F-PERF-104, F-PERF-012, F-PERF-007) — what leaves the per-host record and how do readers see a field that is no longer inline, how does
mmt_session_treach 800 B while #560’s frozen checker array is not merged, and what does the session-table tag cost? A: (1) Host record.mmt_internal_tcpip_id_struct(embedded inmmt_ip4_id_t/mmt_ip6_id_t, one per distinct address) kept a 128 BMMT_PROTOCOL_BITMASKthat onlymmt_internal_add_connection_by()writes and that classifiers read for exactly 14 protocols (FTP, Spotify, PPLive, DirectConnect, IRC, Yahoo, Gadu-Gadu, MSN, Gnutella, Battlefield, POPO, Thunder, OSCAR, World of Warcraft — FTP and Spotify are default-profile readers, so the bits are not legacy-only). It is now auint16_twith one bit per tracked protocol: the writer ORsmmt_host_proto_bit()(0 for any other protocol) and the readers useMMT_HOST_HAS_PROTOCOL/MMT_SRC_HAS_PROTOCOL/MMT_SRC_OR_DST_HAS_PROTOCOL, which pasteMMT_HOST_PROTO_BIT_##protocol, so asking about an untracked protocol is a compile error rather than a silent 0. The 64-entry port cache (516 B; written and read only throughinsert_to_local_protos()/check_local_proto_by_port_nb(), by STUN — including its Tango, FaceTime, LINE, YahooMsg and GTalk sub-verdicts — BitTorrent, eDonkey and RTP) and the IRC DCC port table (16 ports, 16 timestamps, a count) move tommt_internal_tcpip_id_ext_t, allocated by the first write (mmt_host_ext_get()) and freed with the record (free_ip4_id()/free_ip6_id()inip_session_id_management.c, on every path that frees a record). Host records are zeroed at creation, so a record without the extension reads exactly as the zeroed fields did: no cached port, no DCC port. Reads never allocate (STUN and RTP look up the cache on every candidate UDP flow); an allocation failure skips the write, so the host behaves as if nothing had been cached. Two fields nothing referenced (oscar_ssl_session_id[33],detected_gnutella_port) are removed. Result on LP64:mmt_ip4_id_t968 → 208 B,mmt_ip6_id_t984 → 224 B, both static-asserted ≤ 256 inip_session_id_management.h. (2) Session record. Movingfamilyandis_fragmentinginto the tail byte group beside the status bits removes the padding holes (856 → 840 B), not enough for 800.proto_checkers[PROTO_PATH_SIZE]therefore stores auint16_tchecker id instead of a node pointer (−96 B → 744 B). Indexes into #560’s frozen array were not used even though #560 anticipates them: a chain is re-frozen after a late registration, so an index into one frozen copy can name a different checker in the next. Instead each registration node takes a stable id — its slot in a process-wide 1,024-entry table (mmt_classifier_slots,packet_registry_classify.c), the first free slot, under a mutex — and gives it back before the node is freed (free_registered_protocol());mmt_classifier_by_id()maps an id back with an acquire load. Id 0 means no recorded checker: it is what a full table hands out (about 160 checkers register today) and what a freed slot reads as, and both fall back to the full walk, which is the old NULL path, so verdicts cannot change; a stale id after a teardown now reads NULL where the old pointer dangled. The id sits in the node’s existing padding, and it composes with #560 (a frozen entry carries its node, the node its id).tests/core_enginepinssizeof(mmt_session_t) <= 800. (3) Tag. Each open-addressing slot gets a 16-bit tag, the top 16 bits of its key’s hash (the index uses the low bits), stored after the slots in the same allocation, so slots stay 16 B and the table costs 2 B more per slot; find, insert and remove compare the tag before the equality predicate, and every registered hash agrees with its equality, so the tag cannot turn a hit into a miss. Intests/hashmap, 1,000 absent-key lookups on a 1,000-key table make 0 predicate calls and 1,000 present-key lookups make 1,000. (4) Measurement (aarch64, 20 cores, GCC 13.3, Ubuntu 24.04,phase0_throughputbigFlowsbare,MMT_DETERMINISTIC_SEED=1, origin/main 6c53cbab — #560 included — against this change, alternating runs): 20 iterations — library_rss_kib 20,088 → 18,684 (−7.0 %), pps 4,238,810 / 4,283,374 / 4,411,183 → 4,376,390 / 4,533,491 / 4,384,888; 200 iterations — library_rss_kib 32,588 → 31,884, pps 4,418,415 → 4,367,291. pps moves inside the run-to-run spread, so the change is read as throughput-neutral, not a speed-up. At 20 iterations both sides are inside the M4 budget (library_rss_kib ≤ 21,428 and ≥ 3,106,798 pps, the audit host’s reference); library_rss_kib grows with the iteration count (capture_perf.shheader), so at 200 iterations it is above that reference on both sides. The instruction gate moves −0.34 % (bare), −0.35 % (attrs8), −0.07 % (all), inside its 2 % tolerance, soinstructions.txtis not ratcheted. The classification fingerprint and the precision/recall baseline are unchanged. No public header changes;mmt_session_tstays opaque. Source:src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h(mmt_internal_tcpip_id_ext_t,MMT_HOST_PROTO_BIT_*,mmt_host_proto_bit),src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.h(mmt_host_ext_get,mmt_host_ext_release,check_local_proto_by_port_nb,insert_to_local_protos),src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c(mmt_internal_add_connection_by),src/mmt_tcpip/lib/protocols/ip_session_id_management.c(free_ip4_id,free_ip6_id),src/mmt_tcpip/lib/protocols/ip_session_id_management.h,src/mmt_tcpip/lib/protocols/proto_irc.c,src/mmt_core/private_include/packet_processing.h(mmt_session_struct,mmt_classifier_by_id),src/mmt_core/src/packet_registry_classify.c(mmt_classifier_id_assign,mmt_classifier_id_release),src/mmt_core/src/packet_registry.c,src/mmt_core/src/packet_pipeline.c,src/mmt_core/src/hash_utils.c(mmt_oa_tags),tests/core_engine/test_core_engine.c(test_checker_ids,test_host_record),tests/hashmap/test_session_table.c(test_slot_tags). - Q: Issue #561 (plan task 15.2, F-PERF-005 part 2, F-PERF-105) — where does the checkers’ shared guard get evaluated once the chain is frozen, how does a plugin-generic core walk test tcpip-private packet state, which checkers keep their own guard, and how small can the session’s exclusion bitmap get without changing a verdict?
A: (1) Guard: every TCP/UDP checker opened with
(selection & packet selection) == selection && detection ∩ packet detection ≠ ∅ && excluded ∩ flow exclusions = ∅. The frozen entry (and the node, for the list walk and the direct dispatch) now carries the selection mask, a pointer to the unit’s detection set and the dense slot of its excluded id; the parent’sclassify_next.guard_viewhook (the tcpip plugin’s, installed on TCP and UDP before any guard is recorded —mmt_classifier_set_guard()refuses a detection set without one) fills, once per walk, the packet’s selection word, the one word of the detection set holding the packet’s detected protocol (onlyMMT_SAVE_AS_BITMASKand the reset write it: one bit or none) and a pointer to the flow’s exclusion set, read live so an exclusion by an earlier checker of the same walk counts.mmt_classify_guard_open()is then three word tests. A closed guard is skipped: each removed guard’s closed path returned 0 or 4 (noMMT_CLASSIFY_MATCHED_MASKbit) and touched nothing, which the transform checked for every one of the 137 checkers before dropping the guard (its block is kept as a bare block, not re-indented, to keep the diff reviewable). The direct dispatch of a converged flow is guarded too, since the flow’s engine used to test its own guard on every packet. (2) Local guards: TPKT, VNC and NDN-over-HTTP exclude themselves when their guard is closed — the walk’s skip would lose that write — so their units callmmt_checker_keeps_local_guard()and their entries carry no detection set.mmt_check_gtpnever opened with the guard although its unit records one (its.defrow names PROTO_GTP): a central guard would skip it once a malformed or truncated first datagram excluded GTP, where it used to retry on every packet, so its unit opts out the same way (found in QA review). Jabber’s excluded bitmask also held PROTO_TRUPHONE (recorded in #560): the walk tests PROTO_UNENCRYPED_JABBER and the checker tests TRUPHONE itself, the same conjunction. Skype (unregistered) and DTLS (registered outside the.def) keep their guards.check_inter_proto_excluded.pyenforces the placement against the sources. (3) Dense set: 129 protocol ids are ever excluded, read, or named by a guard (excluded_protocols.def); an X-macro gives each a slot and the macros paste the name into it, so an unlisted id does not compile. 3 words instead of 16: the session record goes from 232 to 128 B (static assert ≤ 136 on LP64). (4) Measured: both phase0 baselines unchanged; the golden-pcap replay falls 0.8 % / 0.7 % / 0.2 % instructions per packet (bare / attrs8 / all, inside the 2 % gate band, soinstructions.txtis not ratcheted) because those pcaps are mostly converged flows. Source:src/mmt_core/private_include/packet_processing.h(mmt_classify_guard_view_struct,mmt_classify_guard_open,mmt_classifier_set_guard_view,mmt_classifier_set_guard),src/mmt_core/src/packet_pipeline.c(classify_guard_view,classify_walk_frozen,classify_walk_list,classify_direct_guard_passes),src/mmt_tcpip/lib/configured_protocols.c(mmt_tcpip_guard_view,mmt_set_inter_proto_guard),src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h(MMT_EXCLUDE_PROTOCOL,MMT_FLOW_EXCLUDES,mmt_checker_keeps_local_guard),src/mmt_tcpip/lib/excluded_protocols.def,src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h,tests/core_engine/test_classify_freeze.c,tests/parser_boundaries/test_classifier_chain_api.c,tests/parser_boundaries/check_inter_proto_excluded.py.
2026-11-01
- Q: Issue #574 (plan task 17.5, F-DEP-303 part 2, F-BUG-203) — what keys a UE in the S1AP entity store now that S1AP ids are known to be unique only per node, when does a UE leave the store, and which of the Rel-16 additions listed in
src/mmt_mobile/asn1c/support/DELTA-r16.1.0.mddoes each dissector map, given that the inventory does not define the “family” the acceptance criterion counts per? A: (1) Keying._find_entity_node()(src/mmt_mobile/proto_s1ap.c) returned the first UE matching any of M-TMSI, eNB-UE-S1AP-ID, MME-UE-S1AP-ID or IMSI across every eNodeB and MME, so two eNodeBs reusing an eNB-UE-S1AP-ID merged into one UE. TS 36.413 §9.2.3.3/§9.2.3.4 make the eNB id unique within its eNodeB and the MME id within its MME; both are therefore unique within the S1 association that carries them. A UE is now matched by IMSI or M-TMSI anywhere (_is_same_ue()), and by either S1AP id only on the same association, keyed as the unordered pair of the packet’s IPv4 addresses (_s1_link_key(),(lower << 32) | higher) — the association rather than one node, because the dissector does not know which endpoint is the eNodeB for most procedures (_assign_enb_mme_ip()only places S1Setup and SCTP shutdown). When a UE moves to another association (found by IMSI or M-TMSI), the S1AP ids of the previous one are dropped (_update_ue_link()), so they no longer name it. The key and a last-seen capture time live in the private store nodes1ap_entities_t, not in the installeds1ap_entity_t, whose layout is unchanged (abi-diff). IPv6-carried S1AP has no key (0) and keeps the previous global id matching. (2) Removal.UEContextReleaseComplete(successfulOutcome of procedure 23) was not decoded at all;_decode_s1ap_UEContextReleaseComplete()(src/mmt_mobile/s1ap/s1ap_common.c) now reads its MME/eNB ids, and the UE it names is removed after the packet’s attributes were taken (the packet still reports the UE’s id), while a release of an unknown UE inserts nothing. Detach is covered by the release that follows it (UEContextReleaseCommand with cause nas:detach, then the Complete) rather than at the Command, so a lost Complete is left to aging. A consequence, intended by the issue:s1ap.ue_idnow names a UE-associated S1 connection’s lifetime, so a UE coming back from idle gets a new id. Aging uses the packet timestamp, never the wall clock, so a replay is deterministic: a UE no message named forS1AP_UE_IDLE_TIMEOUT(7200 s, more than twice the 54-minute default periodic TAU timer T3412 of TS 24.301, which brings an idle UE back) is removed by a sweep of the UE list that runs at most once perS1AP_UE_SWEEP_INTERVAL(60) capture seconds, and at once when the capture clock goes back past the last sweep; a message without a timestamp never ages anything. eNodeBs and MMEs are not evicted (their detach only sets a status, as before). Ids came from++entities_count, which eviction now lowers, so they come from a separate monotone counter and are never reused befores1ap_entities_reset(). TheS1AP_MAX_ENTITIESceiling still bounds the store; eviction keeps it from filling with ended connections (3 × 4096 attach/release cycles hold at most one UE). (3) Families.delta-inventory.pybuilds its report from aFAMILIESlist with two entries, S1AP (TS 36.413) and NGAP (TS 38.413), and the inventory has one section per entry, so a family is a protocol. One IE per family is mapped, chosen among those carried by a message the dissector already decodes and testable against an encoding: S1AP NRUESecurityCapabilities (IE 269, InitialContextSetupRequest) ass1ap.nr_encryption_algorithmsands1ap.nr_integrity_algorithms(the first 16 bits of each bitmap,MMT_U16_DATA), checked against the independently encoded #523 vector — the ICS decoder used to stop at the E-RAB list, so it now visits the IEs after it; NGAP SRVCCOperationPossible (IE 177, DownlinkNASTransport and PathSwitchRequestAcknowledge) asngap.srvcc_operation_possible(0 possible, 1 notPossible,MMT_U8_DATA), read only on decode soencode_ngap()/update_ngap_data()re-encode it unchanged. Both attribute ids are appended to their enums, so no existing id moves. The other +130 S1AP and +40 NGAP IEs stay unmapped; mapping more is a feature, not part of this bug. The three attributes raise the runtime attribute counttools/ci/check-runtime-protocol-count.shcompares with the landing page (docs/index.html) from 7,481 to 7,484. (4) Captures. The goldentools/phase0/ci/pcaps/{s1ap,ngap}.pcappredate Rel-16 and stay as they are (a change there moves the golden fingerprint), so the Rel-16 IEs are carried by two new reviewed cases of the accuracy corpus (tools/phase0/ci/accuracy/), which is in neithertools/phase0/ci/golden_pcaps.txtnor the labelled set ofcheck_precision.sh:acc_s1ap_rel16_positive(the independently encoded #523 InitialContextSetupRequest with NRUESecurityCapabilities, MME to eNB on PPID 18) andacc_ngap_rel16_positive(theacc_nas_positiveDownlinkNASTransport with SRVCCOperationPossible notPossible appended, AMF to gNB on PPID 60), generated bytools/phase0/gen_mobile_pcap.pyand listed incorpus.jsonas positive cases with one wire packet each. The accuracy oracle checks their verdicts; their attributes are checked, as the #567classification-methodfixture ofparser_boundarieschecks its method on corpus captures, bytest_mobile_rel16_corpus(tests/s1ap_ngap_decode/test_s1ap_ngap_packets.c), which replays the two committed captures throughpacket_process()with the installed plugins and assertss1ap.nr_encryption_algorithms/s1ap.nr_integrity_algorithms0xE000 (NEA1-NEA3, NIA1-NIA3) andngap.srvcc_operation_possible1. The same file’stest_mobile_ue_keying_and_rel16drives crafted whole Ethernet/IPv4/SCTP frames: two eNodeBs reusing eNB-UE-S1AP-ID 5, a UEContextReleaseComplete and the two Rel-16 PDUs; the unit tests (test_s1ap_ue_keying_per_node,test_s1ap_ue_eviction_bounds,test_ngap_rel16_srvcc) check the keying, the release, the aging boundary and the bound. Those crafted-frame checks fail against themainbuild (5 of 26). Classification is untouched: both phase0 baselines are unchanged. Source:src/mmt_mobile/proto_s1ap.c(s1ap_entities_t,_is_same_ue,_remove_entity_node,_sweep_idle_ues,_update_ue_link,_update_entities_list,_s1_link_key,_parse_s1ap_packet,_extraction_att,s1ap_entities_update),src/mmt_mobile/include/proto_s1ap.h(S1AP_ATT_NR_*,S1AP_UE_IDLE_TIMEOUT,S1AP_UE_SWEEP_INTERVAL),src/mmt_mobile/s1ap/s1ap_common.{h,c}(_decode_s1ap_nr_ue_security_capabilities,_decode_s1ap_initialContextSetupRequest,_decode_s1ap_UEContextReleaseComplete),src/mmt_mobile/ngap/ngap.{h,c}(_get_srvcc_operation_possible),src/mmt_mobile/include/proto_ngap.h,src/mmt_mobile/proto_ngap.c,src/mmt_mobile/asn1c/delta-inventory.py(FAMILIES),tests/s1ap_ngap_decode/test_s1ap_ngap_decode.c,tests/s1ap_ngap_decode/test_s1ap_ngap_packets.c(test_mobile_ue_keying_and_rel16,test_mobile_rel16_corpus),tests/s1ap_ngap_decode/run_tests.sh,tools/phase0/gen_mobile_pcap.py(gen_acc_s1ap_rel16_positive_pcap,gen_acc_ngap_rel16_positive_pcap),tools/phase0/ci/accuracy/corpus.json,docs/index.html. - Q: Issue #582 (plan task 19.3, F-DOCS-008) — how is the doxygen that gates the C API reference pinned, and where is the reference published?
A: The root
Doxyfilescopes doxygen tosrc/mmt_core/public_includewithEXTRACT_ALL=NOand every completeness warning on (WARN_IF_UNDOCUMENTED,WARN_IF_DOC_ERROR,WARN_IF_INCOMPLETE_DOC,WARN_IF_UNDOC_ENUM_VAL);tools/ci/build-api-reference.shfails on any warning and on a public header without a@fileblock (doxygen checks the members of documented files only), so the 0-warning target covers every MMTAPI function and every struct, typedef, enum value and macro of the public headers.tools/ci/build-docs-site.shruns it after the Jekyll build intodocs/_site/api/, before the built-site link check and the manifest (which records the doxygen version), so the reference ships in the one Pages artifact (#386: no second renderer). The pin is doxygen 1.9.8 as the exact Ubuntu 24.04 package1.9.8+ds-2build5of the release pocket, which the archive never replaces: the upstream release binaries are x86-64 only, the docs jobs run on the runner (withruby/setup-ruby), not in a container, and building doxygen from source would add minutes to two jobs.tools/ci/build-api-reference.sh --installinstalls it in both jobs (verify-helpers,pages.yml) and checksdoxygen --version; another release fails underCI=trueand only warns locally, as the cppcheck pin does (#345).tools/ci/build-deps.txtis unchanged: its lists are the build-dependency lists (#495), and the docs jobs install no SDK build dependency. The generated pages carry a footer (tools/ci/doxygen-footer.html) linking the landing page and the docs index, the navigationcheck-site-links.shrequires of every built page (#579). Source:Doxyfile,tools/ci/build-api-reference.sh,tools/ci/doxygen-footer.html,tools/ci/build-docs-site.sh,.github/workflows/c-cpp.yml(verify-helpers),.github/workflows/pages.yml,docs/README.md. - Q: Issue #582 (F-DOCS-009) — which
path:linecitations does the docs guard check, and which pages are exempt? A:tools/ci/check-doc-citations.py, run byscripts/validate-doc-drift.sh(F-DOCS-009), checks every citation of everydocs/*.mdpage (inside fenced code, only a path with a directory part, so compiler output is not read as one): the path must be a repository file named from the root and the range must lie inside it, and the range must be registered intools/ci/doc-citations.txtwith a needle its first line (and optionally its last line) holds; a row its page no longer cites fails too. The generatedsdk/include/copy is not a citable path, so the pages that cited it now citesrc/mmt_core/public_include/; bare basenames (proto_http.c:367,integration.c:153) now carry their repository path. Two pages are exempt as append-only records —docs/DECISIONS.mdanddocs/troubleshooting.md— because their entries describe the tree on their date and may not be rewritten; the checker requires each exempt page to declare itself append-only. Two pages are delegated to their own, richer anchors —docs/AGENT_ENVIRONMENT.md(the CITATIONS table ofscripts/validate-agent-environment.sh) anddocs/Phase2-Heuristics.md(the #559 needle list) — and still have every range resolved and bounds-checked here. The audit’s stale citations found on this pass:src/mmt_core/src/memory.c(the allocation contract moved one line) andpacket_processing.h(mmt_session_structmoved one line), plus the header citations re-anchored after the doc comments were added. Source:tools/ci/check-doc-citations.py,tools/ci/doc-citations.txt,tools/ci/tests/test-doc-citations.sh(run by therelease_gatessuite),scripts/validate-doc-drift.sh.
2026-11-02
-
Q: Issue #568 (plan task 16.4, F-BUG-302) — how is a TLS ClientHello split over several TCP segments read, where does the per-flow state live, and what bounds it? A: (1) Detection.
mmt_classify_ssl()used to take a handshake record for a ClientHello only when the record exactly filled the segment (payload_packet_len - record_len == 5).ssl_is_client_hello_start()keeps the record-level test (handshake type 1, client version 3.0-3.3, handshake length = record length - 4) and drops the segment-fit one: a record complete in its segment (with or without bytes after it) is parsed there as before; a record that continues past its segment starts a collection (ssl_begin_client_hello()) and marks the flowsslon that first segment, the same evidence the single-segment path accepts. (2) Collection. The record body — the handshake message — is collected by TCP sequence number from the client direction (the session direction is the reassembly’s tag), into onemmt_malloc()block sized at the declared record length; byte ranges are tracked (at most 4 disjoint ones), so duplicates, overlaps and reordered segments are placed by position and anything past the record is ignored. Rejected: the generic TCP reassembly (opt-in, 4 MiB per flow by default, not on the default classification path) and appending in arrival order (a retransmitted first segment would be appended twice). (3) Bounds. A record declaring more than 2^14 bytes — the TLS plaintext limit (RFC 8446 §5.1), hence no valid record — is never buffered and takes the old path; a collection is dropped (freed) on a fifth disjoint range or after 8 segments that add no byte, each flow tries once (ssl_hello_started), and a collection still in flight when the flow ends is freed byfree_session_data()— a plainmmt_free(), so the units that includeip_session_id_management.cneed no new symbol. The data part is at most 16,384 bytes, the header 28 bytes; theresource_boundsfixturetls-hellomeasures both, and that no feed allocates. Known limits, left to follow-ups: only client segments count toward the give-up, so a collection whose client goes silent lives until the session expires (16,412 B against the 136 B flow record, with no per-handler cap); a first segment of 12 bytes or fewer (a record header sent alone) or a tail segment that arrives before the record start is not collected; andtls_hello_reasm_begin()needs the message length up front, so the QUIC caller (#571) must hold the 4-byte handshake header first and bound its 62-bit CRYPTO offsets before narrowing them to the 32-bit positions. (4) State. The buffer pointer is a field of the flow record (mmt_internal_tcpip_session_struct.tls_hello), which takes it from 128 B to 136 B — inside the #561 budget (≤ 136 B on LP64) but using all its headroom; the TCP session-data slot was rejected because TCP reassembly owns it when enabled. (5) Parser.tls_client_hello.{c,h}parses a ClientHello from a caller-owned buffer, never reading past it and never allocating:tls_client_hello_parse()takes a handshake message (type + u24 length + body), as a QUIC CRYPTO stream carries it (#571),tls_client_hello_parse_body()the body alone, as the single-segment path hands it, andtls_client_hello_foreach_extension()walks the extensions for the ALPN, supported_versions, ECH and JA4 readers (#569). A declared extension block longer than the buffer is walked as far as it goes (TLS_CH_TRUNCATED), which keeps the #103 and F-BUG-064 harness behaviour ofgetServerNameFromClientHello(), now a wrapper over the parser. (6) Baselines. Neither phase0 baseline changes: no golden capture carries a split hello. The change is pinned by three accuracy-corpus cases —acc_tls_split_clienthello(1,460 + 340 bytes, ssl.google from the second segment on; the base gavesslon the ServerHello only),acc_tls_split_reordered(segments 1, 3, 1, 2; ssl.ms_teams) andacc_tls_split_truncated(the rest never arrives;ssl, no SNI). Source:src/mmt_tcpip/lib/protocols/tls_client_hello.c,src/mmt_tcpip/lib/protocols/tls_client_hello.h,src/mmt_tcpip/lib/protocols/proto_ssl.c(ssl_is_client_hello_start,ssl_begin_client_hello,ssl_continue_client_hello,getServerNameFromClientHello),src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h(tls_hello,ssl_hello_started),src/mmt_tcpip/lib/protocols/ip_session_id_management.c(free_session_data),tests/parser_boundaries/test_tls_client_hello_unit.c,tests/parser_boundaries/test_tls_split_hello_api.c,tests/resource_bounds/test_tls_hello.c,tools/phase0/gen_tcpip_pcap.py,tools/phase0/ci/accuracy/corpus.json. -
Q: Issue #577 (plan task 18.3, F-UX-004/F-UX-006/F-UX-015/F-UX-016) — the hero, quick start, README, USER_GUIDE and DEPLOYMENT each offered their own install route; which install routes can the shared fragment publish today, in what order, and does the first run switch to
pkg-config mmt-dpi? A: (1)docs/_includes/quick-start.mdis the only home of theinstall.shcommands. It lists the routes in the order the plan sets — package repository, release bootstrap, source installer — and each names its platforms. The repository route is not documented: the signed APT and dnf repositories (#575, #576) are open and unpublished, so the fragment carries an HTML comment marking where their block goes first. The bootstrap route (releases/latest/download/install.sh | sh, #498) is listed with its platforms and the statement that it is published from the first release after v1.9.1 — v1.9.1’s assets hold no bootstrapinstall.sh(gh release view v1.9.1 --json assets), so until then the source installer is the command on every platform. The source installer keeps its one-liner, itswgetform and, moved out of README, its option lines (--dry-run,MMT_BASE,BRANCH+--unverified-branch,SKIP_DEPS,--uninstall). README embeds the fragment as before (its hand-written option, bootstrap and uninstall commands are gone, the bootstrap prose stays); USER_GUIDE §1 and DEPLOYMENT link the Quick Start (landing pageindex.html#quick-start, README#installon GitHub) instead of restating a command, anddocs/AGENT_ENVIRONMENT.md§4 names the--uninstalloption without a command line.tools/ci/check-doc-includes.shenforces it: aninstall.shcommand line (curl/wget…install.sh,sh install.sh) in README outside its shared blocks, indocs/index.htmlor indocs/*.mdfails the check —docs/DECISIONS.mdexcepted, since it is append-only and quotes past commands. (2) The landing hero no longer hand-copies the command: Liquid takes the block after the fragment’s<!-- hero-install … -->marker (the source installer, the one route live on every platform) for both the displayed line and the copy control, and the checker asserts that wiring. The hero title “first run — four steps” beside the closing “One command and you’re running” (F-UX-016) now reads “install once, then a first run in three commands” and “One command installs it; three more run your first program.” (3) Every block states or keeps its directory: README’s and USER_GUIDE’s manual builds runmake -C sdkfrom the checkout root they clone into, so USER_GUIDE §2’scd src/examplesfollows from where the reader is; DEPLOYMENT’s blocks all run from the checkout root (make -C sdk …,sdk/mmt-dpi_*.deb); README’s Verify Installationcd src/examplesblock, which started in a directory the previous block (ending insdk/) had not left and needed a checkout no one-command route makes, is replaced by a pointer to the first run, which starts from an empty directory after any route. (4) The first run keeps its explicit-I/-L /opt/mmt/dpicompile line;pkg-config mmt-dpiis deferred.mmt-dpi.pcis written bymake install(sdk/Makefile:126-128) and the package staging (sdk/Makefile:376-381) only since #550, which landed after v1.9.1: the v1.9.1 tag the source installer clones (install.sh:57) and the v1.9.1.deb/.rpminstall no.pc(git show v1.9.1:sdk/Makefilehas nopkgconfig), and noinstall.shpackage list installs pkg-config (tools/ci/build-deps.txt:59-64). Apkg-configcompile line would fail on every live route today; it becomes correct once the pinned release carries #550, and the switch belongs with that release bump. (5)tests/docs_onboardingchecks the routes: every command the fragment’sbashblocks display must belong to a known route (a new route’s block fails the suite until the suite knows it, so #575/#576 extend it with their commands); the bootstrap and source commands must be exactly the onestools/ci/smoke-bootstrap.sh:65andtools/ci/smoke-install.sh:62run before the same first-example steps, and the bootstrap’s own--helpmust show them; each source-installer line runs from an empty directory with the installer fetched from the checkout and--dry-runadded, exits 0, shows the plan its options ask for (prefix, ref, skipped dependencies, uninstall) and leaves the directory empty; the hero’s install control must copy the hero-install command (the Liquid reference in the source tree, the rendered command in a built site). The first run after the bootstrap and source routes stays covered where those routes can run, as root in throwaway containers (the bootstrap-smoke and install-smoke workflows); the repository route’s first run is #575/#576’s to add. Because the suite now namestools/ci/smoke-install.sh,tools/ci/smoke-bootstrap.shandtools/ci/bootstrap-install.sh, whose delegates load the mobile, dicom and business_app libraries,tools/ci/test-map.txttags itdocs,tcpip,mobile,dicom,business_app(tools/ci/check-test-map.shfollows named delegates). Source:docs/_includes/quick-start.md,README.md(Quick Start),docs/index.html(hero, final CTA, quick-start note),docs/USER_GUIDE.md§1-§2,docs/DEPLOYMENT.md(Installation),docs/AGENT_ENVIRONMENT.md§4,tools/ci/check-doc-includes.sh,tests/docs_onboarding/run_tests.sh([2/6], [3/6]),install.sh:57,sdk/Makefile:126-128,376-381,tools/ci/build-deps.txt:59-64,tools/ci/smoke-install.sh:62,tools/ci/smoke-bootstrap.sh:65,tools/ci/bootstrap-install.sh(usage),tools/ci/test-map.txt,tools/ci/check-test-map.sh. -
Q: Issue #580 (plan task 19.1, F-UX-014/F-UX-018/F-UX-019/F-UX-021) — the published
docs/troubleshooting.mdwas an append-only log of documentation fixes, the User Guide carried audit citations in its paragraphs, the manual-build prerequisites sent people to the agent notes, and the landing page’s live-capture snippet passed an unchecked handle topcap_loop(). Where does each part now live, and how is the first-run error page kept true? A: (1) The fix log moves unchanged todocs/doc-fix-log.md(a maintainer page, still append-only:scripts/validate-doc-drift.shF-DOCS-004 and theexemptrow oftools/ci/doc-citations.txtfollow it), anddocs/troubleshooting.mdbecomes the first-run error page: symptom as printed, cause, fix, for the install (unwritable prefix, the two--check-builtrefusals), compile (mmt_core.h,pcap.h), link (-lmmt_core,-lpcap, library order), loader, plugin-directory (empty or moved, relative or unreadableMMT_DPI_PLUGINS_DIR), capture-file and live-capture errors. Every entry was reproduced against a throwaway install before it was written, the privilege fixes in anubuntu:24.04container (as root, as a user,sudowithout and withenv LD_LIBRARY_PATH=,setcap cap_net_raw=eipwithLD_LIBRARY_PATH— ignored for a capability binary — and with-Wl,-rpath); messages that could not be reproduced (a plugin that fails to load, an unknown interface as root) are not documented.tests/docs_onboardingstep [7/7] re-runs the reproducible ones each time and requires the page to quote what is printed; host-dependent cases (a registered system install, running as root, a linker without--as-needed) are reported as not reproducible rather than failed. (2) The human prerequisites are a# Prerequisitessection ofdocs/Compilation-and-Installation-Instructions.md: one install command per package manager (apt, dnf, zypper, pacman) for the build and example roles — the source installer’s set, without the test tooling — whichtools/ci/check-dependency-lists.shnow extracts and compares withtools/ci/build-deps.txtlike the other lists. Their apt line does not namepkg-configorjq, so it is not a second copy of the toolchain linescripts/validate-agent-environment.shkeeps indocs/AGENT_ENVIRONMENT.md§1; README, CONTRIBUTING and the User Guide link the section, and README, the User Guide and the Compilation guide no longer link the agent notes (the validator’s must-link list keeps CLAUDE.md, AGENTS.md, CONTRIBUTING.md, DEVELOPMENT.md and DEPLOYMENT.md). (3) The User Guide’spath:lineand issue citations move to footnotes with their text unchanged, sotests/docs_lifecycleandtools/ci/check-doc-citations.pystill check each one. (4) The landing tier-3 listing checksargc,init_extraction(), the handler and the pcap handle and releases what it acquired;tools/ci/compile-doc-listings.shnow also compiles every<pre class="code">listing ofdocs/index.html(markup stripped, entities decoded) by default, and docs_onboarding runs the live listing without an interface and on one it cannot open. Source:docs/troubleshooting.md,docs/doc-fix-log.md,docs/Compilation-and-Installation-Instructions.md(Prerequisites),docs/USER_GUIDE.md,docs/index.html(tier 3, quick start),README.md,CONTRIBUTING.md,docs/README.md,scripts/validate-doc-drift.sh,scripts/validate-agent-environment.sh,tools/ci/doc-citations.txt,tools/ci/build-deps.txt,tools/ci/check-dependency-lists.sh,tools/ci/tests/test-dependency-lists.sh,tools/ci/compile-doc-listings.sh,tests/docs_onboarding/run_tests.sh([7/7]),tests/docs_lifecycle/run_tests.sh([5/5]),sdk/Makefile:70-80,136-144,src/mmt_core/src/plugins_engine.c:48-82,src/mmt_core/src/packet_registry_handler.c:123. -
Q: Issue #569 (plan task 16.5, F-BUG-309, F-CLEAN-005) — which TLS hello facts are exposed and how, where do they live without growing the flow record, where does JA4’s SHA-256 come from, and does the named-constant rewrite move any verdict? A: (1) Facts. The shared parser (
tls_client_hello.c, issue #568) keeps the first ALPN (16), supported_versions (43) and signature_algorithms (13) extension bodies and an outer encrypted_client_hello (0xfe0d, RFC 9849 §5 type 0) flag, and gainstls_server_hello_parse()(selected_version, ALPN). Three attributes are appended toenum ssl_attributesafterTLS_LENGTH, so no attribute id moves:ssl.tls_alpn(MMT_HEADER_LINE: the ClientHello’s protocol names comma separated in wire order, or the protocol a TLS ≤ 1.2 ServerHello selected — TLS 1.3 sends it encrypted),ssl.tls_sni_hidden(MMT_U8_DATA, ClientHello only: 1 with an outer ECH extension, whose server_name is then the ECH public name; a GREASE ECH extension, RFC 9849 §6.2, is indistinguishable on the wire and reads 1 too) andssl.tls_ja4(MMT_HEADER_LINE). No separate “negotiated version” attribute: as the issue asks,ssl.tls_versionreports on a packet carrying a whole ClientHello the highest non-GREASE supported_versions entry (else legacy_version), on a ServerHello the selected_version (else legacy_version), and the record-layer version on every other record as before — a TLS 1.3 hello no longer reads 0x0301/0x0303. (2) Storage. The facts are packet-scoped, likessl.server_name:struct mmt_tls_hello_factssits in the handler’s internal packet (mmt_tcpip_plugin_structs.h), keyed by packet id, never in the flow, so the #561 flow-record budget (136 B) is untouched. A hello one record holds is parsed on first use by an extractor (ssl_packet_facts(),proto_ssl.c), so for a single-record hello a handler that registers none of the attributes parses nothing more; a hello collected over several segments is read (JA4 included) by the classifier when it completes (ssl_note_hello()inssl_continue_client_hello()), before the buffer is freed. A packet holding only part of a record reports nothing, as before. (3) JA4 follows the FoxIO specification (technical_details/JA4.md): protocol letter, the version table, d/i from the presence of a server_name extension, two-digit cipher and extension counts capped at 99, the first ALPN name’s first and last character (its hex form’s first and last digit when either is not alphanumeric,00without one), then the first 12 hex digits of the SHA-256 of the sorted suites and of the sorted extensions without SNI and ALPN followed by_and the signature algorithms in wire order (no_without any; 12 zeros for an empty list); GREASE values are skipped everywhere. Sorting uses fixed arrays ofTLS_JA4_MAX_ITEMS(256) entries, so a hello with more suites or extensions has no JA4 instead of an allocation on the packet path. The reference value is the specification’s own example,t13d1516h2_8daaf6152771_e5627efa2ab1:acc_tls13_alpn_h2carries exactly its suites, extensions and signature algorithms (GREASE interleaved), and the test compares against the published string, never the SDK’s output. (4) SHA-256. The build links no third-party library (issue #495), sosrc/mmt_tcpip/lib/mmt_sha256.cimplements FIPS 180-4 §6.2 behind an init/update/final interface (byte-wise loads, any alignment), hidden by the plugin’s-fvisibility=hiddenand never installed; QUIC Initial decryption (issue #570) builds HMAC/HKDF on the same interface. The FIPS 180-2 Appendix B vectors are checked whole and in uneven pieces. (5) Named constants. Record, handshake, hello-version, SSLv2 and WhatsApp offsets are named (tls_client_hello.h,proto_ssl.c) and the classifier gates read through small predicates (ssl_is_record_of(),ssl_handshake_fills_record(),ssl_hello_version_ok(),ssl_certificate_fills_message()); the handshake and other-record gates move intossl_classify_handshake_record()andssl_classify_other_record()in their original order, the two ServerHello branches (record-filling, or a flow already TLS) merge into one condition, and every comparison keeps its integer arithmetic.grep -c 'payload\[[0-9]' proto_ssl.cfalls from 22 to 0. One literal is kept on purpose: the certificate-after-ServerHello path compares the next handshake type with 0x11 (17), not 11 (Certificate); correcting it could attribute TLS 1.2 flows from their certificate name and so move verdicts, so it stays asSSL_CERT_MESSAGE_LEGACY_TYPEfor a follow-up. (6) Verdicts. Classification is untouched: both phase0 baselines are unchanged, so the issue’s “regenerate the baselines” criterion has no diff line to justify. The two new corpus cases are in neithertools/phase0/ci/golden_pcaps.txtnor the labelled precision set; the accuracy oracle checks their verdicts (ssl, no attribution) andtest_tls_hello_attrs_api(tests/parser_boundaries/) their attributes. Source:src/mmt_tcpip/lib/protocols/tls_client_hello.c,src/mmt_tcpip/lib/protocols/tls_client_hello.h,src/mmt_tcpip/lib/protocols/proto_ssl.c(ssl_packet_facts,ssl_note_hello,tls_version_extraction,ssl_classify_handshake_record,ssl_classify_other_record),src/mmt_tcpip/lib/mmt_sha256.c,src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h(struct mmt_tls_hello_facts),src/mmt_tcpip/include/mmt_tcpip_attributes.h(enum ssl_attributes),tools/phase0/gen_tcpip_pcap.py(_tls13_client_hello),tools/phase0/ci/accuracy/corpus.json,tests/parser_boundaries/test_tls_fingerprint_unit.c,tests/parser_boundaries/test_tls_hello_attrs_api.c. -
Q: Issue #570 (plan task 17.1, F-BUG-307 part 1) — how are QUIC v1/v2 client Initials decrypted without a third-party crypto library, what is checked on hostile input, what does the classifier change, and which RFC vectors are in scope? A: (1) Primitives. The SDK links no third-party library (#495), so
src/mmt_tcpip/lib/mmt_crypto.cadds HMAC-SHA256 (RFC 2104) and HKDF-Extract/Expand (RFC 5869) on the SHA-256 of #569 (mmt_sha256.c), HKDF-Expand-Label with an empty context (RFC 8446 §7.1), AES-128 in the encryption direction only (FIPS 197 — the one CTR mode, GCM and QUIC header protection use) and AES-128-GCM authenticated decryption with a 96-bit IV (SP 800-38D: GHASH by the bitwise multiply of Algorithm 1, tag checked before any plaintext is written). Byte-wise throughout (any alignment, either byte order); not constant-time, because every key the plugin derives with it comes from public data — Initial keys are a function of the client’s Destination Connection ID and a public salt (RFC 9001 §5.2). Hidden visibility, not installed. (2) Decryption.quic_ietf_initial_decrypt()(src/mmt_tcpip/lib/protocols/quic_ietf_initial.c:158) takes the packet, the readable bytes, the UDP payload size and a caller-owned output buffer: it refuses a datagram under 1,200 bytes (RFC 9000 §14.1,:163), anything but a long-header, fixed-bit, v1 (type 0b00) or v2 (type 0b01, RFC 9369 §3.2) Initial, a DCID or SCID over 20 bytes, and every span (CIDs, Token Length and Token, Length) that does not fit — Length is compared with the bytes left, never added first, and must cover the 4-byte packet-number allowance plus the 16-byte header-protection sample, so the sample and the AEAD input stay inside the packet’s own end even when another packet follows it (quic_initial_parse,:114). Keys: initial secret = HKDF-Extract(salt, DCID), client secret = Expand-Label(“client in”), then “quic key/iv/hp” (v1) or “quicv2 key/iv/hp” (v2) (quic_initial_keys,:145). Header protection is removed with AES-ECB over the sample, the unprotected header is copied to the output and used as AAD, the nonce is the IV xor the truncated packet number (no reconstruction: the first Initials have no acknowledged packet), and reserved bits that are not zero after authentication are refused (:205). The output holds header then plaintext, at most the packet minus its tag (QUIC_INITIAL_OUT_BUFFER, 1,500 bytes, covers an Ethernet MTU); nothing is allocated, so no per-flow memory is held — thequic-initialresource_bounds fixture counts 0 allocations and an intact canary over 1,000 seeded valid, flipped, truncated and random datagrams. (3) Scope. No verdict reads the plaintext yet: #571 reads the CRYPTO frames (SNI, ALPN) through this API, and its 26 functions and tables are allowlisted astestintools/ci/unreachable-sections-allowlist.txtuntil then. The accuracy corpus’s client Initials are padded to 1,200 bytes (tools/phase0/gen_tcpip_pcap.py_quic_long_header(..., pad_to=1200)) but carry filler, not ciphertext: they parse and then fail authentication, so #571 needs real encrypted fixtures (the RFC A.2 packets are one source). Of RFC 9001 / RFC 9369 Appendix A, the A.1 rows (initial secret, client and server secrets, key, iv, hp) are checked throughmmt_hkdf_*and A.2 (the client Initial) end to end; A.3 (server Initial — keyed by the client’s original DCID, which the server packet does not carry, and under 1,200 bytes), A.4 (Retry: an integrity tag, no payload) and A.5 (ChaCha20-Poly1305 short header) are not client Initials and are out of scope. (4) Classifier._classify_quic_ietf_from_data_offset()now refuses a v1/v2 long header whose DCID or SCID length exceeds 20 (RFC 9000 §17.2,src/mmt_tcpip/lib/protocols/proto_quic_ietf.c:324); with the DCID length at most 20 the SCID length byte lies inside the 31-byte minimum already checked. The 1,200-byte minimum stays off the classifier: goldenquic.pcap(tools/phase0/gen_tcpip_pcap.py:195-215, about 59 bytes) and the corpus’s server Initials are shorter and would lose their verdict. Every golden and corpus QUIC capture uses CIDs of 4 or 8 bytes, so the fingerprint and the precision baseline are unchanged. Source:src/mmt_tcpip/lib/mmt_crypto.c,src/mmt_tcpip/lib/mmt_crypto.h,src/mmt_tcpip/lib/protocols/quic_ietf_initial.c,src/mmt_tcpip/lib/protocols/quic_ietf_initial.h,src/mmt_tcpip/lib/protocols/proto_quic_ietf.c(_classify_quic_ietf_from_data_offset),tests/parser_boundaries/test_quic_initial_decrypt_unit.c,tests/parser_boundaries/quic_initial_vectors.h,tests/parser_boundaries/test_quic_ietf_coalesced.c(section 7),tests/resource_bounds/test_quic_initial.c,tests/resource_bounds/budgets.json(quic-initial),tools/ci/unreachable-sections-allowlist.txt, RFC 9000 §14.1/§17.2, RFC 9001 §5 and Appendix A, RFC 9369 §3 and Appendix A. -
Q: Issue #564 (plan task 15.5, F-BUG-301/303/304/314) — what corroborates each weak signature, what does each stricter check give up, and why does the golden fingerprint move? A: (1) DICOM: the TCP classifier claims a flow only on an A-ASSOCIATE-RQ/AC (PS3.8 §9.3.2/§9.3.3) with a zero reserved byte, a PDU length inside the 68..65535 window
mmt_check_dicom_payload()already enforced, protocol version 0x0001 and a zero reserved field; the exportedmmt_check_dicom*()validators are unchanged (attribute extraction still uses them for every PDU type). Later PDUs ride the session the A-ASSOCIATE classified, so the cost is recall on captures that start mid-association, recorded asacc_dicom_midstream_ambiguous. Checking the AE titles or the item area was not needed: type, reserved byte, version and reserved field already leave a random 10-byte prefix under one chance in 2^60. (2) gQUIC: the version-less branch is deleted (withsequence()and its macros, now unused); the Q009..Q025 version branch stays, so a gQUIC flow is classified on its client’s first packet and the server’s version-less replies ride the session (acc_gquic_positive). The 15-byte minimum-length gate is kept. (3) STUN:check_stun_internal()is deleted — the LINE /22 and the IP-table relabels (GOOGLE→GTALK, YAHOO→YAHOOMSG, any other hit as a correlated protocol) were the only things it did, and nothing in a STUN message names an application; the Viber/Tango/FaceTime address fallbacks for non-STUN datagrams are separate behaviour and unchanged. #565’s table regeneration therefore no longer reaches STUN. (4) S1AP/NGAP: PPID 18 / 60 and the PPID 0 port fallbacks (36412, either endpoint, new for S1AP; 38412 destination, as before, for NGAP) classify only when the PDU decodes from the DATA chunk’s declared user data (clamped to the capture) and consumes it exactly —aper_decode()reports consumed bits. NGAP’s decode covers the whole PDU through its class tables; S1AP’s simplified schema keeps each message value as an open type, sotry_decode_s1ap()also decodes that value as the IE list every message shares (any message descriptor decodes it; the InitialUEMessage one is used) and requires it to fill the open type — the outer decode alone, even filling the buffer, accepted 4 zero bytes (an empty open type). Both probes are side-effect free (s1ap_decode()feeds the NAS ciphering table, so it is not reused). A genuine S1AP-PDU on PPID 60 also decodes as NGAP (the two share the header layout); the PPID names NGAP and the bytes parse as NGAP, so it stays NGAP. Cost: one extra APER decode per S1AP/NGAP DATA chunk, since SCTP chunks are classified per packet. Recall given up, recorded and not pinned by a corpus case: a DATA chunk that carries only a fragment of a user message (B/E flags not both set), a PDU cut by the capture’s snaplen (the decode extent is clamped to the captured bytes), and, for NGAP only, a PDU carrying an IE or procedure the r16.1 class tables do not know (its open type fails to decode) are no longer labelled; S1AP’s simplified schema keeps IE values as open types, so later-release S1AP IEs still pass. Trusting the PPID for fragments or clamped chunks was considered and left out: it would reopen exactly the payload-blind claim F-BUG-314 removes, for a case the payload cannot vouch for. (5) Fingerprint:s1ap.pcapkeeps its valid PDU ass1apand loses the 3-byte truncation and the outer-ok/inner-fail vector (both nowsctp_data);ngap.pcaploses the 8-byte dummy and the 2-byte truncation on PPID 60 and keeps the S1AP vector on PPID 60 asngap(see 4). Those packets were written to exercise the dissectors’ guards, which their consumers still reach through the decoders’ own unit tests.precision.txtchanges only in the abstention section (abstain_tcp_0016dicom:2→ 0, accepted 2 → 0); every recall and precision line is unchanged. Source:src/mmt_dicom/dicom.c(_is_dicom_association_open,mmt_check_dicom_tcp),src/mmt_tcpip/lib/protocols/proto_quic.c(mmt_check_quic),src/mmt_tcpip/lib/protocols/proto_stun.c(mmt_check_stun_udp),src/mmt_mobile/proto_s1ap.c(_is_s1ap_sctp_port,_classify_s1ap_from_sctp_data),src/mmt_mobile/s1ap/s1ap_common.c(try_decode_s1ap),src/mmt_mobile/proto_ngap.c(_classify_ngap_from_sctp_data),src/mmt_mobile/ngap/ngap.c(try_decode_ngap),tools/phase0/ci/accuracy/corpus.json,tools/phase0/ci/baseline/classification.txt,tools/phase0/ci/baseline/precision.txt. - Q: Issue #571 (plan task 17.2, F-BUG-307 part 2) — how are the SNI, ALPN and JA4 of a QUIC client Initial read, what bounds the per-flow CRYPTO state, how does the SNI name the application, and how is a capture that starts mid-connection (short headers only) classified without growing the flow record?
A: (1) CRYPTO stream. A new module,
src/mmt_tcpip/lib/protocols/quic_ietf_crypto.{c,h}(the plan put these helpers inproto_quic_ietf.c; a module of its own letstests/parser_boundaries/test_quic_crypto_unit.cinclude it with the decrypt, begin and feed calls counted), decrypts a flow’s client Initials with #570’squic_ietf_initial_decrypt()and walks their frames (RFC 9000 §19): PADDING, PING, ACK and ACK_ECN are stepped over, CRYPTO frames are collected, and CONNECTION_CLOSE, any other type or a malformed varint ends the walk. Every length a varint carries is first compared in 64 bits with the plaintext left in the packet — larger ends the walk, with no feed and no allocation; ACK range counts likewise. A CRYPTO frame outside the message window (offset > 2^14 || len > 2^14 - offset) is then skipped over its already-validated length, so a 62-bit offset is never narrowed to the 32-bit positions of the sharedtls_hello_reasm_*buffer (#568). The 4-byte handshake header is held in the flow state across packets; the buffer starts once it is whole, a ClientHello (type 1) of at most 2^14 bytes, header included — anything else ends the flow — and the held bytes are fed first. CRYPTO frames at offset 4 or more that arrive in an earlier packet than the last header byte are lost (the buffer does not exist yet; a retransmission completes it). Within a packet the CRYPTO frames are fed in ascending offset order (at most 16; more ends the flow), so the shuffled frames of current browsers grow one range instead of exhaustingTLS_HELLO_MAX_RANGES(4). The complete message goes throughtls_client_hello_parse(); the facts (SNI up to 255 bytes, ALPN text fromtls_alpn_text(), JA4 fromtls_client_hello_ja4(..., 'q', ...), the outer-ECH flag) are allocated once (428 B) and the buffer is freed. (2) Bounds. At mostQUIC_CRYPTO_MAX_ATTEMPTS(8) decryptions per flow, counted before each call whatever its outcome, then the flow is done (a forged Initial costs one AES/GHASH pass and counts); datagrams below 1,200 bytes and packets that are not v1/v2 Initial long headers are not attempted, so a ClientHello over three Initials with coalesced 0-RTT or padding still fits. The direction is latched on the endpoint of the first Initial that decrypts — notquic_client, which_quic_ietf_calculate_rtts()rewrites on every long header (a server Initial makes the server the “client”) — and afterwards only that endpoint’s Initials are read; a client Initial, then a server Initial + Handshake datagram, then a second client Initial still publishes the SNI (acc_quic_initial_split_reordered). The datagram length is the UDP length bounded by what the IP header declares (IPv4 total length, IPv6 payload length; the captured bytes only for a jumbogram), never the captured length: the plan said “bounded byl4_packet_len”, butproto_ip.cclampsl4_packet_lento the captured bytes on IPv4, so a snap length would shorten the datagram;test_quic_hello_attrs_apichecks UDP lengths 1208, 0, 0xffff (bounded by the IP length), 7 and 1108 (a 1,100-byte datagram although 1,200 bytes are captured) and IPv6. The QUIC session cleanup frees the buffer and the facts (quic_crypto_release()); thequic-cryptoresource_bounds fixture counts one buffer of at most 2^14 bytes plus its 28-byte header and one facts block per flow, no allocation for out-of-window frames, an incomplete header or forged Initials, at most 8 decryptions per flow and nothing left after release, over 1,000 seeded flows. (3) Attributes.quic_ietf.server_name,quic_ietf.tls_alpnandquic_ietf.tls_ja4(thesslnames,MMT_HEADER_LINE, packet scope) are appended toenum quic_ietf_attributesafterQUIC_IETF_RTT, so no id moves (the registered-attribute count goes from 7,487 to 7,490,docs/index.html); they are reported on the packet whose Initial completed the ClientHello, for the flow’s first QUIC layer. (4) Attribution. Withhostname_classifyon,get_proto_id_by_hostname()maps the SNI asssl_detect_protocol_from_sni()does (proto_ssl.cis not edited); the application becomes a path layer after the datagram’s last QUIC layer (offset 0, it shares the payload), appended again on every datagram — the chained-tail drop of #458 treats it as part of the tail — and the session method is set back tohostnameafterset_classified_proto()recordsdpifor the checker’s own write. The flow protocol stack (mmt_internal_add_connection_by()) is not used:udp_post_classification_function()would rebuild the path from it and lose the coalesced QUIC layers. A mid-flow verdict whose UDP fallback already guessed an application from the IP range keeps it afterquic_ietf, with methodip(test_quic_short_header_api, a server in 1.0.0.0/24). (5) Mid-flow verdict. A short header on a flow without a QUIC session counts when the flow has UDP/443 on one side, the packet goes to 443, sits right after the UDP header (not behind INT) and is at least 21 bytes: the first 8 bytes after its first byte (the DCID of a 1-RTT packet, RFC 9000 §17.3) are kept and the flow is QUIC on the 4th client packet in a row that repeats them; other bytes restart the count at 1. Packets from 443 neither count nor reset (the client’s DCID is often empty). A packet with the fixed bit clear, or TURN ChannelData framing (RFC 8656 §12.4: first byte 0x40-0x4f and the 16-bit length + 4 equal to the datagram length up to 3 bytes of padding), in either direction rejects the flow for good. N = 4: it fits the UDP checker’s window (udp_pre_classification_functionskips the walk after 2 ×CFG_CLASSIFICATION_THRESHOLD= 40 packets) and sits above the 2-packet flows of the precision abstention set. A stable prefix alone does not rule out TURN: constant-size ChannelData repeats bytes 1-8 (channel, length, DTLS type/version/epoch) on every datagram, which is why the framing rule exists (acc_quic_neg_turn_channeldata_443, andacc_quic_neg_turn_channeldata_trailer, where an FCS trailer or a snap length makes the captured length differ from the UDP length). The state — a count (0xff: not QUIC) and the 8 bytes — is two members appended to the packedstruct mmt_internal_udp_session_struct, inside thel4union whose size the TCP member sets; a new_Static_assertkeeps the UDP member within it, and the 136-B flow-record assert is unchanged. (6) Fixtures.tools/phase0/gen_tcpip_pcap.pystays stdlib-only: AES-128, GCM sealing, HKDF-Expand-Label and header protection are written out there, independent of the SDK’smmt_crypto.c, and_quic_selftest()checks the RFC 9001 Appendix A.1 keys and the A.2 protected packet and the RFC 9369 A.2 one byte for byte (read fromtests/parser_boundaries/quic_initial_vectors.h) before any QUIC capture is written. Seven corpus cases are added: three positives with a protected client Initial carrying SNI www.google.com and ALPN h3 (v1, v2, and the two-Initial reordered split), the mid-flow capture, and three negatives (unstable DCID, constant-size TURN ChannelData on 443, its FCS / snap-length variant). (7) Gates. The golden classification fingerprint and the precision baseline are unchanged: the goldenquic.pcapInitial is about 59 bytes (below 1,200, never decrypted) and has a long header, and the abstention set’s UDP flows are 2 packets each on ports from 1024 up. The 26testrows #570 added totools/ci/unreachable-sections-allowlist.txtformmt_crypto.candquic_ietf_initial.care deleted: the classifier reaches them now. Source:src/mmt_tcpip/lib/protocols/quic_ietf_crypto.c,src/mmt_tcpip/lib/protocols/quic_ietf_crypto.h,src/mmt_tcpip/lib/protocols/proto_quic_ietf.c(_quic_ietf_read_crypto,_quic_ietf_hello_attribute,_quic_ietf_append_app_layer,_quic_ietf_drop_chained_layers,_quic_ietf_short_header_candidate,_quic_ietf_udp_datagram_len,_quic_ietf_ip_range_guess),src/mmt_tcpip/lib/protocols/proto_quic_ietf.h,src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h(quic_sh_count,quic_sh_dcid),src/mmt_tcpip/lib/protocols/proto_ip.c:1043-1050,src/mmt_tcpip/lib/protocols/proto_udp.c:64-89,tools/phase0/gen_tcpip_pcap.py(_quic_selftest,_quic_protect_initial),tools/phase0/ci/accuracy/corpus.json,tests/parser_boundaries/test_quic_crypto_unit.c,tests/parser_boundaries/test_quic_hello_attrs_api.c,tests/parser_boundaries/test_quic_short_header_api.c,tests/parser_boundaries/test_classification_method_api.c,tests/resource_bounds/test_quic_crypto.c,tests/resource_bounds/budgets.json(quic-crypto), RFC 9000 §12.2/§16/§17.3/§19, RFC 9001 §4-§5 and Appendix A, RFC 9369 §3 and Appendix A, RFC 8656 §12.4. -
Q: Issue #565 (plan task 16.1, F-BUG-305) — which published feeds regenerate the IP-range table, how are cloud tenancy and CDN edges labelled apart from first-party apps, what happens to the 2017 entries no feed covers, and how is the data’s provenance and redistribution recorded? A: (1) Feeds and labels.
tools/refresh_cdn_ranges.shdownloads AWSip-ranges.json, Googlegoog.jsonandcloud.json, the Azure Service Tags (ServiceTags_Public_YYYYMMDD.json, whose dated URL the script reads from Microsoft’s download page, id 56519), Cloudflareips-v4/ips-v6and Fastly’spublic-ip-listinto a new empty directory and writes aMANIFESTline per feed: name, sha256, fetch date (UTC), URL.tools/gen-ip-range-data.pyreads that directory offline, refuses a missing or duplicated feed, a URL that is not the feed’s, a sha256 mismatch, a malformed feed or prefix, and a prefix two labels (or a feed and the hand-maintained part) list identically. It labelsPROTO_CLOUDFRONTthe AWS servicesCLOUDFRONTandCLOUDFRONT_ORIGIN_FACING,PROTO_AWSevery other AWS prefix (theAMAZONsuperset included) minus CloudFront,PROTO_GOOGLE_CLOUD(new id 667, aliasgoogle_cloud, class web likeaws)cloud.json,PROTO_GOOGLEgoog.jsonminuscloud.json(Google documents that difference as its own services),PROTO_AZUREthe service tagAzureCloud, andPROTO_CLOUDFLARE/PROTO_FASTLYtheir edges. “Minus” removes address space, so a provider’s specific label wins whatever the prefix lengths; prefixes of different providers may nest (longest prefix wins) and do not in the 2026-11-02 data. No prefix is labelledPROTO_AMAZONany more: no feed publishes Amazon’s first-party (retail) space apart from AWS. Oracle’spublic_ip_ranges.jsonis not imported:PROTO_ORACLEis the Oracle database protocol (the accuracy corpus’soraclefamily), so OCI tenancy would need its own id; the issue names AWS, Google, Microsoft and Cloudflare only. Microsoft’s first-party Office 365 endpoints feed is not imported either; Microsoft 365 is attributed by hostname since #566. (2) Kept entries.data/ip_ranges.txtgets two parts. The hand-maintained part holds the 1,592 May 2017 entries of providers with no published feed (582 Apple, 479 Yahoo, 259 Webex, 99 Kakao, 77 Facebook, 48 Netflix, 45 Twitter, 3 Skype), unchanged and in their original order: dropping them would remove attribution that downstream users read, andext_attribution_testrelies on the built-in 1.201.0.0/24 (Kakao). The feed part replaces the 2017 Google (5,014), Amazon (3,670), AWS (4), Azure (8) and Cloudflare (15) entries; its 4,263 prefixes come from the feeds fetched 2026-11-02. The table falls from 10,303 prefixes and 7,786 intervals to 5,855 and 7,180. The builder keeps the hand-maintained part verbatim and setsversion:to the later of the fetch date and the current one. (3) Outputs and reproducibility. The builder also writesdata/ip_ranges.cdn.txt, which now holds the IPv6 prefixes of the same feeds under the same labels (the compiled-in table is IPv4 only). Its 85,000 lines, mostly every Azure service tag’s prefixes repeated, shrink to the 4,412 IPv6 prefixes; the IPv4 ones are compiled in. Both files record each feed’s URL, fetch date and sha256 next to its entries. The build never fetches: the committed files are its input,gen-ip-range-table.py --checkreproduces the.incfromdata/ip_ranges.txt, and the kept download directory reproduces both data files byte for byte (refresh_cdn_ranges.sh --feeds DIR). Thecore_enginesuite runs the builder on fixture feeds (check_ip_range_feeds.sh). (4) Fingerprint and precision. Neither baseline moves: no golden or labelled capture talks to an address whose label changed, so both gates pass against the committed baselines without regeneration. The two new accuracy cases (acc_ip_cloudfront_tenant,acc_ip_gcp_tenant) show the change: an opaque TCP flow to 13.32.10.10 iscloudfrontand one to 35.192.10.10 isgoogle_cloudon all 5 packets, with classification methodip;origin/mainlabels themamazonandgoogle. One test addressed a dropped 2017 entry:test_quic_short_header_api.c(#571) used 1.0.0.2, which the 2017 table labelledgoogle(1.0.0.0/24, APNIC space no Google feed lists); it now uses 8.8.8.8,googlefromgoog.json, and its assertions are unchanged. (5) Redistribution. The feeds are published by the providers for exactly this use, carry no licence text, and are lists of facts (prefixes and service names). Azure ranges were already redistributed indata/ip_ranges.cdn.txtsince #83. The vendored-components inventory (tools/ci/vendored-components.json,tools/ci/vendor-paths.txt) records vendored source code and its licences, not data, so the provenance lives in the data files’ feed lines. The script header anddocs/External-Attribution.mdkeep the instruction to confirm each provider’s terms before redistributing. Source:tools/refresh_cdn_ranges.sh,tools/gen-ip-range-data.py,data/ip_ranges.txt,data/ip_ranges.cdn.txt,src/mmt_tcpip/lib/mmt_tcpip_classif_proto_ip_address.inc,src/mmt_tcpip/include/mmt_tcpip_protocols.h(PROTO_GOOGLE_CLOUD),src/mmt_tcpip/lib/proto_init_list.def,src/mmt_tcpip/lib/mmt_tcpip_classes.c,tests/core_engine/check_ip_range_feeds.sh,tests/core_engine/test_core_engine.c(test_ip_attribution),tools/phase0/ci/accuracy/corpus.json,tools/phase0/gen_tcpip_pcap.py,docs/External-Attribution.md. - Q: Issue #572 (plan task 17.3, F-BUG-308) — how are MPLS, VXLAN, GENEVE and PPPoE walked to the inner flow, what bounds the walk, and how are the inner flows keyed?
A: (1) Ids.
PROTO_MPLS668,PROTO_VXLAN669 andPROTO_GENEVE670 are appended after #565’sPROTO_GOOGLE_CLOUD667 (aliasesmpls,vxlan,geneve, class tunnel);PROTO_MPLS_IN_IP(IP protocol 137) stays registration-only.PROTO_PPPandPROTO_PPPOEkeep their ids and their place inproto_init_list.def— the rows becomeMMT_PROTO_INITin place, since the list’s order is significant. (2) MPLS. The label stack is one layer, not one per label, so a deep stack cannot exhaust the 16-entry protocol path:proto_mpls.creads at most 16 entries (deeper than deployed segment-routing stacks), each only once captured, and a stack without a bottom-of-stack entry within the bound ends the path atmpls. MPLS has no next-protocol field: the bottom entry’s IPv4/IPv6 explicit-null label decides, else the payload’s first nibble — 4 and 6 are IP, 0 is a pseudowire control word (RFC 4385 reserves that nibble) followed by Ethernet; the G-ACh label (13) carries OAM and ends the path; anything else isunknown. Ethernet and 802.1Q gain the 0x8847/0x8848 case, PPP protocols 0x0281/0x0283 lead to MPLS. Rejected: one layer per label (path exhaustion), guessing Ethernet for pseudowires without a control word (a MAC address can start with any nibble). (3) VXLAN and GENEVE are UDP checkers, port-gated on their IANA ports (either direction) at weight 30 aftermmt_check_dhcp: VXLAN needs the I flag and room for an inner Ethernet header, GENEVE version 0, an EtherType Protocol Type and its options inside the datagram. Their classify-next functions re-check the header against caplen, re-enter Ethernet (GENEVE also IPv4/IPv6; another Protocol Type isunknown), and end the path at a GENEVE control packet (O bit). Weight 30 keeps them behind QUIC/mDNS/DNS/DHCP, whose checkers cannot match these ports’ payloads, and ahead of the weaker heuristics. (4) PPPoE/PPP. A session packet (VER 1, TYPE 1, CODE 0) is handed to PPP; discovery packets end atpppoe. PPP skips an Address/Control pair, reads a one-byte (PFC, odd) or two-byte Protocol field, hands IPv4/IPv6/MPLS on, ends the path at a control protocol (0x4000 and above) or a malformed field and reports another network-layer protocolunknown. Ethernet maps the LCP/IPCP EtherTypes to PPP with no Protocol field, so PPP beneath Ethernet ends the path. GRE’s existing 0x880b mapping means PPTP flows now reach their inner IP too;gre_classify_next_proto()therefore counts the Acknowledgment Number enhanced GRE (version 1, RFC 2637 §4.1) carries when its A bit is set, which it used to read as the start of the PPP frame. (5) Stale layers. A packet’s protocol path is its session’s, so when a walker finds no inner layer (cut header, control packet) it ends the session path at its own layer and clears the winning checkers recorded beyond it (tunnel_walk.h, the patternproto_gtp.cuses for non-T-PDU messages); otherwise the inner layers an earlier packet appended would be processed with this packet’s offsets. (5b) Per-packet offsets beneath a session. The layers below a session’s own protocol are read from the session’s stored offsets once the sessionizer finds the session, and those were the creating packet’s: an MPLS stack one direction pops (penultimate-hop popping), GENEVE options only one VTEP adds, keep the same path and IP index, so the IP splice never ran and the other direction was parsed at the wrong offset.proto_session_management()now refreshes the stored offsets up to the session’s layer from the packet, for the layers where both name the same protocol (refresh_session_lower_offsets(), at most 16 stores, no allocation); a layer whose protocol differs stops the refresh and stays with the IP sessionizers’ splice. Plain Ethernet/IP flows store identical values, so the golden fingerprint is unchanged. (6) Keying. Inner flows are sessionized by the inner IP sessionizer on their own 5-tuple, with the outer session asparent_session, as GTP-U and GRE inner flows already are; the VNI and MPLS labels are not part of the session key, so two tenants reusing one inner 5-tuple share a session — the same property 802.1Q VLAN ids and GTP TEIDs have today. Changing the key is a change to every session and to the per-flow cost #584 will measure, so it is left out. The walk allocates nothing per packet; nested tunnels stop when the 16-entry path is full. (7) Baselines. No golden CI capture is encapsulated and no abstention-set flow uses UDP/4789 or 6081, so both phase0 baselines are unchanged; the new behaviour is pinned by eight accuracy-corpus cases (inner HTTP or TLS through each encapsulation, and a negative per encapsulation — 17 labels without a bottom entry, PPPoE discovery + LCP, VXLAN without the I flag, GENEVE version 1) and by theparser_boundariesfixtureencap. The precision tools countvxlanandgeneveas non-application layers, likegreandmpls. Source:src/mmt_tcpip/lib/protocols/proto_mpls.c,src/mmt_tcpip/lib/protocols/proto_vxlan.c,src/mmt_tcpip/lib/protocols/proto_geneve.c,src/mmt_tcpip/lib/protocols/proto_pppoe.c,src/mmt_tcpip/lib/protocols/proto_ppp.c,src/mmt_tcpip/lib/protocols/tunnel_walk.h,src/mmt_tcpip/lib/protocols/proto_ethernet.c,src/mmt_tcpip/lib/protocols/proto_8021q.c,src/mmt_tcpip/lib/protocols/proto_gtp.c(non-T-PDU path truncation),src/mmt_tcpip/lib/protocols/ip_session_id_management.h(mmt_session_key_t),src/mmt_tcpip/lib/inter_proto_classif_list.def,src/mmt_tcpip/lib/proto_init_list.def,src/mmt_core/src/packet_pipeline.c(set_classified_proto,PROTO_PATH_SIZEbound),src/mmt_core/src/packet_session.c(refresh_session_lower_offsets),src/mmt_tcpip/lib/protocols/proto_gre.c(gre_classify_next_proto), RFC 2637 §4.1,tests/parser_boundaries/test_encap_walk_api.c,tools/phase0/gen_tcpip_pcap.py(_EncapFlow),tools/phase0/ci/accuracy/corpus.json, RFC 3032 §2.1, RFC 4385 §3, RFC 4448 §3, RFC 5586, RFC 7348 §5, RFC 8926 §3, RFC 2516 §4-§5, RFC 1661 §2. - Q: Issue #556 (plan task 14.2, F-PERF-003) — how does an attribute fetch find its registered attribute without scanning, is extraction memoised per (packet_id, index), and how are the issue’s targets measured?
A: Each handler keeps, per protocol, a direct
attribute_id -> attribute_internal_t *table (mmt_handler_t.proto_attr_index,src/mmt_core/private_include/packet_processing.h) next to the field_id-sortedproto_registered_attributesarray.mmt_attr_index_slot()packs the generic statistics/session ids (PROTO_HEADER..PROTO_HEADER+ 15) into slots 0-15 and protocol-specific ids below 1024 at 16 + id — on this tree the 675 protocols declare 7,481 attributes whose protocol-specific ids stop at 187 and whose generic ids span 0x1000-0x100b — so a protocol’s table is only as long as its largest registered id needs, allocated on its first indexable registration and grown in steps of 8 slots; an id outside both ranges (a plugin may declare anyuint32_t) is found by binary search over the sorted array (search_registered_attribute()). Every lookup helper —get_registered_attribute(),is_registered_attribute()(which now also rejects a protocol id >=PROTO_MAX_IDENTIFIERinstead of indexing past the arrays),has_registered_attribute_handler(),is_registered_attribute_handler(), the getters — goes through the inlinemmt_find_registered_attribute(). Coherence:register_extraction_attribute()reserves the slot before linking the attribute, so a failed growth fails the registration and leaves the registry as it was;release_extraction_registration()clears the slot in the same step that unlinks the attribute from the array, before the #501 deferred free, so the index never holds a pointer the array does not;free_registered_extraction_attributes()frees the tables. The extraction body (internal_extract_attribute(), still exported) is inlined into the getters (extract_attribute_at()), so a fetch runs in one call frame. Per-(packet_id, index) memoisation was not added: no measured workload re-fetches an attribute within a packet (the fetch-all driver fetches each attribute once per layer), so it saves nothing on the gate, while session- and statistics-scoped values (e.g.PROTO_PACKET_COUNT) read from an attribute handler mid-packet and again from the packet handler legitimately differ — a memo would return the stale one;docs/MMT-Attributes.md’s “every read extracts the attribute again” stays true. Measured on aarch64 (20 cores, Cortex-X925 performance cores — the audit host’s figures reproduce here: main’s bigFlows bare 293-300 ns/pkt, fetch-all 1,692-1,701 ns/pkt against the audit’s 1,704), GCC 13.3.0, Ubuntu 24.04.4 LTS,phase0_throughputpinned to one X925 core, 10 iterations, two runs: bigFlows fetch-all 1,692-1,698 -> 955-956 ns/pkt, bare 293-296 -> 289-290, attrs8 336-337 -> 325; smallFlows fetch-all 1,886-1,901 -> 1,116-1,122 ns/pkt. Instruction gate (callgrind,tools/phase0/ci/check_instructions.sh, same host): fetch-all 52,091.9 -> 30,608.9 Ir/pkt (-41.2 %), bare 10,532.7 -> 10,533.2 (+0.005 %), attrs8 11,610.3 -> 11,470.3 (-1.2 %); the committed baseline is refreshed from that run. Re-measured on the same host after merging main (#557, #558, #560, #561, #562), against main’s baseline: fetch-all 51,264.2 -> 29,490.6 Ir/pkt (-42.5 %), attrs8 11,301.3 -> 10,992.4 (-2.7 %), bare 10,222.0 -> 10,067.0 (-1.5 %); the committed baseline is regenerated from that run. Re-measured again after merging main’s #564-#572 and #580, on the same host, against main at acf6d5f7 measured there: fetch-all 51,191.8 -> 29,524.4 Ir/pkt (-42.3 %), attrs8 11,257.4 -> 11,069.1 (-1.7 %), bare 10,182.4 -> 10,143.0 (-0.4 %); the committed baseline is regenerated from that run. The issue’s “get_attribute_extracted_data_at_indexself cost < 15 %” is not met as callgrind reports it: with the extraction inlined the function’s self cost is the whole fetch path (45.7 % ontcp_ecn_sample.pcap, the same share as before but of a 39 % smaller total), and keeping the extraction out of line to lower that figure cost 120 ns/pkt on bigFlows (1,073 ns/pkt, -38.4 % Ir) and missed both other targets. The lookup itself is about 10 instructions of the roughly 40 the function spends validating the index, protocol path and protocol registration and looking the attribute up; before, the function spent 169 instructions per fetch, almost all of them the scan. Source:src/mmt_core/private_include/packet_processing.h(proto_attr_index,mmt_attr_index_slot(),mmt_find_registered_attribute()),src/mmt_core/src/packet_registry_attr.c,src/mmt_core/src/packet_pipeline.c(extract_attribute_at(),extract_consumed_attribute_data()),tests/core_engine/test_core_engine.c(test_attribute_index()),tools/phase0/ci/baseline/instructions.txt,tools/phase0/phase0_throughput.c. - Q: Release 1.10.0 (merge into the public Montimage/mmt-dpi repository) — which internal or legacy documents leave the tree?
A: Removed:
docs/ci-audit-2026-10.md(internal CI audit; its recommendations landed as issues #653–#659, which the code comments now cite instead),debian/license-audit.md(draft licence audit for the Debian submission; its open questions are tracked in issue #475, anddebian/copyright/debian/README.sourcepoint there),docs/ChronoChat.mdanddocs/Install-mmt-sdk-on-CubieBoard-X.md(legacy notes for a third-party NDN demo and an mmt-sdk 0.1 board port), and the Pencil sourcesdocs/images/mmt-arch-Nov2015.ep,docs/docs/mmt-flow.epwith the unreferenceddocs/docs/mmt-flow_v1.0.png. The removed files stay readable in the git history. Earlier entries of this file that name them are kept unchanged (append-only). Source: maintainer decision, 2026-11-07;debian/copyright,debian/README.source,tools/ci/run-cppcheck.sh,tools/ci/test-map.txt,tools/ci/doc-citations.txt,docs/README.md,docs/NDN-protocol.md,docs/_config.yml. - Q: Release 1.10.0 — which organisation is canonical once the tree lands in the public repository?
A:
Montimage(https://github.com/Montimage/mmt-dpi, sitehttps://montimage.github.io/mmt-dpi/) supersedes the 2026-09-12/2026-09-13 entries that namedmontimage-projects: the 1.10.0 cycle merges themontimage-projectstree into the publicMontimage/mmt-dpirepository, which becomes the home of the code, issues, Releases and Pages. Every installer, smoke, bootstrap, packaging and documentation reference now namesMontimage/mmt-dpi(the exact$GITHUB_REPOSITORYspelling); the earlier entries above are kept unchanged. The history was rewritten for the move (commit-message trailers removed, trees unchanged), so the v1.9.0 and v1.9.1 tags inMontimage/mmt-dpiname the rewritten commits andinstall.shpins v1.9.1 to 7c150ef4. Source: maintainer decision, 2026-11-07;install.sh(REPO_URL,INSTALLER_URL,RELEASE_TAG_SHA),scripts/validate-install-origin.sh,scripts/validate-compile-install.sh,docs/_config.yml,tools/ci/smoke-install.sh,tools/ci/bootstrap-install.sh. - Q: Release 1.10.0 — which baseline do the landing page’s measured 1.10.0 figures name, and where does their evidence live?
A: The baseline is
Montimage/mmt-dpimainataf338b16(git describe:v1.8.0-40-gaf338b16), never “v1.9.1” or “the previous release”: v1.9.1 is not an ancestor ofaf338b16. The candidate was measured at54bdae50, whose tree equals90b7a8cfonrelease/v1.10.0; nothing undersrc/,rules/,data/ortools/phase0/changed on the branch after it. The page quotes only figures without a known bias —bigFlows.pcapbare throughput (×2.3–2.5 over two alternating rounds), library RSS (−56%) and sanitizer findings on 2,011 hostile inputs (100 → 0) — and labels them, with the 1.10.0 features, as unreleased in a section of their own, leaving the hero version, the pinned install and the FAQ figure thatscripts/validate-doc-drift.shreads fromtools/phase0/baseline/perf/throughput.txtunchanged. Instructions per packet (better onsmallFlows.pcap, worse on the tiny CI pcaps) and the accuracy corpus (written with the 1.10.0 fixes) are not claimed. The raw output is committed underdocs/benchmarks/1.10.0-vs-af338b16/, not undertools/phase0/baseline/, which belongs to the CI gates; the method is described in prose indocs/BENCHMARKS.mdrather than committing the container script. Source:docs/BENCHMARKS.md,docs/benchmarks/1.10.0-vs-af338b16/,docs/index.html(#next-release),CHANGELOG.md(Version 1.10.0), maintainer merge-readiness run of 2026-11-07. -
Q: Issue #749 (plan task 1.3, epic #746) — what happens to each of the 11 high CodeQL alerts reported on Montimage/mmt-dpi#41, and how is the generated asn1c tree kept out of CodeQL? A: (1) Seven alerts are fixed in code and four are dismissed here, with their reasons (table below). Inline
// codeql[...]comments dismiss nothing on GitHub code scanning: alert #8 stayed open on the line ofsrc/mmt_core/src/dpi_profiles.c:259that already carries one. A dismissal therefore means the reason recorded in this entry, which a maintainer applies in the Security tab as “Won’t fix” (this change cannot write repository alert state). (2) The asn1c exclusion is in the existing advanced-setupcodeqljob of.github/workflows/c-cpp.yml. CodeQL is not on GitHub default setup here (the default-setup API reportsnot-configured), so no setup switch is needed upstream. A config-filepaths-ignorewould do nothing for this job: GitHub honourspaths/paths-ignoreonly for interpreted languages and forbuild-mode: none, and this job traces abuild-mode: manualENABLESEC=1build.build-mode: nonewas rejected because it would replace the traced build, and with it the whole SDK’s analysis fidelity, to filter one directory. Soanalyzenow writes the SARIF without uploading it (upload: failure-only,output: sarif-results), a jq step drops every result whose primary location (locations[0]) is undersrc/mmt_mobile/asn1c/and logs the count, andupload-sarif, at the same pinned SHA, uploads the rest under the unchanged/language:c-cppcategory, so the job keeps its alert stream. Guaranteed: no alert whose primary location is in the asn1c tree is raised from that job, and the two open criticalcpp/type-confusionalerts atOCTET_STRING_xer.c:279,342close as fixed on the next analysis of each ref. Not guaranteed: the tree is still extracted, because the handwritten mobile dissectors include its headers. A handwritten-code result whose data flow passes through asn1c code is kept, as it should be, and refs analysed before this change (the v1.9.0/v1.9.1 tags) keep their alerts until they are analysed again or dismissed. (3) Alert #13 (cpp/unsafe-strcat, critical,mmt_utils.c:432) is not one of the 11.str_replace()lost itsstrcatcalls in #748.Alert Rule Location (#41) Outcome Reason #1 cpp/comparison-with-wider-typesrc/mmt_tcpip/lib/protocols/http.c:1005fixed Counter awidened fromuint8_ttouint16_t, the type ofparsed_lines(mmt_tcpip_plugin_structs.h:758). The line parser stops below 200 lines (mmt_tcpip_utils.c:317,MMT_MAX_PARSE_LINES_PER_PACKET200), so the loop never reached 256: no verdict can change.#3 same proto_fasttrack.c:39fixed Same widening and cap. #5 same proto_icecast.c:27fixed iwidened touint16_tagainstparsed_unix_lines(mmt_tcpip_plugin_structs.h:759), capped below 200 atmmt_tcpip_utils.c:371.#7 same proto_smtp.c:46fixed Same as #1. #2 same proto_direct_download_link.c:167fixed (real bug) The :portstrip ofsearch_ddl_domains()walks back over trailing digits withiagainst theuint16_tHost length. Auint8_tiwrapped to 0 after 255 digits, readhost_line.ptr[len](one byte past the Host value, past the payload when the Host line ends the packet) and never reached the:: a direct-download host with a port of 255 or more digits went unrecognised, and the walk never ended when that byte was itself a digit.iis nowuint32_t. Regression test:tests/parser_boundaries/test_ddl_host_port_unit.c(fixtureddl). It fails on theuint8_tcounter and passes now. Hosts with fewer than 255 port digits behave as before.#4 same proto_dns.c:80fixed bytes_to_int_extraction()compared auint16_tiwith theintnb_bytes, so a count above 65535 never ended the loop.iis nowint, the type of its bound. The function’s callers pass small constants, so the output is unchanged.#14 cpp/suspicious-allocation-sizesrc/mmt_tcpip/lib/protocols/ip_session_id_management.c:361fixed get_session()allocatedsizeof (mmt_session_t) + sizeof (mmt_session_key_t) + sizeof (struct mmt_internal_tcpip_session_struct)and reached the key and the tcpip state through byte offsets. A localstruct mmt_tcpip_session_block { session; key; internal; }is now allocated assizeof (*block), and each member gets its own aligned offset.sessionis the first member, sofree(session)in the session cleanup still releases the whole block.#8 cpp/path-injectionsrc/mmt_core/src/dpi_profiles.c:259dismissed (won’t fix) The environment variable is the feature: MMT_DPI_PROFILES_FILE(dpi_profiles.c:254) names an operator-supplied profiles file, documented indocs/DEPLOYMENT.md(Environment Variables) anddocs/DPI-Profiles.md. It is opened read-only with the embedding process’s own privileges (fopen(path, "r"),dpi_profiles.c:190) and parsed by a bounded line reader. For a process running with the privileges of whoever sets its environment (the supported deployment), that person can already read any file the process can, so the path is not attacker input in the library’s threat model (remote packet bytes). The three file variables (dpi_profiles.c:254,mmt_tcpip_plugin_internal.c:672,mmt_tcpip_classif_utils.c:570) are read withgetenv(), notsecure_getenv(), so a set-uid, set-gid or file-capability process would honour them, and its loader would echo fields of rejected lines to stderr (dpi_profiles.c:223,mmt_tcpip_plugin_internal.c:659,mmt_tcpip_classif_utils.c:505); such an embedder must clear them. Switching the three reads tosecure_getenv(), asMMT_DPI_PLUGINS_DIR(plugins_engine.c:50) andMMT_SEC_REACTION_DIR(tips_report.c:970) already do, is left as a follow-up behaviour change. Unset, nothing is opened.#9 same src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c:676dismissed (won’t fix) Same contract for MMT_DPI_PORT_MAP_FILE(mmt_tcpip_plugin_internal.c:672, opened read-only at:592), documented indocs/External-Attribution.md.#10 same src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c:574dismissed (won’t fix) Same contract for MMT_DPI_IP_RANGES_FILE(mmt_tcpip_classif_utils.c:570, opened read-only at:468), documented indocs/External-Attribution.md.#15 cpp/uncontrolled-process-operationsrc/mmt_core/src/plugins_engine.c:118dismissed (won’t fix) dlopen()(nowplugins_engine.c:122) loads only files thatload_plugins()lists inplugins_directory()(plugins_engine.c:48-60). That directory is the compiled-inPLUGINS_REPOSITORY_OPTunlessMMT_DPI_PLUGINS_DIRoverrides it. The override is read withsecure_getenv()(:50), so setuid/setgid processes ignore it, and a relative value is refused (:55). The working directory is never scanned (issue #503). Pointing a process at an operator-chosen plugin directory is the documented purpose of the variable and gives no more control thanLD_LIBRARY_PATHorLD_PRELOAD.Fingerprint: none of the fixes changes classification on the golden corpus (
tools/phase0/ci/check_classification.shandcheck_precision.shpass unchanged). Source: CodeQL alerts #1-#17 onrefs/pull/41/mergeof Montimage/mmt-dpi (read-only API, 2026-11-07); GitHub Docs, Workflow configuration options for code scanning (Specifying directories to scan);.github/workflows/c-cpp.yml(codeqljob); the files in the table;tests/parser_boundaries/run_tests.sh(fixtureddl). - Q: Issue #751 (plan task 2.1, epic #746): how does the upstream
v1.9.1GitHub Release get published, given that Montimage/mmt-dpi#41’sabi-diffsymbol leg needs it (“release not found”)? A: Recommendation, pending maintainer sign-off. A maintainer creates it once by hand withgh release create v1.9.1 --verify-tagonMontimage/mmt-dpi, carrying the 21 assets of the fork’sv1.9.1Release unchanged. This is recorded as the one exception to the single-publisher rule of issue #489. The upstream release workflow cannot publish this tag:- its
v1.9.1tag run (upstream issue #42) failedverify-tag, because7c150ef4is not on upstreammain; - it failed
release-gates, which needsunit-tests,sanitizer-testsandGolden classification fingerprint unchangedcheck runs at7c150ef4, andphase0-baseline.ymlrecords none for a tag push; - its
centos-stream9legs failed withmanifest unknownon thesha256:086f25bf…pin of that tree. A re-run uses the tag’s tree, so it fails the same way.
tools/ci/publish-release.shis not run by hand either: it finds its draft by thegithub-actions[bot]author.The fork’s assets were built from
1b4aad29, whose tree256e1177is the tree of the upstream tag commit7c150ef4. The history was rewritten for the move, with the trees unchanged. What a maintainer should expect:- asset names carry
1b4aad29; - provenance verifies only with
gh attestation verify --repo montimage-projects/mmt-dpi; - the
Bootstrap smokefixture still fails on #41. It fetches the Latest Release’s bundle from the upstream attestations API, which answers 404 for these digests and for v1.8.0’s. It is not a required check, and it passes with the first Release the upstream workflow publishes,v1.10.0.
Every later tag goes through the workflow again. The full ordered runbook is Landing 1.10.0 in Montimage/mmt-dpi in
docs/Prepare-for-a-new-released-version.md. Source: read-only API calls on 2026-11-07 (gh run view 42360494415 --repo Montimage/mmt-dpi --log-failed;gh release view v1.9.1 --repo montimage-projects/mmt-dpi --json assets;repos/Montimage/mmt-dpi/attestations/<digest>returning 404);git rev-parse '7c150ef4^{tree}' '1b4aad29^{tree}';tools/ci/publish-release.sh,tools/ci/check-release-tag.sh,tools/ci/check-release-gates.sh(REQUIRED),tools/ci/make-bootstrap-fixture.sh,tools/ci/bootstrap-install.sh(REPO,SIGNER_WORKFLOW),.github/workflows/phase0-baseline.yml(on:),.github/workflows/c-cpp.yml(abi-diffjob). - its
- Q: Issue #751 (plan task 2.1, epic #746): do fork PRs #743 (
ci(images): repin drifted base images) and #741 (M4 budget measurement, issue #584) go into 1.10.0? A: Recommendation, pending maintainer sign-off: neither goes into 1.10.0. Both stay open and are not retargeted. Both target the fork’smain, which holds the history from before the rewrite.release/v1.10.0holds the rewritten history, and the compare API reports both branches as diverged from it (#743: 346 ahead, 363 behind; #741: 345 ahead, 363 behind). Including either one would therefore take a cherry-pick PR ontorelease/v1.10.0, never a retarget.- #743 (8 lines, 3 files, mergeable, green) repins four drifted digests:
buildpack-deps:trixieinasn1c-regen.yml, andopensuse/leap:16.0,archlinux:baseandalpine:3.23ininstall-smoke.yml. It is not a blocker. The four old digests still resolve (docker manifest inspect, 2026-11-07); the tags moved, but no digest is missing. None of the images is on therelease-packages.ymlorbootstrap-smoke.ymlpath that tagging v1.10.0 depends on. Adding a workflow change torelease/v1.10.0would also re-run the full tier on #41. After the merge,base-image-refresh.ymlon upstreammainproposes the same repin against the canonical history, and #743 can then be closed as superseded. One condition reverses this: runbook step 10 runsrefresh-base-images.sh --checkover every pin before the tag. If that, or the post-tag install smoke’s supportedopensuse-leap-16.0leg, finds a pinmissing, the repin lands first on upstreammain. - #741 (618 lines, 8 files) is
CONFLICTING, and its body says “Leave this PR open”. Its #556 dependency has landed (#722 is onrelease/v1.10.0asa77edef5). The run on the physical audit host has not: that run is what writestools/phase0/baseline/perf/throughput.txtand closes #584. It changes no shipped code, so 1.10.0 loses nothing without it. It lands after 1.10.0, rebased onto upstreammain.
Source:
gh pr view 743/gh pr view 741 --repo montimage-projects/mmt-dpi(files, mergeable, checks, body),gh pr diff 743,gh api repos/montimage-projects/mmt-dpi/compare/release/v1.10.0...<head>(2026-11-07),tools/ci/refresh-base-images.sh,tools/ci/base-images.txt,.github/workflows/install-smoke.yml. - #743 (8 lines, 3 files, mergeable, green) repins four drifted digests:
- Q: Issue #756 (follow-up of the #749 review, epic #746): should the three config-file variables
MMT_DPI_PROFILES_FILE,MMT_DPI_PORT_MAP_FILEandMMT_DPI_IP_RANGES_FILEkeep being read withgetenv()? A: No. All three are now read withsecure_getenv()(dpi_profiles.c:258,mmt_tcpip_plugin_internal.c:676,mmt_tcpip_classif_utils.c:574), asMMT_DPI_PLUGINS_DIR(plugins_engine.c:50) andMMT_SEC_REACTION_DIR(tips_report.c:970) already were. Each file defines_GNU_SOURCEunder an#ifndefguard before its first include, the formplugins_engine.c:1-3uses. In a set-uid, set-gid or file-capability process (AT_SECURE) the variable now reads as unset, so the loader opens nothing and echoes nothing to stderr; the built-in tables apply, as with the variable unset. Any other process sees no change. This closes the follow-up the #749 entry above leaves open; that entry stays as written, and its line numbers describe the tree before this change: each moved by 4, except those below the profiles read indpi_profiles.c, which moved by 5 (the alert linedpi_profiles.c:259is now:264;mmt_tcpip_plugin_internal.c:676is now:680andmmt_tcpip_classif_utils.c:574is now:578).MMT_DPI_PROFILEnames a built-in or already-loaded profile, opens no file, and stays ongetenv()(dpi_profiles.c:270). Source:src/mmt_core/src/dpi_profiles.c,src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c,src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c,src/mmt_core/src/plugins_engine.c:1-3,50,src/mmt_security/tips_report.c:970; secure_getenv(3). -
Q: Issue #601 (follow-up of #490): how are the two fragile required contexts
unit-tests (-fsigned-char, hashmap memory hexdump mmt_utils mmt_inet_ntop)andLabelled-pcap precision/recall holds or improves (M9, issuerenamed without blocking pull requests or weakening either gate, and can thepackagespath filter fail open? A: Both are renamed to stable names, and each old name is reported by an aggregate job with the renamed job’s verdict until a maintainer swaps the contexts in branch protection on both repositories. The -fsigned-char leg now reportsunit-tests (-fsigned-char):unit-teststakes an explicitname: unit-tests${{ matrix.context_suffix }}, so neither the suite list nor a new matrix key enters the context (the default leg staysunit-tests).precision-gatelost itsname:, cut at the#74YAML comment, so it reports its job id, asharness-gate,leak-gateandinstruction-gatedo. The #659if: falsestub was rejected: a stub reports success, and the assertion would have moved to a context protection does not yet require, so a precision/recall regression or a -fsigned-char failure would have merged until the swap. Insteadunit-tests-signed-char-context(c-cpp.yml,needs: unit-tests, fails unless it succeeded) andprecision-gate-context(phase0-baseline.yml,needs: precision-gate, fails unless it succeeded or was skipped, as a skipped gate reported success before) report the old names;.github/required-checks.txtlists the old and the new names, andretired-checks.txtis unchanged. After the swap, a follow-up deletes both aggregates and the old lines. Thechangesjob ofrelease-packages.ymlnow readsgit -c core.quotePath=false diff --no-renames --name-only -z, NUL-separated: a C-quoted path (non-ASCII, control, quote or backslash bytes) matched no packaging glob, so a PR touching only such a file skipped the package builds andpackages-gatepassed. Item 4 of the issue (the skipped path ofpackages-gatehad not run) needs no change: any pull request that touches no packaging path runs it. Source:.github/workflows/c-cpp.yml(unit-tests,unit-tests-signed-char-context),.github/workflows/phase0-baseline.yml(precision-gate,precision-gate-context),.github/workflows/release-packages.yml(changes),.github/required-checks.txt,tools/ci/check-required-checks.sh(name derivation, aggregate rules), issue #601. -
Q: Montimage/mmt-probe#18 — v1.10.0 moved the six
get_content_class_*/get_application_class_*lookups (#537) intolibmmt_tcpip, so a consumer calling them must link that plugin. mmt-dpi also dissects non-network input (thelps_datalog-line stack ofmmt_business_app, mmt-probe’sstack-type) and its protocols are run-time plugins. Should consumers add-lmmt_tcpip, and where do the lookups belong? A: No link change. With-lmmt_tcpipa host holding onlylibmmt_business_appcannot start (libmmt_tcpip.so.1: cannot open shared object), and with the full plugin directory the process maps two copies, because$(MMT_LIB)and$(MMT_PLUGINS)hold separate files. The tables stay in the plugin, as #537 decided, since the core is protocol-agnostic; only the access path changes. (1)mmt_class_provider.haddsmmt_register_class_provider()and six core lookups; a plugin registers its callbacks frominit_proto(), the first provider that knows a key answers, and a provider may leave callbacks NULL, so a non-TCP/IP plugin can class its own protocols. (2)mmt_tcpip.hkeeps the six names as forwarders to the core: this replaces the “nostatic inline” criterion of #537, whose purpose (no tables compiled into consumers) still holds and is whatinstalled_consumernow asserts. With no provider they reportPROTO_CLASS_UNKOWN/MMT_CONTENT_FAMILY_UNSPECIFIEDand the matching labels; this is also the answer beforeinit_extraction(). (3)libmmt_tcpipkeeps exporting the six functions for binaries built against v1.10.0; onlymmt_tcpip_classes.csees those prototypes (MMT_TCPIP_CLASSES_DEFINITIONS). (4) The registry is inplugins_engine.c, a member every static consumer oflibmmt_core.apulls (tools/ci/check-static-link.sh);close_plugins()clears it before anydlclose(), so a plugin has nothing to unregister. Restoring thestatic inlinebodies was rejected: it brings back the per-consumer table copies and gives other plugins no way to add classes. Source:src/mmt_core/public_include/mmt_class_provider.h,src/mmt_core/src/plugins_engine.c,src/mmt_tcpip/include/mmt_tcpip.h,src/mmt_tcpip/lib/mmt_tcpip_classes.c,src/mmt_tcpip/lib/configured_protocols.c,tests/core_engine/test_api_contracts.c,tests/installed_consumer/test_header_macros.c. -
Q: Issue #66 — #537 made
dbg.hprivate and droppedlikely/unlikelyfrommmt_utils.h, so out-of-tree plugins that useddebug(),log_err(),log_warn(),log_info(),likely()orunlikely()(e.g. Montimage/mmt-plugin-generatorndn_src/ndn_mmt_plugin.c, threedebug()calls) no longer compile against an installed SDK. What do plugin authors use instead, without the installed headers leaking unprefixed macros again? A: (1) The SDK logger header moves fromsrc/mmt_core/private_include/tosrc/mmt_core/public_include/mmt_log.h, somake installships it. It stays opt-in: no installed header includes it, and every name it defines ismmt_log*/MMT_LOG*, so #537’s guarantee holds (installed_consumerstill compiles every installed header with -Werror after the consumer’s owndebug/check/likely/unlikely, and its new host includesmmt_core.hand fails to build if the logger came with it). Library code reaches it by its new path (dbg.h,s1ap_common.h, NASdecoder.h);tools/ci/lint-packet-path-io.shkeeps checking its macro definitions for stdout writes. (2) The five functions were alreadyMMTAPIand exported forlibmmt_tmobile(#545), so no symbol is added; they are now public, which brings them undercheck-api-contracts.sh(fourCONTRACTentries,mmt_log_get_levelwaived as taking no input) and doxygen’s completeness gate, and flips theirpubliccolumn indocs/Exported-Symbols.md.mmt_log_get_stats()is documented as ignoring NULL, which is whatmmt_log.cdoes.tools/ci/count-weak-types.shallowlists the threeintreturns:mmt_log_set_level/mmt_log_get_levelreturn a level (or -1), andmmt_log_event(boolean meaning) keeps theintit was exported with in 1.10.0, sincelibmmt_tmobileand every expandedmmt_log_at()call it — retyping an exported function’s return toboolwas rejected as an ABI change for no caller benefit. Installing the header also makes part of the logger’s layout ABI that out-of-tree plugins compile in: themmt_log_site_tlayout (a static per expanded call site, passed tommt_log_write()),mmt_log_stats_tand itsMMT_LOG_LEVEL_COUNT-sizedeventsarray (whichmmt_log_get_stats()fills), the level values and themmt_log_at()expansion; changing any of them is an incompatible change under the SOVERSION policy (#536), and theabi-diffjob now sees them as public types.mmt_log_debug()keys on the unprefixedDEBUG, the SDK’s own SHOWLOG convention: a plugin that definesDEBUGfor its own reasons compiles its debug lines in, which only affects that plugin’s lines. The flat$(MMT_INC)now holds a file namedmmt_log.h; mmt-security’s ownsrc/lib/mmt_log.his included from its directory or by relative path, so it still resolves to its own header. (3) Branch hints:MMT_LIKELY()/MMT_UNLIKELY()inmmt_utils.h,__builtin_expect(!!(x), …)under GCC/Clang and!!(x)otherwise;dbg.hkeeps the unprefixed pair for the SDK sources. (4) Plugin code that keeps the old names maps them in the plugin (#define debug(...) mmt_log_debug(__VA_ARGS__)), the shimdocs/Add-New-Protocol.mdshows. Semantics differ from the olddbg.hmacros, which wrote to stderr unconditionally: the logger is off unlessMMT_DPI_LOG_LEVELraises it, rate-limited per site, andmmt_log_debug()compiles out (arguments unevaluated) unless the plugin definesDEBUG. Rejected: installing an opt-indbg.h-compatible header with the unprefixed names — it would ship the colliding names again for any consumer that includes it; shippingMMT_LIKELYinmmt_log.h— branch hints are not logging, andmmt_utils.his wherelikelylived. The NDN generator plugin builds with the shim except for its own enum clash with the SDK’s built-in NDN dissector (NDN_PACKET_TYPE… redeclared fromtcpip/mmt_tcpip_attributes.h), which predates #537 and is outside this issue;installed_consumeruses an equivalent test plugin. Source:src/mmt_core/public_include/mmt_log.h,src/mmt_core/public_include/mmt_utils.h,src/mmt_core/private_include/dbg.h,tools/ci/lint-packet-path-io.sh,tests/core_engine/test_api_contracts.c,tests/core_engine/api-contract-waivers.txt,tests/installed_consumer/test_plugin_log.c,tests/installed_consumer/test_plugin_log_host.c,tests/installed_consumer/run_tests.sh,tools/ci/count-weak-types.sh,docs/Add-New-Protocol.md,docs/Exported-Symbols.md. -
Q: Issue #66, review of PR #68 — the installed
mmt_log.henabledmmt_log_debug()on the consumer’s unprefixedDEBUG, and installing it makesmmt_log_site_tandmmt_log_stats_tlayouts that out-of-tree plugins compile in. Should the debug opt-in be prefixed, and should those layouts get headroom before 1.10.2 ships? A: Both, confirmed by the maintainer on the PR; this entry supersedes the entry above where they differ. (1)mmt_log_debug()is compiled in under#if defined(MMT_LOG_ENABLE_DEBUG) || (defined(_MMT_BUILD_SDK) && defined(DEBUG)). A plugin opts in with-DMMT_LOG_ENABLE_DEBUG; its ownDEBUG— a#define DEBUG 0, a CMake/autotools debug configuration, a-DDEBUGmeant for something else — no longer compiles in lines that may carry subscriber-identifying fields (F-SEC-016)._MMT_BUILD_SDKis set for every SDK object list (CORE_OBJECTS/TCPIP_OBJECTS,LIBMOBILE_OBJECTS,FUZZ_OBJECTS/SECURITY_OBJECTS,LIBBAPP_OBJECTS/LIBDICOM_OBJECTS,rules/common.mk:276,298,311,613), soSHOWLOG=1(-DDEBUG) builds of the SDK behave as before. Changing it after 1.10.2 would break no ABI but would silently drop debug lines from plugins built with-DDEBUG, so it is done now. Plugin code that wants itsDEBUGto keep enablingdebug()definesMMT_LOG_ENABLE_DEBUGitself (the shim indocs/Add-New-Protocol.md). (2)mmt_log_site_tgainsuint64_t reserved[2](16 → 32 bytes; a static per expanded call site, in.bss). The static is zero-initialised andmmt_log.cneither reads nor writes the words, so 1.10.2 assigns them no meaning. A later release may give them one only with zero meaning today’s behaviour, and only for sites it can tell were compiled against ≥1.10.2 headers: the in-tree libraries 1.10.0/1.10.1 built with the 16-byte layout (onlylibmmt_tmobilecallsmmt_log_write()), but they ship and are replaced together withlibmmt_core, and no out-of-tree binary could include the header before 1.10.2. Ignored rather than zero-checked: a check would add a branch to every written line and could only refuse a site, which helps no caller. (3)mmt_log_stats_tgets headroom too, since it is caller-allocated andmmt_log_get_stats()writes all of it:events[]is sized by the newMMT_LOG_EVENT_SLOTS(8, asserted ≥MMT_LOG_LEVEL_COUNT) instead ofMMT_LOG_LEVEL_COUNT, and fouruint64_t reservedwords follow the counters (80 → 120 bytes).mmt_log_get_stats()zeroes the struct before copying, so the unused slots and words read 0. A new level then takes a free slot without movingwritten,rate_limitedorwrite_errors, and a new counter takes a reserved word, so neither is a SOVERSION bump by itself; renumbering a level, ormmt_log_at()calling a different function, still is. Rejected: leavingmmt_log_stats_tas it was and adding a sized getter later — it works, but leaves the 1.10.2 struct unable to grow at the one release where reserving is free; reserving onlymmt_log_site_t— the stats struct is the one a new level breaks. Both sizes are pinned by_Static_assertinmmt_log.c, andcore_engine’s logger test checks the offsets, the zeroed reserved words and that a site’s reserved words stay untouched. Against the baseline theabi-diffjob uses, v1.10.1 (ABI_BASELINEin.github/workflows/c-cpp.yml), whose logger types sat in a private header,tools/ci/abi-diff.sh --fail-on incompatiblereports 0 incompatible: abidiff filters out the two size changes reached throughmmt_log_write()’s andmmt_log_get_stats()’s pointer parameters. Running against v1.10.1’s libraries is safe in both directions that ship: itslibmmt_tmobilepasses 16-byte sites, of which the newmmt_log.creads only those 16 bytes, and no 1.10.0/1.10.1 library callsmmt_log_get_stats(), the only function that writes the larger stats struct. Source:src/mmt_core/public_include/mmt_log.h,src/mmt_core/src/mmt_log.c,rules/common.mk:276,298,311,613,tests/core_engine/test_mmt_log.c,tests/installed_consumer/run_tests.sh,tests/installed_consumer/test_plugin_log.c,docs/Add-New-Protocol.md,CHANGELOG.md. - Q: Issue #70 (follow-up of Montimage/mmt-plugin-generator#2) — the issue says a duplicate protocol name “is silently ignored” by the loader, and that a plugin loaded before
libmmt_tcpip.so“never classifies anything”. Is the duplicate protocol dropped, or only its name? And is the misordered plugin’s failure unavoidable? A: (1) Only the name is ignored.register_protocol()registers the protocol under its own id and adds its name to the name index only when no protocol already holds it, compared case-insensitively overMax_Alias_Len, soget_protocol_id_by_name()returns the first protocol’s id; nothing logs the clash. A duplicate id, by contrast, is refused byinit_protocol_struct_for_registration()(NULL), and the plugin that loads second fails itsinit_proto()and with itinit_extraction()(issue #503). (2) The silence comes from the plugin, not the core:register_classification_function_with_parent_protocol()returns 0 when the parent protocol is not registered yet, and a plugin that ignores it registers a protocol nothing classifies. A plugin that failsinit_proto()on that 0, asdicom.cdoes, turns a wrong load order into aninit_extraction()failure.docs/Add-New-Protocol.md(Loading a plugin of your own) documents both and recommends the check; the loader is unchanged. Thetoflibmmt_tmobile/libmmt_tdicomis the in-tree form of the same sort-after-libmmt_tcpiprule (rules/common.mkcomment aboveLIBMOBILE). Source:src/mmt_core/src/packet_registry.c(protocol_names_comparison_fct,is_free_protocol_id_for_registration,init_protocol_struct_for_registration,register_protocol,get_protocol_id_by_name,init_extraction),src/mmt_core/src/packet_registry_classify.c(register_classification_function_with_parent_protocol),src/mmt_core/src/plugins_engine.c(load_plugins,load_plugin),src/mmt_dicom/dicom.c(init_dicom_proto_struct),rules/common.mk, Montimage/mmt-plugin-generator#2 (Needs mmt-dpi).
2026-11-10
-
Q: Issue #73 (follow-up of #70/#71 and the mmt-plugin-generator redesign) — which protocol ids may an out-of-tree plugin use without colliding with a built-in protocol, and how is that promise kept? A: Ids 950–999 are reserved for third-party plugins, documented in
docs/Add-New-Protocol.md(Protocol ids for a plugin of your own, linked from Picking a free id and name and from step 1 of the in-tree procedure). The range is the top of the usable space: an id must be belowPROTO_MAX_IDENTIFIER, 1000 (src/mmt_core/public_include/mmt_core.h:40), and in 1.10.2 the built-in ids reach 904 (PROTO_NAS5G,src/mmt_mobile/include/mmt_mobile.h), so 905–949 stays free for new built-in protocols and none needs renumbering. The NDN example of Montimage/mmt-plugin-generator#2 already uses 980, inside the range. The reservation only separates plugins from the SDK: plugins share the range and nothing assigns ids within it, so the page keeps the run-time check of id and name.scripts/validate-proto-id-range.sh, which the requireddoc-validatorsjob picks up through itsscripts/validate-*.shglob, fails when a#define PROTO_<NAME> <n>undersrc/falls in the range (any spaces or tabs, asPROTO_HTTP2insrc/mmt_tcpip/include/mmt_tcpip_protocols.his tab-separated; decimal, hex or octal, with or without a U/L suffix or parentheses; every numericPROTO_define, not only protocol ids, so no otherPROTO_constant may take a value in the range either — none does), whenPROTO_MAX_IDENTIFIERdrops below 1000, or when the page stops naming the range; its fixture self-testtools/ci/tests/test-proto-id-range.shruns in therelease_gatessuite. Rejected: raisingPROTO_MAX_IDENTIFIERto make room above 999 — it sizes the per-protocol arrays of the core’s registry (configured_protocols,proto_registered_attributesinsrc/mmt_core/private_include/packet_processing.h) and is installed inmmt_core.h, so changing it is an ABI change for no current need; a range below 950 — it would split the space new built-in ids grow into. No protocol id or classifier changes, so the golden fingerprint and precision/recall are unchanged. No CHANGELOG entry: no validator requires one for a documentation change, and the version is not bumped. Source: issue #73;src/mmt_core/public_include/mmt_core.h:40;src/mmt_mobile/include/mmt_mobile.h;src/mmt_tcpip/include/mmt_tcpip_protocols.h;src/mmt_core/private_include/packet_processing.h;scripts/validate-proto-id-range.sh;tools/ci/tests/test-proto-id-range.sh;tests/release_gates/run_tests.sh;.github/workflows/c-cpp.yml(doc-validators); Montimage/mmt-plugin-generator#2. -
Q: Issue #76 (follow-up of the #24 decisions) — how does a published mmt-dpi release reach the signed APT repository of Montimage/packages, which alone holds the APT signing key, and what happens when that notification cannot be sent? A: The last step of the
releasejob, afterpublish-release.sh, runstools/ci/notify-packages.sh "$GITHUB_REF_NAME", which sendsPOST /repos/Montimage/packages/dispatcheswithevent_type: mmt-dpi-releaseandclient_payload: {"tag": "<tag>"}throughgh api(non-zero on any non-2xx). It is a step ofrelease, not a job of its own, so it needs no checkout or download of its own and runs only when every earlier step — the publish included — succeeded: itsif:isstartsWith(github.ref, 'refs/tags/v')and keeps the implicitsuccess(). The credential is the repository secretPACKAGES_DISPATCH_TOKEN, a fine-grained token limited to Montimage/packages with Contents read and write (the permission the dispatches endpoint requires; no narrower one exists). Contents: write also lets the token push to the unprotected branches of Montimage/packages, not just dispatch; the ruleset on itsmain(pull request, approval, required checks, no force-push, no deletion) is the safeguard. The token is referenced once, in that step’senv:, and the script hands it toghasGH_TOKENfor the one call and never prints it. The script sends only a tag of the formvX.Y.Z(^v[0-9]+\.[0-9]+\.[0-9]+$); any other tag is a::warning::and exit 0, thoughverify-tag, whichreleaseneeds, already matches the tag tov$(VERSION). The step never fails the release, because the Release is already public when it runs and a red tag run would open arelease-alertissue for a release that shipped: a missing token or a refused dispatch prints a::warning::naming the manual trigger (gh workflow run apt-repo.yml -R Montimage/packages) and exits 0, andcontinue-on-error: truecovers a broken helper. The step’stimeout-minutes: 2bounds a hunggh apicall, which sets no overall timeout of its own: a step timeout is a step failure, whichcontinue-on-errorabsorbs, whereas reaching the job’stimeout-minutes: 15fails the job whatevercontinue-on-errorsays. A re-run dispatches again, harmlessly, as the packages build is stateless. The workflow nameapt-repo.ymlwas read from Montimage/packages PR #5 (head1d1fa8d8, issue Montimage/packages#2), not from itsmain, which held onlyci.ymlandpages.ymlon 2026-11-11; itsrepository_dispatchtrigger takestypes: [mmt-dpi-release]and readsclient_payload.tag. A GitHub App instead of the token was left to the maintainer (the PR’s Decisions to confirm).tools/ci/check-release-verification.shre-checks the wiring (one step after the publish, tag-only withoutalways()/failure()/cancelled()/success(),continue-on-error: true, a steptimeout-minutesbelow the job’s, arun:that is exactlybash src/tools/ci/notify-packages.sh "$GITHUB_REF_NAME"and so has noexitor other command of its own, the secret referenced once and only in itsenv:, the helper in the sparse checkout);tools/ci/tests/test-notify-packages.sh, run by therelease_gatessuite, proves it rejects each broken shape and drives the helper against a stubgh. No CHANGELOG line:scripts/validate-release-prep.shrequires the topmost heading to beVERSION(1.10.2), so a1.10.3 (unreleased)section would fail it until the bump. Source: issue #76; issue #24 (decision comment of 2026-11-10);.github/workflows/release-packages.yml(release, step “Notify Montimage/packages (APT repository rebuild)”);tools/ci/notify-packages.sh;tools/ci/check-release-verification.sh;tools/ci/tests/test-notify-packages.sh;tests/release_gates/run_tests.sh;docs/Prepare-for-a-new-released-version.md(Check the APT repository rebuild); Montimage/packages PR #5.github/workflows/apt-repo.yml; GitHub REST docs, “Create a repository dispatch event”.
2026-11-13
- Q: Issue #82 — the
make deb/make rpmpayloads shipped the development linkslib<name>.so -> /opt/mmt/dpi/lib/lib<name>.so.<version>and/usr/share/pkgconfig/mmt-dpi.pc -> /opt/mmt/dpi/lib/pkgconfig/mmt-dpi.pcwith absolute targets, so a package unpacked outside/(dpkg-deb -x) left them dangling. Which target do the links take, doesmake installchange too, and where is the absence of absolute links enforced? A: The development link points at the versioned file in the same directory,lib<name>.so -> lib<name>.so.$(VERSION), in the package tree and inmake install: the same file it named before, one hop, and created unconditionally like before (the SONAME linklib<name>.so.$(SOVERSION)is only laid down when the library was built, so pointing the development link at it would chain through a link that may be missing);install-fhskeeps itslib<name>.so -> lib<name>.so.$(SOVERSION)chain. The pkg-config link is computed withrealpath -s --relative-to, asinstall-fhsdoes for its plugin links (../../../opt/mmt/dpi/lib/pkgconfig/mmt-dpi.pcfor the default prefix). Adpkg -i/rpm -iinstall resolves exactly as before.--private-prepare-build-dir, which bothdebandrpmrun, ends with$(MMT_ASSERT_RELATIVE_LINKS)(defined at the end ofsdk/Makefileso no cited line moves): anyfind -type l -lname '/*'hit in the staged trees fails the package build.tools/ci/check-package-split.sh, whichbuild-package.shruns on every release-matrix.deband.rpmand the installer suite on its.deb, checks the extracted payloads the same way, rpm’s build-id links included; the installer suite also asserts the relativemake installdevelopment links and the package listings. Verified in anubuntu:24.04container:dpkg-deb -xinto a temporary directory,readlink -eresolves inside it, a consumer links there with NEEDEDlibmmt_core.so.1, anddpkg -istill yields a working/opt/mmt/dpi. No CHANGELOG line: the topmost section is the released 1.10.2. Source: issue #82;sdk/Makefile:88,365,381,410andMMT_ASSERT_RELATIVE_LINKS(end of file);tools/ci/check-package-split.sh;tests/installer/run_tests.sh(sections on the SONAME links and the package split);scripts/validate-agent-environment.sh(rowssdk/Makefile:88,sdk/Makefile:364-366).
2026-11-15
- Q: Issue #84 — since the #192 clamp (
c8bbd1b5, v1.10.0),ip_post_classification_functionboundedl4_packet_lenbyMIN(l3_packet_len, l3_captured_packet_len)on every branch; for a datagram rebuilt from IPv4 fragmentsl3_packet_lenis thetot_lenof the fragment that completed it, so the reassembled TCP/UDP payload was cut to the size of that last fragment (tcp.payload_len0 when it is smaller than a TCP header). What bounds the L4 length of a rebuilt datagram, and does the #192 clamp still hold? A: The #192MIN(l3_packet_len, l3_captured_packet_len)clamp now applies to every packet except a datagram rebuilt from fragments (nb_reassembled_packets[index] > 1), whose L4 length is taken froml3_captured_packet_lenalone: the length of the reassembled buffer, header +dg->len, whichip_process_fragment()allocates and records asp_hdr->caplen, so it is bounded by what was really rebuilt and cannot exceed the allocation. A forgedtot_lenlarger than the capture on any other packet is still clamped. This restores the pre-c8bbd1b5reassembled branch; the #192 entry of 2026-09-13 is left as written and is superseded for reassembled datagrams only. IPv6 is unaffected (its reassembly setsp_hdr->lento the rebuilt length, from whichl3_packet_lenis derived), and theproto_redis.c/proto_syslog.ccaplen bounds already apply to the reassembled buffer. Theip.tot_lenattribute of a reassembled packet still reports the completing fragment’s value; that is unchanged. The CHANGELOG line waits for the 1.10.3 bump (scripts/validate-release-prep.shrequires the topmost heading to beVERSION). Source: issue #84;src/mmt_tcpip/lib/protocols/proto_ip.c:1040-1063(ip_post_classification_function),src/mmt_tcpip/lib/protocols/proto_ip.c:733-747(ip_process_fragment);tools/phase0/tests/run_ip_reassembled_l4_len_test.shandtools/phase0/tests/ip_reassembled_l4_len_test.c(fragmented TCP in and out of order, fragmented UDP, unfragmentedtot_len=65535control);tools/phase0/tests/run_caplen_clamp_test.sh. -
Q: Issue #93 (moved from montimage-projects/mmt-dpi#676) — the doc comments of
htoi,mmt_strcmp,mmt_strncmp,mmt_strcasecmpandmmt_strncasecmpindata_defs.hdisagreed withmmt_data.c:htoiwas said to return “a negative value on failure” (its return type isunsigned int),mmt_strcmpandmmt_strncmpwere called case-insensitive, and the two case-insensitive comparators claimed to fold non-ASCII characters. Does the header follow the code, or the code the header? A: The header follows the code; no function changes.htoireturns the number of bytes written, at most min(len,binary_data_cap), stops at the first non-hex character (the NUL included, a0xprefix not skipped), stores a lone trailing digit as a byte of its own value, writes no NUL terminator, and returns 0 for a NULL pointer,len<= 0, a zero capacity or a non-hex first character; there is no error value.mmt_strcmp/mmt_strncmpcompare case-sensitively;mmt_strcasecmp/mmt_strncasecmpfolda-zto upper case and leave every other byte unchanged. All four return exactly -1, 0 or +1, and a byte 0x80 or above orders by the signedness of plainchar.htoiandmmt_strcmpstay deprecated for removal in 2.0.0 (montimage-projects/mmt-dpi#541), and nothing insrc/calls them. Themmt_strncmpcallers (http.crequest methods,proto_bittorrent.cDHT keys) and themmt_strncasecmp/mmt_strcasecmpcallers (packet_registry.c,mmt_tcpip_utils.c,mmt_tcpip_classif_utils.c,http.c) test only for 0 or a sign, against case-exact literals or, inpacket_registry.c, another protocol name, so none relied on the old text. Making the ordering independent ofcharsignedness would change deprecated exports and was not done. Source: issue #93;src/mmt_core/src/mmt_data.c:389-433(htoi),src/mmt_core/src/mmt_data.c:442-503(_mmt_toupperand the four comparators);src/mmt_core/public_include/data_defs.h:1155-1183,1355-1425;tests/core_engine/test_api_contracts.c:946-974,1121-1154(b_htoi,e_htoi,b_mmt_strcasecmp,b_mmt_strncasecmp,b_mmt_strcmp,b_mmt_strncmp). - Q: Issue #94 (moved from montimage-projects/mmt-dpi#597; the review notes of montimage-projects/mmt-dpi#596, which shipped the manifest-based uninstall of montimage-projects/mmt-dpi#485) — should the offline ZIP uninstaller use the manifest, does an upgrade merge the manifest, is a directory at the manifest path refused, and should the installers check who owns the prefix?
A: (1) There is no ZIP uninstaller left to change:
dist/ZIP/was retired by388bea9(montimage-projects/mmt-dpi#550), and the installer suite checks that no tracked file orziptarget brings it back, so the first acceptance criterion is met by its absence. (2)make installalready merges the earlier manifest.install.shwrote its own manifest only when none existed aftermake install, so over an earlierinstall.shinstall with a Makefile that writes none it kept the old list, and--uninstallleft the new files behind. It now writes its manifest whenmake installdid not replace the file (manifest_id, the inode before and after), andwrite_manifestmerges the earlier entries asmake installdoes. The pinned v1.10.3 Makefile writes and merges the manifest itself, so the default install is unchanged. (3) A manifest path that is a symlink or not a regular file is refused before anything is installed or removed:MMT_MANIFEST_GUARD, defined at the end ofsdk/Makefileso no cited line moves, runs in--check-prefixand again at the manifest write and at the start ofuninstall. The manifest is renamed withmv -fT, which fails on a directory instead of moving the file into it. Ininstall.sh,refuse_unsafe_manifestruns beforemake install(the pinned tag’s Makefile has no guard), inwrite_manifestand inuninstall_mmt. (4) Prefix ownership stays documentation-only (§4 ofdocs/AGENT_ENVIRONMENT.md: keep the prefix writable only by the installing user). Requiring a root-owned prefix would refusesudo make uninstallof a prefix the user owns, which is a supported setup, and the check could only be tested in theroot-installcontainer. A root uninstall is already bounded to the real prefix: every entry is validated before anything is removed, each removal needs its directory to resolve (cd -P) inside the prefix, and a symlinked or non-regular manifest is refused. Rejected: enforcing ownership (the analysis’s option 3), for the reasons above. Source: issue #94;sdk/Makefile(install,uninstall,--check-prefix,MMT_MANIFEST_GUARD);install.sh(refuse_unsafe_manifest,manifest_id,install_mmt,write_manifest,uninstall_mmt);tests/installer/run_tests.sh(the issue #94 legs of sections 6 and 7);docs/AGENT_ENVIRONMENT.md§4;388bea9. - Q: Issue #92 (moved from montimage-projects/mmt-dpi#698), defect 1 —
mmt_check_vnc,mmt_check_tpktandmmt_check_ndn_httpwere the three checkers montimage-projects/mmt-dpi#561 left with their own guard (mmt_checker_keeps_local_guard()), because a closed guard made them exclude their protocol on the flow and the walk’s skip would have lost that side effect; the payload-less TCP handshake closes the guard, so they excluded themselves on the SYN and never matched after a three-way handshake. Is the exclusion on a closed guard kept? A: No. The three checkers now open with the{ /* guard evaluated by the classifier walk (issue #561) */block of the other checkers, keep the exclusions they make on a payload they reject, and no longer callmmt_checker_keeps_local_guard();mmt_check_gtp, which never had a guard, is the only local-guard unit left. A checker must not exclude itself on a closed guard: the walk simply does not call it on the handshake, and it decides on the first payload. NDN keeps both registrations (TCP and UDP), and the UDP accuracy case still passes. The golden fingerprint and the precision baselines are unchanged: no golden pcap carries VNC, TPKT or NDN over TCP, and the abstention set still has accepted=0. Source: issue #92;src/mmt_tcpip/lib/protocols/proto_vnc.c:17-50,src/mmt_tcpip/lib/protocols/proto_tpkt.c:36-67,src/mmt_tcpip/lib/protocols/proto_ndn_http.c:190-218,src/mmt_tcpip/lib/mmt_tcpip_internal_defs_macros.h:352-363,src/mmt_tcpip/lib/protocols/proto_gtp.c:497;tests/parser_boundaries/test_classifier_chain_api.c:65-69(local_guard[]),docs/Add-New-Protocol.md:66; casesacc_vnc_*,acc_tpkt_*,acc_ndn_http_tcp_*intools/phase0/ci/accuracy/corpus.json. - Q: Issue #92, defect 2 —
mmt_check_tdsis unreachable becausemmt_check_mssql, earlier in the TCP chain, claims every conformant TDS header off port 102. Should the two be reordered ormmt_check_tdsmoved to thelegacyprofile? A: Neither; the shadowing is accepted andmmt_check_tdsstays incoverage-pending.txtwith this entry as its reason. TDS is MSSQL’s wire protocol: the only exchangemmt_check_tdsconfirms is the TDS 7.x pre-login 0x12 -> 0x04 -> 0x12 (0x02/0x07 logins are excluded at stage 2), and its first segment is a valid TDS header (type 1-8 or 14-18, status, length equal to the segment, window 0) thatmmt_check_mssqllabels first. Puttingmmt_check_tdsfirst would relabel real Microsoft SQL Server traffictds.MMT_INTER_PROTO_LEGACYis for a service or client protocol that is unequivocally retired, which TDS is not. Telling Sybase TDS 4.x/5.0 from MSSQL needs real captures of both, which the synthetic corpus cannot supply; that is left until such captures exist. Source: issue #92;src/mmt_tcpip/lib/protocols/proto_mssql.c:39-51,src/mmt_tcpip/lib/protocols/proto_tds.c:21-60,src/mmt_tcpip/lib/inter_proto_classif_list.def:64,111(chain order),src/mmt_tcpip/lib/inter_proto_classif_list.def:22-28anddocs/DPI-Profiles.md:59-66(the legacy criterion);tools/phase0/ci/accuracy/coverage-pending.txt. - Q: Issue #92, defects 3 and 4 — RFC 4571-framed RTP over TCP is searched only once the flow is STUN, but a converged STUN flow is dispatched to
mmt_check_stun_tcpalone (montimage-projects/mmt-dpi#252), sommt_check_rtp_tcpnever saw the media; and unframed STUN over TCP (RFC 8489 §6.2.2) was not detected, becausemmt_check_stun_tcprequired the framing. Where is the hand-over made, and which unframed messages are STUN? A: The hand-over is inside the owning checker;packet_pipeline.cis unchanged. On a flow already labelled STUN,mmt_check_stun_tcpreturnsmmt_check_rtp_tcp(ipacket, index)while the flow does not exclude RTP, so a framed segment reaches the RTP sequence check, which labels the flowstun.rtpon its fourth RTP packet; a STUN keep-alive in between is no RTP and leaves the flow as it is, and once the flow is RTP the STUN checker’s guard is closed, so the label does not flip back. For the walk to call the STUN checker on a STUN-labelled flow, STUN’s detection set now holdsPROTO_STUN;mmt_check_stun_udpreturns 0 on a STUN-labelled flow, so UDP behaviour is unchanged (STUN followed by RTP on one UDP flow stays STUN, as before; not changed here).mmt_int_rtp_add_connectionno longer readspacket->udpwhen it is NULL: RTP over TCP, once reachable, dereferenced it. Framed RTP with no STUN before it stays unclassified by design, because the RTP test alone is too weak for an arbitrary TCP flow (acc_rtp_tcp_unpreceded_ambiguous). Unframed STUN over TCP is matched only when the message carries the RFC 8489 magic cookie 0x2112A442 at offset 4 and passesmmt_int_check_stun(); a cookie-less (RFC 3489) message without framing cannot be told from arbitrary bytes and is not STUN (acc_stun_tcp_unframed_classic_ambiguous), as montimage-projects/mmt-dpi#564 required corroboration for weak signatures. Source: issue #92;src/mmt_tcpip/lib/protocols/proto_stun.c:121-134(hand-over),src/mmt_tcpip/lib/protocols/proto_stun.c:148-156(unframed path),src/mmt_tcpip/lib/protocols/proto_stun.c:323-327(UDP),src/mmt_tcpip/lib/protocols/proto_stun.c:357(detection set),src/mmt_tcpip/lib/protocols/proto_rtp.c:642-649(UDP header guard),src/mmt_tcpip/lib/protocols/proto_rtp.c:818-831(framed search after STUN/RTP only),src/mmt_core/src/packet_pipeline.c:815-854(direct dispatch of a converged flow);tests/proto_classifiers/test_stun_attribution.c:321-363; casesacc_stun_tcp_unframed_*andacc_rtp_tcp_*. - Q: Issue #92, defect 5 — an Icecast or SHOUTcast listener stream starts with an HTTP request, so
mmt_check_httpowns the flow beforemmt_check_icecast/mmt_check_shoutcastsee the server’s answer, and the stream was labelledhttp,http.oggorhttp.mpeg, nevericecast/shoutcast. Which label does a listener stream get, and from which marker? A:mmt_check_httplabels it from the server’s answer, incheck_content_type_and_change_protocol(), before the Icy-MetaData -> MPEG rule: aServer: Icecastline addsPROTO_ICECAST, anICY 200 OKstatus line addsPROTO_SHOUTCAST, each throughmmt_int_http_add_connection(), so the HTTP layer and the media type already found stay beneath it:http.mpeg.icecast(request withIcy-MetaData: 1),http.ogg.icecast(Ogg stream) andhttp.mpeg.shoutcast. The request packet itself keepshttp/http.mpeg. Icecast is tested first becauseServer: Icecastnames the server software, whereasICY 200 OKis the SHOUTcast v1 status-line dialect another server can speak too, so an answer carrying both is Icecast.icy-headers under an HTTP status line are not a SHOUTcast marker (acc_shoutcast_listener_ambiguous). The source-client paths ofmmt_check_icecastandmmt_check_shoutcastare unchanged. Source: issue #92;src/mmt_tcpip/lib/protocols/http.c:1003-1021,src/mmt_tcpip/lib/protocols/proto_icecast.c,src/mmt_tcpip/lib/protocols/proto_shoutcast.c;tests/http_header_case/test_http_header_case.c:125-139,211-237; casesacc_icecast_listener_*andacc_shoutcast_listener_*. - Q: Issue #92, corpus — how does the accuracy corpus cover the fixed classifiers, IPv6 and the three classifiers montimage-projects/mmt-dpi#527 left pending for want of generator support (
mmt_check_dhcpv6,mmt_check_spotify,mmt_check_direct_download_link)? A: (1) 21 cases (188 -> 209, families 68 -> 72 withvnc,tpkt,spotify,dhcpv6): a positive and a negative or ambiguous case each for VNC, TPKT, NDN over TCP, unframed STUN, STUN-preceded RTP over TCP (plus a keep-alive variant), and the Icecast (MPEG and Ogg) and SHOUTcast listener streams, whose nine positives all fail against the SDK of37b24bc9, the commit before the fixes (no wire label); the review notes ofacc_icecast_positive,acc_shoutcast_positive,acc_ndn_http_positiveandacc_stun_tcp_positivethat recorded the defects now say they are fixed, and no existing capture’s bytes changed. (2) IPv6:_AccFlowbuilds an IPv6 flow when given 16-byte addresses — ethertype 0x86DD, an RFC 8200 header and the TCP/UDP checksum over the IPv6 pseudo-header — and leaves IPv4 frames byte-identical (all 212 captures the generator wrote before, golden, accuracy and abstention, keep their sha256). IPv6 identities follow the RFC 5737/2606 rule: global addresses from the RFC 3849 documentation prefix 2001:db8::/32, link-scoped ones fe80::/64 derived from the locally administered MACs. The DHCPv6 positive is a Solicit from the client’s link-local address to ff02::1:2 and the server’s Advertise offering 2001:db8::201 (RFC 8415 §7.1, §18.2.1); the negative is plain text on the same ports. (3) Spotify is covered without a Spotify address: an HTTP request with aSpotify-User-Agent records Spotify on both RFC 5737 hosts, and a later flow between them whose payloads start 01 00 00 and 00 is labelledspotifyby the two-packet heuristic; the negative differs only in the User-Agent. Its payloads are the bytes the heuristic reads, not a reviewed Spotify message (none is published), and the 78.31.8.0/22 range test stays unexercised. No oracle change was needed. (4)mmt_check_direct_download_linkstays pending: it matches only real file-hoster Host names, and the 2026-10-29 entry for montimage-projects/mmt-dpi#527 (second tranche) says the corpus may not carry them; whether it may is a maintainer decision, not taken here. Coverage is 75 of the 110 default-chain classifiers (35 pending;mmt_check_vnc,mmt_check_tpkt,mmt_check_rtp_tcp,mmt_check_spotifyandmmt_check_dhcpv6left the list,mmt_check_tdsandmmt_check_direct_download_linkstay with reasons citing this date’s entries). The oracle self-test that removedmmt_check_spotifyfrom the pending list to provoke the uncovered-classifier failure now usesmmt_check_tds. Source: issue #92;tools/phase0/gen_tcpip_pcap.py:62-79(ip6_header,l4_checksum6),tools/phase0/gen_tcpip_pcap.py:549-555(identity rule),tools/phase0/gen_tcpip_pcap.py:564-624(_AccFlow),tools/phase0/gen_tcpip_pcap.py:2802-2881(ACC_CLASSIFIER_FLOWSrows),tools/phase0/gen_tcpip_pcap.py:3070-3179(Spotify and DHCPv6 captures);src/mmt_tcpip/lib/protocols/proto_spotify.c:28-53,src/mmt_tcpip/lib/protocols/http.c:753-758,src/mmt_tcpip/lib/protocols/proto_dhcpv6.c:22-25,src/mmt_tcpip/lib/protocols/proto_direct_download_link.c:31-108;tools/phase0/ci/accuracy/corpus.json,tools/phase0/ci/accuracy/coverage-pending.txt,tools/ci/tests/test-accuracy-corpus.py:486-491. - Q: The 2026-10-29 entry for montimage-projects/mmt-dpi#527 (second tranche) cites several lines that had drifted by the time issue #92 was taken up; since the log is append-only, where are the corrected citations?
A: Here, against the tree before issue #92 (
37b24bc9): the RFC 4571 framing test ofmmt_check_stun_tcpwassrc/mmt_tcpip/lib/protocols/proto_stun.c:123-124(cited:125-126), the framed RTP search after STUNsrc/mmt_tcpip/lib/protocols/proto_rtp.c:819-828(cited:822-831), the Yahoo framingsrc/mmt_tcpip/lib/protocols/proto_rtp.c:808-814(cited:811-817), the direct dispatch of a converged flowsrc/mmt_core/src/packet_pipeline.c:815-854(cited:740-758), the SHOUTcast123456password testsrc/mmt_tcpip/lib/protocols/proto_shoutcast.c:24-25(cited:27) and the MSSQL header testsrc/mmt_tcpip/lib/protocols/proto_mssql.c:41-51(cited correctly);proto_vnc.c:52,proto_tpkt.c:67andproto_ndn_http.c:218were right and are gone with the defect 1 fix. The same drift incoverage-pending.txtreasons (proto_tds.c:23-29,proto_spotify.c:31-32,packet_pipeline.c:771-789) left with the entries or was corrected in them. The corpus review note citingproto_shoutcast.c:27now cites:24-25. Source: issue #92;git show 37b24bc9:<path>for each file above;tools/phase0/ci/accuracy/coverage-pending.txt,tools/phase0/ci/accuracy/corpus.json(acc_shoutcast_positive). - Q: Issue #92, follow-up of the STUN to RTP hand-over entry above — on the newly reachable
stun.rtpRTP-over-TCP flows, where does the RTP layer start, and what does the RTP session analysis read on a segment that ends inside the RTP header? A: After the RFC 4571 2-byte length prefix, only on the flows whose RTPmmt_check_rtp_tcpfound behind that prefix. The TCP post-classification placed every stacked application id at offset 0 of the payload, so the RTP attributes (version…ssrc) and the session analysis read the prefix as the RTP header;mmt_check_rtp_tcpnow records the framing on the flow (rtp_rfc4571_framing, outside the TCP/UDPl4union) once its framed search leaves STUN behind, andtcp_post_classification_function()adds 2 to the RTP layer’s offset on such a flow. UDP, and the 4-byte Yahoo framing, are unchanged. The session analysis no longer reads the 12-byte fixed header (RFC 3550 §5.1) past the captured frame: a shorter RTP layer is skipped, on UDP as on TCP. On a framed TCP flow, where a segment can end anywhere, the CSRC list and the header extension (§5.3.1) must fit as well, and a frame that is not RTP version 2 (the STUN keep-alives ICE-TCP multiplexes on the flow) is skipped too. The attribute extractors were already bounded (rtp_hdr_avail(), the CSRC list check, the generic extractors). Neither baseline changes: no golden pcap holds RTP over TCP. Left open, and older than issue #92 (it shows on UDP RTP too): the RTP session data is initialised again on every packet the protocol path reports as an update, so the loss and jitter counters restart each packet and the previous block is not freed. Source: issue #92;src/mmt_tcpip/lib/protocols/proto_rtp.c:869-878(framing recorded),src/mmt_tcpip/lib/protocols/proto_tcp.c:1253-1259(offset),src/mmt_tcpip/lib/mmt_tcpip_plugin_structs.h:568-571(flag),src/mmt_tcpip/lib/protocols/proto_rtp.c:589-637(rtp_session_hdr_avail()),src/mmt_core/src/packet_session.c:657-667(session data initialised on an update);tests/parser_boundaries/test_rtp_tcp_framing_api.c(fixturertp-tcp; seq/timestamp/SSRC onacc_rtp_tcp_keepalive_positive.pcap, short segments in exact-size buffers underSANITIZE=asan). - Q: Issue #100 (a gap the review of #97 noted, older than #97) — a non-root user upgrading through
sudointo a prefix that user cannot enter (mode 0700, root’s):install.shcannot see the earlier manifest, replaces the onemake installjust merged with a list missing the earlier entries, andinstall.sh --uninstallthen removes nothing and deletes the manifest. Shouldinstall.shread the prefix with privilege, or only skip its rewrite whenmake installreplaced the manifest? A: It reads the prefix with the privilege it writes it with. Skipping the rewrite alone (the inode check run as root) would keepmake install’s manifest, but--uninstallwould still test, read and resolve every entry unprivileged on that prefix, see nothing, and leave every file behind.install_mmtnow decides elevation (prefix_writable,ELEVATED) before it reads the prefix, and every test,stat, read andcd -Pof the prefix inrefuse_unsafe_manifest,manifest_id,write_manifest,resolve_dir,uninstall_mmtand the post-install library check runs through that same$SUDO(empty for a writable prefix or a root run, so those paths are unchanged). Paths reachsh -cas arguments, never in the script text, and the entry allowlist and thecd -Pcontainment check are unchanged.write_manifestbuilds its list before the privilegedteestarts, so no read overlaps the write. Nosdk/Makefilechange:make installandmake uninstallalready run whole undersudo. Rejected: the inode check alone (fails the uninstall criterion), and one privileged shell running the helpers’ definitions (more fragile, andsudo’s environment reset varies between hosts). Source: issue #100;install.sh(refuse_unsafe_manifest,uninstall_mmt,install_mmt,manifest_id,write_manifest,resolve_dir,post_install);tests/installer/run_tests.sh(the issue #100 legs: a mode-000 prefix opened only by a fakesudo, an upgrade with and without a manifest-writingmake, then--uninstall, and a symlinked manifest refused);sdk/Makefile(install,uninstall). - Q: Issue #77 (decisions of #24) — #24 planned an offline primary key on an encrypted removable drive. Where does the release signing key live, and what does mmt-dpi hold?
A: On 2026-11-17 the maintainer chose a designated signing machine (encrypted disk, dedicated
GNUPGHOME, backup and a separate revocation-certificate copy kept off that machine) instead of the offline drive. The rest of the #24 model is unchanged. The primary keyMontimage Release Signing <developer@montimage.eu>(ed25519, certify-only, expires 2031-11-16, fingerprint21630C362624FB205C3D0B184F95AECCFEF48443) never reaches CI. Subkey A (9383150437FEF6B9BCC61DC013D801774F5BF0EB) signs the APT repository and lives only in theapt-signingenvironment of Montimage/packages. Subkey B (495827E653092A1F6760ABBC054C7A5FC3824811) signs the source tarball and lives only in this repository’sMMT_RELEASE_SIGNING_KEY/MMT_RELEASE_SIGNING_PASSPHRASEsecrets, re-protected with a CI-only passphrase. mmt-dpi commits the public key asdebian/upstream/signing-key.asctogether withpgpsigurlmangleindebian/watch. Key handling is documented once, in Montimage/packagesdocs/signing-key.md. Source: issue #77, issue #24 (decisions comment, 2026-11-10);debian/upstream/signing-key.asc,debian/watch,tools/ci/sign-source-tarball.sh; Montimage/packagesdocs/signing-key.md,site/montimage-archive-keyring.gpg.