What is wrong
ci-assign-id reports action: "renamed_and_assigned" for a fresh assignment, and
build_commit_message only counts assigned / would_assign:
for a in assignments {
if a.action == "assigned" || a.action == "would_assign" {
listed.push(...);
}
}
if listed.is_empty() { return String::new(); }
(crates/forgeplan-cli/src/commands/ci_assign_id.rs:1191-1206; the action enum at lines 981-986 is
would_assign | renamed_and_assigned | assigned.)
The workflow takes that field straight to git commit:
.github/workflows/assign-id.yml:94 - jq -r '.commit_message_suggested' into GITHUB_OUTPUT
.github/workflows/assign-id.yml:133 - git commit -m "$COMMIT_MSG", with no
[[ -n "$COMMIT_MSG" ]] guard
So on any PR that introduces a new artifact - the common case, since Phase 2.2 renames
<kind>-<slug>.md to <KIND>-<NNN>-<slug>.md - the commit step aborts with
Aborting commit due to empty commit message., the step fails, and the "Comment on PR" failure
handler fires. The renamed files are committed by git add -A but never pushed.
Evidence
Reproduced on 0.37.0 in a throwaway git workspace:
$ forgeplan ci-assign-id --head HEAD --base HEAD --json
"assignments": [ { "slug": "prd-widget-auth", "action": "renamed_and_assigned",
"assigned_number": 1, "path": ".../PRD-001-widget-auth.md" } ],
"commit_message_suggested": ""
$ git commit -m ""
Aborting commit due to empty commit message.
Source: build_commit_message gate at ci_assign_id.rs:1191-1206; workflow lines 86, 94, 133.
Fix options
- include
renamed_and_assigned in the gating condition (it is a real assignment), or
- guard the commit step: skip the commit when the message is empty, or
- fall back to a default message in the workflow.
Option 1 is the honest one - the message is about an assignment, and a rename is one.
Revisit trigger
Act if a PR that adds an artifact is merged with the ID assignment left to CI - the run will fail
before the ids land.
What is wrong
ci-assign-idreportsaction: "renamed_and_assigned"for a fresh assignment, andbuild_commit_messageonly countsassigned/would_assign:(
crates/forgeplan-cli/src/commands/ci_assign_id.rs:1191-1206; the action enum at lines 981-986 iswould_assign | renamed_and_assigned | assigned.)The workflow takes that field straight to
git commit:.github/workflows/assign-id.yml:94-jq -r '.commit_message_suggested'intoGITHUB_OUTPUT.github/workflows/assign-id.yml:133-git commit -m "$COMMIT_MSG", with no[[ -n "$COMMIT_MSG" ]]guardSo on any PR that introduces a new artifact - the common case, since Phase 2.2 renames
<kind>-<slug>.mdto<KIND>-<NNN>-<slug>.md- the commit step aborts withAborting commit due to empty commit message., the step fails, and the "Comment on PR" failurehandler fires. The renamed files are committed by
git add -Abut never pushed.Evidence
Reproduced on 0.37.0 in a throwaway git workspace:
Source:
build_commit_messagegate atci_assign_id.rs:1191-1206; workflow lines 86, 94, 133.Fix options
renamed_and_assignedin the gating condition (it is a real assignment), orOption 1 is the honest one - the message is about an assignment, and a rename is one.
Revisit trigger
Act if a PR that adds an artifact is merged with the ID assignment left to CI - the run will fail
before the ids land.