[test] Carry the v0.115.3 test suites onto the v0.115.4 structure - #6731
[test] Carry the v0.115.3 test suites onto the v0.115.4 structure#6731mmabrouk wants to merge 1 commit into
Conversation
All four pass on either branch alone and fail only once the two meet. None of them changes what the product does. - The admission suite replaced `@agenta/entities/session` wholesale, and the composer's file palette reads a real export of it. Spread the original. - The link-gate test drives the rehype list directly, so the list has to be reachable: `MD_REHYPE_PLUGINS` is exported from `ChatMarkdown` and re-exported from the desktop surface. Without it the helper fell back to Streamdown's defaults and reported the stock pipeline's verdict, which is "[blocked]" for every bare relative path. The renderer itself was always correct. - The slash-command test sat beside a hook that moved into `@agenta/chat`. It could not resolve its import and never ran at all. It moves to the package and drops the host stubs the hook now takes as props. - Two Next versions resolve in this workspace, so a test that mounts a package component cannot satisfy its `useRouter`; the app's own RouterContext is a different module. Pin one copy per vitest run.
|
@coderabbitai review |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Mahmoud Mabrouk seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe change exports ChangesMarkdown test integration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change exposes the existing markdown plugin configuration and repairs chat test setup without changing product behavior. The updated tests, typechecks, linting, and formatting checks are clean, so the change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Railway Preview Environment
|
run-web-unit-testsis red onrelease/v0.115.4: a17ae79a75Four suites pass on
release/v0.115.3and onrelease/v0.115.4separately, and fail only once the two are merged, because a v0.115.3 test now meets the surface v0.115.4 rebuilt under it. This carries them onto that structure.What was red, and why
@agenta/chattests/unit/hooks/useServerSessionInputs.test.ts@agenta/entities/sessionwholesale. The composer's file palette, which v0.115.4 added, reads a real export of it (sessionMountsQueryFamily).@agenta/ossmarkdownLinkGate.test.tsxMD_REHYPE_PLUGINSis module-private insideChatMarkdown, so the test'sgatehelper importsundefinedand silently drives Streamdown's stock pipeline instead of ours.@agenta/ossuseChatSlashCommands.test.tsx@agenta/chat, cannot resolve./useChatSlashCommands, and fails to collect. Its one test has not run since the merge.@agenta/osspermissions.test.tsxRouterContext.Provideris a different module from the one a package component'suseRouterreads.Eleven failing tests, plus one that never runs.
The link-gate row is not a product bug
Worth stating plainly, because "keeps the working-directory-relative path (#6659)" failing looks like agent file links are broken. They are not.
ChatMarkdownbuilds the plugin list and passes it toStreamdown, so a bare relative path in a reply still gets the pre-harden respelling and still resolves. Only the test's view of that list broke. The cost is that the four assertions which prove #6659 works currently prove nothing about the real pipeline, which is why they are worth repairing rather than deleting.What this changes
Five files. Everything is test-side except one line.
MD_REHYPE_PLUGINSinweb/packages/agenta-chat/src/components/ChatMarkdown.tsxgains theexportkeyword. The constant, its value and its use are untouched; the desktop surface re-exports it so the link-gate test keeps its import path.@agenta/chat, beside the hook, and drops the host stubs the hook now takes as props. Nothing is deleted.web/oss/vitest.config.tspins onenext/routerfor the run, so every copy of Next shares the router context the tests provide.Source is otherwise untouched.
After
@agenta/chat@agenta/oss@agenta/entity-ui@agenta/mobile@agenta/sessions-uiTypecheck clean on chat, sessions-ui, entity-ui, home-ui, oss, ee and mobile. Lint clean per package; mobile keeps five pre-existing warnings and no errors, in files this branch does not touch. Prettier clean.