Stufe 4c (#764): Bezeichner auf Englisch - Typen, Methoden, Felder, Parameter, Locals, Testnamen

Mit Roslyn umbenannt (Verweise folgen, Zeichenketten bleiben unberuehrt).
Nicht umbenannt, weil gespeichert oder ueber die API gebunden (Stufe 4e):
Properties, Record-Parameter, Enum-Member sowie die Parameter der
Endpunkt-Handler (Routen-/Query-Bindung ueber den Namen). Die JSON-Felder
anonymer Objekte bleiben ausdruecklich benannt (JsonFilter: pfad).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-10-04 13:18:43 +02:00
co-authored by Claude Opus 5.5
parent 837a634a22
commit 77062facc9
190 changed files with 4813 additions and 4813 deletions
+37 -37
View File
@@ -620,7 +620,7 @@ public sealed class SqliteStorage
cmd.ExecuteNonQuery();
Nachruesten(connection);
AddMissingColumns(connection);
}
/// <summary>
@@ -631,58 +631,58 @@ public sealed class SqliteStorage
/// only the next <c>INSERT</c> that names it fails — in operation, at the
/// user's, not at the developer's with the fresh file.</para>
/// </summary>
private static void Nachruesten(SqliteConnection connection)
private static void AddMissingColumns(SqliteConnection connection)
{
// #554: Pairs the "started" entry with its completion.
SpalteErgaenzen(connection, "AuditLog", "CallId", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "AuditLog", "CallId", "TEXT NOT NULL DEFAULT ''");
// #716: What happened when the budget refused a run.
SpalteErgaenzen(connection, "Tasks", "BudgetMissCount", "INTEGER NOT NULL DEFAULT 0");
SpalteErgaenzen(connection, "Tasks", "LastBudgetMissAt", "TEXT NULL");
SpalteErgaenzen(connection, "Tasks", "DeferredUntil", "TEXT NULL");
SpalteErgaenzen(connection, "Tasks", "CatchUpPending", "INTEGER NOT NULL DEFAULT 0");
AddColumnIfMissing(connection, "Tasks", "BudgetMissCount", "INTEGER NOT NULL DEFAULT 0");
AddColumnIfMissing(connection, "Tasks", "LastBudgetMissAt", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "DeferredUntil", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "CatchUpPending", "INTEGER NOT NULL DEFAULT 0");
// #725: a trigger's address name, the human's instruction for every delivery, and its tasks' priority.
SpalteErgaenzen(connection, "InboundTriggers", "Slug", "TEXT NOT NULL DEFAULT ''");
SpalteErgaenzen(connection, "InboundTriggers", "Instruction", "TEXT NOT NULL DEFAULT ''");
SpalteErgaenzen(connection, "InboundTriggers", "Priority", "INTEGER NOT NULL DEFAULT 3");
SpalteErgaenzen(connection, "InboundTriggers", "Fields", "TEXT NOT NULL DEFAULT '[]'");
SpalteErgaenzen(connection, "InboundTriggers", "Strict", "INTEGER NOT NULL DEFAULT 1");
AddColumnIfMissing(connection, "InboundTriggers", "Slug", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "InboundTriggers", "Instruction", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "InboundTriggers", "Priority", "INTEGER NOT NULL DEFAULT 3");
AddColumnIfMissing(connection, "InboundTriggers", "Fields", "TEXT NOT NULL DEFAULT '[]'");
AddColumnIfMissing(connection, "InboundTriggers", "Strict", "INTEGER NOT NULL DEFAULT 1");
// #684: Who created a task — decides its board when nobody in particular is assigned.
SpalteErgaenzen(connection, "Tasks", "CreatedBy", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "Tasks", "CreatedBy", "TEXT NOT NULL DEFAULT ''");
// #714: The task a task serves — the goal chain.
SpalteErgaenzen(connection, "Tasks", "ParentId", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "Tasks", "ParentId", "TEXT NOT NULL DEFAULT ''");
// #697: The run a delegated run came from.
SpalteErgaenzen(connection, "RunReceipts", "CallerRunId", "TEXT NULL");
AddColumnIfMissing(connection, "RunReceipts", "CallerRunId", "TEXT NULL");
// #697: Where a task came from — the run, and the task that run worked on.
SpalteErgaenzen(connection, "Tasks", "OriginRunId", "TEXT NOT NULL DEFAULT ''");
SpalteErgaenzen(connection, "Tasks", "OriginTaskId", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "Tasks", "OriginRunId", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "Tasks", "OriginTaskId", "TEXT NOT NULL DEFAULT ''");
// #717: Fill work — a deadline instead of an appointment, the author's estimate, and
// when a human was asked because no room was found.
SpalteErgaenzen(connection, "Tasks", "FillBy", "TEXT NULL");
SpalteErgaenzen(connection, "Tasks", "EstimateUsd", "TEXT NULL");
SpalteErgaenzen(connection, "Tasks", "FillAlertedAt", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "FillBy", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "EstimateUsd", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "FillAlertedAt", "TEXT NULL");
// #717: A large task got its planning run — split or special budget, the agent proposed.
SpalteErgaenzen(connection, "Tasks", "LargePlannedAt", "TEXT NULL");
AddColumnIfMissing(connection, "Tasks", "LargePlannedAt", "TEXT NULL");
// #717: Runs that drew on a special budget — outside the daily limits, visible apart.
SpalteErgaenzen(connection, "RunUsage", "BudgetPot", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "RunUsage", "BudgetPot", "TEXT NOT NULL DEFAULT ''");
// #686: who takes part in a meeting, in the order they speak.
SpalteErgaenzen(connection, "Tasks", "Participants", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "Tasks", "Participants", "TEXT NOT NULL DEFAULT ''");
// #712: the runtime, and whether a subscription paid — 0 $ is not "free".
SpalteErgaenzen(connection, "RunUsage", "Runtime", "TEXT NOT NULL DEFAULT ''");
SpalteErgaenzen(connection, "RunUsage", "OnSubscription", "INTEGER NOT NULL DEFAULT 0");
SpalteErgaenzen(connection, "RunReceipts", "BudgetPot", "TEXT NULL");
AddColumnIfMissing(connection, "RunUsage", "Runtime", "TEXT NOT NULL DEFAULT ''");
AddColumnIfMissing(connection, "RunUsage", "OnSubscription", "INTEGER NOT NULL DEFAULT 0");
AddColumnIfMissing(connection, "RunReceipts", "BudgetPot", "TEXT NULL");
// #687: a lead that may decide a staged call instead of the human, until when, and its inbox task.
SpalteErgaenzen(connection, "StagedCalls", "Approver", "TEXT NULL");
SpalteErgaenzen(connection, "StagedCalls", "ApproverUntil", "TEXT NULL");
SpalteErgaenzen(connection, "StagedCalls", "ApproverTaskId", "TEXT NULL");
AddColumnIfMissing(connection, "StagedCalls", "Approver", "TEXT NULL");
AddColumnIfMissing(connection, "StagedCalls", "ApproverUntil", "TEXT NULL");
AddColumnIfMissing(connection, "StagedCalls", "ApproverTaskId", "TEXT NULL");
// Finds open calls at startup without reading the whole table.
using var index = connection.CreateCommand();
@@ -703,19 +703,19 @@ public sealed class SqliteStorage
/// first. The default is mandatory: a <c>NOT NULL</c> column without a
/// default value cannot be added to a filled table.</para>
/// </summary>
private static void SpalteErgaenzen(SqliteConnection connection, string tabelle, string spalte, string definition)
private static void AddColumnIfMissing(SqliteConnection connection, string tabelle, string column, string definition)
{
using (var pruefen = connection.CreateCommand())
using (var check = connection.CreateCommand())
{
pruefen.CommandText = $"SELECT COUNT(*) FROM pragma_table_info('{tabelle}') WHERE name = @spalte";
pruefen.Parameters.AddWithValue("@spalte", spalte);
check.CommandText = $"SELECT COUNT(*) FROM pragma_table_info('{tabelle}') WHERE name = @spalte";
check.Parameters.AddWithValue("@spalte", column);
if (Convert.ToInt32(pruefen.ExecuteScalar()) > 0)
if (Convert.ToInt32(check.ExecuteScalar()) > 0)
return;
}
using var ergaenzen = connection.CreateCommand();
ergaenzen.CommandText = $"ALTER TABLE {tabelle} ADD COLUMN {spalte} {definition}";
ergaenzen.ExecuteNonQuery();
using var toAdd = connection.CreateCommand();
toAdd.CommandText = $"ALTER TABLE {tabelle} ADD COLUMN {column} {definition}";
toAdd.ExecuteNonQuery();
}
}