Skip to content

ci(release): cap dist-* build-artifact retention at 2 days#953

Open
dev-punia-altimate wants to merge 2 commits into
mainfrom
ci/cap-release-dist-artifact-retention
Open

ci(release): cap dist-* build-artifact retention at 2 days#953
dev-punia-altimate wants to merge 2 commits into
mainfrom
ci/cap-release-dist-artifact-retention

Conversation

@dev-punia-altimate

@dev-punia-altimate dev-punia-altimate commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Why

The Release workflow's per-platform dist-* artifacts (actions/upload-artifact, no retention-days set) were inheriting the org's 90-day default and piling up to ~90 GB across releases dating back to March 20 — single-handedly exhausting the shared org Actions artifact-storage quota and causing Failed to CreateArtifact: Artifact storage quota has been hit failures in other repos (e.g. altimate-ingestion PR builds).

These artifacts are spent intra-run couriers

dist-* only exists to hand the compiled binaries from the build matrix to the publish/release jobs within the same run. Job chain (no environment:/approval gates — verified):

build (uploads dist-*) → sanity-verdaccio → publish-npm (downloads dist-*, npm publish) → github-release (downloads dist-*, uploads Release assets)

After the run, the binaries live permanently in two places, neither of which is an Actions artifact and neither counts against the storage quota:

  • npm registrynpm publish uploads an immutable copy; npm never references the GitHub artifact again.
  • GitHub Release assets*.tar.gz/*.zip + checksums.txt; these carry real download counts (v0.8.0 linux-x64 = 200, v0.8.7 darwin-arm64 = 179), proving this is the actual distribution path the installers use.

Org-wide code search confirmed nothing downloads dist-* cross-run or cross-repo.

Why retention-days: 5 is safe (evidence)

The artifact only needs to survive one release run. Measured durations of recent runs:

Release Duration
v0.7.1 (longest in history) 62 min
v0.8.5 37 min
v0.8.0–v0.8.7 (typical) 13–15 min

5 days → ~116x margin over the worst-ever run (62 min), ~480x over typical. Bumped from an initial 2 days to give comfortable headroom for re-running a partial publish/release job days later without a full rebuild.

Residual risk (accepted): re-running only the publish-npm/github-release job >2 days after the build would find the artifact expired — fix is to re-run the whole release (rebuilds dist-*), which is normal practice.

Cleanup already done

Separately deleted the existing backlog: 324 dist-* artifacts older than June 1 (74.3 GB) via the API. altimate-code live artifact storage dropped 90.73 GB → 16.40 GB, bringing the org back under the storage quota (after GitHub's 6–12h usage recalc).

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated internal CI/CD workflow configuration to optimize artifact storage management.

The per-platform dist-* artifacts are intra-run couriers: the publish and
gh-release jobs download them within the same release run, after which the
binaries live permanently as npm packages and GitHub Release assets (which
do NOT count against the Actions artifact storage quota).

With no retention set they inherited the org 90-day default and accumulated
to ~90 GB across releases back to March — single-handedly exhausting the
shared org artifact-storage quota and failing artifact uploads in other
repos (e.g. altimate-ingestion). 2 days is plenty to span a release run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWgwuud3NLX8fdZp581v5y
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Hey! Your PR title ci(release): cap dist-* build-artifact retention at 2 days doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow's build job artifact upload step gains a retention-days: 5 setting along with inline comments documenting that these artifacts are only needed within the same workflow run for inter-job consumption.

Changes

Release Workflow Artifact Retention

Layer / File(s) Summary
Build artifact retention configuration
.github/workflows/release.yml
retention-days: 5 added to the "Upload build artifact" step, with comments documenting these artifacts as intra-run couriers used by later jobs within the same workflow run.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through CI lanes,
Five days of artifacts, then drains!
Build, pass along, then fade away,
No hoarding storage day by day. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is missing the required 'PINEAPPLE' identifier at the top (required for AI-generated contributions) and lacks a formal Test Plan section, though comprehensive technical justification is provided. Add 'PINEAPPLE' at the very top of the description before other content, and include a Test Plan section describing how the retention change was validated.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: capping dist-* build-artifact retention at 2 days in the CI release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/cap-release-dist-artifact-retention

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWgwuud3NLX8fdZp581v5y

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 133-135: In the .github/workflows/release.yml file, locate the
retention-days configuration (currently set to 5) and change the value from 5 to
2 to align with the PR objective and address the organization's artifact storage
quota concerns mentioned in the comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 757107d3-492b-4176-a400-799e084f94ad

📥 Commits

Reviewing files that changed from the base of the PR and between 32b31f6 and e6372f2.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment on lines +133 to +135
# the run (worst run ~62 min) plus margin for a next-day partial re-run,
# so they don't accumulate against the org artifact-storage quota.
retention-days: 5

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set retention to the intended 2 days (not 5).

Line 135 conflicts with the stated PR objective (retention-days: 2). Given prior org-wide quota exhaustion and CreateArtifact failures, this value mismatch should be corrected in this PR.

Suggested fix
-          retention-days: 5
+          retention-days: 2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# the run (worst run ~62 min) plus margin for a next-day partial re-run,
# so they don't accumulate against the org artifact-storage quota.
retention-days: 5
# the run (worst run ~62 min) plus margin for a next-day partial re-run,
# so they don't accumulate against the org artifact-storage quota.
retention-days: 2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 133 - 135, In the
.github/workflows/release.yml file, locate the retention-days configuration
(currently set to 5) and change the value from 5 to 2 to align with the PR
objective and address the organization's artifact storage quota concerns
mentioned in the comment.

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.yml">

<violation number="1" location=".github/workflows/release.yml:135">
P2: The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets `retention-days: 5`. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

# packages + GitHub Release assets. Keep them only long enough to span
# the run (worst run ~62 min) plus margin for a next-day partial re-run,
# so they don't accumulate against the org artifact-storage quota.
retention-days: 5

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: The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets retention-days: 5. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 135:

<comment>The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets `retention-days: 5`. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.</comment>

<file context>
@@ -130,8 +130,9 @@ jobs:
-          retention-days: 2
+          # the run (worst run ~62 min) plus margin for a next-day partial re-run,
+          # so they don't accumulate against the org artifact-storage quota.
+          retention-days: 5
 
   # ---------------------------------------------------------------------------
</file context>

@dev-punia-altimate

Copy link
Copy Markdown
Contributor Author

❌ Tests — Failures Detected

TypeScript — 15 failure(s)

  • connection_refused
  • timeout [1.00ms]
  • permission_denied
  • parse_error
  • network_error
  • auth_failure
  • rate_limit [1.00ms]
  • internal_error
  • empty_error
  • connection_refused
  • timeout
  • permission_denied
  • parse_error
  • oom [1.00ms]
  • network_error

Next Step

Please address the failing cases above and re-run verification.

cc @dev-punia-altimate

@dev-punia-altimate

Copy link
Copy Markdown
Contributor Author

🤖 Code Review — OpenCodeReview (Gemini) — No Issues Found

No supported files changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant