Skip to content

fix(cloud): align Worker-stub runWithTrajectoryPurpose with main — defuse next promote deleting BOTH copies - #11875

Merged
NubsCarson merged 1 commit into
developfrom
fix/align-worker-stub-dedup-with-main
Jul 3, 2026
Merged

fix(cloud): align Worker-stub runWithTrajectoryPurpose with main — defuse next promote deleting BOTH copies#11875
NubsCarson merged 1 commit into
developfrom
fix/align-worker-stub-dedup-with-main

Conversation

@NubsCarson

Copy link
Copy Markdown
Member

The landmine

#11845/#11847 raced the same missing-export fix into packages/cloud/api/src/stubs/elizaos-core.ts at two locations, duplicating runWithTrajectoryPurpose (broke Verify Worker typecheck: 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 zero runWithTrajectoryPurpose exports, re-breaking every Worker deploy with the original No matching export esbuild failure.

Evidence

  • Simulated git merge origin/main onto develop tip: grep -c "export function runWithTrajectoryPurpose" on the merged file → 0.
  • This branch: file made byte-identical to main's (git diff origin/main -- <file> → empty), export count → 1.
  • bun run --cwd packages/cloud/api typecheck (tsgo --noEmit, the exact Verify Worker gate) → 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)

  • Real-LLM trajectories: N/A — build-infra/stub-only change, no agent/model behavior.
  • Screenshots/video: N/A — no user-facing surface.
  • Backend/frontend logs: N/A — no runtime change (both copies are identical no-op pass-throughs; net diff vs main is zero).
  • Domain artifacts: merge simulation + typecheck outputs quoted above.

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]

…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.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ac8845f-eaf0-4fec-b0ba-0c3a0e59d630

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/align-worker-stub-dedup-with-main

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NubsCarson
NubsCarson merged commit 0439057 into develop Jul 3, 2026
32 of 37 checks passed
@NubsCarson
NubsCarson deleted the fix/align-worker-stub-dedup-with-main branch July 3, 2026 10:18
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

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.

1 participant