test(tools): fixtures annotations and exit codes; docs for this round
- New Titano.Tools.Tests program (CI and release run it): the warning annotation escapes workflow-command characters, and a missing fixture fails the command unless --allow-missing is given. - ARCHITECTURE, STATUS, CHANGELOG and README describe the portable update package, resumable and cancellable download, the release ordering, the rebuild gate in the §1.1 shape and the new numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
11 files changed
+86
-15
No files matched your search
@@ -82,6 +82,9 @@ jobs:
|
||||
- name: Test · Server
|
||||
run: dotnet run --project tests/Titano.Server.Tests -c Release --no-build -- --junit out/junit/server.xml
|
||||
|
||||
- name: Test · Tools
|
||||
run: dotnet run --project tests/Titano.Tools.Tests -c Release --no-build -- --junit out/junit/tools.xml
|
||||
|
||||
- name: Test · Core.Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: dotnet run --project tests/Titano.Core.Windows.Tests -c Release --no-build -- --junit out/junit/core-windows.xml
|
||||
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
- name: Build and test
|
||||
run: |
|
||||
dotnet build Titano.slnx -c Release -p:TitanoVersion="$VERSION" -p:TitanoReleasesRepo="$RELEASES_REPO"
|
||||
for t in Core Data Server Core.Windows App; do
|
||||
for t in Core Data Server Tools Core.Windows App; do
|
||||
dotnet run --project "tests/Titano.$t.Tests" -c Release --no-build -- --junit "out/junit/$t.xml"
|
||||
done
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ dotnet build Titano.slnx -c Release
|
||||
dotnet run --project tests/Titano.Core.Tests -c Release -- --junit out/core.xml
|
||||
dotnet run --project tests/Titano.Data.Tests -c Release
|
||||
dotnet run --project tests/Titano.Server.Tests -c Release
|
||||
dotnet run --project tests/Titano.Tools.Tests -c Release
|
||||
dotnet run --project tests/Titano.Core.Windows.Tests -c Release # Windows
|
||||
dotnet run --project tests/Titano.App.Tests -c Release # Windows
|
||||
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
<Project Path="tests/Titano.Data.Tests/Titano.Data.Tests.csproj" />
|
||||
<Project Path="tests/Titano.Server.Tests/Titano.Server.Tests.csproj" />
|
||||
<Project Path="tests/Titano.App.Tests/Titano.App.Tests.csproj" />
|
||||
<Project Path="tests/Titano.Tools.Tests/Titano.Tools.Tests.csproj" />
|
||||
</Folder>
|
||||
</Solution>
|
||||
@@ -63,7 +63,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
|
||||
|
||||
| Host | Composition root | What it runs |
|
||||
|---|---|---|
|
||||
| Titano (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Titano` (or `.\data` when portable); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`); diagnostics bundle |
|
||||
| Titano (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Titano` (or `.\data` when portable); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`, `About/UpdateFlow`: the setup, or the portable zip for a portable copy, verified against `SHA256SUMS`, resumable, cancellable, failing after 60 s without data); diagnostics bundle |
|
||||
| Titano Server | `Server/Hosting/ServerHost.Build` | Options from `server.json` + `TITANO_*`; PostgreSQL (or SQLite on Windows); `ArchiveModule` then `ProcessingModule` register job handler providers; `JobEngineHost` (never claims renders); `RenderNodeService`/`RenderNodeMonitor`; `UploadService`; `EventHub` (WebSocket); embedded admin panel; LAN discovery beacon; Windows service host |
|
||||
| Titano Uploader | `Uploader/App.xaml.cs` | `TitanoClient`, persisted queue, watch folders; no database |
|
||||
| Titano Setup | `Setup/Program` | TPK1 payload extraction, registry, shortcuts, silent mode, uninstaller |
|
||||
@@ -149,8 +149,8 @@ snapshot when fresh). Writers coordinate through lease files, so a desktop and a
|
||||
- IDs are UUIDv7 (`Guid.CreateVersion7()`); timestamps UTC; capture times are camera wall-clock with an optional
|
||||
offset.
|
||||
- The only OS actions the programs perform are those of BRIEF §8.6: open a URL and show a folder or file in Explorer
|
||||
(`ShellActions` in the App), the format-volume dialog (`Core.Windows/Devices`). Downloaded updates are shown in
|
||||
Explorer, never started.
|
||||
(`ShellActions` in the App), the format-volume dialog (`Core.Windows/Devices`). Downloaded updates (the setup, or
|
||||
the portable zip for a portable copy) are shown in Explorer, never started.
|
||||
|
||||
## 6. Tests
|
||||
|
||||
@@ -164,8 +164,10 @@ snapshot when fresh). Writers coordinate through lease files, so a desktop and a
|
||||
committed); tests depending on them skip when absent and CI shows a warning per missing sample.
|
||||
- Fuzz tests: truncate and corrupt valid inputs at many offsets; assert no exception escapes.
|
||||
- Performance gates (`tests/Titano.Data.Tests/Perf`, `[Category("perf")]`, run only with `TITANO_PERF=1`): the
|
||||
500,000-photo library (Library open < 1 s, filters < 200 ms) on SQLite and PostgreSQL, and the 100,000-frame
|
||||
rebuild from sidecars. `.github/workflows/perf.yml` runs them weekly against PostgreSQL 17.
|
||||
500,000-photo library (Library open < 1 s on a new connection pool, filters < 200 ms; the OS cache is warm from
|
||||
building it) and the 100,000-frame rebuild from sidecars (400 sequences of 250 real photos, every column compared,
|
||||
< 120 s), each on SQLite and PostgreSQL. `.github/workflows/perf.yml` runs them weekly against PostgreSQL 17.
|
||||
- `Titano.Tools.Tests` covers the tools whose output CI relies on (fixtures annotations and exit codes).
|
||||
|
||||
## 7. Localization
|
||||
|
||||
|
||||
+9
-4
@@ -51,8 +51,9 @@ commits follow Conventional Commits (release notes are generated from them by `T
|
||||
- Titano desktop: shell with rail, job bar and toasts; Welcome, Library (virtualised grid and list, filters, sort,
|
||||
hover scrubbing), Jobs, Server (trust-on-first-use sign-in, DPAPI token), Settings (general, archive, rendering
|
||||
with encoder inventory and self-test, storage, server, updates, advanced) and About; `--capture` screenshots.
|
||||
- Update check against the public releases repository and **Download**: the setup is fetched into
|
||||
`%TEMP%\Titano\updates`, verified against the release's `SHA256SUMS` and shown in Explorer.
|
||||
- Update check against the public releases repository and **Download**: the setup (the portable zip for a portable
|
||||
copy) is fetched into `%TEMP%\Titano\updates`, verified against the release's `SHA256SUMS` and shown in Explorer;
|
||||
an interrupted download resumes, *Cancel* stops it, and a transfer that stalls for 60 s fails.
|
||||
- Diagnostics bundle (Settings › Advanced, About): environment, codec and encoder inventory, scrubbed settings,
|
||||
recent failed jobs and logs.
|
||||
- Titano Server: configuration from `server.json` and `TITANO_*`, TLS (auto, PEM, proxy), API v1 (auth, users,
|
||||
@@ -72,11 +73,15 @@ commits follow Conventional Commits (release notes are generated from them by `T
|
||||
- Release workflow: tests, self-contained publish, optional Authenticode signing, installers, portable and server
|
||||
zips, `SHA256SUMS`, release notes from Conventional Commits, multi-arch GHCR image, and the public releases
|
||||
repository (README, EULA draft, SECURITY policy, issue forms, Unraid template, compose file, screenshots, `i18n/`).
|
||||
- Performance gates (`perf.yml`, weekly): 500,000-photo library on SQLite and PostgreSQL 17, 100,000-frame rebuild
|
||||
from sidecars.
|
||||
- Performance gates (`perf.yml`, weekly): 500,000-photo library and 100,000-frame rebuild from sidecars (every
|
||||
column compared), each on SQLite and PostgreSQL 17.
|
||||
- `Titano.Tools.Tests`: the fixtures command's warning annotations and exit codes.
|
||||
|
||||
### Fixed
|
||||
- Release workflow: signing and the public-repository publish never ran (step conditions cannot read the step's own
|
||||
secrets); the publish job lacked the .NET SDK for `make-icon`; re-publishing an existing tag failed; the portable
|
||||
zip lacked `portable.txt`.
|
||||
- CI fixtures step reported missing RAW samples as a silent pass; it now emits a warning per missing sample.
|
||||
- Release workflow: the server image and its `:latest` tag were pushed before the Windows tests passed, and
|
||||
publishing an older tag again moved `:latest` back; the image now follows the tests and `:latest` the newest
|
||||
stable release. Stable release notes started at the last release candidate instead of the previous stable tag.
|
||||
+5
-5
@@ -6,8 +6,8 @@ Phase plan: docs/BRIEF.md §22. Windows behaviour is verified on CI (`windows-la
|
||||
|---|---|
|
||||
| 0 Bootstrap | Done: solution, rules, Titano.Testing, zero-package guard, i18n, WPF shell, server skeleton, Docker, icons, CI. |
|
||||
| 1 Metadata and imaging | Done: metadata parsers, managed codecs, native RAW development (DNG, CR2, NEF, ARW, PEF, RAF), WIC provider and codec inventory, decode tiers, thumbnails and proxies, `diagnose`. Real-camera fixtures wait for verified raw.pixls.us URLs (CI warns per missing sample). |
|
||||
| 2 Data layer and archive | Done: SQLite binding, PostgreSQL wire client, migrations, repositories, job engine, archive layout, sidecars, scan, rebuild, verify, duplicates, orphans, adopt, mass rename. Gate measured: a 100,000-frame archive rebuilds from sidecars into the identical index in 1.1 s (budget 120 s). |
|
||||
| 3 Library and Archive manager | Library, Jobs, Settings, Welcome, Server and About screens done; Archive manager screen in progress. Gate measured on 500,000 photos: Library open 313 ms cold on SQLite, 162 ms on PostgreSQL (budget 1 s); every filter, search, sort and next page ≤ 8.4 ms (budget 200 ms). |
|
||||
| 2 Data layer and archive | Done: SQLite binding, PostgreSQL wire client, migrations, repositories, job engine, archive layout, sidecars, scan, rebuild, verify, duplicates, orphans, adopt, mass rename. Gate measured: a 100,000-frame archive (400 sequences of 250 photos) rebuilds from sidecars into an index identical in every column in 1.8 s on SQLite and 4.7 s on PostgreSQL (budget 120 s). |
|
||||
| 3 Library and Archive manager | Library, Jobs, Settings, Welcome, Server and About screens done; Archive manager screen in progress. Gate measured on 500,000 photos: Library open 259 ms on SQLite and 181 ms on PostgreSQL on a new connection pool (warm OS cache; budget 1 s); every filter, search, sort and next page ≤ 6.4 ms (budget 200 ms). |
|
||||
| 4 Card import | Engine done (plan, sessions, hash-verified copy, verified erase, import jobs); screen in progress. |
|
||||
| 5 Analysis advisor | Engine done (light and deep analysis, advisor, presets, analysis jobs); editor integration in progress. |
|
||||
| 6 Engine, encoding, editor | Render pipeline, MP4/AVI/GIF/APNG/image sequences, Media Foundation H.264/HEVC/AV1 done; sequence editor in progress. |
|
||||
@@ -26,10 +26,10 @@ docker compose -f deploy/docker/docker-compose.yml up -d # server +
|
||||
TITANO_PERF=1 dotnet run --project tests/Titano.Data.Tests -c Release -- --filter category:perf --verbose # performance gates
|
||||
```
|
||||
|
||||
- Diagnostics: Settings › Advanced › *Export bundle* (desktop) or admin panel › Logs › *Diagnostics* (server,
|
||||
- Diagnostics: Settings › Advanced › Diagnostics › *Export bundle* (desktop) or admin panel › Logs › *Diagnostics* (server,
|
||||
`GET /api/v1/server/diagnostics`). Open the zip: logs, reports, settings and failed jobs, no passwords or tokens.
|
||||
- Update download: About › *Check for updates*, then *Download* when a newer release exists; the verified setup
|
||||
appears in Explorer.
|
||||
- Update download: About › *Check for updates*, then *Download* when a newer release exists; the verified setup (the
|
||||
portable zip in a portable copy) appears in Explorer. *Cancel* stops it; the next *Download* resumes.
|
||||
|
||||
## Next steps (Phase 8 gate)
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<RootNamespace>Titano.Tools</RootNamespace>
|
||||
<AssemblyName>Titano.Tools</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="Titano.Tools.Tests" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Titano.Core\Titano.Core.csproj" />
|
||||
<ProjectReference Include="..\Titano.Data\Titano.Data.csproj" />
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using Titano.Testing;
|
||||
using Titano.Tools.Commands;
|
||||
|
||||
namespace Titano.Tools.Tests;
|
||||
|
||||
/// <summary>The fixtures command reports a sample it cannot fetch instead of passing silently (BRIEF §20.2).</summary>
|
||||
public sealed class FixturesCommandTests(TestContext context)
|
||||
{
|
||||
[Test]
|
||||
public void TheWarningAnnotationNamesTheFixtureAndEscapesWorkflowCommandCharacters()
|
||||
{
|
||||
var entry = new FixturesCommand.Entry("canon-eos-r5.cr3", new Uri("https://raw.pixls.us/data/Canon/EOS%20R5/IMG_0001.CR3"), null, null, "Cr3");
|
||||
var line = FixturesCommand.Annotation("tests/fixtures/manifest.json", entry, "Response status code 404, 100% missing\r\nretry later.");
|
||||
Assert.Equal(
|
||||
"::warning file=tests/fixtures/manifest.json,title=RAW fixture missing::canon-eos-r5.cr3 (Cr3) could not be fetched from " +
|
||||
"https://raw.pixls.us/data/Canon/EOS%2520R5/IMG_0001.CR3: Response status code 404, 100%25 missing%0D%0Aretry later. " +
|
||||
"Its decode tests are skipped. Replace the url in the manifest (see its 'instructions').",
|
||||
line);
|
||||
Assert.True(FixturesCommand.Annotation("a:b,c.json", entry, "x").StartsWith("::warning file=a%3Ab%2Cc.json,title=", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AMissingFixtureFailsTheCommandUnlessMissingFilesAreAllowed()
|
||||
{
|
||||
var folder = context.CreateTempDirectory();
|
||||
var manifest = Path.Combine(folder, "manifest.json");
|
||||
// Port 1 refuses the connection at once (or the proxy answers with an error): the fixture stays missing.
|
||||
await File.WriteAllTextAsync(manifest, """
|
||||
{ "files": [ { "name": "missing.dng", "url": "https://127.0.0.1:1/missing.dng", "sha256": null, "size": null, "format": "Dng" } ] }
|
||||
""");
|
||||
var output = Path.Combine(folder, "external");
|
||||
|
||||
Assert.Equal(1, await new FixturesCommand().RunAsync(["--manifest", manifest, "--out", output]));
|
||||
Assert.Equal(0, await new FixturesCommand().RunAsync(["--manifest", manifest, "--out", output, "--allow-missing"]));
|
||||
Assert.FileMissing(Path.Combine(output, "missing.dng"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using Titano.Testing;
|
||||
|
||||
namespace Titano.Tools.Tests;
|
||||
|
||||
internal static class TestMain
|
||||
{
|
||||
public static Task<int> Main(string[] args) => TestRunner.RunAsync(args, typeof(TestMain).Assembly);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Titano.Tools.Tests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Titano.Testing\Titano.Testing.csproj" />
|
||||
<ProjectReference Include="..\..\src\Titano.Tools\Titano.Tools.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in new issue
Block a user