Conversation
Summary of ChangesHello @fi3ework, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on internal CI adjustments and dependency management. It updates the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request appears to be for testing a new version of @rstest/core in the CI environment, given the title "ci: test CI". The changes update the dependency to point to a specific commit URL and adapt the test code to changes in the @rstest/core API. While these changes are understandable for testing purposes, they introduce issues that should be addressed before merging into a main branch. My review includes a critical comment about using a direct URL for a dependency in package.json and a high-severity comment on a potentially flaky test in tests/prebundle.test.ts with a suggested fix.
| "@astrojs/sitemap": "^3.7.0", | ||
| "@rslib/core": "0.19.4", | ||
| "@rstest/core": "^0.8.2", | ||
| "@rstest/core": "https://pkg.pr.new/web-infra-dev/rstest/@rstest/core@7b64c24bad5a4691753ee91eb695bba40e7cf1be", |
There was a problem hiding this comment.
Using a direct URL to a specific commit for a dependency is not recommended for merging into a main branch. This approach is brittle, as the commit can become unavailable, and it bypasses standard package versioning, making dependency management and security auditing difficult. While this might be acceptable for temporary CI testing, it should be reverted to a proper version from a package registry before merging.
| // rs.stubEnv('FORCE_COLOR', '1'); | ||
| const mod = await loadBundledModule(distPath); | ||
| const chalkInstance = mod.default ?? mod; | ||
| const message = chalkInstance.hex('#00ff88')('prebundle-ready'); | ||
| expect(message).toContain('prebundle-ready'); | ||
| expect(message).toContain('\u001b['); | ||
| rs.unstubAllEnvs(); | ||
| // rs.unstubAllEnvs(); |
There was a problem hiding this comment.
Commenting out rs.stubEnv and rs.unstubAllEnvs without providing an alternative makes this test less reliable. The test still asserts that chalk produces color codes, but without FORCE_COLOR=1, chalk's color output will depend on the environment where the tests are run, which can lead to flaky tests.
If rs.stubEnv is no longer available, you should manually set and restore the environment variable to ensure the test is deterministic. Using a try...finally block is recommended to ensure the environment is cleaned up even if assertions fail.
const originalForceColor = process.env.FORCE_COLOR;
try {
process.env.FORCE_COLOR = '1';
const mod = await loadBundledModule(distPath);
const chalkInstance = mod.default ?? mod;
const message = chalkInstance.hex('#00ff88')('prebundle-ready');
expect(message).toContain('prebundle-ready');
expect(message).toContain('\u001b[');
} finally {
process.env.FORCE_COLOR = originalForceColor;
}
to test https://github.com/web-infra-dev/rstest/actions/runs/21700326385.