Skip to content

fix(workflow-model): scrub sync-main-to-dev prose in promote-release (trunk) - #1243

Merged
c-vigo merged 3 commits into
devfrom
bugfix/1233-promote-release-trunk-prose
Jul 21, 2026
Merged

c-vigo merged 3 commits into
devfrom
bugfix/1233-promote-release-trunk-prose

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Problem

Follow-up to #1226 (PR #1229). The trunk workflow-model render scrubs residual dev prose from prepare-release.yml, ci.yml, codeql.yml and sync-issues.yml, but render_workflow_model() never touched promote-release.yml. Two comments there name sync-main-to-dev:

  • assets/workspace/.github/workflows/promote-release.yml:8 — # 3. merge: merge release/X.Y.Z PR to main (triggers sync-main-to-dev)
  • assets/workspace/.github/workflows/promote-release.yml:473 — echo "... merged to main (sync-main-to-dev may run next)"

sync-main-to-dev.yml is copy-excluded in trunk mode (EXCLUDE_ARGS), so trunk consumers ship comments referencing a workflow absent from their repo. Cosmetic only, same class as #1226 — a pre-existing gap, not a regression from PR #1229.

Root cause

render_workflow_model() (assets/init-workspace.sh) enumerates the files it retargets; promote-release.yml was simply not among them.

Fix

Add an anchored promote-release.yml block to the trunk render that drops both parentheticals (comments only, no behavior change). The template is untouched, so gitflow output stays byte-identical (the render early-returns for non-trunk).

sed -i 's| (triggers sync-main-to-dev)||' "$prom"
sed -i 's| (sync-main-to-dev may run next)||' "$prom"

Test evidence

New test test_trunk_promote_release_has_no_sync_main_to_dev_prose asserts a trunk-scaffolded promote-release.yml carries no sync-main-to-dev mention; promote-release.yml is also registered in the gitflow byte-identical guard (NO_PLACEHOLDER_RENDER_FILES).

  • RED (test commit): assert 'sync-main-to-dev' not in text failed on the two parentheticals.
  • GREEN (fix commit): full tests/test_workflow_model.py suite — 21 passed.
  • gitflow no-op: test_gitflow_render_files_are_byte_identical_to_template (now covering promote-release.yml) and test_gitflow_scaffold_matches_default_path both green; the trunk-filtered bats suite (5 tests) green.
  • just precommit (full suite, both hook environments) — all green, no auto-fixes.

Closes #1233

c-vigo added 3 commits July 21, 2026 13:20
The trunk render leaves the two `sync-main-to-dev` parenthetical comments
in promote-release.yml (the header step list + the Summary echo), naming a
workflow that is copy-excluded in trunk. Require the trunk-scaffolded
promote-release.yml to carry no `sync-main-to-dev` mention, and register
the file in the gitflow byte-identical guard (placeholder-free, render-only).

Fails until render_workflow_model rewrites these prose spots.

Refs: #1233
render_workflow_model rewrote the inert dev prose in prepare-release.yml,
ci.yml, codeql.yml and sync-issues.yml (#1208, #1226) but never touched
promote-release.yml. Its header step list and Summary echo each name
sync-main-to-dev, a workflow copy-excluded in trunk (EXCLUDE_ARGS), so a
trunk consumer shipped comments referencing a workflow absent from its
repo. Extend the anchored trunk render to drop both parentheticals.

Comments only, no behavior change; the template is untouched so gitflow
output stays byte-identical (the render is a no-op for gitflow).

Refs: #1233
@c-vigo
c-vigo merged commit 1052755 into dev Jul 21, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1233-promote-release-trunk-prose branch July 21, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant