refactor!: rename Titano to Chronos and move CI and releases to Gitea (#6)
CI / Build and test (push) Successful in 8m14s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 13m19s
CI / PostgreSQL 16 integration (push) Successful in 4m49s
CI / PostgreSQL 17 integration (push) Successful in 5m28s
CI / Docker image (push) Successful in 53s
Release / Server image (push) Failing after 10s

The owner renamed the product and moved the repository to the self-hosted
Gitea (https://gitea.encke-hake.ts.net/BalboSoft/Chronos) for more control,
and asked for Actions and a first automatic release with the server package
and the Windows exe (docs/requests/2026-10-23-chronos-gitea.md).

- Chronos everywhere: a byte-exact rename of contents and paths, then a
  per-language review of the forms the old name's ending had dictated.
- Gitea instead of GitHub: the update check, licence, issue and support
  links read ChronosReleasesUrl; the update check takes the highest stable
  version, offers a pre-release build its final release and reports a
  repository it cannot see as a failed check. EULA, security policy and
  Gitea issue forms live at the repository root.
- Gitea Actions for the Linux act_runner (.gitea/workflows): CI, release,
  nightly image and performance gates in the .NET SDK container with git
  checkout and the system SQLite. The release cross-compiles the Windows
  programs, checks their icon, version and DPI manifest, packs installers
  and zips, publishes the Gitea release and pushes the server image
  (REGISTRY_TOKEN). Windows-only tests run in an opt-in job on a Windows
  runner (WINDOWS_RUNNER).
- New Chronos.Tools commands: zip, gitea-release, postgres-ci (replaces the
  docker-exec script, which Gitea's service containers do not allow; the
  throw-away server runs without durability) and pe-check.
- Timed tests take their budget from TestTiming (CHRONOS_TEST_TIME_FACTOR,
  3 on the shared runner; the weekly performance gates keep theirs).

BREAKING CHANGE: programs, settings, data folders, file types, environment
variables and the Docker image use the new name; nothing is migrated from
Titano, which never had a release.

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 #6.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-23 12:45:18 +02:00
1 parent c99842cc86
commit f2b58522b9
1801 files changed
+11804 -10676

No files matched your search

+152
View File
@@ -0,0 +1,152 @@
using Chronos.Core.Advice;
using Chronos.Core.Analysis;
using Chronos.Core.Analysis.Deep;
using Chronos.Core.Export;
using Chronos.Core.Motion;
using Chronos.Core.Project;
namespace Chronos.App.Editor;
/// <summary>An advisor-decided setting of the editor, whatever its value type.</summary>
public interface IAutoSetting
{
/// <summary><see cref="AdvisorParameters"/> id.</summary>
string Id { get; }
AdvisorSection Section { get; }
bool IsAuto(ProjectSettings project);
/// <summary>Drops the manual value so the advice applies.</summary>
ProjectSettings Reset(ProjectSettings project);
}
/// <summary>
/// One <see cref="Auto{T}"/> member of the project (BRIEF §10.4) and the value the engine uses when the advisor has
/// none (<see cref="Fallback"/>, from the deep analysis when it measured one).
/// </summary>
public sealed class AutoSetting<T>(
string id,
AdvisorSection section,
Func<ProjectSettings, Auto<T>> get,
Func<ProjectSettings, Auto<T>, ProjectSettings> set,
Func<ProjectSettings, DeepAnalysisReport?, T> fallback) : IAutoSetting
where T : notnull
{
public string Id { get; } = id;
public AdvisorSection Section { get; } = section;
public Auto<T> Get(ProjectSettings project) => get(project);
public bool IsAuto(ProjectSettings project) => get(project).IsAuto;
/// <summary>The advisor's value, else what the engine uses without advice.</summary>
public T AutoValue(ProjectSettings project, DeepAnalysisReport? deep) => get(project) is { HasAdvice: true, AutoValue: { } advised } ? advised : fallback(project, deep);
/// <summary>The value in force.</summary>
public T Effective(ProjectSettings project, DeepAnalysisReport? deep) => get(project).Resolve(fallback(project, deep));
/// <summary>Touching the control: the value becomes manual.</summary>
public ProjectSettings WithManual(ProjectSettings project, T value) => set(project, get(project).WithManual(value));
public ProjectSettings Reset(ProjectSettings project) => set(project, get(project).Reset());
}
/// <summary>The Auto settings of the editor's sections, in panel order.</summary>
public static class EditorSettings
{
public static readonly AutoSetting<TimingMode> TimingMode = new(AdvisorParameters.TimingMode, AdvisorSection.Timing,
p => p.Timing.Mode, (p, a) => p with { Timing = p.Timing with { Mode = a } }, (_, _) => Core.Project.TimingMode.Constant);
/// <summary>Playback rate; without a value it equals the export frame rate (DECISIONS: export fps vs playback rate).</summary>
public static readonly AutoSetting<string> FrameRate = new(AdvisorParameters.FrameRate, AdvisorSection.Timing,
p => p.Timing.FrameRate, (p, a) => p with { Timing = p.Timing with { FrameRate = a } },
(p, _) => FrameRateText.Format(ExportResolver.Resolve(p.Export).FrameRate));
public static readonly AutoSetting<bool> Deflicker = new(AdvisorParameters.Deflicker, AdvisorSection.Exposure,
p => p.Exposure.Deflicker, (p, a) => p with { Exposure = p.Exposure with { Deflicker = a } }, (_, _) => false);
public static readonly AutoSetting<int> DeflickerWindow = new(AdvisorParameters.DeflickerWindow, AdvisorSection.Exposure,
p => p.Exposure.DeflickerWindow, (p, a) => p with { Exposure = p.Exposure with { DeflickerWindow = a } },
(_, deep) => deep?.Flicker.RecommendedWindow ?? DeflickerOptions.Default.Window);
public static readonly AutoSetting<double> DeflickerStrength = new(AdvisorParameters.DeflickerStrength, AdvisorSection.Exposure,
p => p.Exposure.DeflickerStrength, (p, a) => p with { Exposure = p.Exposure with { DeflickerStrength = a } }, (_, _) => DeflickerOptions.Default.Strength);
public static readonly AutoSetting<RegionMode> Regions = new(AdvisorParameters.Regions, AdvisorSection.Exposure,
p => p.Exposure.Regions, (p, a) => p with { Exposure = p.Exposure with { Regions = a } }, (_, _) => RegionMode.Off);
public static readonly AutoSetting<bool> HolyGrail = new(AdvisorParameters.HolyGrail, AdvisorSection.Exposure,
p => p.Exposure.HolyGrail, (p, a) => p with { Exposure = p.Exposure with { HolyGrail = a } }, (_, _) => false);
public static readonly AutoSetting<int> TransitionLength = new(AdvisorParameters.TransitionLength, AdvisorSection.Exposure,
p => p.Exposure.TransitionLength, (p, a) => p with { Exposure = p.Exposure with { TransitionLength = a } },
(_, deep) => deep?.Exposure.TransitionLength ?? new HolyGrailOptions().SingleStepTransitionFrames);
public static readonly AutoSetting<bool> WhiteBalance = new(AdvisorParameters.WhiteBalanceSmoothing, AdvisorSection.Exposure,
p => p.Exposure.WhiteBalanceSmoothing, (p, a) => p with { Exposure = p.Exposure with { WhiteBalanceSmoothing = a } }, (_, _) => false);
public static readonly AutoSetting<bool> MotionBlur = new(AdvisorParameters.MotionBlur, AdvisorSection.Motion,
p => p.Motion.MotionBlur, (p, a) => p with { Motion = p.Motion with { MotionBlur = a } }, (_, _) => false);
public static readonly AutoSetting<double> ShutterAngle = new(AdvisorParameters.TargetShutterAngle, AdvisorSection.Motion,
p => p.Motion.TargetShutterAngle, (p, a) => p with { Motion = p.Motion with { TargetShutterAngle = a } }, (_, _) => 180.0);
public static readonly AutoSetting<FlowQualitySetting> FlowQuality = new(AdvisorParameters.FlowQuality, AdvisorSection.Motion,
p => p.Motion.FlowQuality, (p, a) => p with { Motion = p.Motion with { FlowQuality = a } }, (_, _) => FlowQualitySetting.Balanced);
public static readonly AutoSetting<bool> Stabilize = new(AdvisorParameters.Stabilize, AdvisorSection.Motion,
p => p.Motion.Stabilize, (p, a) => p with { Motion = p.Motion with { Stabilize = a } }, (_, _) => false);
public static readonly AutoSetting<double> StabilizeSmoothing = new(AdvisorParameters.StabilizeSmoothing, AdvisorSection.Motion,
p => p.Motion.StabilizeSmoothing, (p, a) => p with { Motion = p.Motion with { StabilizeSmoothing = a } }, (_, _) => new StabilizerOptions().SmoothingSigma);
public static readonly AutoSetting<string> Aspect = new(AdvisorParameters.Aspect, AdvisorSection.Camera,
p => p.Camera.Aspect, (p, a) => p with { Camera = p.Camera with { Aspect = a } }, (_, _) => "source");
public static readonly AutoSetting<string> ExportPreset = new(AdvisorParameters.ExportPreset, AdvisorSection.Export,
p => p.Export.Preset, (p, a) => p with { Export = p.Export with { Preset = a } }, (_, _) => ExportResolver.DefaultPresetId);
public static IReadOnlyList<IAutoSetting> All { get; } =
[
TimingMode, FrameRate, Deflicker, DeflickerWindow, DeflickerStrength, Regions, HolyGrail, TransitionLength, WhiteBalance,
MotionBlur, ShutterAngle, FlowQuality, Stabilize, StabilizeSmoothing, Aspect, ExportPreset,
];
/// <summary>"Reset": every Auto setting of <paramref name="section"/> back to Auto; stacking (no advice) back to off.</summary>
public static ProjectSettings ResetSection(ProjectSettings project, AdvisorSection section)
{
ArgumentNullException.ThrowIfNull(project);
foreach (var setting in All)
{
if (setting.Section == section) project = setting.Reset(project);
}
return section == AdvisorSection.Stack ? project with { Stack = new StackSettings() } : project;
}
/// <summary>True when every Auto setting of <paramref name="section"/> is in Auto.</summary>
public static bool IsSectionAuto(ProjectSettings project, AdvisorSection section) =>
All.Where(s => s.Section == section).All(s => s.IsAuto(project));
/// <summary>
/// Whether <paramref name="setting"/> applies under the switches in force: the deflicker window, strength and regions
/// with deflicker on, the transition length with holy grail on, the shutter angle with motion blur on, the flow quality
/// with motion blur or interpolated timing, the stabiliser's smoothing with stabilisation on. A setting that does not
/// apply shows n/a in its row (which cannot be taken over by hand then), and the Edit path asks nothing about it.
/// </summary>
public static bool Applies(IAutoSetting setting, ProjectSettings project, DeepAnalysisReport? deep)
{
ArgumentNullException.ThrowIfNull(setting);
ArgumentNullException.ThrowIfNull(project);
return setting.Id switch
{
AdvisorParameters.DeflickerWindow or AdvisorParameters.DeflickerStrength or AdvisorParameters.Regions => Deflicker.Effective(project, deep),
AdvisorParameters.TransitionLength => HolyGrail.Effective(project, deep),
AdvisorParameters.TargetShutterAngle => MotionBlur.Effective(project, deep),
AdvisorParameters.FlowQuality => MotionBlur.Effective(project, deep) || TimingMode.Effective(project, deep) == Core.Project.TimingMode.Interpolated,
AdvisorParameters.StabilizeSmoothing => Stabilize.Effective(project, deep),
_ => true,
};
}
}