Skip to content

[AI] Stabilize size-compare job by pinning downloads to run_id - #7780

Merged
MatissJanis merged 4 commits into
masterfrom
ai/stabilize-bundle-size-compare
May 14, 2026
Merged

MatissJanis merged 4 commits into
masterfrom
ai/stabilize-bundle-size-compare

Conversation

@MatissJanis

@MatissJanis MatissJanis commented May 9, 2026 •

Copy link
Copy Markdown
Member

Description

Making the size-compare ci job more stable.

Full disclosure: I have not tested this (testing github actions is a pain..), but it should work as-expected. And if it doesn't - will revert or hotfix.

Related issue(s)

n/a

Testing

n/a

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 34 13.93 MB 0%
loot-core 1 5.27 MB 0%
api 2 3.9 MB 0%
cli 1 7.97 MB 0%
crdt 1 43.41 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
34 13.93 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.93 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ReportRouter.js 1.22 MB 0%
static/js/ScheduleEditForm.js 145.76 kB 0%
static/js/TransactionEdit.js 190.4 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/Value.js 4.94 MB 0%
static/js/alerts.js 800.08 kB 0%
static/js/bankSyncUtils.js 54.1 kB 0%
static/js/ca.js 187.91 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.38 kB 0%
static/js/de.js 170.55 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/en.js 185.11 kB 0%
static/js/es.js 179 kB 0%
static/js/extends.js 520.14 kB 0%
static/js/fr.js 178.9 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.01 kB 0%
static/js/narrow.js 364.41 kB 0%
static/js/nb-NO.js 148.31 kB 0%
static/js/nl.js 106.47 kB 0%
static/js/pl.js 86.52 kB 0%
static/js/pt-BR.js 189.58 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.76 kB 0%
static/js/theme.js 31.67 kB 0%
static/js/uk.js 207.75 kB 0%
static/js/useFormatList.js 4.96 kB 0%
static/js/wide.js 453 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 117.91 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.27 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.CfcE9hoo.js 5.27 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.9 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.9 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 7.97 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.97 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 43.41 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 43.41 kB 0%

The compare job in .github/workflows/size-compare.yml was flaky because
fountainhead/action-wait-for-check matched a check by name from any run
on the branch, while dawidd6/action-download-artifact with branch:/pr:
filters and workflow_conclusion: '' resolved to the latest run regardless
of completion. When a new master build started in the seconds between
waiting and downloading, the action picked up the in-progress run and
failed with "artifact not found".

Replaces the eight wait-for-check steps with one actions/github-script
step that polls listWorkflowRuns for a successful build.yml run on
master and the PR head SHA in parallel via Promise.all, then pins all
eight downloads to those run_ids.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@netlify

netlify Bot commented May 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit ac2f04c
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/69ff7960fe7dfa0008119080
😎 Deploy Preview https://deploy-preview-7780.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 9, 2026

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget-website ready!

Name Link
🔨 Latest commit 732a6a1
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget-website/deploys/69ff665a3ec86f00082401e2
😎 Deploy Preview https://deploy-preview-7780.www.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@MatissJanis

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The workflow polls the GitHub Actions API to resolve the latest successful build.yml run IDs for the base branch and PR head, then downloads size-comparison artifacts pinned to those run IDs; previous check-wait and branch/pr-based download logic is removed. A release note was added.

Changes

Build artifact resolution via run ID polling

Layer / File(s) Summary
Permissions
.github/workflows/size-compare.yml
Workflow permissions extended with actions: read for GitHub Actions API access.
Run resolution
.github/workflows/size-compare.yml
New Resolve build runs github-script step polls GitHub Actions for successful build.yml runs on the base ref and PR head SHA and emits master_run_id and head_run_id.
Artifact downloads
.github/workflows/size-compare.yml
build-stats, api-build-stats, cli-build-stats, and crdt-build-stats downloads now fetch artifacts by the resolved run IDs from build.yml for both base and head.
Removed wait/check block
.github/workflows/size-compare.yml
Previous wait-for-check, failure-report, and branch/pr-based download (including fork handling) block removed.
Release notes
upcoming-release-notes/7780.md
Adds front-matter and a description noting the size comparison workflow was stabilized by pinning artifact downloads to run IDs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I hopped through workflows, sniffed each run ID,

Pinned the artifacts tidy, no longer silly.
Polling with patience, the downloads align,
Builds and sizes matched, neat and on time.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: stabilizing the size-compare workflow by pinning artifact downloads to specific run IDs instead of branch/PR-based downloads.
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.
Description check ✅ Passed The PR description clearly states the purpose: making the size-compare CI job more stable by pinning artifact downloads to run IDs, which directly relates to the changeset.

✏️ 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 ai/stabilize-bundle-size-compare

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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 9, 2026
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Auto-generated Release Notes

Hey @MatissJanis! I've automatically created a release notes file based on CodeRabbit's analysis:

Category: Enhancements
Summary: Stabilize size comparison workflow by pinning artifact downloads to specific run IDs.
File: upcoming-release-notes/7780.md

If you're happy with this release note, you can add it to your pull request. If not, you'll need to add your own before a maintainer can review your change.

Updated category from 'Enhancements' to 'Maintenance'.
@MatissJanis
MatissJanis marked this pull request as ready for review May 9, 2026 17:36
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 9, 2026
jfdoming
jfdoming previously approved these changes May 9, 2026
Comment thread .github/workflows/size-compare.yml Resolved
@MatissJanis
MatissJanis added this pull request to the merge queue May 14, 2026
Merged via the queue into master with commit fd01bd8 May 14, 2026
23 checks passed
@MatissJanis
MatissJanis deleted the ai/stabilize-bundle-size-compare branch May 14, 2026 19:45
@coderabbitai coderabbitai Bot mentioned this pull request May 25, 2026
RafaelEspino pushed a commit to RafaelEspino/actual that referenced this pull request Oct 28, 2026
…lbudget#7780)

* [AI] Stabilize size-compare job by pinning downloads to run_id

The compare job in .github/workflows/size-compare.yml was flaky because
fountainhead/action-wait-for-check matched a check by name from any run
on the branch, while dawidd6/action-download-artifact with branch:/pr:
filters and workflow_conclusion: '' resolved to the latest run regardless
of completion. When a new master build started in the seconds between
waiting and downloading, the action picked up the in-progress run and
failed with "artifact not found".

Replaces the eight wait-for-check steps with one actions/github-script
step that polls listWorkflowRuns for a successful build.yml run on
master and the PR head SHA in parallel via Promise.all, then pins all
eight downloads to those run_ids.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Add release notes for PR actualbudget#7780

* Change category to Maintenance in release notes

Updated category from 'Enhancements' to 'Maintenance'.

* [AI] Clean up comment to remove reference to previous implementation

Co-authored-by: Matiss Janis Aboltins <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
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.

5 participants