Skip to content

fix(ci): give Backend Lint 25 min so mypy is not cancelled mid-run - #9452

Merged
iamwhatever merged 1 commit into
mainfrom
fix/ci-backend-lint-timeout
Sep 8, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/ci-backend-lint-timeout

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One-line CI unblocker: backend-lint (Backend Lint & Type Check) gets timeout-minutes: 25 (was 15).

The job's floor on today's hosted runners is ~14–15 min — check_black_formatting.py runs black --check over the whole tree (7–8 min), the five gate scripts + isort take ~3 min, flake8 ~2 min, and mypy then starts cold with under two minutes of budget left — so a green PR gets its mypy step cancelled by the job timeout.

Observed today (all ubuntu-latest):

run outcome lint job wall time
34211086807 (fix/cron-command-shell-brace-off) passed 14m38s
34209554482 attempt 1 (PR #8947, frontend + docs, no Python) cancelled, mypy running 15m18s
34209554482 attempt 2 cancelled, mypy running 15m06s
34209554482 attempt 3 passed 14m15s

25 is the budget frontend-test and bundle-size already run on in this file. Nothing else changes; the job's steps and gates are untouched.

Why not make the steps faster instead

Black over the whole tree is the deliberate design of the shrinking-baseline gate (scripts/check_black_formatting.py — it must see every file to detect a baselined file that has become clean). Speeding that up is a real change to the gate; this PR only stops the budget from cancelling a job whose steps all pass.

Tests

Workflow-only change; python3 -c "import yaml; yaml.safe_load(...)" parses. Verification is this PR's own Backend Lint & Type Check job finishing.

Pattern harvest

Rule candidate: a job whose observed floor is within ~10% of its timeout-minutes is a flake generator — when a CI job's passing wall time approaches its budget (here 14m38s / 14m15s against 15), raise the budget or split the job before a green PR is cancelled, rather than rerunning. Checkable from the Actions API (job completedAt - startedAt vs the workflow's timeout-minutes).

no linked issue: CI unblocker for an inherited red seen on PR #8947 (and any backend PR on a slow runner).

The backend-lint job's floor on today's hosted runners is ~14-15 min:
`check_black_formatting.py` runs `black --check` over the whole tree
(7-8 min), flake8 takes ~2 min and mypy starts cold with under two
minutes of the 15-min budget left. Observed today:

- run 34211086807 (fix/cron-command-shell-brace-off): lint passed at 14m38s
- run 34209554482 (PR #8947) attempt 1: cancelled at 15m18s, mypy running
- run 34209554482 attempt 2: cancelled at 15m06s, mypy running

25 is the budget frontend-test and bundle-size already run on. No other
change.
@CrysisDeu
CrysisDeu requested review from a team and buluoray September 8, 2026 10:31
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 3996820e36f5e6960fefc133cd064fff3b4e08bf — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3996820

Verdict parsed from the review's SHA-scoped output markers for commit 3996820e36f5e6960fefc133cd064fff3b4e08bf.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 3996820e36f5e6960fefc133cd064fff3b4e08bf: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 3996820e36f5e6960fefc133cd064fff3b4e08bf — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

A one-line, evidence-backed, fully reversible budget fix; the slower-alternative question is answered in the PR itself.

Suggestions

  • Black and mypy both support caching (--cache-dir persisted via actions/cache); a follow-up could pull the job floor back under 10 min without touching the shrinking-baseline gate's whole-tree semantics.

[DESIGN-REVIEWED] 3996820

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 3996820e36f5e6960fefc133cd064fff3b4e08bf — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

The change is fully verified against the repo: single-line timeout bump, both cited sibling jobs (frontend-test, bundle-size) do run on 25 minutes, and no doc pins the old 15-minute budget. Producing the review now.

First-Principles-Verdict: PASS

Verify the cited runs — 34209554482 cancelled twice mid-mypy at ~15m — since the whole premise rests on evidence only readable in Actions.

What this change ships

Intent: stop the CI job budget from cancelling mypy on green backend-lint runs — a FIX.

Inventory (1 item)
  1. The Backend Lint & Type Check job now gets 25 minutes instead of 15 before CI kills it — justified

Checked: frontend-test (ci.yml:1594) and bundle-size (ci.yml:1806) already run on timeout-minutes: 25, so the number is not invented; grepped docs/ci/ for a pinned lint budget — zero matches restate 15, so no doc goes stale. The slower root cause (whole-tree black --check) is the documented design of the shrinking-baseline gate, and the description says so and names what is left — the fix sits at the right level for its scope.

[FIRST-PRINCIPLES-REVIEWED] 3996820

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 3996820e36f5e6960fefc133cd064fff3b4e08bf and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3996820

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3996820e36f5e6960fefc133cd064fff3b4e08bf: <one-sentence reason>

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@iamwhatever
iamwhatever enabled auto-merge (squash) September 8, 2026 12:03

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tier 1 auto-approve: chore / build tooling (1 file). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: CI plumbing only -- raises the Backend Lint job timeout in .github/workflows/ci.yml so mypy is not cancelled mid-run; no runtime impact.

@iamwhatever
iamwhatever merged commit 9c5e35b into main Sep 8, 2026
97 of 99 checks passed
@iamwhatever
iamwhatever deleted the fix/ci-backend-lint-timeout branch September 8, 2026 12:03
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 8, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
…irodotdev#9452)

The backend-lint job's floor on today's hosted runners is ~14-15 min:
`check_black_formatting.py` runs `black --check` over the whole tree
(7-8 min), flake8 takes ~2 min and mypy starts cold with under two
minutes of the 15-min budget left. Observed today:

- run 34211086807 (fix/cron-command-shell-brace-off): lint passed at 14m38s
- run 34209554482 (PR kirodotdev#8947) attempt 1: cancelled at 15m18s, mypy running
- run 34209554482 attempt 2: cancelled at 15m06s, mypy running

25 is the budget frontend-test and bundle-size already run on. No other
change.
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.

2 participants