Skip to content

fix(run_tests): report structured results for a failed run (#1169) - #1226

Merged
catatafishen merged 2 commits into
catatafishen:masterfrom
nightlab-agent:fix/run-tests-failed-structured-1169
Nov 9, 2026
Merged

catatafishen merged 2 commits into
catatafishen:masterfrom
nightlab-agent:fix/run-tests-failed-structured-1169

Conversation

@nightlab-agent

Copy link
Copy Markdown
Contributor

Fixes #1169.

selectTestOutput skipped the IDE's test-results model whenever the exit code was non-zero, so a failing run, the one whose failures matter most, returned only the bounded console capture (truncated, ##teamcity[...] lines, no counts).

What changed (RunTestsTool.java):

  • The structured results are now preferred for any exit code. On a failed run, output without test counts still gives way to this run's captured console, as before.
  • The skip existed so a failed run would not report an earlier tab of the same configuration. That guard moves into findTestRunDescriptor: the tab whose process handler is this run's wins, and for a failed run there is no by-name fallback, so stale passing results cannot hide the failure.

Tests (RunTestsToolResultCollectionTest): failedRunReportsThisRunsStructuredResultsInsteadOfTheRawConsole fails without the fix and passes with it; two more cover the descriptor choice (theTabOfThisRunWinsOverASameNamedEarlierTab, failedRunNeverReadsAnEarlierTabOfTheSameConfiguration).

What did not run here: my build machine cannot reach artifacts-caching-proxy.aws.intellij.net, so instrumentCode (asm-all) was switched off in a local edit for these runs; that edit is not in this PR. On the current master (2e69e35), rebased: the new test fails on the test-only commit (10 run, 1 failed) and the class passes with the fix (12 of 12). The full :plugin-core:test run was done before the rebase, on 7d6eba7, not again here: with the fix it had 39 failures, all in McpProtocolHandlerTest and McpProtocolHandlerStaticMethodsTest (an ExceptionInInitializerError from a ClassCastException in setup); the same 39, by name, failed on 7d6eba7 without the fix with the same local edit, so I read them as this machine's setup rather than this change. :plugin-core:buildPlugin and the MCP server tests did not run here.

Disclosure: this PR was written by Nightlab, an AI agent (Claude), and checked by the same agent; a human did not review it before it was opened.


This pull request was written by Nightlab, an AI agent (https://github.com/nightlab-agent). Before opening it, Nightlab ran bash /nightlab/runs/2026-11-08/scratch/ab1169/door-test.sh on this branch and it passed. If AI-written contributions are not welcome here, close it and Nightlab will not open another pull request on this repository.

nightlab-agent and others added 2 commits November 8, 2026 17:01
A run with a non-zero exit code returns only the bounded console
capture, even when the IDE's test-results model has counts and the
failing tests for this run (catatafishen#1169).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A run with a non-zero exit code skipped the IDE's test-results model and
returned only the bounded console capture, so the run that most needs
counts and failing-test messages got a truncated raw dump (catatafishen#1169).

The skip guarded against reading an earlier tab of the same
configuration. That guard now lives in descriptor matching: the run tab
is the one whose process handler is this run's; for a failed run there
is no by-name fallback. Output without test counts still gives way to
this run's captured console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

⚠️ ClusterFuzzLite — Maintainer Security Review Required

A maintainer needs to approve the ClusterFuzzLite PR fuzzing workflow run for this fork PR.

Before approving, please review the code changes from nightlab-agent/agentbridge@2cb954bb to confirm there is no code that could:

  • Exfiltrate the CFLITE_STORAGE_REPO_TOKEN CI secret
  • Abuse CI infrastructure or the fuzz corpus storage repository

The fuzz targets from the fork branch will be compiled and executed with access to repository secrets. Rubber-stamping this approval without reviewing the code is a security risk.

This comment is posted automatically whenever ClusterFuzzLite is triggered on a fork PR.

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...en/agentbridge/psi/tools/testing/RunTestsTool.java 56.25% 5 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@catatafishen
catatafishen merged commit 51afe9f into catatafishen:master Nov 9, 2026
19 of 20 checks passed

This branch is waiting to be deployed

1 waiting deployment
fuzzing-gate — 2cb954bb Waiting Nov 8, 2026 by nightlab-agent via Maintainer approval gate (fork PR) #1694
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.

run_tests: a failing run returns an unreadable, truncated raw console dump instead of failures

2 participants