feat: add group-metadata-members skill for inspecting GroupMetadata from heap dumps#11
Open
BewareMyPower wants to merge 1 commit into
Conversation
BewareMyPower
commented
May 7, 2026
- Create .opencode/skills/group-metadata-members/SKILL.md with instructions for using mat-cli inspect-object and OQL queries against io.streamnative.pulsar.handlers.kop.coordinator.group.GroupMetadata
- Include sanitized example JSON output (fake data, no sensitive info)
- Register the skill in AGENTS.md
- Document the bundled decode_assignments.py script in SKILL.md
- Remove generic assignment decoding tip (replaced by the script)
…rom heap dumps - Create .opencode/skills/group-metadata-members/SKILL.md with instructions for using mat-cli inspect-object and OQL queries against io.streamnative.pulsar.handlers.kop.coordinator.group.GroupMetadata - Include sanitized example JSON output (fake data, no sensitive info) - Register the skill in AGENTS.md - Document the bundled decode_assignments.py script in SKILL.md - Remove generic assignment decoding tip (replaced by the script)
b8bcb31 to
9fd218a
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new OpenCode skill (group-metadata-members) intended to help users extract and inspect Kafka consumer group member information from io.streamnative.pulsar.handlers.kop.coordinator.group.GroupMetadata objects in MAT heap dumps, including a helper script for decoding assignment bytes.
Changes:
- Added a new skill guide with MAT CLI
instances/inspect-objectusage and OQL recipes forGroupMetadata. - Added a bundled
decode_assignments.pyhelper to decode KafkaConsumerMemberAssignmentbytes from JSON dumps. - Registered the new skill in
AGENTS.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
AGENTS.md |
Registers the new group-metadata-members skill in the repo’s skill index. |
.opencode/skills/group-metadata-members/SKILL.md |
Adds step-by-step instructions and example output structure for inspecting GroupMetadata and members. |
.opencode/skills/group-metadata-members/decode_assignments.py |
Adds a Python helper for decoding member assignment bytes into a topic/partition ownership view. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+29
to
+31
| mat-cli inspect-object <heap-file> --address <address> \ | ||
| --field-paths groupId,generationId,protocolType,protocol,members | ||
| ``` |
Comment on lines
+44
to
+46
| mat-cli inspect-object <heap-file> --address <member-metadata-address> \ | ||
| --field-paths memberId,clientId,clientHost,sessionTimeout,rebalanceTimeout,groupInstanceId,subscription,assignment | ||
| ``` |
Comment on lines
+62
to
+66
| ```sql | ||
| SELECT m.value.memberId.toString(), m.value.clientId.toString(), m.value.clientHost.toString(), m.value.sessionTimeout, m.value.rebalanceTimeout, m.value.assignment.@length | ||
| FROM io.streamnative.pulsar.handlers.kop.coordinator.group.GroupMetadata g | ||
| OBJECTS g.members.table m | ||
| ``` |
| topic-b: missing partitions [2, 3, 4] ← ORPHANED | ||
| ``` | ||
|
|
||
| The default input path is `group_metadata_members_ds.json` in the project root. Pass a different file as the first argument to override. |
Comment on lines
+105
to
+107
| path = sys.argv[1] if len(sys.argv) > 1 else \ | ||
| "group_metadata_members_ds.json" | ||
| main(path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.