fix(app-core): stabilize embed auth tests#10660
Conversation
|
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 |
|
Reviewed #10660 locally at Validation run:
No merge from me because this PR is still draft and required GitHub checks are queued. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…tmerge-auth-tests
|
Updated #10660 onto latest Current-base validation after merge:
Pushed current-base branch so GitHub checks restart without the stale cancelled contexts from the earlier ready-for-review transition. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…tmerge-auth-tests
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Refreshed onto current Local validation on the refreshed branch:
Diff against latest |
|
Reviewed current head This looks scoped correctly: production still defaults to the core Validation run in an isolated worktree:
No code changes from me on this PR. Current GitHub checks are still queued/pending, so I’m leaving merge to the normal green-check path. |
…tmerge-auth-tests
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Refreshed again onto current Local validation on the refreshed branch:
Diff against latest |
Summary
@elizaos/coremocking from embed handshake testsEmbedLaunchDepshook so tests can injecthasRoleAccesswhile production keeps the real core role checkRoot cause
After #10638/#10643/#10653 landed on
develop, the combined app-core embed/auth test run failed under the shared Vitest module cache. The handshake tests mocked@elizaos/coreglobally, but other files could import the real module first, so accepted OWNER/ADMIN cases failed asinsufficient_role.Validation
bun run build:corebun run --cwd packages/app-core test src/api/embed-auth-routes.test.ts src/api/auth/embed-session-auth.test.ts src/api/auth/embed-session-token.test.ts src/api/auth/embed-handshake.test.ts src/api/auth/discord-exchange.test.ts src/api/auth/embed-end-to-end.test.tsbun run --cwd packages/app test src/embed-bootstrap.test.tsbun run --cwd plugins/plugin-discord test __tests__/slash-commands.test.tsbun run --cwd plugins/plugin-telegram test src/messageManager.embed-launch.test.tsbun run --cwd packages/app-core buildbunx biome check --write packages/app-core/src/api/auth/embed-handshake.ts packages/app-core/src/api/auth/embed-handshake.test.ts packages/app-core/src/api/auth/embed-end-to-end.test.ts