Skip to content

Commit 0b39631

Browse files
fix: add progress.Fail() to extract-criteria error paths and Start() call
Extract criteria handler was missing extractProgress.Fail() in catch blocks, causing .spectra-progress.html to stay stuck on "Extracting" if an error occurred. Also added extractProgress.Start() immediately after Reset() to eliminate the gap where no result file exists. Same fix applied to import-criteria handler. Version 1.32.1.
1 parent 4f2878d commit 0b39631

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/Spectra.CLI/Commands/Analyze/AnalyzeHandler.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public async Task<int> RunExtractCriteriaAsync(
253253
{
254254
var extractProgress = CreateExtractProgress();
255255
extractProgress.Reset();
256+
extractProgress.Start("Initializing criteria extraction...");
256257
try
257258
{
258259
var currentDir = Directory.GetCurrentDirectory();
@@ -671,11 +672,13 @@ public async Task<int> RunExtractCriteriaAsync(
671672
}
672673
catch (OperationCanceledException)
673674
{
675+
extractProgress.Fail("Operation cancelled.");
674676
Console.WriteLine("\nOperation cancelled.");
675677
return ExitCodes.Cancelled;
676678
}
677679
catch (Exception ex)
678680
{
681+
extractProgress.Fail(ex.Message);
679682
if (_outputFormat == OutputFormat.Json)
680683
{
681684
JsonResultWriter.Write(new ErrorResult
@@ -1111,11 +1114,13 @@ public async Task<int> RunImportCriteriaAsync(
11111114
}
11121115
catch (OperationCanceledException)
11131116
{
1117+
importProgress.Fail("Operation cancelled.");
11141118
Console.WriteLine("\nOperation cancelled.");
11151119
return ExitCodes.Cancelled;
11161120
}
11171121
catch (Exception ex)
11181122
{
1123+
importProgress.Fail(ex.Message);
11191124
if (_outputFormat == OutputFormat.Json)
11201125
{
11211126
JsonResultWriter.Write(new ErrorResult

src/Spectra.CLI/Spectra.CLI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<PackAsTool>true</PackAsTool>
2828
<ToolCommandName>spectra</ToolCommandName>
2929
<PackageId>Spectra.CLI</PackageId>
30-
<Version>1.32.0</Version>
30+
<Version>1.32.1</Version>
3131
<Authors>Spectra</Authors>
3232
<Description>AI-native test generation and management CLI</Description>
3333
<PackageOutputPath>./nupkg</PackageOutputPath>

src/Spectra.MCP/Spectra.MCP.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackAsTool>true</PackAsTool>
1111
<ToolCommandName>spectra-mcp</ToolCommandName>
1212
<PackageId>Spectra.MCP</PackageId>
13-
<Version>1.32.0</Version>
13+
<Version>1.32.1</Version>
1414
<Authors>Spectra</Authors>
1515
<Description>Spectra MCP Server for test execution</Description>
1616
<PackageOutputPath>./nupkg</PackageOutputPath>

0 commit comments

Comments
 (0)