← Back to Pull requests

feat: under -c opt, automatically compress #89

Merged
alexeagle merged 4 files (84 lines) on Dec 09, 2025 16:30 UTC
View on GitHub
alexeagle alexeagle commented on Dec 04, 2025 00:50 UTC
Author

Not sure it's a good idea though, since the output filename changes to .gz

Diff: 84 lines (+16 / -68) across 4 files Reviewer: arrdem Review duration: 8140m
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.34) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.34 · 84 lines diff across 4 files
0.34
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.73 · 5 substantive comment(s)
0.73
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
81%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.266
Real PR Conversation Timeline
12 items
aspect-workflows[bot] aspect-workflows[bot] commented on Dec 04, 2025 00:50 UTC
Bot

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/f3c4acff-fee8-40a2-8c9c-61e51c641b8a" target="_blank">Test (Bazel 7.x) (Test)</a>

All tests were cache hits

<i>24 tests (100.0%) were fully cached saving 2s.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/10dd0cf2-4adf-4e0f-a41a-951944aeda0e" target="_blank">Test (Bazel 8.x) (Test)</a>

All tests were cache hits

<i>24 tests (100.0%) were fully cached saving 2s.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/82056388-2021-450a-9a83-9a3313e57269" target="_blank">Test (Bazel 9.x) (Test)</a>

All tests were cache hits

<i>24 tests (100.0%) were fully cached saving 2s.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/975c7952-36a6-4641-abb1-f825b6457d48" target="_blank">Test (Bazel 7.x) (Test)</a>

<h6>e2e/smoke</h6>

All tests were cache hits

<i>1 test (100.0%) was fully cached saving 32ms.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/de39bbd4-a87d-44b8-9c9c-4c4cc734e3df" target="_blank">Test (Bazel 8.x) (Test)</a>

<h6>e2e/smoke</h6>

All tests were cache hits

<i>1 test (100.0%) was fully cached saving 63ms.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/834d4861-18a8-4f0a-a38b-b37f85ae460a" target="_blank">Test (Bazel 9.x) (Test)</a>

<h6>e2e/smoke</h6>

All tests were cache hits

<i>1 test (100.0%) was fully cached saving 45ms.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/e556dc29-74b9-4fc0-9834-dfdf4a39243a" target="_blank">Test (WORKSPACE) (Test)</a>

<h6>e2e/smoke</h6>

All tests were cache hits

<i>1 test (100.0%) was fully cached saving 59ms.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/386c20c9-e9bc-4228-a741-0745388ca6ca" target="_blank">Test (Bazel 7.x) (Test)</a>

<h6>examples</h6>

All tests were cache hits

<i>3 tests (100.0%) were fully cached saving 135ms.</i>

---

<img src="https://static.aspect.build/marvin/assets/18px/success-outline.png" align="top"> <a href="https://app.oss.aspect.build/053264f9-10fa-4307-8dc2-deaad26d0f6c" target="_blank">Test (Bazel 8.x) (Test)</a>

<h6>examples</h6>

All tests were cache hits

<i>3 tests (100.0%) were fully cached saving 158ms.</i>
<!--H4sIAAAAAAACA+2YTYscRwyG/4rpXGIY7daHqkqaWxJyyiEhCeRgwiBVlexh52OZ7sF2lv3voT1r8uGNgzcYZsneGqmokt56WrzdN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H7765tvPxLWAM2uAZAWYyEHl2HPK6j35h3HdU8qtBoaCyoBWHTBFhGbNUCIHjPJkt/8fdjudmTEpAdAbgaoF8Fp8ibl2rg80Jq1HVm0IQqUBohLwbLexYq0lYo/NHiXqT4blk1HP8bzcSomAUiJIswxFtFI0H9XsgW4lYkPKHjwJAZoTkEgKGotRko7ZPc6p/uRiPhl1TOf1E6UkQCME1uahZkOu2qhGehjqkXINrjJ01goYAoEU9OAKpkhUJdcPUH8j2+tNH5/8y6P1L/Feux7TmRmYDCi1gQYk8NoDph4xpAd+g7oUQ0Zj8M4EMLoC1GqA1kVayM1Zro8R9Sf/8umoJ7r99fZ3AG6DAekaAAA=-->

chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on code on Dec 04, 2025 00:53 UTC
Code Review
tar/tar.bzl:1
@@ -130,5 +130,6 @@ def tar(name, mtree = "auto", mutate = None, include_runfiles = None, stamp = 0,
     tar_rule(
         name = name,
         mtree = mtree_target,
+        compress = kwargs.pop("compress", select({Label(":compilation_mode.opt"): "gzip", "//conditions:default": None})),
         **kwargs

<sub><sub>!P1 Badge</sub></sub> Compress default references missing config_setting

The tar macro now hardcodes compress = kwargs.pop("compress", select({Label(":compilation_mode.opt"): "gzip", "//conditions:default": None})). Label(":compilation_mode.opt") is resolved relative to the caller’s package, but the only compilation_mode.opt config_setting lives in //tar:compilation_mode.opt. Any consumer that invokes tar(...) outside //tar without explicitly setting compress will get a load-time error for a missing target :<compilation_mode.opt> (or a type error if it resolves to None). This breaks the default macro usage in downstream packages; the select should point at the repository’s config_setting (e.g. //tar:compilation_mode.opt).

Useful? React with 👍 / 👎.

chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Dec 04, 2025 00:53 UTC
Reviewer

💡 Codex Review

Here are some automated review suggestions for this pull request.

<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>

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".

    </details>

    alexeagle alexeagle commented on code on Dec 04, 2025 01:50 UTC
    Code Review
    tar/tar.bzl:1
    @@ -130,5 +130,6 @@ def tar(name, mtree = "auto", mutate = None, include_runfiles = None, stamp = 0,
         tar_rule(
             name = name,
             mtree = mtree_target,
    +        compress = kwargs.pop("compress", select({Label(":compilation_mode.opt"): "gzip", "//conditions:default": None})),
             **kwargs

    The Label() constructor avoids the string being evaluated in the caller's context

    hofbi hofbi commented on Dec 04, 2025 06:18 UTC
    Contributor

    Also not too sure about this. What if a user does not want to have compression despite an opt build.

    One scenario that comes to my mind are simulations. Let's say the simulation pipeline produces oci images which are then executed. You want the best performance for your binaries, since simulation is still some sort of internal testing, you might not care about storage as much as time. And having no compression saves some time.

    alexeagle alexeagle commented on Dec 04, 2025 16:43 UTC
    Author

    If you want to save time, you'd never run an opt build because all other compile steps would also be slower, right? Compressing a tar file feels very much the same use case as spending more time making any other build output smaller or run faster?

    hofbi hofbi commented on Dec 04, 2025 17:58 UTC
    Contributor

    Right, but when running simulations you might want your pipeline to be fast but at the same time have the binaries running in the simulation to be optimized.

    arrdem arrdem commented on Dec 05, 2025 18:39 UTC
    Contributor

    I think that's a fine use-case, but calls for finer grained settings defined by then user than -c opt which is a blanket optimize everything indicator. As a matter of default behavior, I think this is reasonable and improves the majority fastbuild case.

    arrdem arrdem approved these changes on Dec 05, 2025 18:39 UTC
    Approved Reviewer

    Approved these changes.

    hofbi hofbi approved these changes on Dec 06, 2025 08:18 UTC
    Approved Reviewer

    Approved these changes.

    Silic0nS0ldier Silic0nS0ldier commented on Jan 27, 2026 00:46 UTC
    Contributor

    A change to compression level by default would be _okay_ I think, but .tar -> .tar.gz is too great a change.

    Reviewers
    Assignees
    alexeagle alexeagle
    Labels
    risk: low confidence: 81.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 34.0% (LOW) · Higher = larger blast radius
    34.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 81.8% · Lower = rushed or shallow review
    81.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.2% · Safe to merge
    6.2%