Skip to content

feat(ci): record per-run LEM actuals via workflow_run#3766

Draft
EffortlessSteven wants to merge 1 commit intomainfrom
claude/improve-bitnet-ci-AkGLc-N-lem-actuals
Draft

feat(ci): record per-run LEM actuals via workflow_run#3766
EffortlessSteven wants to merge 1 commit intomainfrom
claude/improve-bitnet-ci-AkGLc-N-lem-actuals

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

Summary

Adds .github/workflows/ci-actuals.yml. Triggers on workflow_run completion for each canonical PR-time workflow, pulls the job list from the Actions API, and emits a ci-actuals.json artifact with per-job wall time + LEM and a per-run total.

This is PR N in the multi-PR CI roadmap.

Schema (v1)

{
  "schema_version": 1,
  "workflow": "CI (Core)",
  "workflow_run_id": 25438135897,
  "conclusion": "success",
  "event": "pull_request",
  "head_branch": "...",
  "head_sha": "...",
  "totals": { "wall_min": 12.4, "lem": 12.4, "jobs": 5 },
  "jobs": [
    { "name": "Build & Test (ubuntu-latest)", "wall_min": 6.55, "runner_mult": 1.0, "lem": 6.55, ... },
    ...
  ]
}

Runner multipliers mirror policy/ci-budget.toml (Linux=1, macOS=10, Windows=2). Skipped/cancelled jobs are excluded from the total but listed in jobs for diagnostics.

Workflows watched

  • CI (Core), Feature Matrix, GPU CI Matrix, Compatibility Tests, Property-Based Tests
  • Test Telemetry (PR M), ripr (static exposure) (PR J), PR Plan (PR H + xtask in PR K)

Stage: visibility only

We do not enforce budget here. The existing CI baseline does not yet have enough actuals to enforce learned thresholds safely. The path is:

  1. PR N — collect actuals (this PR)
  2. observe a few weeks of data
  3. PR O — soft warnings using policy/ci-budget.toml thresholds
  4. (later) hard enforcement at the hard ceiling unless full-ci / ci-budget-override label is present

Test plan

  • After this PR merges, complete a CI Core run and verify a ci-actuals-<run_id> artifact appears.
  • Verify the step summary shows totals + top-15 jobs by LEM.
  • Verify skipped jobs are listed but not counted in totals.

Out of scope

  • Aggregating actuals across runs into a durable dashboard / warehouse.
  • In-line PR comments comparing estimated LEM vs observed LEM (future).
  • Hard budget enforcement (PR O / future).

https://claude.ai/code/session_01S2yTnEYJcA3G2CyZn9bY4v


Generated by Claude Code

Adds .github/workflows/ci-actuals.yml. Triggers on workflow_run completed
for each canonical PR-time workflow (CI Core, Feature Matrix, GPU CI,
Compatibility, Property, Test Telemetry, ripr, PR Plan), pulls the job
list from the Actions API, and emits a `ci-actuals.json` artifact:

  {
    "schema_version": 1,
    "workflow": "CI (Core)",
    "workflow_run_id": 25438135897,
    "conclusion": "success",
    "event": "pull_request",
    "head_branch": "...",
    "head_sha": "...",
    "totals": { "wall_min": 12.4, "lem": 12.4, "jobs": 5 },
    "jobs": [
      {
        "name": "Build & Test (ubuntu-latest)",
        "status": "completed",
        "conclusion": "success",
        "started_at": "...",
        "completed_at": "...",
        "wall_min": 6.55,
        "runner_label": "ubuntu-22.04",
        "runner_mult": 1.0,
        "lem": 6.55
      },
      ...
    ]
  }

Runner multipliers mirror policy/ci-budget.toml (Linux=1, macOS=10,
Windows=2). Skipped / cancelled jobs are excluded from the total but
listed in the job array for diagnostics.

The workflow also writes a step summary with totals and the 15 top jobs
by LEM, so engineers see actuals as soon as a run completes.

Stage: visibility only. We are NOT enforcing budget yet — we need a few
weeks of actuals before promoting to soft / hard enforcement (PR O).

Out of scope:
  - Aggregating actuals across runs into a durable dashboard.
  - Comparing estimated LEM (PR Plan) to observed LEM in-line on the PR.
  - Hard budget enforcement (PR O).
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6beff98f-bb92-487c-bac0-532699720e2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/improve-bitnet-ci-AkGLc-N-lem-actuals

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.

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