Skip to content

fix(ci): run the job-time alarm on the schedule only #4634

Closed

Description

@dan-petty

Problem or Motivation

Test Job Duration runs on each merge, and it reads the same window of 20 runs each time. 42 of 42 completed main push runs on 2026-11-10 and 2026-11-11 failed only in this job (measured). Thus main has no green run, and a new failure on main hides behind the red alarm.

The metric includes queue time. Over 20 main runs, the mean span is 575 s, and the mean of the slowest shard run is 464 s. Run 43018142394 gives 975 s, but its slowest shard ran for 427 s.

The daily schedule run shares the concurrency group of the merges (.github/workflows/ci.yml:18-20), and a merge cancelled the schedule run of 2026-11-11.

Saving: 1 job and 1.3 runner-min per merge (measured), which is 61-76 jobs per day.

Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.

Proposed Solution & Architectural Design

  • Run the job-time job only on schedule and workflow_dispatch.
  • Add github.event_name to the concurrency group of ci.yml, so that a merge does not cancel the schedule run.
  • In _job_seconds (src/devops_cli/github/client.py:510-564), measure the slowest shard run plus the aggregate run. Print the queue part on its own line.
  • Keep the 300 s limit.

Risk: None. The alarm stays.

Target Subsystem

SDLC, Git & PR Governance (.github/workflows/ci.yml, src/devops_cli/github/client.py).

Existing Tool Considered

GitHub Actions schedule and concurrency (native), and the started_at and completed_at fields of the GitHub REST jobs API that the client already reads. No new tool. Cost: about 30,000 tokens and 2 hours.

Acceptance Criteria

  • No push run has a Test Job Duration job.
  • A merge does not cancel the schedule run.
  • For run 43018142394, the metric gives 520 s or less, not 975 s.
  • The alarm still exits 1 when the mean without queue time is more than 300 s.
  • A main push run that has no failed test is green.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/ci
    status/new
    value/high
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/ci. The (ci) scope of the title gives the scope.
    • Priority: P1-High. All 42 main push runs fail in this job, so main has no green run and new failures are hidden.
    • Value: High. It unblocks every merge on main and removes 61 to 76 wasted jobs per day.
    • Effort: Low. The change touches one workflow trigger, one concurrency key, and one metric function; the body estimates 2 hours.
    • Related: fix(roadmap): check CI job-time premise before staging time-budgeted items #4026, which asks for a different change. Both concern the job-time alarm and the 300 s limit, but the candidate fixes the alarm's scheduling and metric while 4026 asks the roadmap service to validate the premise before staging.
  3. added
    priority/p1-high
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 19:36 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/cisource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions