Repository navigation
fix(ci): break renovate changelog self-commit loop and sync workspace mirror - #864
Merged
Merged
Conversation
… mirror The changelog commit is pushed with a GitHub App token that re-triggers workflows, but the build gated only on the PR author (permanently renovate[bot]) and never the pusher, and commit-action has no empty-diff guard -- so the bot's own no-op commits fired endless synchronize events (#862 accrued 150+ empty commits). Guard both build jobs on github.event.sender.login so the commit bot's push no longer starts a build. The automation also committed only root CHANGELOG.md, leaving the scripts/manifest.toml mirror assets/workspace/.devcontainer/CHANGELOG.md stale and failing the sync-manifest gate on every Renovate PR. The build now mirrors the verbatim copy and both files are committed (FILE_PATHS). Refs: #863
This was referenced Jul 6, 2026
c-vigo
added a commit
that referenced
this pull request
Jul 6, 2026
Fixes #867. Cosmetic follow-up split out of #863 / PR #864. ## Problem `insert_renovate_changelog_entry` appended entries at the **bottom** of `## Unreleased → ### Changed`. With the `#### Modules` sub-heading convention (#816), a Renovate dependency bump landed **under `#### Modules`**, misattributing it as a module change (seen on #862). ## Fix Insert at the **top** of `### Changed` — a plain bullet above any `####` sub-heading — reusing the existing post-heading offset, and add a trailing blank line when the section opens with a heading so Keep-a-Changelog spacing is preserved. The position-independent idempotency guard (`_pr_marked_in_changed`) is unchanged. ## Testing (TDD) - RED: `test_insert_above_subheading_in_changed` (fails on old code — entry landed below `#### Modules`). - GREEN: fix applied; renamed `test_insert_appends_to_changed_section` → `test_insert_prepends_to_changed_section` and asserted top placement. `uv run pytest packages/vig-utils/tests/test_renovate_changelog_pr.py` → 12 passed. - Manual smoke: ran `renovate-changelog-pr` against a `#### Modules` fixture — the bullet now sits above `#### Modules`. - `prek run --all-files` green (incl. `sync-manifest`). ## Rollout note The tool runs from the baked `renovate-changelog-pr` console script in the published image, so this goes live for Renovate PRs after the next image rebuild that bakes the updated `vig-utils`.
c-vigo
added a commit
that referenced
this pull request
Jul 6, 2026
…nv (#875) ## Description Fixes the two residual defects in the Renovate changelog automation surfaced when the workflow was re-enabled after #863/#864, verified live on PRs #861/#862 (mirror missing from bot commit → `sync-manifest` red) and #865/#866 (commit stage crash on parenthesized branch names). Closes #874 ## Type of Change - [x] `fix` -- Bug fix ## Changes Made - `Upload changelog artifact` step now sets `include-hidden-files: true` — `upload-artifact` (≥ v4.4) silently excludes hidden directories, dropping `assets/workspace/.devcontainer/CHANGELOG.md` from the artifact so the commit workflow could never commit the mirror. - `metadata.env` values are written with `printf '%s=%q'` instead of unquoted `echo`, so grouped Renovate branch names (`renovate/python-(minor-and-patch)`) survive being `source`d by `renovate-changelog-commit.yml`. - Workspace copy of the workflow updated via `sync-manifest`; changelog entry added (root + mirror). ## Changelog Entry ### Fixed - **Renovate changelog artifact drops the workspace mirror; `metadata.env` breaks on parenthesized branches** ([#874](#874)) - `upload-artifact` silently excluded the mirror under the hidden `.devcontainer` directory, so the bot commit updated only the root `CHANGELOG.md` and tripped the `sync-manifest` gate; now uploaded with `include-hidden-files: true`. - `metadata.env` values are `%q`-quoted so grouped Renovate branch names (e.g. `renovate/python-(minor-and-patch)`) survive being `source`d by the commit workflow. ## Testing - Workflow-YAML-only change — TDD exception (non-testable config). - Root cause confirmed empirically: downloaded the actual `renovate-changelog` artifact from run 28799680160 (PR #862) — it contains only `CHANGELOG.md` + `metadata.env`, no mirror; commit-stage failures for #865/#866 (runs 28799792964 / 28799804936) show `metadata.env: line 3: syntax error near unexpected token '('`. - Full pre-commit suite green locally (`just precommit`, exit 0, all files). - End-to-end verification after merge: re-tick the rebase checkboxes on #861/#862/#865/#866 — Renovate rewrites the branches, the automation must add one bot commit per PR touching both changelogs, with green `sync-manifest`.
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.
Fixes #863.
What was wrong
The Renovate changelog automation had two independent defects, both surfaced on #862 (which accrued 150+ identical empty commits before the build workflow was disabled by hand to stop it):
renovate-changelog-commit.ymlpushes with a GitHub App token (re-triggers workflows); the build gated only on the PR author (permanentlyrenovate[bot]), never the pusher, andcommit-actionhas no empty-diff guard → the bot's own no-op commits fired freshsynchronizeevents without end.CHANGELOG.md, leaving thescripts/manifest.tomlmirrorassets/workspace/.devcontainer/CHANGELOG.mdstale, so thesync-manifestgate failed on every Renovate PR — independent of the loop.Fix
github.event.sender.login != 'commit-action-bot[bot]', so asynchronizeraised by the commit bot's push no longer starts a build. Net effect: exactly one changelog commit per Renovate PR.CHANGELOG.md→ the verbatim mirror and ships both in the artifact;renovate-changelog-commit.ymlcommitsFILE_PATHS: CHANGELOG.md,assets/workspace/.devcontainer/CHANGELOG.md(precedent:prepare-release.yml).Shipped copies under
assets/workspace/.github/workflows/regenerated viascripts/sync_manifest.py(identical to root).Testing
CI-config + changelog only (no unit-testable logic).
prek run --all-filesgreen locally, includingsync-manifest.Operational note
renovate-changelog-build.ymlis disabled manually right now to stop the active loop. Re-enable once this reachesdev(viasync-main-to-dev), then use #862 to validate the flow end-to-end.