Repository navigation
Add CMDP extension types wire format for DQM metrics - #21
VanitasCodes wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The wire format has unresolved interoperability and validation gaps.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds CMDP MsgPack extension wire-format documentation for DQM matrices and histograms.
Changes:
- Defines Matrix, Histogram1D, and Histogram2D extension types.
- Documents payload layouts, dtype tags, and byte ordering.
- Describes metric integration and compatibility behavior.
| File | Reviewed changes and findings |
|---|---|
docs/framework_reference/protocols.md |
Adds structured metric extension specifications. Findings: Critical (3 votes): zero-bin histograms are undefined at lines 315 and 361. Moderate (2 votes): Histogram2D bin-count dtype is unspecified. Moderate (1 vote): unknown Matrix dtype tags lack decoding rules. Nit (2 votes): the normative CMDP protocol location is not updated or linked. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
stephanlachnit
left a comment
There was a problem hiding this comment.
In general I think the technical aspects are fine. However - I urge to read through our other protocols (https://gitlab.desy.de/constellation/constellation/-/tree/main/docs/protocols?ref_type=heads) - try to copy the structure and write it in RFC style (see also RFC 2119.
This should be less of an explanation of what you did but a documented targeted for people trying to implement - Motivation should briefly come once in the beginning and then the rest should be technical details with motivation only when absolutely necessary.
Think about it like this: when implementing this protocol I don't care about why they choose their design pattern - I just want to get the job done. In that case, the shorter and more precise, the better.
4d08db1 to
991e8a1
Compare
stephanlachnit
left a comment
There was a problem hiding this comment.
Already much better wording!
The spellcheck in the GitLab MR is still failing and needs to be addressed (see https://gitlab.desy.de/constellation/constellation/-/merge_requests/1221).
ab4fbd3 to
850ac0d
Compare



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:
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.