Skip to content

Feature request: support message-driven subsystems (MQTT, AMQP, Kafka) in setup, config, gold traces and review #23

Open

Description

@devin-ai-integration

Problem

The skills assume a subsystem is reached through HTTP routes and SQL. Nothing in
appmap-setup, appmap-config, appmap-gold-traces or appmap-review mentions a message
broker, a topic, or a message handler. For an application whose decisions are made in
topic handlers (an MQTT hub relaying device commands, state and data streams), this
leaves three gaps.

  1. No entry point inventory. The coverage matrix and the subsystem list are built
    from the route table. A broker-driven application has no route table. Its entry
    points are the callbacks subscribed to each topic, and the skills give no way to
    list them, so coverage cannot be measured.
  2. No standard labels. The config skill lists labels for authorization, HTTP and
    SQL. There is no label for "a message arrived from the broker" or "a message was
    published", so a review cannot tell a changed handler from a changed helper. A
    scan had to invent mqtt.receive and mqtt.publish.
  3. No recipe for the integration layer. Unit tests in these projects replace the
    broker with a mock or never connect. The skills do not say to record against a
    real broker, which one, how to keep the broker client library's network loop out of
    the recording, or how to wait for asynchronous delivery so the recording is stable.

The scanner reflects the same gap: on such a project it runs its checks and returns
nothing, because none of its rules look at message ingress or publish. A clean scan
then reads as evidence of safety when it is evidence of no coverage.

Steps to see it

  1. Clone MideTechnology/endaq-device, branch feature/gateway_interface.
  2. Follow appmap-setup and appmap-gold-traces as written.
  3. Observe that the bootstrap selects only unit tests (none reach
    endaq/device/mqtt/manager.py), the coverage matrix has no rows for the topic
    handlers, and scanner scan reports 0 findings over 154 checks.

What a fix would need to cover

  • appmap-setup Phase 0 detects a broker client dependency (paho-mqtt, pika, aiokafka,
    kafkajs, Spring AMQP or Kafka) and says the reach check is not met without a broker.
  • appmap-config names the message handler and publish functions as the decision layer
    for such a project, with standard labels, and lists the client library internals to
    exclude.
  • appmap-gold-traces treats each subscribed topic family as a subsystem for the
    coverage matrix and ranking.
  • appmap-review reads handlers against the same absence checklist it applies to routes.

Found while scanning a public MQTT gateway branch with appmap-python 3.0.1, AppMap CLI
3.206.0 and scanner 1.92.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions