Automattic / Automattic/wp-codebox
Runner workspace publisher ignores configured branch
- 主要言語
- TypeScript
- スター
- 16
- フォーク
- 4
- 平均マージ
- 59分
- マージ済み PR(30日)
- 131
説明
## 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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
runner-workspace-publisher.mjs から始め、workspace の公開時に runner_workspace.branch と branch_prefix がどのように読み取られるかを追跡します。exact-branch パスと fallback パスを比較し、その後、既存の決定論的なカバレッジを確認するか、適切な箇所にカバレッジを追加します。設定された exact branches が実行をまたいで安全に再利用され、fallback のブランチ名が上限内に収まり安全であれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- ci-cd, devops
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100