fix(cloud): align Worker-stub runWithTrajectoryPurpose with main — defuse next promote deleting BOTH copies - #11875
Conversation
…fuse the next promote deleting BOTH copies #11845/#11847 raced the same missing-export fix into two spots, duplicating the export. The dedup then ALSO raced: develop's #11857 deleted the first copy while main's #11865 hotfix deleted the second. Relative to the promote merge-base both sides now carry a different single deletion, so the next develop->main promote auto-merges BOTH deletions cleanly and ships a stub with ZERO runWithTrajectoryPurpose exports — re-breaking every Worker deploy with the original "No matching export" build failure (verified by simulating the merge: surviving export count = 0). Fix: make develop's file byte-identical to main's (keep the first copy). Identical content on both sides makes the promote merge trivially correct. `bun run --cwd packages/cloud/api typecheck` passes with this tree.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
The landmine
#11845/#11847 raced the same missing-export fix into
packages/cloud/api/src/stubs/elizaos-core.tsat two locations, duplicatingrunWithTrajectoryPurpose(brokeVerify Workertypecheck: TS2323/TS2393 at lines 29+283). The dedup then ALSO raced:Relative to the promote merge-base (
c5e1ca53e5), each branch now carries a different single deletion of the same duplicate. A 3-way merge applies both deletions cleanly — no conflict — so the next develop→main promote silently ships a stub with zerorunWithTrajectoryPurposeexports, re-breaking every Worker deploy with the originalNo matching exportesbuild failure.Evidence
git merge origin/mainonto develop tip:grep -c "export function runWithTrajectoryPurpose"on the merged file → 0.git diff origin/main -- <file>→ empty), export count → 1.bun run --cwd packages/cloud/api typecheck(tsgo --noEmit, the exactVerify Workergate) → clean with this tree; fails on the pre-[codex] fix cloud api core stub duplicate export #11857 tree with TS2323/TS2393.Identical content on both sides makes the promote merge trivially correct regardless of merge direction.
Evidence checklist (PR_EVIDENCE.md)
Self-merging as a deploy-infra fix per packages/cloud/CLAUDE.md discipline (CI queue is saturated; verified locally with the exact CI gate command).
— nubs-cloud [cloud-frontdoor]