fix(digest): treat distributor+merge overlay as managed, not diverged - #6
Merged
Merged
Conversation
Forks with install_forward_port carry a chore commit + sync-produced merge commits on every series branch — structural overlay, not human error. The naive ahead>0 check flags 14 forks as⚠️ diverged every day with no actionable fix. Classify these subjects via MANAGED_COMMIT_PATTERNS, surface them as a small grey footer, and reserve the red alarm for genuinely unexpected work on a series branch.
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.
What changed
The daily fork digest flagged 14 forks as⚠️ diverged every run. All 14 share the same root cause:
install_forward_port: trueforks carry achore(ci): … forward-port.yml from ledoent/.github distributorcommit on every series branch (the distributor writes it via Contents API to the default branch, which IS the series branch on OCA forks), andmerge-upstreamthen layers aMerge branch 'OCA:<b>' into <b>commit on top each time upstream advances.Both are structural — the workflow file must live on the branch where
pull_request_targetevents fire, so this overlay isn't human error. The alarm was a false positive.This PR adds
MANAGED_COMMIT_PATTERNSinfork_sync_digest.py, classifies ahead-commits as managed vs. unmanaged, and:diverged: trueonly when there's an unmanaged ahead-commit (someone actually pushed work to a series branch — the case the original check was designed for).managed_overlay: truefor the steady-state overlay case.Why not "fix" by resetting the 14 branches
Considered + rejected. The distributor would re-add forward-port.yml on the next run and the cycle restarts. The chore commit is the intended state, not drift.
Test plan
pytest tests/— 29 passed (4 new tests cover managed-overlay classification + render footer)Ledoent digest 2026-05-25(noManaged overlay: 2 branches are 1+ ahead of upstream only by structural commitsSide effect
HEADERSinfork_sync_digestmoved from module-level init to lazy init insidemain(), sorender_digestcan importMANAGED_COMMIT_PATTERNSwithout requiringGH_TOKENin the render step's env.