Repository navigation
ci: replay adapted ledger patches where their retired originals were - #18
Merged
Merged
Conversation
A ledger patch adapted by a stable sync keeps its original in alas history, retired, and the adaptation reaches alas later through the sync merge. The replay walked alas by commit date, so fork commits that build on the patch replayed before its appliedCommit and conflicted. The v2.5.0 codex sync stopped this way on 6b51376 (docs/codex-hook-review.md), which depends on neutral-codex-hook-review-execution, adapted in v2.4.0 as 78e7be6. Each ledger patch's appliedCommit now replays at the position of its first retired original, as non-ledger downstreamTransitions already do. This does not depend on patch ids, because an adaptation can keep its original's patch id. An appliedCommit that is not in protected alas fails the build.
Owner
Author
Planned v2.5.0 sync (level 2, after this PR merges)Simulated on a synthetic merge of this branch (
The SHAs will change after the real merge, because the merge commit is new. Once that happens, the sync is rebuilt on the new |
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.
Why
The scheduled v2.5.0 codex sync (run 40929309607) failed closed with a cherry-pick conflict on
6b51376("docs(hooks): clarify whole-operation retry allowlist"). Nothing was pushed or published.The cause is in the sync tooling, not in upstream v2.5.0. A ledger patch adapted by a stable sync keeps its original in
alashistory, retired, and its adaptation (appliedCommit) reachesalaslater through the sync merge. The replay walksalasby commit date, so a ledger adaptation is replayed at the adaptation's date. Fork commits that build on the patch are replayed before it and conflict.neutral-codex-hook-review-executionwas adapted in v2.4.0 as78e7be6(original960f779, PR feat(hooks): add process-bound review for neutral clients #12, Oct 21).6b51376(same PR) edits lines ofdocs/codex-hook-review.mdthat960f779introduced. In the v2.5.0 replay it came before78e7be6, so it conflicted.PR #16 fixed the same problem for non-ledger adaptations recorded in
downstreamTransitions. This PR applies the same rule to ledger patches.What changes
downstreamReplayOrderreplays each ledger patch'sappliedCommitat the position of its first retired original. This does not depend on patch ids, because an adaptation can keep its original's patch id (same change, same context).appliedCommitthat is not in protectedalasfails the build, like adownstreamTransitionsreplacement.docs/ALAS_DOWNSTREAM.mddocuments the rule.No workflow, verifier contract, ledger or
KNOWN_PATCH_IDENTITIESchange.verify-sync-source-review.mjsreconstructs throughbuildSyncCandidate, so the publication verifier uses the same order.Verification
scripts/sync-ledger-replacement-order.test.mjs: a fixture with a ledger patch adapted in a v1.1.0 sync, merged intoalaslike a protected PR, and a fork commit that edits the patch's line. The v1.2.0 sync must replay the adaptation before the dependent commit, reproduce the same integration twice, and passverifySyncSourceReviewon a synthetic protected merge.appliedCommitoutside protectedalasthrows.scripts/sync-candidate.mjsreverted, all three new tests fail; the two replay variants stop on the samekind: "downstream"conflict as the real run. With only the patch-id guard restored, the same-patch-id variant fails.vitest run scripts/: 15 files, 163 tests, all pass.alas, with every ledger patch resolved asretain:manualReviewReasons: [];redundantDownstreamCommits: [a37cd3f], the earlier-sync copy already handled by PR ci: replay non-ledger adaptations where their retired originals were #16;The same simulation on current
alasstops on6b51376.After merge
This PR is level 3 and needs the maintainer's merge. The v2.5.0 sync then runs as level 2: upstream touched
src/CodexAcpServer.ts, so every ledger patch classifies asoverlapand needs a reviewed resolution, which will be recorded on thesync/upstream-2.5.0PR.