Skip to content

feat: add upload count to sample - #81

Merged
alanshaw merged 3 commits into
mainfrom
ash/feat/sample-upload-count
Sep 28, 2026
Merged

alanshaw merged 3 commits into
mainfrom
ash/feat/sample-upload-count

Conversation

@alanshaw

Copy link
Copy Markdown
Member

The upload count is mapped to object count - ingot uses it to count objects in a space fil-forge/ingot#176

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

The JSON decoder still accepts empty arrays as zero-valued samples, leaving wire validation inconsistent.

Review effort: Lite
Findings: 1 Medium severity 路 1 Low severity

Open (2)
What changed in this PR

Adds UploadCount to metrics samples so consumers can derive object counts.

Changes:

  • Extends CBOR and DAG-JSON tuple codecs.
  • Updates round-trip tests and fixtures.
  • Documents the new field and wire format.
File Description
commands/鈥媘etrics/鈥媡ypes.go Adds and documents UploadCount.
commands/鈥媘etrics/鈥媕son_gen.tuples.go Encodes and decodes the fourth DAG-JSON field.
commands/鈥媘etrics/鈥媍odec_test.go Updates codec round-trip coverage.
commands/鈥媘etrics/鈥媍bor_gen.tuples.go Encodes and decodes the fourth CBOR field.
Files not reviewed (2)
  • commands/metrics/cbor_gen.tuples.go: Generated file
  • commands/metrics/json_gen.tuples.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
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

馃數 Needs a closer look

The change spans generated serialization code and dependency updates, warranting final human review.

Review effort: Lite
Findings: None

Resolved since last review (2)
Files not reviewed (4)
  • blobindex/datamodel/json_gen.tuples.go: Generated file
  • commands/content/json_gen.tuples.go: Generated file
  • commands/metrics/cbor_gen.tuples.go: Generated file
  • commands/metrics/json_gen.tuples.go: Generated file

@alanshaw
alanshaw merged commit 9954086 into main Sep 28, 2026
8 checks passed
@alanshaw
alanshaw deleted the ash/feat/sample-upload-count branch September 28, 2026 15:16
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