Skip to content

Fix antigravity bots + filter more noise from test result output - #5964

Merged
DanTup merged 3 commits into
masterfrom
fix-antigravity-bot
Mar 5, 2026
Merged

DanTup merged 3 commits into
masterfrom
fix-antigravity-bot

Conversation

@DanTup

@DanTup DanTup commented Mar 5, 2026

Copy link
Copy Markdown
Member

No description provided.

DanTup added 2 commits March 5, 2026 16:18
…eal executable

We need to pass the real executable (not shell script wrapper) otherwise the process spawns, but the test runner does not wait.
@DanTup DanTup added this to the v3.132.0 milestone Mar 5, 2026
@DanTup DanTup added the is testing Relates to the testing (either manual or automated) of Dart Code label Mar 5, 2026
@DanTup
DanTup requested a review from Copilot March 5, 2026 16:30
@DanTup

DanTup commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

/gemini review

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

Copy link
Copy Markdown

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 removes the which dependency and refactors the test execution logic to require absolute paths for IDE overrides. It also improves test output by filtering more noisy log messages and adding a warning when no tests are found. The changes are logical and align with the goal of improving the test infrastructure. I have one suggestion to improve the clarity of an error message in the new IDE override handling logic.

Comment thread src/test/test_all.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DanTup
DanTup merged commit dbe1649 into master Mar 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the test harness and CI configuration to make IDE override resolution more deterministic (especially for Antigravity) and to reduce noisy/irrelevant output in test logs.

Changes:

  • Require *_EXE overrides to be absolute paths (and remove which dependency).
  • Add additional output-filter patterns to suppress known noisy VS Code logs.
  • Update GitHub Actions to set ANTIGRAVITY_EXE values for Linux/macOS.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/test/test_all.ts Makes IDE override resolution stricter (absolute path) and expands output filtering patterns.
package.json Removes which dependency no longer needed by test runner logic.
.github/workflows/build-and-test.yml Sets ANTIGRAVITY_EXE in CI to align with new absolute-path override requirement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/test/test_all.ts
Comment on lines +78 to +81
ideOverride = process.env[`${originalIdeOverride.toUpperCase()}_EXE`] ?? originalIdeOverride;
if (!path.isAbsolute(ideOverride))
throw new Error(`IDE override executable (${originalIdeOverride.toUpperCase()}_EXE) must be a full absolute path (got: ${ideOverride})`);

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

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

This change makes IDE overrides a breaking behavior change for local/dev runs that previously relied on PATH resolution (eg. passing antigravity or code). If the intent is only to enforce absolute paths when using *_EXE, consider: (1) only requiring path.isAbsolute() when the *_EXE env var is set, and (2) otherwise preserving the previous PATH-based behavior (or at minimum improving the error to explain that users must set ${NAME}_EXE to an absolute path).

Suggested change
ideOverride = process.env[`${originalIdeOverride.toUpperCase()}_EXE`] ?? originalIdeOverride;
if (!path.isAbsolute(ideOverride))
throw new Error(`IDE override executable (${originalIdeOverride.toUpperCase()}_EXE) must be a full absolute path (got: ${ideOverride})`);
const envVarName = `${originalIdeOverride.toUpperCase()}_EXE`;
const envIdeOverride = process.env[envVarName];
// If an explicit *_EXE env var is provided, require it to be an absolute path.
if (envIdeOverride) {
ideOverride = envIdeOverride;
if (!path.isAbsolute(ideOverride)) {
throw new Error(`IDE override executable (${envVarName}) must be a full absolute path (got: ${ideOverride})`);
}
} else {
// No *_EXE env var; keep the original override and allow PATH-based resolution.
ideOverride = originalIdeOverride;
}

Copilot uses AI. Check for mistakes.
Comment thread src/test/test_all.ts
Comment on lines +78 to +80
ideOverride = process.env[`${originalIdeOverride.toUpperCase()}_EXE`] ?? originalIdeOverride;
if (!path.isAbsolute(ideOverride))
throw new Error(`IDE override executable (${originalIdeOverride.toUpperCase()}_EXE) must be a full absolute path (got: ${ideOverride})`);

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

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

The error message always points to (${originalIdeOverride.toUpperCase()}_EXE) even when the caller may have supplied an explicit path in ideOverrideEnv (and no env var was intended). Consider computing an envVarName separately and tailoring the message based on whether the env var was actually present (eg. 'Set ANTIGRAVITY_EXE to an absolute path …' vs 'ideOverride must be an absolute path …') to reduce confusion.

Suggested change
ideOverride = process.env[`${originalIdeOverride.toUpperCase()}_EXE`] ?? originalIdeOverride;
if (!path.isAbsolute(ideOverride))
throw new Error(`IDE override executable (${originalIdeOverride.toUpperCase()}_EXE) must be a full absolute path (got: ${ideOverride})`);
const envVarName = `${originalIdeOverride.toUpperCase()}_EXE`;
const envVarValue = process.env[envVarName];
ideOverride = envVarValue ?? originalIdeOverride;
if (!path.isAbsolute(ideOverride)) {
if (envVarValue !== undefined) {
throw new Error(`IDE override executable (${envVarName}) must be a full absolute path (got: ${ideOverride})`);
} else {
throw new Error(`IDE override must be a full absolute path (got: ${ideOverride})`);
}
}

Copilot uses AI. Check for mistakes.
Comment on lines 94 to +96
brew install --cask antigravity
echo "$(dirname "$(command -v agy)")" >> "$GITHUB_PATH"
echo "ANTIGRAVITY_EXE=agy" >> "$GITHUB_ENV"
echo "ANTIGRAVITY_EXE=/Applications/Antigravity.app/Contents/MacOS/Electron" >> "$GITHUB_ENV"

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

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

This step now sets ANTIGRAVITY_EXE to an absolute path, but still depends on command -v agy succeeding. To avoid coupling the job to an extra CLI/binary name (and potential failures if it isn’t present), consider removing the GITHUB_PATH line or guarding it, and instead validating that ANTIGRAVITY_EXE points to an executable (eg. test -x ...) so failures are actionable.

Copilot uses AI. Check for mistakes.
Comment thread src/test/test_all.ts
/To eliminate this warning, add "type": "module"/i,
/depends on UNKNOWN service agentSessions/i,
/command 'antigravity\.isFileGitIgnored' not found/i,
/An unknown error occurred. Please consult the log for more details./i,

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

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

This filter is very generic and risks hiding genuinely useful failure output (it could match extension-under-test errors too). Consider narrowing it (eg. anchor to a known VS Code logger prefix/module, or only filter when it appears alongside a specific known noisy stack trace) so real test failures remain visible.

Suggested change
/An unknown error occurred. Please consult the log for more details./i,

Copilot uses AI. Check for mistakes.
@DanTup
DanTup deleted the fix-antigravity-bot branch March 12, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is testing Relates to the testing (either manual or automated) of Dart Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants