Skip to content

fix(ci): raise 'Run TUI library tests (Linux only)' budget 600s -> 1800s - #198

Merged
KooshaPari merged 4 commits into
masterfrom
fix/ci-tui-test-step-budget
Oct 27, 2026
Merged

KooshaPari merged 4 commits into
masterfrom
fix/ci-tui-test-step-budget

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

User description

Closes #197

Summary

Raises the budget of exactly one CI step -- Run TUI library tests (Linux only) in the Build & Test (${{ matrix.os }}) job -- from 600 to 1800 seconds.

On a cold cargo cache that step spends nearly its whole budget compiling the jcode-tui lib-test binary; the suite itself costs ~30s once the target is built (which is what the step's own comment already says). CI job 121349210430 killed the step at exactly 600s with exit 124 on 2026-10-26 while it was still compiling, so the serial suite never got a chance to run.

1800s covers the one-time cold compile plus the serial suite.

Scope

This PR changes only the one run_with_timeout.py value, plus a short comment explaining it:

Only .github/workflows/ci.yml is modified.

Depends on PR #183

This branch is based on PR #183's branch, fix/ci-cold-cache-build-green (base commit be1eea4b48d816612ed494d24174a39189c21798). This PR adds one commit on top of it.

PR #183 must land first, then this branch can be rebased/merged on top of it. This is the same fix pattern PR #183 already applied to the Compile library and binary tests step (900 -> 3300) and the job timeout-minutes (120 -> 240): cold compiles exceed the per-step budgets.

Validation

  • git diff origin/fix/ci-cold-cache-build-green...HEAD --stat -> only .github/workflows/ci.yml
  • exactly one run_with_timeout.py value changed (600 -> 1800)
  • no timeout-minutes and no cache-config lines in the diff
  • test command and flags byte-identical to the base branch
  • YAML parses (yaml.safe_load -> ok)
  • git merge-tree --write-tree origin/master HEAD -> CLEAN
  • git merge-tree --write-tree origin/fix/ci-cold-cache-build-green HEAD -> CLEAN

CodeAnt-AI Description

Prevent Build & Test failures on cold caches

What Changed

  • Build & Test no longer attempts to restore the oversized workspace build cache; it still caches Cargo dependencies.
  • Cold builds and test steps have more time to compile and finish before CI stops them.
  • The TUI and retention-readiness test steps can complete their cold compiles before running their tests.

Impact

✅ Fewer Build & Test timeouts
✅ PR builds avoid stalled 2 GB cache restores
✅ TUI and retention-readiness tests run after cold compiles

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

KooshaPari and others added 4 commits October 21, 2026 12:57
tx-agent: jcode
tx-validated: manual
tx-scope: .github/workflows/ci.yml (build job only)
tx-intent: Make Build & Test (desk-linux) able to restore its cache and go green on PR branches

The Build & Test (desk-linux) job's rust-cache blob was 2,029,470,155 bytes.
Every restore attempt aborted at a ~600s cap (617s / 605s / 600s across jobs
119054392243, 119055460640, 119065565800) at 37.4% / 39.7% / 44.0% and fell
through to "No cache found", so the job always ran cold, so the 900s compile
cap killed it, so the save step was skipped. GitHub caches are ref-scoped and
PR refs (refs/pull/N/merge) cannot read refs/heads/master, so the loop repeats.

target/ is the dominant contributor: this is the only job that puts a release
build, a --lib --bins test compile, and eight integration/e2e compiles into one
target dir. Per Swatinem/rust-cache action.yml, cache-targets:false caches only
the cargo registry, which is provably under the 687,972,881 bytes that job
119062133759 already restored successfully.

cache-all-crates was evaluated and is the wrong lever: src/save.ts calls
cleanRegistry(pkgs, crates !== "true"), so cache-all-crates:"true" skips the
registry cleanup and keeps MORE. This job already uses the pruning default.

Timeouts raised because the job is now intentionally cold: Build cold 2453s,
compile cold ~2990s.

Co-Authored-By: Jcode <[email protected]>
…pin it

  The previous rust-cache key (v0-rust-desk-linux-stablepin-build-...) had
  a 2,029,470,155-byte entry stuck on refs/heads/master. Even with
  cache-targets: "false" flipped on, the key was identical so actions/cache
  attempted to restore the 2GB blob and aborted at ~600s (37-44%). The
  post-step save was then SKIPPED because the key was immutable per
  (key, ref), so master remained pinned forever and every fresh PR paid the
  same doomed download.

  Suffix the key with -notarget. This propagates into both the primary key
  and the restore-key prefix, and matches no legacy entry -- the doomed
  restore is never attempted and the save reserves a fresh slot.

  tx-agent: jcode
  tx-validated: manual
  tx-scope: .github/workflows/ci.yml
  tx-intent: make the build job's rust-cache use a new key so cache-targets:false can actually take effect
The Build & Test (desk-linux) job cannot go green on a cold cache because
the retention-readiness cohort budget is 600s while that step pays a full
cold compile of the jcode-app-core lib-test harness.

The harness stays cold at that point: the workspace declares no
`default-members`, so `cargo test --lib --bins --no-run` builds only the
default member `kcode` and never pre-builds the cohort crates' harnesses.
Run 39672218586 / job 119472777140 hit exit 124 at 600s on exactly this.

Raise that one budget to 1800s and record why. The cohort itself still runs
in under a second once the harness is built; 1800s covers the one-time cold
compile and nothing more.

Based on #168 (fix/ci-build-cache-blob-size), which already carries the
3300s compile budget and the 240-minute job cap, so this branch is a strict
superset of #177 (fix/ci-retention-cohort-timeout), which can be closed
without merging.

tx-agent: jcode
tx-validated: manual
tx-scope: .github/workflows/ci.yml
On a cold cargo build this step spends most of its budget compiling the
jcode-tui lib-test binary; the suite itself costs ~30s once the target
is built. CI job 121349210430 (2026-10-26) killed the step at exactly
600s with exit 124 while it was still compiling. 1800s covers that
one-time cold compile plus the serial suite.

tx-agent: jcode
tx-validated: manual
tx-task: #183
tx-scope: .github/workflows/ci.yml
tx-intent: give the cold jcode-tui lib-test compile enough time to finish
Copilot AI balanced review requested due to automatic review settings October 26, 2026 03:27
@codeant-ai

codeant-ai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  Reviewed your PR 7fb9086 Oct 26, 2026 · 03:27 03:32

@codeant-ai

codeant-ai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0cc217da-7908-48f7-914f-43aa0190fd51
Commits

Reviewing files that changed from the base of the PR and between 0d95c41 and 7fb9086.

Files selected for processing: 1
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 9
  • GitHub Check: Require Linked Issue
  • GitHub Check: TypeScript SDK
  • GitHub Check: Build & Test (desk-linux)
  • GitHub Check: Format
  • GitHub Check: Release Automation
  • GitHub Check: Windows Cross-Target Check (Linux)
  • GitHub Check: Quality Guardrails
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Kilo Code Review
Additional context used
zizmor (1.30.1)
.github/workflows/ci.yml

[warning] 1-845: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

[warning] 136-524: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

[warning] 296-296: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

📝 Summary

Summary

The PR raises the timeout for Run TUI library tests (Linux only) from 600 to 1,800 seconds. It adds a comment explaining that a cold compile consumed the prior budget before the serial test suite could run.

The commit changes only .github/workflows/ci.yml, with six added lines and one removed line. The change matches the stated scope.

Must Fix

No blocking issues were identified in the supplied evidence. Test results were not supplied.

Should Fix

None identified.

Consider

None.

Approve / Request Changes

Approve. The verified diff changes only the specified step timeout and its explanatory comment.

The CI workflow disables target-directory caching, changes the Rust cache key, and increases the Build & Test job timeout and timeouts for library and binary test compilation, the retention-readiness cohort, and TUI library tests.

Changes: CI workflow

Layer / File(s) Summary
Rust cache settings
.github/workflows/ci.yml
The Rust cache key gains the -notarget suffix, and target-directory caching is disabled.
Build and test timeouts
.github/workflows/ci.yml
The Build & Test job timeout increases from 120 to 240 minutes. The library and binary test-compilation timeout increases from 900 to 3300 seconds. The retention-readiness cohort and TUI library-test timeouts increase from 600 to 1800 seconds. Comments describe cold-compile timing.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related PRs

  • KooshaPari/KCode#196: This PR applies the same Rust cache-key suffix and target-cache setting to other CI jobs.
  • KooshaPari/KCode#190: This PR proposes the same Build & Test job and step timeout values.

Suggested reviewers: 1jehuang

Merge Risk: Minimal · up to 7fb90

The longer TUI test budget presents no identified merge-blocking risk; merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Out of Scope Changes check Warning The whole-PR diff contains changes outside issue #197. It changes timeout-minutes from 120 to 240, changes the Rust cache key and adds cache-targets: "false", changes `Compile library and binary t… Rebase or otherwise remove the unrelated timeout, cache, and retention-readiness changes from this PR. Keep only the Run TUI library tests (Linux only) timeout change and its explanatory comment.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the change: the timeout budget for the 'Run TUI library tests (Linux only)' step in ci.yml rises from 600s to 1800s. It matches the single value change in the diff and the linked issue…
Description check Passed The description matches the changeset. It explains that the 'Run TUI library tests (Linux only)' step timed out at 600s while compiling the jcode-tui lib-test binary. It states the new 1800s budget, l…
Linked Issues check Passed Issue #197 requires changing only the Run TUI library tests (Linux only) budget from 600 to 1800 seconds. The reviewed workflow changes that value to 1800. The test command and flags remain unchange…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Title check

Explanation

The title names the change: the timeout budget for the 'Run TUI library tests (Linux only)' step in ci.yml rises from 600s to 1800s. It matches the single value change in the diff and the linked issue #197. The 'fix(ci):' prefix is a conventional-commit style, and the title is specific and short enough to scan in history. It is slightly long at 72 characters.

Full details: Description check

Explanation

The description matches the changeset. It explains that the 'Run TUI library tests (Linux only)' step timed out at 600s while compiling the jcode-tui lib-test binary. It states the new 1800s budget, lists the scope limits, and notes the dependency on PR #183. The validation steps also refer to the ci.yml diff. The description is detailed and relevant.

Full details: Linked Issues check

Explanation

Issue #197 requires changing only the Run TUI library tests (Linux only) budget from 600 to 1800 seconds. The reviewed workflow changes that value to 1800. The test command and flags remain unchanged in the diff. The job-level timeout remains 240 minutes after the existing change, so no additional job-level change is required for #197.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Out of Scope Changes check

Explanation

The whole-PR diff contains changes outside issue #197. It changes timeout-minutes from 120 to 240, changes the Rust cache key and adds cache-targets: "false", changes Compile library and binary tests from 900 to 3300 seconds, and changes the retention-readiness timeout from 600 to 1800 seconds. Issue #197 explicitly excludes these changes. The current PR description does not match the reviewed diff.

Resolution

Rebase or otherwise remove the unrelated timeout, cache, and retention-readiness changes from this PR. Keep only the Run TUI library tests (Linux only) timeout change and its explanatory comment.

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Oct 26, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • .github/workflows/ci.yml

Reviewed by free · Input: 47.5K · Output: 758 · Cached: 192.3K

@codeant-ai

codeant-ai Bot commented Oct 26, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

1 code suggestion

1. This step can consume 1,800 seconds, but the sequential step budgets plus the measured cold build exceed the 240-minute job cap, so later checks can be canceled.

Logic error · .github/workflows/ci.yml:429-433

@codeant-ai

codeant-ai Bot commented Oct 26, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 7fb9086ce436

@KooshaPari
KooshaPari merged commit 183ac87 into master Oct 27, 2026
11 of 17 checks passed
KooshaPari added a commit that referenced this pull request Oct 27, 2026
Resolves the ci.yml conflict introduced by #183, #196, #190 and #198 landing
first. All three conflict hunks were comment-only -- both sides already
agreed on every semantic value, and the timeout and cache fixes this
branch carried are now on master.

The resolved ci.yml is byte-identical to master. The branch's remaining
diff against master is exactly the dictation test budget change.

tx-agent:     jcode
tx-validated: none
tx-scope:     ci workflow
tx-intent:    Resolve the ci.yml conflict after the timeout and cache fixes landed
@KooshaPari
KooshaPari deleted the fix/ci-tui-test-step-budget branch November 29, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): 'Run TUI library tests (Linux only)' 600s budget is consumed by the cold jcode-tui test-binary compile

2 participants