Skip to content

Commit d755b70

Browse files
committed
rename
1 parent 8e58817 commit d755b70

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace GeneralUpdate.Bowl;
1414
/// If a startup crash is detected, captures a dump, exports diagnostics,
1515
/// and optionally restores the backup version.
1616
/// </summary>
17-
public sealed class Bowl
17+
public sealed class BowlBootstrap
1818
{
1919
private readonly IBowlStrategy _strategy;
2020
private readonly ICrashReporter _crashReporter;
@@ -23,9 +23,9 @@ public sealed class Bowl
2323
// ---- Constructors ----
2424

2525
/// <summary>
26-
/// Creates a Bowl instance with auto-detected platform strategy and default providers.
26+
/// Creates a BowlBootstrap instance with auto-detected platform strategy and default providers.
2727
/// </summary>
28-
public Bowl()
28+
public BowlBootstrap()
2929
: this(
3030
StrategyFactory.Create(),
3131
new CrashReporter(),
@@ -35,7 +35,7 @@ public Bowl()
3535
/// <summary>
3636
/// DI-friendly constructor for testing. All dependencies are injectable.
3737
/// </summary>
38-
internal Bowl(
38+
internal BowlBootstrap(
3939
IBowlStrategy strategy,
4040
ICrashReporter crashReporter,
4141
ISystemInfoProvider systemInfoProvider)
@@ -57,7 +57,7 @@ public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken
5757
{
5858
context = context.Normalize();
5959

60-
GeneralTracer.Info($"Bowl.LaunchAsync: monitoring '{context.ProcessNameOrId}' " +
60+
GeneralTracer.Info($"BowlBootstrap.LaunchAsync: monitoring '{context.ProcessNameOrId}' " +
6161
$"at '{context.TargetPath}', workModel={context.WorkModel}");
6262

6363
// Phase 1: Prepare child process start info
@@ -66,7 +66,7 @@ public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken
6666
{
6767
// Strategy may return null when tooling is unavailable (e.g. procdump not installed on Linux).
6868
// This is a graceful degradation, not a platform error.
69-
GeneralTracer.Warn("Bowl.LaunchAsync: strategy returned null — monitoring tool unavailable.");
69+
GeneralTracer.Warn("BowlBootstrap.LaunchAsync: strategy returned null — monitoring tool unavailable.");
7070
return new BowlResult { Success = false, ExitCode = -1, DumpCaptured = false };
7171
}
7272

@@ -78,12 +78,12 @@ public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken
7878
}
7979
catch (OperationCanceledException)
8080
{
81-
GeneralTracer.Warn("Bowl.LaunchAsync: cancelled.");
81+
GeneralTracer.Warn("BowlBootstrap.LaunchAsync: cancelled.");
8282
throw;
8383
}
8484
catch (TimeoutException)
8585
{
86-
GeneralTracer.Warn("Bowl.LaunchAsync: child process timed out.");
86+
GeneralTracer.Warn("BowlBootstrap.LaunchAsync: child process timed out.");
8787
// Treat timeout as a non-crash exit (no dump captured)
8888
return new BowlResult { Success = false, ExitCode = -1, DumpCaptured = false };
8989
}
@@ -94,7 +94,7 @@ public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken
9494

9595
if (!dumpCaptured)
9696
{
97-
GeneralTracer.Info("Bowl.LaunchAsync: no dump file found, process exited normally.");
97+
GeneralTracer.Info("BowlBootstrap.LaunchAsync: no dump file found, process exited normally.");
9898
return new BowlResult
9999
{
100100
Success = exitResult.ExitCode == 0,
@@ -104,7 +104,7 @@ public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken
104104
}
105105

106106
// Phase 4: Crash detected — run the full remediation pipeline
107-
GeneralTracer.Warn($"Bowl.LaunchAsync: crash detected, dump at {dumpPath}.");
107+
GeneralTracer.Warn($"BowlBootstrap.LaunchAsync: crash detected, dump at {dumpPath}.");
108108
return await HandleCrashAsync(context, exitResult, dumpPath!, ct);
109109
}
110110

@@ -128,7 +128,7 @@ private async Task<BowlResult> HandleCrashAsync(
128128
}
129129
catch (Exception ex)
130130
{
131-
GeneralTracer.Error("Bowl.HandleCrashAsync: crash report generation failed.", ex);
131+
GeneralTracer.Error("BowlBootstrap.HandleCrashAsync: crash report generation failed.", ex);
132132
// Continue with remaining steps even if report generation fails
133133
}
134134

@@ -143,27 +143,27 @@ private async Task<BowlResult> HandleCrashAsync(
143143
}
144144
catch (Exception ex)
145145
{
146-
GeneralTracer.Error("Bowl.HandleCrashAsync: system info export failed.", ex);
146+
GeneralTracer.Error("BowlBootstrap.HandleCrashAsync: system info export failed.", ex);
147147
}
148148

149149
// 3. Restore backup if in Upgrade mode with AutoRestore enabled
150150
if (context.AutoRestore && context.WorkModel == "Upgrade")
151151
{
152152
try
153153
{
154-
GeneralTracer.Info($"Bowl.HandleCrashAsync: restoring backup from " +
154+
GeneralTracer.Info($"BowlBootstrap.HandleCrashAsync: restoring backup from " +
155155
$"'{context.BackupDirectory}' to '{context.TargetPath}'.");
156156
StorageHelper.Restore(context.BackupDirectory, context.TargetPath);
157157
restored = true;
158-
GeneralTracer.Info("Bowl.HandleCrashAsync: restore completed.");
158+
GeneralTracer.Info("BowlBootstrap.HandleCrashAsync: restore completed.");
159159
}
160160
catch (OperationCanceledException)
161161
{
162162
throw;
163163
}
164164
catch (Exception ex)
165165
{
166-
GeneralTracer.Error("Bowl.HandleCrashAsync: restore failed.", ex);
166+
GeneralTracer.Error("BowlBootstrap.HandleCrashAsync: restore failed.", ex);
167167
}
168168
}
169169

@@ -178,7 +178,7 @@ private async Task<BowlResult> HandleCrashAsync(
178178
}
179179
catch (Exception ex)
180180
{
181-
GeneralTracer.Error("Bowl.HandleCrashAsync: post-process failed.", ex);
181+
GeneralTracer.Error("BowlBootstrap.HandleCrashAsync: post-process failed.", ex);
182182
}
183183

184184
// 5. Invoke crash callback
@@ -201,7 +201,7 @@ private async Task<BowlResult> HandleCrashAsync(
201201
}
202202
catch (Exception ex)
203203
{
204-
GeneralTracer.Error("Bowl.HandleCrashAsync: OnCrash callback failed.", ex);
204+
GeneralTracer.Error("BowlBootstrap.HandleCrashAsync: OnCrash callback failed.", ex);
205205
}
206206
}
207207

src/GeneralUpdate.Bowl/Common/git.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)