Experimental code coverage verification prep

From chromium/chromium · View interactive version

Experimental code coverage verification prep is an AI agent skill from the GitHub repository chromium/chromium. Prepares a Gerrit CL for code coverage verification try jobs. Adds dummy comments to trigger builds, optimizes builder configs by isolating test suites, and commits all changes.

How to use this skill

Skill file

Prep Verification Build

This skill modifies workspace files to ensure LUCI builders run, isolates target

test suites in builder Starlark files for speed, and uploads a Work-In-Progress

(WIP) Gerrit CL. It is used to prepare both experimental branches with fixes and

clean baseline branches.

When to Use This Skill

build.

modifications to trigger and speed up the build.

Inputs (Read from scratch/triage_state.json)

This skill reads its primary inputs directly from scratch/triage_state.json.

The only dynamic selector passed in the subagent prompt is role ("Control"

vs. "Fix"):

they are included in the build's affected files.

To locate the .star Starlark configuration file for each builder, reference

[builder_star_map.json][star_map].

configurations.

role is "Control" (or "control"), check out control_branch_name. If

role is "Fix" (or "fix"), check out fix_branch_name.

Workflow

  1. Checkout Branch:

Read scratch/triage_state.json and check out control_branch_name (if

role is "Control") or fix_branch_name (if role is "Fix").

```bash

git checkout {{selected_branch_name}}

```

  1. Add Dummy Comments:

scratch/triage_state.json).

// Verification run for b/{{bug_id}}).

```bash

# Example for one file

echo "// Verification run for b/{{bug_id}} $(date)" >> {{file_path}}

```

  1. Optimize Builder Configurations:

from test_suites (from scratch/triage_state.json).

```python

# Example for a builder's test targets

targets = targets.bundle(targets = {{test_suites}})

```

directly from the repository root:

```bash

lucicfg generate infra/config/main.star

```

This updates the underlying JSON build specifications.

  1. Commit Changes:

stages the dummy comments and updated builder configurations while safely

ignoring any untracked scratch files or local skills.

```bash

git add -u

```

title must explicitly state (Control) or (Fix) based on role. If

test_suites contains multiple test suites, join their names or list them.

```text

Verify Code Coverage Change for {{test_suites}} ({{role}})

This was generated by the Code Coverage Debugging Agent.

Role: {{role}} Verification

Target Files: {{ target_files }}

{{ summary of applied GN/Starlark/recipe fixes or trimming }}

Bug: {{bug_id}}

```

```bash

git commit \

-m "Verify Code Coverage Change for {{test_suites}} ({{role}})" \

-m "This was generated by the Code Coverage Debugging Agent." \

-m "Role: {{role}} Verification" \

-m "Target Files: {{ target_files }}" \

-m "{{ summary of applied GN/Starlark/recipe fixes or trimming }}" \

-m "Bug: {{bug_id}}"

```

  1. Upload to Gerrit:

```bash

git cl upload -f --bypass-hooks -o wip

```

  1. Update State File:

control_cl (if role is "Control") or fix_cl (if role is "Fix").

Output

been updated.

References

[star_map]: ../experimental-cq-debugger/references/builder_star_map.json

[lucicfg_ref]: https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/lucicfg/doc/README.md

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.