Skip to content

ci-flake: cache apt runtime packages in desktop-windows Linux smoke job - #23343

Closed
Git-on-my-level wants to merge 3 commits into
mainfrom
agent/m1-studio-zcode-glm-5-3/07c23a3dac52
Closed

Git-on-my-level wants to merge 3 commits into
mainfrom
agent/m1-studio-zcode-glm-5-3/07c23a3dac52

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What

desktop-windows-ci → build-linux (Linux package · helper smoke) intermittently fails in Install Linux runtime dependencies with The action 'Install Linux runtime dependencies' has timed out after 5 minutes. This PR removes the per-run apt download that causes it: it caches the runtime .deb archives between runs and re-times the step budget for cold-cache runs.

Flake evidence (not a regression)

Root cause

Every uncached run downloads ~35 MB of .deb archives from azure.archive.ubuntu.com. Runner↔mirror throughput is intermittently degraded to ~50–100 KB/s; the existing Acquire::Retries/Acquire::http(s)::Timeout options cannot catch that (every connection is alive and streaming), so the download alone can exceed the 5-minute step budget.

Fix (smallest durable change, CI infrastructure)

  1. Cache the .debs (actions/cache@v6 on ~/apt-debs): seed /var/cache/apt/archives before install, run install --download-only, capture the fetched files, then unpack. In steady state the install downloads nothing — apt verifies the cached files against the fresh indexes and fetches only version changes. The key tracks this workflow file so package-list edits rotate the cache, and the restore-keys prefix carries still-current .debs across other edits to this file. Approved direction: David approved caching CI dependencies (2026-10-22).
  2. Step budget 5 → 10 minutes (measured): a cold cache must download the full ~35 MB, which needs ~9 minutes at the worst observed throughput (34.6 MB ÷ 68 KB/s ≈ 8.5 m + unpack); 5 minutes is what cut both failing runs off mid-download. Warm-cache runs finish the step in seconds. The job-level 20-minute ceiling and the apt stall bounds are unchanged.

.github edits here touch only this flake's own step in desktop-windows-ci.yml; no workflows are added, no tests skipped or deleted.

Verification

  • actionlint -shellcheck "" .github/workflows/desktop-windows-ci.yml (same pin as repo-checks) — pass.
  • YAML parse — pass.
  • The seed/capture shell guards exercised in all three states (cold cache, warm cache, post-install-cleaned archive dir) — behave as intended.
  • scripts/pr-preflight --pr-body-file — validated for this draft (lane ci, no invariant citations or failure-class declarations required).

Note: the ci-flake label does not exist in this repo, so no label was added.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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 🔄 Running since 2026-10-23T02:09:45.501341Z f97ec08 New commits
ℹ️ 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.

Git-on-my-level and others added 2 commits October 23, 2026 08:34
The build-linux job's 'Install Linux runtime dependencies' step downloads
~35 MB of .debs from azure.archive.ubuntu.com every uncached run; when
runner<->mirror throughput degrades (~68 KB/s avg in job 120062237675)
the download alone exceeds the 5-minute step budget while every
connection keeps streaming, so the per-request apt timeouts cannot catch
it. Same signature on main 2026-10-07 (job 113037996050); the re-run of
the same job on the same PR code succeeded.

Cache the .deb archives (seed /var/cache/apt/archives, download-only,
capture, unpack) so steady-state installs download nothing but version
changes, and raise the step budget to 10 minutes to cover cold-cache
runs at the worst observed throughput (34.6 MB / 68 KB/s ~ 8.5 m). Stall
bounds and the 20-minute job ceiling are unchanged.
…rror evidence

This PR's own first run (job 120074210159) missed the apt cache (first run
with the new key) and streamed the deb pool at ~40-45 KB/s — worse than
the 68 KB/s the 10-minute budget was sized from — timing out mid-download
at Get:30 of 30 (~14.4 min of pure download needed at that pacing).

20 minutes covers ~32 KB/s effective throughput while reserving 2 minutes
for index fetch and unpack, and is idempotent for warm-cache runs, which
download nothing and finish in seconds. Note the budget must cover the
cold path even though cache misses are rare: the key hashes this workflow
file, so every edit re-cold-starts the cache.
@Git-on-my-level
Git-on-my-level force-pushed the agent/m1-studio-zcode-glm-5-3/07c23a3dac52 branch from b0225ac to c5e2116 Compare October 23, 2026 01:45

@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: c5e2116974

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

Address Codex review of c5e2116:

1. Cache key pinned the workflow file hash, which stays an exact match
   forever (actions/cache never re-saves on exact hit): cached .debs
   would freeze at first-saved versions as Ubuntu publishes updates,
   and every workflow edit gratuitously cold-started the cache. Key on
   ${ImageOS}-${ImageVersion} plus a literal package-list token instead,
   matching the scheme already established in PR #23344; the restore-key
   prefix carries still-current .debs across runner image bumps.

