Skip to content

feat: add command for retrieving metrics samples for a space - #76

Merged
alanshaw merged 3 commits into
mainfrom
ash/feat/metrics-sample
Sep 22, 2026
Merged

alanshaw merged 3 commits into
mainfrom
ash/feat/metrics-sample

Conversation

@alanshaw

Copy link
Copy Markdown
Member

Adds /metrics/sample

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Clarify the sampling contract for incomplete final buckets before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

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/sample command 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.

Comment thread commands/metrics/types.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
alanshaw merged commit 3bb3c2c into main Sep 22, 2026
8 checks passed
@alanshaw
alanshaw deleted the ash/feat/metrics-sample branch September 22, 2026 16:40
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
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