Skip to content

Add CMDP extension types wire format for DQM metrics - #20

Closed
VanitasCodes wants to merge 1 commit into
constellation-daq:mainfrom
VanitasCodes:dqm-docs-spec
Closed

VanitasCodes wants to merge 1 commit into
constellation-daq:mainfrom
VanitasCodes:dqm-docs-spec

Conversation

@VanitasCodes

Copy link
Copy Markdown

This adds a wire format specification to the CMDP protocol documentation for structured data quality monitoring (DQM) metrics. The specification defines three MsgPack extension types that allow CMDP to carry dense 2D matrices and histograms alongside the existing scalar metric values.

The extension types are:

Type Code Purpose
Matrix 1 Dense 2D array of typed numeric values (uint32, uint64, float32, float64)
Histogram1D 2 1D histogram with uniform binning and float64 bin counts
Histogram2D 3 2D histogram with uniform x/y binning, embedding a Matrix

All numeric fields within ext payloads use little-endian byte order for zero-copy compatibility with x86 and NumPy. The existing CMDP metric payload format is unchanged. Deserializers that do not understand the new extension types encounter an unknown MsgPack ext object in the value position and can skip it gracefully.

This is the specification groundwork for the C++ and Python implementations that will follow in subsequent commits.

Copilot AI lite review requested due to automatic review settings September 23, 2026 19:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved moderate issues affect wire-format correctness and payload bounds validation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Adds MsgPack extension wire-format documentation for CMDP DQM matrices and histograms.

Changes:

  • Defines Matrix, Histogram1D, and Histogram2D payloads.
  • Documents numeric types, endianness, and metric integration.
  • Describes compatibility with unknown extensions.
File Review summary
docs/​framework_reference/​protocols.md Adds structured metric extension specifications. Findings: inaccurate extension code-range documentation (moderate, 2 votes); missing matrix bounds and checked arithmetic (moderate, 1 vote); missing histogram bounds and checked arithmetic (moderate, 1 vote); canonical RFC documentation should be updated or linked (nit, 2 votes).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

structured 2D data such as matrices and histograms.

These types use the MsgPack Extension format, which stores a tuple of an integer type code and a byte array payload.
MsgPack reserves type codes `[0, 127]` for application-defined use.
Comment on lines +239 to +243
### CMDP Extension Types for Structured Metrics

The standard CMDP metric payload carries scalar values (integers, floats, strings, booleans, timestamps) encoded as native
MsgPack types. For data quality monitoring, CMDP is extended with application-specific MsgPack Extension types that carry
structured 2D data such as matrices and histograms.
@VanitasCodes
VanitasCodes deleted the dqm-docs-spec branch September 23, 2026 19:33
@VanitasCodes
VanitasCodes restored the dqm-docs-spec branch September 23, 2026 19:35
@VanitasCodes VanitasCodes reopened this Sep 23, 2026
@VanitasCodes
VanitasCodes deleted the dqm-docs-spec branch September 23, 2026 19:56
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.

2 participants