Skip to content

feat(contimage): add hidden bytes and uncompressed image size - #525

Draft
Stephanie0829 wants to merge 3 commits into
masterfrom
codex/container-image-hidden-bytes
Draft

Stephanie0829 wants to merge 3 commits into
masterfrom
codex/container-image-hidden-bytes

Conversation

@Stephanie0829

@Stephanie0829 Stephanie0829 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add optional container-image measurements:

  • Per-layer hidden_bytes: logical file data hidden by later deletions or replacements, attributed to the layer that stored it.
  • Image-level uncompressed_size: regular-file data across all layers, including hidden versions, counting same-layer hardlinks once. Excludes tar overhead, symlinks, directories, whiteout markers, and image metadata.

Absence means unavailable; an explicit zero is a measured zero. No percentage is sent. The existing size field is unchanged.

Motivation

Provide comparable logical byte counts for image-optimization analysis. This is not compressed download size, decompressed tar size, or guaranteed reclaimable disk space.

Additional Notes

Companion: datadog-agent #56823, including minikube QA instructions and observed results. Neither draft is ready to merge; user validation is pending.

🤖 Generated with Claude Code

@Stephanie0829

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: f15262a548

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T21:29:20.572109Z 451811d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Stephanie0829

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 451811d2b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Logical regular-file bytes across all layers, including versions hidden by
// later layers. Same-layer hardlinks count once. Excludes archive and filesystem
// overhead, symlinks, config and manifest. Absent when collection is unavailable.
optional uint64 uncompressed_size = 14;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the unrelated uncompressed-size field

This commit and its companion work introduce only the per-layer hidden_bytes metric, but this line also publishes a separate image-level protobuf contract and permanently claims field 14. If merged independently of the total-size work, consumers see an unsupported field and the eventual implementation can no longer choose or revise its wire definition safely; move this field and its generated Go changes to the dedicated uncompressed-size change.

Useful? React with 👍 / 👎.

@Stephanie0829 Stephanie0829 changed the title feat(contimage): add optional per-layer hidden bytes feat(contimage): add hidden bytes and uncompressed image size Sep 24, 2026
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.

1 participant