2. The step budget raise (10 -> 20) ignored the pre-existing job-level
   timeout-minutes: 20 on build-linux. Worst case cold apt (14.4 min
   measured pacing) + ~70s setup + ~5m packaging/smoke exceeds 20 min,
   cancelling the job mid-packaging; a cancelled job never saves the
   cache (save-always: false), so every retry stays cold. Raise the job
   budget to 30 so the cold path fits and the cache actually warms.
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor run (context cc3f9e611705af165c843bed8d8a408604ef809629c4ac3350cc47cd8aa612eb) — addressed the failing Linux package · helper smoke check and both Codex review threads on this PR. Three commits:

  1. 09f1035cbde (pre-existing) → step budget raised 5 → 20m: the PR's own first run (job 120074210159) missed the cache (new key) and timed out mid-download at Get:30 of 30 — pool throughput measured ~40–45 KB/s (fonts-urw-base35: 4m27s for 11 MB), worse than the 68 KB/s the 10-minute budget was sized from. At that pacing the ~35 MB download alone needs ~14.4 min.

  2. c5e2116974a — step budget 10 → 20m with that evidence.

  3. f97ec087725 — addresses both Codex threads:

    • P2 cache-key rotation (line 179): exact-match keys are never re-saved by actions/cache, so the hashFiles(workflow.yml) key would freeze cached .debs at first-saved versions as Ubuntu publishes updates, and cold-start on every workflow edit. Re-keyed on the runner image (${ImageOS}-${ImageVersion} + literal package-list token, restore-key prefix falls back across image bumps) — same scheme as ci-flake: keep desktop Linux runtime apt install off the network when warm #23344.
    • P2 job timeout (line 194): the pre-existing job-level timeout-minutes: 20 on build-linux couldn't fit worst-case cold apt (14.4m) + setup + packaging/smoke; a cancelled job never saves the apt cache (save-always: false), so retries stayed cold. Raised to 30m and pinned it in scripts/ci/test_nightly_main_workflow.py INTENTIONAL_BUDGET_CHANGES per the nightly contract.

Verified: Linux package · helper smoke green on both new heads (each validated the cold-cache path — the key rotated on each edit); all checks pass, merge state CLEAN; no new review threads on f97ec087725. Both addressed threads resolved.

@Git-on-my-level
Git-on-my-level marked this pull request as draft November 4, 2026 07:01
@Git-on-my-level
Git-on-my-level marked this pull request as ready for review November 4, 2026 07:27

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

4 issues found across 2 files

Confidence score: 4/5

  • In .github/workflows/desktop-windows-ci.yml, the cache key can stay an exact hit when Ubuntu package versions change, so updated .debs are never saved and keep getting downloaded. Include package versions in the key.
  • In .github/workflows/desktop-windows-ci.yml, a packaging or smoke-test failure prevents the cache from being saved, so retries repeat the ~35 MB download. Save the cache independently of those later job steps.
  • In scripts/ci/test_nightly_main_workflow.py, the pinned limits conflict with the workflow and PR description: the job ceiling rises from 20 to 30 minutes, and the step is set to 20, not 10. Align the description and pin with the actual limits.
  • In scripts/ci/test_nightly_main_workflow.py, the comment gives the wrong p50 budget; build-linux remains at 9 minutes in ci-budget.yaml. Update the comment to 9.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/ci/test_nightly_main_workflow.py">

<violation number="1" location="scripts/ci/test_nightly_main_workflow.py:51">
P3: This comment cites the wrong p50 budget. `ci-budget.yaml` sets `desktop-windows-ci.yml/build-linux` to `budget_p50_minutes: 9`, and this PR leaves that unchanged. Change the comment to say 9.</violation>

<violation number="2" location="scripts/ci/test_nightly_main_workflow.py:52">
P3: This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.</violation>
</file>

<file name=".github/workflows/desktop-windows-ci.yml">

<violation number="1" location=".github/workflows/desktop-windows-ci.yml:193">
P2: Ubuntu apt package versions can change without `ImageVersion` changing, leaving this as an exact cache hit. Since exact caches are immutable, changed `.debs` are never saved and are downloaded on every run; include resolved package versions in the key.</violation>

<violation number="2" location=".github/workflows/desktop-windows-ci.yml:223">
P2: The apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with `if: always()` or `save-always`, so a later-step failure still persists the .debs.</violation>
</file>

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

View guided diff | Turn on auto-fix | Re-trigger cubic

sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y --download-only imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb
mkdir -p "$HOME/apt-debs"
if compgen -G "/var/cache/apt/archives/*.deb" > /dev/null; then
cp /var/cache/apt/archives/*.deb "$HOME/apt-debs/"

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 apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with if: always() or save-always, so a later-step failure still persists the .debs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/desktop-windows-ci.yml, line 223:

<comment>The apt package cache is only saved if the entire job succeeds, because the save runs in the cache action's post step. Packaging or smoke failures will therefore keep discarding the ~35 MB download and every retry re-downloads from the degraded mirror. Consider saving the cache from a dedicated step right after the install, with `if: always()` or `save-always`, so a later-step failure still persists the .debs.</comment>

<file context>
@@ -161,17 +166,62 @@ jobs:
+          sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y --download-only imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb
+          mkdir -p "$HOME/apt-debs"
+          if compgen -G "/var/cache/apt/archives/*.deb" > /dev/null; then
+            cp /var/cache/apt/archives/*.deb "$HOME/apt-debs/"
+          fi
           sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y imagemagick fonts-dejavu-core tesseract-ocr tesseract-ocr-eng xvfb
</file context>

# workflow edit. Key on the runner image instead: ImageVersion bumps
# roll the key so refreshed .debs are saved, and package-list edits
# rotate via the literal token (matches the scheme in PR #23344).
key: apt-linux-runtime-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.linux-apt-image.outputs.image }}-imagemagick-dejavu-tesseract-xvfb

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: Ubuntu apt package versions can change without ImageVersion changing, leaving this as an exact cache hit. Since exact caches are immutable, changed .debs are never saved and are downloaded on every run; include resolved package versions in the key.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/desktop-windows-ci.yml, line 193:

<comment>Ubuntu apt package versions can change without `ImageVersion` changing, leaving this as an exact cache hit. Since exact caches are immutable, changed `.debs` are never saved and are downloaded on every run; include resolved package versions in the key.</comment>

<file context>
@@ -161,17 +166,62 @@ jobs:
+          # workflow edit. Key on the runner image instead: ImageVersion bumps
+          # roll the key so refreshed .debs are saved, and package-list edits
+          # rotate via the literal token (matches the scheme in PR #23344).
+          key: apt-linux-runtime-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.linux-apt-image.outputs.image }}-imagemagick-dejavu-tesseract-xvfb
+          # Same restore-key strategy as #23344: fall back to the newest
+          # saved image of the same runner OS so image bumps reuse still-
</file context>

# job never saves the apt cache (save-always: false), so every retry
# stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
# so budget_p50 stays 7.
("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/ci/test_nightly_main_workflow.py, line 52:

<comment>This pin records a job-level ceiling increase from 20 to 30, but the PR description says job-level limits are unchanged and the step goes to 10 minutes. The workflow actually sets the step to 20 minutes. Update the PR description so the reviewed budget change matches the code.</comment>

<file context>
@@ -41,6 +41,15 @@ def jobs(text):
+    # job never saves the apt cache (save-always: false), so every retry
+    # stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
+    # so budget_p50 stays 7.
+    ("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30",
 }
 
</file context>

# 20m ceiling the cold path was cancelled mid-packaging, and a cancelled
# job never saves the apt cache (save-always: false), so every retry
# stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
# so budget_p50 stays 7.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This comment cites the wrong p50 budget. ci-budget.yaml sets desktop-windows-ci.yml/build-linux to budget_p50_minutes: 9, and this PR leaves that unchanged. Change the comment to say 9.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/ci/test_nightly_main_workflow.py, line 51:

<comment>This comment cites the wrong p50 budget. `ci-budget.yaml` sets `desktop-windows-ci.yml/build-linux` to `budget_p50_minutes: 9`, and this PR leaves that unchanged. Change the comment to say 9.</comment>

<file context>
@@ -41,6 +41,15 @@ def jobs(text):
+    # 20m ceiling the cold path was cancelled mid-packaging, and a cancelled
+    # job never saves the apt cache (save-always: false), so every retry
+    # stayed cold. 30m fits the cold path; warm runs still finish in ~7m,
+    # so budget_p50 stays 7.
+    ("desktop-windows-ci.yml", "build-linux", "timeout-minutes"): "30",
 }
</file context>
Suggested change
# so budget_p50 stays 7.
# so budget_p50 stays 9.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Folding batch (2026-11-04): this branch's tip was merged into the survivor PR #24477 (feat/cv1-release-safety), which now carries origin/main plus all sixteen folded branches; pushed as 88c7ec5. Both sides' conflict intents were preserved (main's evolved implementations win where a successor of the same intent had already landed). Closing here so the batch lives on one PR. Reopen if something you need is missing from the survivor.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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