rebuild fork on upstream main: single patch commit, zero drift - #13
Merged
feifeigood merged 2 commits intoJul 26, 2026
Merged
Conversation
…e aa1d14a7 Single squashed patch carrying every agentfleet-owned change on top of google/ax main. Rebuilt directly on upstream so `git diff origin/main` is exactly this patch and nothing else -- the previous long-lived merge branch had accumulated drift because upstream rewrote its history, which made 3-way merge bases unreliable. To follow upstream: branch from the new upstream main, cherry-pick this commit, resolve conflicts, done. Contents: - proto: `harness_metadata` on ConversationEvent, HarnessEnd and ExecResponse so a harness can attach an opaque terminal blob (token usage) to the event that ends a turn. Generated artifacts regenerated with upstream's toolchain (protoc 28.2, protoc-gen-go-grpc 1.5.1, grpcio-tools 1.62.2) so only ax.pb.go / ax_pb2.py move. - harness: `Drainer` optional capability; stream plumbing for terminal metadata (OnCompleteWithMetadata / OnFailWithMetadata). - controller: honor `CloseBeforeNextStart` so harnesses tracking per-conversation turn state close before the next turn starts, while everything else keeps upstream's deferred-close semantics; persist terminal metadata on both COMPLETED and FAILED paths. - registry: drain Drainer harnesses on Close so warm actors awaiting deferred idle suspension are suspended, not leaked, on process exit. - server: GracefulStop drains gRPC before closing the controller so no turn re-arms the idle timer after the drain. - substrate harness: warm-then-suspend idle policy, warm actor revalidation with cold-resume fallback, shutdown drain. - go.mod: substrate pin -> aa1d14a7 (imagecache Phase 1 plus the 07-24 fixes); internal/ate and harnesstest adapted to name-based actor addressing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TK34TZokEcfPq5JdbUVWo
…uild Records the previous agentfleet/main as a parent so this lands without rewriting published history, while keeping this branch's tree (the clean upstream-based rebuild) verbatim. A normal 3-way merge would resurrect the drift, hence -s ours. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TK34TZokEcfPq5JdbUVWo
feifeigood
marked this pull request as ready for review
July 26, 2026 02:25
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.
按维护者要求重做:从 google/ax main 干净开分支,把我们自己的提交 cherry-pick 上去,而不是把上游 merge 进我们那条长期分叉的分支。
为什么必须重做
上游 google/ax 重写过 git 历史——同一个提交 "Run Antigravity Interactions as substrate actors (google#287)" 在上游是
fea5d23、在我们 fork 里是c4f4cf9。SHA 错位导致 3-way merge 的 base 判定失真:base 有某个上游特性、我们这边没有、上游有 → git 判定「只有我们改了」→ 静默保留我们的删除,连冲突都不报。结果是 #12 合并后,
git diff upstream/main fork/main有 33 个文件,其中 15 个不是我们的 patch:ax_grpc.pb.go、content.pb.go、ax_pb2_grpc.py、content_pb2.py、content_pb2_grpc.pyantigravityinteractions/*(5 个)、cliutil.go、cmd/ax/harness.goWorkDir配置 +resolveRunDir,我们更早的 v0.2.0 同步(#10)在冲突解析里保留了旧的 chdir 方案check-binaries.yml(被我们删掉)、go.yml、.gitignore这个 PR 怎么做的
origin/main(cbd2c56)开新分支;ax_grpc.pb.go/content.pb.go/content_pb2*.py/ax_pb2_grpc.py现在与上游逐字节一致,只有ax.pb.go和ax_pb2.py因为我们真加了字段而变;01dd9f4。结果:
git diff origin/main= 18 个文件,全部是我们的 patch,零多余。(重建版 vs 旧 fork main 的差异也逐一核对过,只有上表那 15 个文件,我们的功能代码一行没丢。)以后怎么跟上游
关于合并方式
分支顶端有一个
-s ours的 merge,把旧的agentfleet/main记为父提交。这样不需要 force-push、不改写已发布历史就能落地,同时保留本分支这棵干净的树。普通 3-way 合并会把 drift 又合回来,所以必须这样。合并后agentfleet/main与上游的差异就只剩那一个 patch。验证
gofmt/go build/go vet/go test -race ./...全绿,13 包 0 失败(含被还原成上游版的antigravityinteractions包)。后续
合并后 af 的
go.modreplace pin 需要指向新提交(现指向旧分支的1234e31),我会跟一个小 PR。🤖 Generated with Claude Code
https://claude.ai/code/session_017TK34TZokEcfPq5JdbUVWo