Skip to content

Merge upstream mtconnect/cppagent (through PR #612) into fork#12

Open
johnathan-arsenault wants to merge 185 commits into
mainfrom
jarsenault-merge-upstream-2026-07
Open

Merge upstream mtconnect/cppagent (through PR #612) into fork#12
johnathan-arsenault wants to merge 185 commits into
mainfrom
jarsenault-merge-upstream-2026-07

Conversation

@johnathan-arsenault

Copy link
Copy Markdown

Summary

Merges upstream mtconnect/cppagent (184 commits since our last sync at PR mtconnect#569, 2025-09-17) into our fork. This closes the ~10-month gap that was held open over concern about Ubuntu 22.04 static-link parity — that concern is resolved: the merge builds on stock 22.04 and produces a binary linked only against libc/libm.

Upstream through PR mtconnect#612. Boost is now 1.88.0; agent version 2.7.

Conflicts resolved (6)

File Resolution
conan/profiles/gcc Identical text both sides — collapsed.
source/adapter/shdr/connector.cpp Our DHCP re-resolve used deprecated asio::ip::address::from_string; upstream modernized to ip::make_address (our DHCP fix was effectively upstreamed). Took upstream's API.
test_package/http_server_test.cpp Additive — kept both our resilience tests and upstream's new OPTIONS/CORS tests.
entity/xml_printer.cpp + printer/xml_printer.cpp Upstream refactored addAttributes/addSimpleElement/addAttribute out of the .cpps into xml_printer_helper.hpp. Removed our local copies and took upstream's structure.
printer/xml_printer_helper.hpp Upstream's moved helpers wrote through raw libxml2 calls, which would have silently dropped our C0-control-byte sanitization. Re-applied it once in the canonical helper (routes through writeXmlAttribute/writeXmlRaw) — DRYer than the former per-file copies.
configuration/async_context.hpp Behavioral overlap — see below.

async_context worker exception policy

Our fork and upstream independently fixed the same root cause (a naked m_context.run() whose thrown completion handler silently killed the serving worker → "up but not serving").

  • Our fork made the worker catch and resume in place.
  • Upstream (b6745137, "fatal exception handling + graceful shutdown") made it exit cleanly with code 1 as part of a coherent FatalException taxonomy, so the service layer / systemd (Restart=always, RestartSec=2) restarts the agent fresh.

For our systemd-supervised edge deployment, upstream's approach is better-engineered (clean, observable restart vs. resuming after an unknown fault) and carries zero divergence. Adopted upstream's version verbatim. The fork-only test was rewritten to assert the adopted contract (a_thrown_handler_is_fatal_and_stops_the_context).

Our two independent hardening fixes in server.cpp — accept-loop re-arm and listen() throwing on bind failure — are unaffected and retained.

Verification (Ubuntu 22.04, gcc-13, static)

  • Built via docker/build.sh (mirrors .github/workflows/build-ubuntu-22.04.yml).
  • 896/896 tests pass (up from 753 pre-merge; the usual TLS/MQTT-broker tests skip).
  • Fork-critical tests green: IllegalControlCharactersAreSanitized, accept_loop_rearms_after_recoverable_error, listen_throws_when_port_is_already_bound, a_thrown_handler_is_fatal_and_stops_the_context.
  • Shipping binary (conan package, CPack dist, and deb pkgroot) links libc/libm only — no libstdc++.so.

🤖 Generated with Claude Code

wsobel and others added 30 commits September 18, 2025 17:45
…n_20

Migrate to cpp version 20, upgrade to boost 1.88, and update other dependencies.
wsobel and others added 25 commits April 24, 2026 15:49
…v2 and created a cutting tool test for v2. Added Date to the response header per 1.1
…tDevices complete document. Added tests and fixed all test names that were not descriptive
…guration for Devices, Streams, Assets, and Error Schemas as well as automatic detection if they are in a file directory
…s_with_schema_validation

Added all versions of the json schemas from 2.0 to 2.7
Wire LLVM/gcov coverage instrumentation into the Conan and CMake builds:

- cmake/Coverage.cmake: compiler-aware AGENT_ENABLE_COVERAGE option
  (Clang -fprofile-instr-generate/-fcoverage-mapping, GCC --coverage),
  included before targets so flags reach the lib, agent, and tests.
- conanfile.py: new "coverage" option mapped to AGENT_ENABLE_COVERAGE.
- tools/coverage.sh: run ctest, merge profiles, and emit an llvm-cov
  text + HTML report; auto-detects shared lib vs static test binaries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ation_when_using_agent_adapter

611 obervation duplication when using agent adapter
# Conflicts:
#	conan/profiles/gcc
#	src/mtconnect/configuration/async_context.hpp
#	src/mtconnect/entity/xml_printer.cpp
#	src/mtconnect/printer/xml_printer.cpp
#	src/mtconnect/source/adapter/shdr/connector.cpp
#	test_package/http_server_test.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants