Repository navigation
fix(workflow-model): scrub residual dev prose in trunk render - #1229
Merged
Merged
Conversation
Extend the trunk render suite to require that a trunk-scaffolded ci.yml, codeql.yml, and sync-issues.yml carry no stray `dev` prose: the trigger-header comments, the origin/dev commit-gate rationale, and the sync-issues target-branch example must retarget dev -> main like the functional literals already do. Targeted string assertions avoid tripping on legit devkit/dev-shell tokens. Fails until render_workflow_model rewrites these prose spots. Refs: #1226
render_workflow_model retargeted only functional literals, so trunk consumers shipped comments still naming `dev`. Extend the anchored render to rewrite the inert prose too (comments/descriptions only, no behavior change), matching the prepare-release precedent (#1208): - ci.yml / codeql.yml trigger-header comment: drop `dev` from the "Pull requests to …" list. - ci.yml origin/dev commit-gate rationale comment: dev -> main. - sync-issues.yml target-branch input description example: dev -> main. gitflow is unaffected (the render is a no-op there); the templates are untouched so gitflow output stays byte-identical. Refs: #1226
This was referenced Jul 21, 2026
c-vigo
added a commit
that referenced
this pull request
Jul 21, 2026
…(trunk) (#1243) ## 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
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.
Summary
Both live trunk switches (vig-os/org-config#64, exo-pet/exo-fleet#230) flagged
cosmetic residue:
render_workflow_model()retargeted only functional literals,so a
trunkconsumer still shipped comments namingdev. This extends theanchored render to rewrite the four inert prose spots too — comments and input
descriptions only, no functional change. gitflow is unaffected (the render is a
no-op there) and the templates are untouched, so gitflow output stays
byte-identical.
Follows the
prepare-release.ymlprecedent (#1208), which already rewrites inertdevstep-names/comments tomainfor trunk in the same function.Before / after (trunk-rendered)
ci.ymlheader# - Pull requests to dev, release/**, and main# - Pull requests to release/** and mainci.ymlcommit-gate rationale# … reachable from origin/dev — a no-op on a dev PR/# (its base IS dev) …# … reachable from origin/main — a no-op on a main PR/# (its base IS main) …codeql.ymlheader# - Pull requests to dev, release/**, and main# - Pull requests to release/** and mainsync-issues.ymltarget-branchdescription… (e.g., dev, release/x.y.z).… (e.g., main, release/x.y.z).A trunk scaffold now contains no stray
devworkflow-branch prose in thesefiles (legit
devkit/dev-shelltokens are untouched).Test evidence
tests/test_workflow_model.py(targeted string assertions, noover-assert) in
test_trunk_ci_pr_filter_excludes_dev,test_trunk_codeql_pr_filter_excludes_dev, andtest_trunk_sync_issues_default_main. TDD: assertions committed failing first(
test:), then the render fix made them pass (fix:).uv run pytest tests/test_workflow_model.py→ 19 passed.prek run --all-files→ all hooks green.TestVersionCheckInitWorkspacefailures are unrelated(reproduce on the base release commit
d16541f5; environment-specific).Concurrency note
Issue #1228 concurrently adds functional sync-target knobs to the
sync-issues.ymltemplate and render function. This PR touches thesync-issues.ymlblock ofrender_workflow_model(one added comment-only sedline) and may need a trivial rebase after the #1228 PR lands (or vice versa).
Changes here are strictly comments/descriptions.
Refs: #1226