fix(oss-commit-sync): stop reporting our own exports as lost trailers - #207
Merged
Merged
Conversation
Content healing advances the import anchor over every OSS commit whose content the subtree already holds. After any export that includes the commits we exported ourselves: they carry Monorepo-Commit and, by design, never an Oss-Commit trailer, because that trailer records an import. The import then annotated ::notice::Anchor healed from content: <a> -> <b> (4 OSS commit(s) already present in staging/... but not recorded by a readable Oss-Commit trailer) on a run where nothing was wrong, and re-fired it with a growing count until the next external import recorded a fresh trailer. The health direction reported the same range as stale-anchor. A real trailer loss produces the identical message, so the annotation that has to stay trustworthy was the one being cried wolf on. Split the healed range by provenance instead: commits carrying Monorepo-Commit are our exports (expected, plain log line), commits carrying neither trailer are imports whose provenance record was lost (annotated, and pointed at the merge method). Health judges stale-anchor on the unrecorded count alone and reports both classes in its step summary. New outputs: healed-export-count, healed-unrecorded-count, redundant-export-count, redundant-unrecorded-count. Closes DEVOPS-1238
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.
Summary
A green
sync-from-ossrun onvcluster-proprinted:All 4 commits carried a
Monorepo-Committrailer: our own exports. Their content is instaging/because that is where it was authored, and they will never carry anOss-Committrailer, because that trailer records an import.content_anchordid not distinguish them from external commits, so the notice fired after every export with a count that grew until the next external import recorded a fresh trailer, andhealthreported the same range asstale-anchor.A genuine trailer loss (squash-merged sync PR) produces the identical message, so the annotation that has to stay trustworthy was the one crying wolf.
classify_healed_rangesplits the healed range by provenance:Monorepo-Commitpresent means our export (expected), neither trailer means an import whose record was lost.stale-anchoron the unrecorded count alone and reports both classes in the step summary.healed-export-count,healed-unrecorded-count,redundant-export-count,redundant-unrecorded-count.healed-count/redundant-countkeep their totals.Test plan
make test-oss-commit-sync— 64 tests pass, including three new cases: export-only healing (no::notice::), a mixed range (1 export + 1 unrecorded, notice fires), and health treating an export-only lag asstale-anchor=false. The existing lost-trailer case now also asserts the unrecorded classification.make check-docsclean,make lint(actionlint + zizmor) clean,shellcheckadds no new findings.Follow-up
Merging does not ship this:
oss-commit-sync/v1must be advanced to the merged commit, otherwisevcluster-pro'ssync-from-ossandsync-to-osskeep running the old code.Closes DEVOPS-1238