Automattic / Automattic/wp-codebox

Runner workspace publisher ignores configured branch

Offen
#1,817 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
16
Forks
4
Ø Merge
59 Min.
Gemergte PRs (30 T.)
131

Beschreibung

## Problem

The reusable workflow request can provide both `runner_workspace.branch` and `runner_workspace.branch_prefix`, but `runner-workspace-publisher.mjs` ignores `branch` and always computes the publication head as `${branch_prefix}${run_id}`. When the caller supplies the same stable value for both fields, the workload id is concatenated without a separator.

Hosted evidence: https://github.com/Automattic/agents-api/actions/runs/29473678677
Published PR: https://github.com/Automattic/agents-api/pull/430

The request specified:

```json
{
"branch": "docs-agent/agents-api-docs-upkeep",
"branch_prefix": "docs-agent/agents-api-docs-upkeep"
}
```

The successful publication result instead reported:

```json
{
"head": "docs-agent/agents-api-docs-upkeepdocs-agent-technical-maintenance"
}
```

## Expected

A configured exact `runner_workspace.branch` is the publication head. `branch_prefix + run_id` remains the fallback when no exact branch is configured. Validation must keep both paths bounded and safe, and deterministic coverage should prove existing exact branches are reused across runs.

## Impact

Publication succeeds, but caller-declared stable branch identity is not honored and generated branch names can be malformed or unexpected.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit runner-workspace-publisher.mjs und verfolge, wie runner_workspace.branch und branch_prefix beim Veröffentlichen eines Workspace gelesen werden. Vergleiche den exact-branch- und den Fallback-Pfad und prüfe anschließend die vorhandene deterministische Abdeckung oder füge gegebenenfalls Abdeckung hinzu. Erledigt ist die Aufgabe, wenn konfigurierte exact branches sicher über mehrere Läufe hinweg wiederverwendet werden und Fallback-Branchnamen begrenzt und sicher bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
ci-cd, devops
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.