Repository navigation
feat: fold the sync mirror archive at release and reset it at promote - #1426
Merged
Merged
Conversation
…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
6 tasks
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.
Description
Makes the release train the integration point for mirror-mode sync-issues
consumers (
DEVKIT_SYNC_TARGETset, #1227/#1228). Today the mirror "divergespermanently and is never merged back", so a protected-
mainconsumer nevercarries the issue/PR archive on
main(live evidence: org-config has nodocs/issues/despite two releases), and the existing release-time sync legcannot fix it — it is an incremental top-up sharing the repo-wide
sync-issues-state-<repo>cutoff cache, so a release-branch run would bothproduce 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 featureModifiers
!) -- This change breaks backward compatibilityChanges Made
render_sync_settings(init-workspace.sh), only whenDEVKIT_SYNC_TARGETis set:
release-core.ymlfinal leg: the sync dispatch retargets to themirror (
--refstays on the release branch so the release's ownworkflow definition runs and the wait step's
--branchfilter isuntouched), and three fold steps land after the release-branch pull —
stage
docs/issues/+docs/pull-requests/from the mirror(
git checkout FETCH_HEAD -- <dirs>, no branch merge, so mirrordivergence is irrelevant), commit via commit-action with the existing
commit_app_token, then re-pull soOutput finalize SHA(the tagtarget) includes the fold commit. Missing mirror, missing snapshot dirs,
or an already-identical archive are clean no-ops.
promote-release.yml: appendedreset-sync-mirrorjob(
needs: [resolve-toolchain, merge], gated on merge success) thatforce-resets the mirror ref onto
mainviagit push— never the RESTrefs API (promote-release: first-time floating minor/major tag creation fails (422 on POST /git/refs) after publish+merge #1157/promote-release: floating-tag creation via POST /git/refs is not covered by the Release App's ruleset bypass — switch move_tag() to git push #1377) — using the commit App (git/ref-ops identity).
The mirror is unprotected by design and its history is regenerated
state, so the reset loses nothing; a racing nightly sync self-heals.
release-core.yml/promote-release.yml(pinned by test), so every existing non-mirror consumer is untouched.
main;folded via the release PR at finalize, re-based onto
mainat 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
DEVKIT_SYNC_TARGETset, the scaffoldedrelease-core.ymlfinal legnow 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 thefull archive reaches
mainthrough the human-approved release PR —previously the mirror diverged forever and
mainnever carried thearchive
promote-release.ymlgains a renderedreset-sync-mirrorjob that force-resets the mirror onto
mainafter the release PR merges,bounding its divergence to post-release snapshot commits
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 survivesrenders the fold steps between pull and finalize SHA— presence + strictordering (Pull < fold < finalize SHA), so the tag target includes the fold
renders the promote-time mirror reset job— job present, push-based refmutation, mirror ref literal
unset DEVKIT_SYNC_TARGET leaves release-core + promote-release byte-identical—cmpagainst the templatesactionlint passes over the mirror-rendered workflows— the Adopt actionlint for authored and per-mode rendered workflow templates #995 fixturesonly 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-filessuite) green.