Skip to content

fix(workspace): retarget renovate preset baseBranchPatterns to main in trunk - #1339

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1336-trunk-renovate-basebranch
Aug 4, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1336-trunk-renovate-basebranch

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Trunk-model consumers (DEVKIT_WORKFLOW=trunk) keep the gitflow-shaped baseBranchPatterns: ["dev"] in their scaffolded .github/renovate-default.json — but have no dev branch, so Renovate has nothing to operate on and runs no updates at all (verified live on exo-pet/vault and vig-os/org-config). The trunk render now retargets the preset to ["main"], mirroring the existing dev→main retarget for workflows.

Type of Change

  • fix -- Bug fix

Changes Made

  • assets/init-workspace.sh (render_workflow_model): new anchored sed rewrites "baseBranchPatterns": ["dev"] → ["main"] in the scaffolded .github/renovate-default.json under trunk; gitflow remains a byte-for-byte no-op. The consumer-owned root renovate.json is preserved and untouched.
  • tests/test_workflow_model.py: new test_trunk_renovate_preset_targets_main (drives the real init-workspace.sh end-to-end, like the rest of the suite), and .github/renovate-default.json added to NO_PLACEHOLDER_RENDER_FILES so the gitflow byte-identical guard covers the new render target.
  • CHANGELOG.md + .devcontainer mirror.

Changelog Entry

Fixed

  • Trunk consumers' Renovate preset now targets main (#1336)
    • The trunk render (render_workflow_model) retargets baseBranchPatterns from ["dev"] to ["main"] in the scaffolded .github/renovate-default.json. Previously a DEVKIT_WORKFLOW=trunk consumer kept ["dev"] while having no dev branch, leaving Renovate with nothing to operate on — effectively inert. Existing trunk repos self-heal on their next devkit-upgrade.

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • TDD: test committed RED first (trunk scaffold keeps ["dev"]), GREEN after the render change.
  • tests/test_workflow_model.py: 23 passed (includes the gitflow no-op guards — gitflow output stays byte-identical to the template).
  • bats tests/bats/init-workspace.bats: 278 ok, exit 0.
  • prek run --all-files: green, exit 0.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Rollout: the preset is a managed file, so vault, org-config, and exo-fleet self-heal on their next devkit-upgrade after this ships — no manual consumer action. Their first Renovate run after that upgrade will open the accumulated update PRs (including the #1332 managed-file exclusion taking effect for the first time on trunk repos, since Renovate was inert there until now).

Closes #1336

Refs: #1336

c-vigo added 2 commits August 4, 2026 09:09
RED: the trunk scaffold leaves baseBranchPatterns ["dev"] in
.github/renovate-default.json, so Renovate has no branch to operate on in
a trunk consumer. Also extend the gitflow byte-identical guard to the
preset (placeholder-free render target).

Refs: #1336
…n trunk

Renovate restricted to a base-branch pattern matching no existing branch
has nothing to operate on, so trunk consumers (no dev branch) ran no
updates at all. render_workflow_model now rewrites the anchored preset
line dev -> main; existing trunk repos self-heal on their next
devkit-upgrade. Verified inert live on exo-pet/vault and
vig-os/org-config before the fix.

Refs: #1336
@c-vigo
c-vigo merged commit 1ca3a50 into dev Aug 4, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1336-trunk-renovate-basebranch branch August 4, 2026 08:27
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