Skip to content

feat: add group-metadata-members skill for inspecting GroupMetadata from heap dumps#11

Open
BewareMyPower wants to merge 1 commit into
Demogorgon314:clifrom
BewareMyPower:bewaremypower/skill-convert-assignment
Open

feat: add group-metadata-members skill for inspecting GroupMetadata from heap dumps#11
BewareMyPower wants to merge 1 commit into
Demogorgon314:clifrom
BewareMyPower:bewaremypower/skill-convert-assignment

Conversation

@BewareMyPower
Copy link
Copy Markdown

  • 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)
@BewareMyPower BewareMyPower force-pushed the bewaremypower/skill-convert-assignment branch from b8bcb31 to 9fd218a Compare May 7, 2026 13:07
@Demogorgon314 Demogorgon314 requested a review from Copilot May 12, 2026 01:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-object usage and OQL recipes for GroupMetadata.
  • Added a bundled decode_assignments.py helper to decode Kafka ConsumerMemberAssignment bytes 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)
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