Skip to content

fix(inkless:sync): improve branch consistency check and add cherry-pick sync guide#550

Merged
tvainika merged 3 commits into
mainfrom
jeqo/fix-branch-consistency-check
May 26, 2026
Merged

fix(inkless:sync): improve branch consistency check and add cherry-pick sync guide#550
tvainika merged 3 commits into
mainfrom
jeqo/fix-branch-consistency-check

Conversation

@jeqo

@jeqo jeqo commented Mar 23, 2026

Copy link
Copy Markdown
Contributor
  • Fix branch-consistency.sh to use --first-parent when listing main commits, so upstream merge-commit content is excluded from the missing-commits report.
  • Add comprehensive cherry-pick sync documentation covering the workflow, conflict resolution patterns, and session tracking for backporting inkless commits from main to release branches (e.g., inkless-4.0).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to scan origin/main using git log --first-parent so merged-in upstream history is not treated as “missing”.
  • Update cherry-pick-to-release.sh to 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.

Comment thread inkless-sync/branch-consistency.sh
Comment thread inkless-sync/cherry-pick-to-release.sh Outdated
jeqo and others added 2 commits March 24, 2026 07:08
…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>
@jeqo jeqo force-pushed the jeqo/fix-branch-consistency-check branch from 06a2844 to 2b9eb5f Compare March 24, 2026 12:08
@jeqo jeqo marked this pull request as ready for review March 24, 2026 12:15
@jeqo jeqo requested a review from AnatolyPopov March 24, 2026 12:15
@jeqo jeqo requested a review from tvainika May 25, 2026 19:32
@tvainika

Copy link
Copy Markdown
Member

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>

jeqo commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@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

@tvainika tvainika merged commit 8d06b09 into main May 26, 2026
4 checks passed
@tvainika tvainika deleted the jeqo/fix-branch-consistency-check branch May 26, 2026 10:02
giuseppelillo pushed a commit that referenced this pull request May 29, 2026
…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>
giuseppelillo pushed a commit that referenced this pull request May 29, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants