fix(inkless:sync): improve branch consistency check and add cherry-pick sync guide#550
Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
06a2844 to
2b9eb5f
Compare
|
Inkless-4.0 is gone, only 4.1 & 4.2 are supported. Inkless-main is 4.2 based. Was that information up to date with this ie. is there such differences between 4.1 & 4.2 still? |
Makes it clear which version differences apply to which branches, so the table can evolve as older branches are retired. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@tvainika Good catch. The tooling should be branch-agnostic as it should take the branch as an input. Though, I've updated the issues to collect in which versions they were observed, so if we find similar issues when syncing 4.2+, we can expand the list |
…ck sync guide (#550) * fix(inkless:sync): use --first-parent to detect inkless commits in branch-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. * docs(inkless:sync): add cherry-pick sync guide and session template 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. * docs(inkless-sync): add affected-versions column to divergence table Makes it clear which version differences apply to which branches, so the table can evolve as older branches are retired. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ck sync guide (#550) * fix(inkless:sync): use --first-parent to detect inkless commits in branch-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. * docs(inkless:sync): add cherry-pick sync guide and session template 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. * docs(inkless-sync): add affected-versions column to divergence table Makes it clear which version differences apply to which branches, so the table can evolve as older branches are retired. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
branch-consistency.shto use--first-parentwhen listing main commits, so upstream merge-commit content is excluded from the missing-commits report.