# CI matrix expander

- Human page: https://happytails.ai/en/developer-tools/ci-matrix-expander/
- Markdown: https://happytails.ai/en/developer-tools/ci-matrix-expander.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/ci-matrix-expander/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `ci-matrix-expander` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Expands GitHub Actions matrices on your device using the documented include and exclude rules. Up to 200,000 characters; expressions are not evaluated.

### Inputs and settings

Text input: Workflow or matrix YAML.

Example or placeholder shown in the interface (not a validated fixture):

```text
jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest]
```

Paste a GitHub Actions workflow, one or more jobs, a strategy block or the matrix mapping. A pasted job can keep its job ID line. Up to 200,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `job` | Job ID (optional) | text | "" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 200,000 characters of YAML in one document, 64 matrix variables, 1,024 values or include and exclude entries each, and 4,096 base combinations. Everything runs on your device in a background worker. Downloads: a JSON report and a CSV list of jobs.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "ci-matrix-expander",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 200,000 characters of YAML in one document, 64 matrix variables, 1,024 values or include and exclude entries each, and 4,096 base combinations. Everything runs on your device in a background worker. Downloads: a JSON report and a CSV list of jobs.",
  "implementation": {
    "fields": [
      {
        "key": "job",
        "label": "Job ID (optional)",
        "value": "",
        "type": "text",
        "help": "Leave empty to expand every matrix job in the workflow."
      }
    ],
    "registrationFamily": "config-analysis-reference",
    "inputMaxLength": 200000,
    "inputErrorCode": "CONFIG_ANALYSIS_REFERENCE_TOO_LONG",
    "note": "Expands GitHub Actions matrices on your device using the documented include and exclude rules. Up to 200,000 characters; expressions are not evaluated.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 200000,
      "inputMode": "text",
      "label": "Workflow or matrix YAML",
      "placeholder": "jobs:\n  test:\n    strategy:\n      matrix:\n        os: [ubuntu-latest]",
      "help": "Paste a GitHub Actions workflow, one or more jobs, a strategy block or the matrix mapping. A pasted job can keep its job ID line. Up to 200,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Expand a GitHub Actions matrix into the exact list of jobs it runs. See which include entries changed each job and which combinations exclude removed.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use CI matrix expander

1. Paste a workflow file, a job or just the matrix block.
2. Enter a job ID if you only want one job, or leave it empty.
3. Run the expansion and review each job with its values.
4. Download the JSON report or the CSV job list.

## Useful next steps

- [YAML validator](https://happytails.ai/en/developer-tools/yaml-validator/) ([Markdown](https://happytails.ai/en/developer-tools/yaml-validator.md))

- [YAML anchor resolver](https://happytails.ai/en/data-tools/yaml-anchor-resolver/) ([Markdown](https://happytails.ai/en/data-tools/yaml-anchor-resolver.md))

- [YAML duplicate key checker](https://happytails.ai/en/data-tools/yaml-duplicate-key-checker/) ([Markdown](https://happytails.ai/en/data-tools/yaml-duplicate-key-checker.md))

## How the expansion works

Happytails.ai follows the matrix rules in the GitHub Docs page "Workflow syntax for GitHub Actions" (docs.github.com, read on 16 October 2026). The tool builds every combination of the matrix variables, with the first variable changing slowest. Exclude entries remove a combination when every key they name matches, so a partial match is enough. Include entries are applied after exclude.

### How include entries are applied

An include entry is added to each original combination whose matrix values it does not change. It may replace values that an earlier include entry added. If it fits no original combination, it becomes a new job. Jobs created this way are never extended by later include entries. This matches the fruit and animal example in the GitHub Docs.

### Limits and assumptions

GitHub runs at most 256 jobs per matrix, and the report flags any matrix above that. Expressions such as ${{ fromJSON(...) }} cannot be evaluated here, so a matrix that uses them is rejected. Object values are compared exactly. A pasted mapping whose values are all mappings, at least one of them with strategy.matrix, is read as jobs keyed by job ID, so a job copied with its ID line expands as expected. The run order shown is the expansion order; GitHub does not guarantee the order in which jobs start.
