feat: add command for retrieving metrics samples for a space - #76
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
馃煛 Changes recommended
Clarify the sampling contract for incomplete final buckets before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds the /metrics/sample command for retrieving space usage samples and serialized request/response models.
Changes:
- Defines sampling arguments and metric result types.
- Registers the
/metrics/samplecommand and error names. - Adds generated CBOR and DAG-JSON codecs.
- Adds codec round-trip tests.
| File | Description |
|---|---|
commands/鈥媘etrics/鈥媡ypes.go |
Defines metrics request and response models. |
commands/鈥媘etrics/鈥媠ample.go |
Registers the /metrics/sample command. |
commands/鈥媘etrics/鈥媕son_gen.go |
Adds generated DAG-JSON codecs. |
commands/鈥媘etrics/鈥媑en/鈥媘ain.go |
Configures codec generation. |
commands/鈥媘etrics/鈥媍odec_test.go |
Tests codec round trips. |
commands/鈥媘etrics/鈥媍bor_gen.go |
Adds generated CBOR codecs. |
Files not reviewed (2)
- commands/metrics/cbor_gen.go: Generated file
- commands/metrics/json_gen.go: Generated file
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Copilot review overview
馃煝 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
Resolved since last review (1)
Files not reviewed (2)
- commands/metrics/cbor_gen.go: Generated file
- commands/metrics/json_gen.go: Generated file
alanshaw
added a commit
to fil-forge/sprue
that referenced
this pull request
Sep 24, 2026
Allows Hilt to call Sprue to retrieve per space metrics. Depends on: * fil-forge/libforge#76
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.

Adds
/metrics/sample