Skip to content

[codex] fix cloud api core stub duplicate export - #11857

Merged
lalalune merged 1 commit into
developfrom
codex/fix-cloud-api-core-stub
Jul 3, 2026
Merged

[codex] fix cloud api core stub duplicate export#11857
lalalune merged 1 commit into
developfrom
codex/fix-cloud-api-core-stub

Conversation

@odilitime

Copy link
Copy Markdown
Collaborator

Summary

Removes the duplicate runWithTrajectoryPurpose export from the Cloudflare @elizaos/core compatibility stub. The latest develop Cloud CF Deploy failure is in the Verify Worker step: src/stubs/elizaos-core.ts redeclares runWithTrajectoryPurpose at lines 29 and 283.

The later grouped trajectory stub remains in place, so the worker bundle still has the export needed by @elizaos/shared email classification.

Verification

  • bun --check packages/cloud/api/src/stubs/elizaos-core.ts
  • bunx @biomejs/biome@2.5.2 check packages/cloud/api/src/stubs/elizaos-core.ts
  • git diff --check

Notes

A full bun install --frozen-lockfile --ignore-scripts was attempted in a sparse checkout first, but Bun requires all workspace paths to be present and failed on omitted workspaces. Expanding to a full checkout was abandoned after the Git materialization stalled locally; disk was tight at roughly 34-35 GiB free.

@odilitime odilitime added the codex label Jul 3, 2026
@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: 28f2d427-e4a9-4a50-9abd-214db6460d51

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 codex/fix-cloud-api-core-stub

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.

@lalalune
lalalune force-pushed the codex/fix-cloud-api-core-stub branch from 1a60f94 to 39a773a Compare July 3, 2026 10:11
@lalalune

lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

Validated the rebased develop fix locally in /tmp/eliza-11857-pr.

Checks run:

  • bun --check packages/cloud/api/src/stubs/elizaos-core.ts
  • bunx @biomejs/biome@2.5.2 check packages/cloud/api/src/stubs/elizaos-core.ts
  • git diff --check origin/develop...HEAD
  • rg -n "runWithTrajectoryPurpose" packages/cloud/api/src/stubs/elizaos-core.ts confirms only one export remains (lines 262/268).

This directly addresses the Cloud CF Deploy Verify Worker failure: duplicate exported variable runWithTrajectoryPurpose in the Worker stub.

@lalalune
lalalune marked this pull request as ready for review July 3, 2026 10:11

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

@lalalune
lalalune merged commit 1f0610b into develop Jul 3, 2026
39 of 93 checks passed
@lalalune
lalalune deleted the codex/fix-cloud-api-core-stub branch July 3, 2026 10:11

@NubsCarson NubsCarson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified locally against develop tip (c5e1ca5):

  • bun run --cwd packages/cloud/api typecheck on develop fails: src/stubs/elizaos-core.ts(29,17) + (283,17) TS2323/TS2393#11845 and #11847 raced the same missing-export fix into two spots.
  • With this PR's deletion applied, the same typecheck passes clean.
  • The deploy workflow's Verify Worker step runs exactly that command, so the in-flight prod deploy on main (run 28653353358, promote #11861) and the develop staging deploy (run 28653155120) will both fail at Verify Worker without this.

Admin-merging as a deploy-unblock (CI queue is saturated; change is a 15-line duplicate deletion, verified locally), then promoting to main so prod can ship.

— nubs-cloud [cloud-frontdoor]

NubsCarson added a commit that referenced this pull request Jul 3, 2026
…fuse the next promote deleting BOTH copies (#11875)

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

Co-authored-by: NubsCarson <carson@nubs.site>
NubsCarson added a commit that referenced this pull request Jul 3, 2026
… break (#11902)

After the #11861 promote, the runWithTrajectoryPurpose Worker stub was deduped
DIFFERENTLY on each branch: #11865 removed the second copy on main (kept the
top 'pass-through' one); #11857 removed the top copy on develop (kept the
other). A develop->main 3-way merge would then apply BOTH removals and drop
runWithTrajectoryPurpose entirely (verified: merge-tree yields 0 exports) —
silently re-breaking the Worker build on the next promote.

Fix: make develop's stub byte-identical to main's (single 'pass-through'
export, matching what's already deployed on prod). Future promotes are now a
no-op on this file. Functionally identical no-op stub either way.
@NubsCarson NubsCarson mentioned this pull request Jul 3, 2026
20 tasks
@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.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ PR title does not match the required pattern. Please use one of these formats:

  • 'type: description' (e.g., 'feat: add new feature')
  • 'type(scope): description' (e.g., 'chore(core): update dependencies')
    Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, release

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants