fix(inkless:sync): improve branch consistency check and add cherry-pick sync guide#550
Open
fix(inkless:sync): improve branch consistency check and add cherry-pick sync guide#550
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the inkless sync tooling to (1) improve how missing commits are identified between main and release branches, and (2) document a repeatable workflow for cherry-picking inkless features from main into release branches.
Changes:
- Update
branch-consistency.shto scanorigin/mainusinggit log --first-parentso merged-in upstream history is not treated as “missing”. - Update
cherry-pick-to-release.shto present/execute commit lists oldest-first (while preserving user-provided ordering for explicit commit lists). - Add cherry-pick sync documentation, conflict patterns, and a session template, and link them from the sync README.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| inkless-sync/cherry-pick-to-release.sh | Reorders the commit list for display/execution (oldest-first by default). |
| inkless-sync/branch-consistency.sh | Switches main scanning to --first-parent and changes commit filtering logic. |
| inkless-sync/README.md | Documents “Cherry-pick Sync” as a third sync type and links new guide/template. |
| inkless-sync/CONFLICT-RESOLUTION-STRATEGY.md | Adds cherry-pick-specific conflict categories and tracking guidance. |
| inkless-sync/CHERRY-PICK-SYNC-GUIDE.md | New end-to-end guide for cherry-pick sync workflow and troubleshooting. |
| inkless-sync/CHERRY-PICK-SESSION-TEMPLATE.md | New template for tracking cherry-pick sessions and resolutions. |
Comments suppressed due to low confidence (1)
inkless-sync/branch-consistency.sh:188
- The script still prints "Scanning main branch for inkless commits..." / "Found X inkless-specific commits on main", but the current filtering only removes sync + non-PR commits. If you keep the broader filter intentionally, these messages and the table header (
Inkless commits on main) will be misleading; otherwise, reinstate inkless/diskless filtering so the reported counts match the script's stated purpose.
# Get all inkless commits on main since divergence.
# --first-parent only walks the main branch lineage, so upstream commits
# brought in via merge are excluded. Only PRs landed directly on main
# (and sync fix-ups) appear. We then filter out sync fix-ups.
info "Scanning main branch for inkless commits..."
local inkless_commits_file
inkless_commits_file=$(mktemp)
# Use RETURN trap for function-scoped cleanup (doesn't persist after function returns)
trap "rm -f '$inkless_commits_file'" RETURN
while IFS= read -r line; do
local msg="${line#* }"
if ! is_excluded_commit "$msg"; then
echo "$line" >> "$inkless_commits_file"
fi
done < <(git log --first-parent --no-merges --oneline "$diverge_point..origin/main")
local inkless_count
inkless_count=$(wc -l < "$inkless_commits_file" | tr -d ' ')
echo "Found $inkless_count inkless-specific commits on main"
echo ""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…anch-consistency Replace keyword-based inkless commit detection (matching "inkless/diskless" in message) with --first-parent git log traversal. This only walks the main branch lineage, so upstream commits brought in via merge are naturally excluded. All remaining commits with a PR number are inkless PRs regardless of their commit message wording. This fixes commits like "feat(produce): optimize AppendCompleter (#529)" being missed because they don't mention "inkless" or "diskless". Also fixes cherry-pick-to-release.sh to apply commits oldest-first instead of newest-first, ensuring dependencies are met. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add documentation for cherry-picking inkless commits from main to release branches, covering workflow, conflict resolution patterns (TopicPartition vs TopicIdPartition, missing features, interface expansion, class coexistence), and session tracking. Co-Authored-By: Claude Opus 4.6 <[email protected]>
06a2844 to
2b9eb5f
Compare
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.
branch-consistency.shto use--first-parentwhen listing main commits, so upstream merge-commit content is excluded from the missing-commits report.