Repository navigation
fix(workflow-model): scrub sync-main-to-dev prose in promote-release (trunk) - #1243
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow-up to #1226 (PR #1229). The trunk workflow-model render scrubs residual
devprose fromprepare-release.yml,ci.yml,codeql.ymlandsync-issues.yml, butrender_workflow_model()never touchedpromote-release.yml. Two comments there namesync-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.ymlis 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.ymlwas simply not among them.Fix
Add an anchored
promote-release.ymlblock 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).Test evidence
New test
test_trunk_promote_release_has_no_sync_main_to_dev_proseasserts a trunk-scaffoldedpromote-release.ymlcarries nosync-main-to-devmention;promote-release.ymlis also registered in the gitflow byte-identical guard (NO_PLACEHOLDER_RENDER_FILES).assert 'sync-main-to-dev' not in textfailed on the two parentheticals.tests/test_workflow_model.pysuite — 21 passed.test_gitflow_render_files_are_byte_identical_to_template(now coveringpromote-release.yml) andtest_gitflow_scaffold_matches_default_pathboth green; the trunk-filtered bats suite (5 tests) green.just precommit(full suite, both hook environments) — all green, no auto-fixes.Closes #1233