Skip to content

feat: fold the sync mirror archive at release and reset it at promote - #1426

Merged
c-vigo merged 3 commits into
devfrom
feature/1424-sync-mirror-release-fold
Aug 11, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/1424-sync-mirror-release-fold

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Description

Makes the release train the integration point for mirror-mode sync-issues
consumers (DEVKIT_SYNC_TARGET set, #1227/#1228). Today the mirror "diverges
permanently and is never merged back", so a protected-main consumer never
carries the issue/PR archive on main (live evidence: org-config has no
docs/issues/ despite two releases), and the existing release-time sync leg
cannot fix it — it is an incremental top-up sharing the repo-wide
sync-issues-state-<repo> cutoff cache, so a release-branch run would both
produce a partial archive and permanently starve the mirror of the
inter-sync window (mirror mode has no sync-main-to-dev backflow).

Closes #1424

Type of Change

  • feat -- New feature

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • render_sync_settings (init-workspace.sh), only when DEVKIT_SYNC_TARGET
    is set:
  • Unset knob ⇒ byte-identical release-core.yml/promote-release.yml
    (pinned by test), so every existing non-mirror consumer is untouched.
  • MIGRATION.md mirror doctrine amended: never merges directly into main;
    folded via the release PR at finalize, re-based onto main at promote.

Known limitation (noted in the rendered comment): commit-action v0.3.2 only
adds/updates files, so a path deleted on the mirror survives on the release
branch — theoretical for an include-closed archive that only grows; revisit
with commit-action deletion support.

Changelog Entry

Changed

  • Mirror-mode consumers integrate the issue archive via the release train (#1424)
    • With DEVKIT_SYNC_TARGET set, the scaffolded release-core.yml final leg
      now dispatches sync-issues onto the mirror (the only branch that may
      advance the shared incremental-sync cutoff) and then folds the mirror's
      docs/issues/ + docs/pull-requests/ into the release branch, so the
      full archive reaches main through the human-approved release PR —
      previously the mirror diverged forever and main never carried the
      archive
    • The scaffolded promote-release.yml gains a rendered reset-sync-mirror
      job that force-resets the mirror onto main after the release PR merges,
      bounding its divergence to post-release snapshot commits
    • Unset knob renders byte-identical templates; no change for non-mirror
      consumers

Testing

TDD: contract pinned first (e564408, 3 of 5 new bats tests red), then the
render (19a24a9, all green):

  • DEVKIT_SYNC_TARGET retargets the release-time sync dispatch to the mirror —
    mirror-targeted -f target-branch=, no release-branch dispatch survives
  • renders the fold steps between pull and finalize SHA — presence + strict
    ordering (Pull < fold < finalize SHA), so the tag target includes the fold
  • renders the promote-time mirror reset job — job present, push-based ref
    mutation, mirror ref literal
  • unset DEVKIT_SYNC_TARGET leaves release-core + promote-release byte-identical — cmp against the templates
  • actionlint passes over the mirror-rendered workflows — the Adopt actionlint for authored and per-mode rendered workflow templates #995 fixtures
    only lint default renders and would never see the injected steps/job; this
    lints the knob-set render (expressions, needs wiring, shellcheck on run
    blocks)

Local: bats --filter "#1424|#1228|#995|#1279" 12/12 green;
just precommit (full --all-files suite) green.

c-vigo added 3 commits August 11, 2026 15:05
…romote

In mirror mode (DEVKIT_SYNC_TARGET) the release train becomes the mirror's
integration point: release-core's final-leg sync dispatch retargets to the
mirror (the only branch allowed to advance the shared incremental-state
cutoff), fold steps land the snapshot archive on the release branch via
commit-action, and promote force-resets the mirror onto main so divergence
stays bounded. Unset knob renders byte-identical templates.

Refs: #1424
@c-vigo
c-vigo merged commit 4822b70 into dev Aug 11, 2026
12 checks passed
@c-vigo
c-vigo deleted the feature/1424-sync-mirror-release-fold branch August 11, 2026 14:15
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