Skip to content

ci: test CI#48

Closed
fi3ework wants to merge 1 commit intorstackjs:mainfrom
fi3ework:ci-test
Closed

ci: test CI#48
fi3ework wants to merge 1 commit intorstackjs:mainfrom
fi3ework:ci-test

Conversation

@fi3ework
Copy link
Member

@fi3ework fi3ework commented Feb 5, 2026

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 @rstest/core package to a specific development URL, synchronizes the lockfile to reflect this change and an upgrade of @rsbuild/core, and refines a test file by removing an unused utility import. These changes are geared towards ensuring the continuous integration pipeline functions correctly with updated or custom dependency versions.

Highlights

  • Dependency Update: The @rstest/core dependency has been updated in package.json to point to a specific development build URL, likely for testing purposes within the CI environment.
  • Lockfile Synchronization: The pnpm-lock.yaml file has been updated to reflect the new @rstest/core dependency URL and to upgrade @rsbuild/core from version 1.7.2 to 1.7.3.
  • Test File Refinement: The tests/prebundle.test.ts file has been modified to remove the rs utility from its @rstest/core import and to comment out related environment stubbing calls, indicating a change in how testing utilities are used or exposed.

🧠 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
  • package.json
    • Updated the @rstest/core dependency from a version range (^0.8.2) to a direct URL pointing to a specific build.
  • pnpm-lock.yaml
    • Updated the specifier and version for @rstest/core to match the new direct URL.
    • Removed the entry for @rsbuild/core@1.7.2.
    • Updated the dependency of @rstest/core from @rsbuild/core@1.7.2 to @rsbuild/core@1.7.3.
  • tests/prebundle.test.ts
    • Removed the rs utility from the import statement for @rstest/core.
    • Commented out calls to rs.stubEnv and rs.unstubAllEnvs() within the chalk test case.
Activity
  • No specific activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@fi3ework fi3ework closed this Feb 5, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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",

Choose a reason for hiding this comment

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

critical

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.

Comment on lines +22 to +28
// 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();

Choose a reason for hiding this comment

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

high

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;
      }

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