Skip to content

feat(stack): port replay HTTP upload + orchestrator to Rust#1537

Closed
jd wants to merge 1 commit into
devs/jd/feat/rust-stack-detect-change-type/port-stack-push-approvals-decision-rust--57e70b92from
devs/jd/feat/rust-stack-detect-change-type/port-replay-http-upload-orchestrator-rust--719eb150
Closed

feat(stack): port replay HTTP upload + orchestrator to Rust#1537
jd wants to merge 1 commit into
devs/jd/feat/rust-stack-detect-change-type/port-stack-push-approvals-decision-rust--57e70b92from
devs/jd/feat/rust-stack-detect-change-type/port-replay-http-upload-orchestrator-rust--719eb150

Conversation

@jd

@jd jd commented Jun 4, 2026

Copy link
Copy Markdown
Member

Completes the replay-for-revision pipeline: the git-only half
landed in the previous commit (compute_merged_tree +
compute_tree_delta); this adds the GitHub Git Data API upload
that materialises the synthetic commit the revision-history
compare URL anchors at.

  • upload_replay_commitPOST /git/trees with the delta,
    then POST /git/commits with parents=[old_sha] so
    compare/<old_sha>...<commit> shows just the amendment.
    Any API error coerces to None (matches Python's
    except httpx.HTTPError, ValueError); the failure is non-
    fatal because the revision-history row already carries a
    durable (raw) fallback URL.
  • replay_for_revision — top-level orchestrator wiring
    compute_merged_tree → rev-parse parent_old^{tree}
    compute_tree_delta → upload_replay_commit. Returns None
    on conflict, missing parents, empty diff (rebase fully
    absorbed the edit), git error, or API error so callers
    fall back to the plain old…new three-dot URL.

Coverage: 4 wiremock tests pinning the two-call shape, the
short-circuit on tree-POST failure, the short-circuit on
commit-POST failure, an end-to-end run against a real repo,
and the empty-diff short-circuit (no HTTP calls).

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Depends-On: #1536

Completes the replay-for-revision pipeline: the git-only half
landed in the previous commit (compute_merged_tree +
compute_tree_delta); this adds the GitHub Git Data API upload
that materialises the synthetic commit the revision-history
compare URL anchors at.

- `upload_replay_commit` — `POST /git/trees` with the delta,
  then `POST /git/commits` with `parents=[old_sha]` so
  `compare/<old_sha>...<commit>` shows just the amendment.
  Any API error coerces to `None` (matches Python's
  `except httpx.HTTPError, ValueError`); the failure is non-
  fatal because the revision-history row already carries a
  durable `(raw)` fallback URL.
- `replay_for_revision` — top-level orchestrator wiring
  compute_merged_tree → `rev-parse parent_old^{tree}` →
  compute_tree_delta → upload_replay_commit. Returns `None`
  on conflict, missing parents, empty diff (rebase fully
  absorbed the edit), git error, or API error so callers
  fall back to the plain `old…new` three-dot URL.

Coverage: 4 wiremock tests pinning the two-call shape, the
short-circuit on tree-POST failure, the short-circuit on
commit-POST failure, an end-to-end run against a real repo,
and the empty-diff short-circuit (no HTTP calls).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I719eb150882c54ba66cb2bbc7181e9834737dd64
@jd

jd commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(stack): port detect_change_type + patch-id helpers to Rust #1532
2 feat(stack): port StackComment renderer to Rust #1533
3 feat(stack): port replay git helpers (merge-tree + diff-tree) to Rust #1534
4 feat(stack): port RevisionHistoryComment to Rust #1535
5 feat(stack): port stack push approvals decision to Rust #1536
6 feat(stack): port replay HTTP upload + orchestrator to Rust #1537 👈
7 feat(stack): port stack push git plumbing (notes fetch + push) to Rust #1539
8 feat(stack): port stack push rebase log lines to Rust #1540
9 feat(stack): port format_pull_description + build_change_tasks to Rust #1541
10 feat(stack): port create_or_update_pr + orphan branch delete to Rust #1542
11 feat(stack): port per-PR stack + revision-history comment upserters to Rust #1543
12 feat(stack): port stack push planner (get_changes) to Rust #1544
13 feat(stack): port stack push orchestrator to Rust #1545
14 feat(rust): wire native stack push + delete Python push.py #1546
15 chore: delete Python tree + simplify wheel/CI for pure-Rust binary #1547

@mergify

mergify Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 ⛓️ Depends-On Requirements

Waiting for

This rule is failing.

Requirement based on the presence of Depends-On in the body of the pull request

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by>=2
This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant