feat: owner review 2 phase 5c: originals, local render, clean-up and the workspace settings (#18)
CI / Build and test (push) Successful in 9m26s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 8s
Release / Build, test and publish (push) Successful in 14m31s
CI / PostgreSQL 16 integration (push) Successful in 9m53s
CI / PostgreSQL 17 integration (push) Successful in 9m22s
CI / Docker image (push) Successful in 44s
Release / Server image (push) Successful in 1m36s
CI / Build and test (push) Successful in 9m26s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 8s
Release / Build, test and publish (push) Successful in 14m31s
CI / PostgreSQL 16 integration (push) Successful in 9m53s
CI / PostgreSQL 17 integration (push) Successful in 9m22s
CI / Docker image (push) Successful in 44s
Release / Server image (push) Successful in 1m36s
Originals in the workspace, local render and send home with provenance, the workspace clean-up, size limit and trash, moving the workspace folder, and the complete Settings › Workspace page (owner review 2, R8, phase 5c). One adversarial review round (35 findings, 32 fixed), a copy-cancel race fixed, 184 strings in all 38 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #18.
This commit is contained in:
1 parent
81c303f484
commit
db389a54f2
364 files changed
+17417
-595
No files matched your search
@@ -30,6 +30,30 @@ public sealed class JobPriorityQueueTests
|
||||
Assert.Equal(JobKindPriority.Low, (queue with { Levels = new Dictionary<JobKind, JobKindPriority> { [JobKind.Render] = JobKindPriority.Low } }).LevelOf(JobKind.Render));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ALocalRenderAndAWorkspaceMoveGoFirstAndSendingARenderHomeWaitsItsTurn()
|
||||
{
|
||||
var queue = new JobPriorityQueue();
|
||||
// The user waits on a local render as on a render, and Edit is held while the workspace moves.
|
||||
Assert.Equal(JobKindPriority.High, queue.LevelOf(JobKind.WorkspaceRender));
|
||||
Assert.Equal(JobKindPriority.High, queue.LevelOf(JobKind.WorkspaceMove));
|
||||
Assert.Equal(JobKindPriority.Normal, queue.LevelOf(JobKind.WorkspaceSend));
|
||||
var on = queue with { Enabled = true };
|
||||
Assert.True(on.Interrupts(JobKind.WorkspaceRender, JobKind.WorkspaceSend));
|
||||
Assert.False(on.Interrupts(JobKind.WorkspaceSend, JobKind.Scan));
|
||||
// The defaults are no change: settings store none of them, and read back as they are.
|
||||
var defaults = new Dictionary<JobKind, JobKindPriority>
|
||||
{
|
||||
[JobKind.WorkspaceRender] = JobKindPriority.High,
|
||||
[JobKind.WorkspaceSend] = JobKindPriority.Normal,
|
||||
[JobKind.WorkspaceMove] = JobKindPriority.High,
|
||||
};
|
||||
Assert.Empty(JobPriorityQueue.Changed(defaults));
|
||||
var changed = JobPriorityQueue.Changed(new Dictionary<JobKind, JobKindPriority> { [JobKind.WorkspaceSend] = JobKindPriority.Low });
|
||||
Assert.Equal("low", changed["workspace-send"]);
|
||||
Assert.Equal(JobKindPriority.Low, JobPriorityQueue.From(true, changed).LevelOf(JobKind.WorkspaceSend));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OnlyAHigherLevelInterruptsAndOnlyWhileTheQueueIsOn()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using Chronos.Core.Model;
|
||||
using Chronos.Data.Jobs;
|
||||
using Chronos.Testing;
|
||||
|
||||
namespace Chronos.Data.Tests.Jobs;
|
||||
|
||||
/// <summary>The names the jobs' kinds carry on the wire and in settings (BRIEF §14.6): stable once shipped.</summary>
|
||||
[Category("jobs")]
|
||||
public sealed class JobWireTests
|
||||
{
|
||||
[Theory]
|
||||
[Case(JobKind.WorkspaceCopy, 20, "workspace-copy")]
|
||||
[Case(JobKind.WorkspaceRender, 21, "workspace-render")]
|
||||
[Case(JobKind.WorkspaceSend, 22, "workspace-send")]
|
||||
[Case(JobKind.WorkspaceMove, 23, "workspace-move")]
|
||||
public void TheWorkspaceJobsKeepTheirValueAndName(JobKind kind, int value, string name)
|
||||
{
|
||||
Assert.Equal(value, (int)kind);
|
||||
Assert.Equal(name, JobWire.Kind(kind));
|
||||
Assert.True(JobWire.TryParseKind(name, out var parsed), name);
|
||||
Assert.Equal(kind, parsed);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EveryKindHasItsOwnName()
|
||||
{
|
||||
var names = Enum.GetValues<JobKind>().Select(JobWire.Kind).ToList();
|
||||
Assert.Equal(names.Count, names.Distinct(StringComparer.Ordinal).Count());
|
||||
Assert.False(JobWire.TryParseKind("workspace-teleport", out _));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user