Files
Chronos/README.md
T
Alby96andClaude Opus 5.5 19265b36c2 build: debug the Windows programs from VS Code
F5 in VS Code now starts Titano, the Uploader and the server under the C#
extension's debugger, as well as the --capture runs, Titano.Tools and the test
programs. Each configuration builds in Debug first and starts the program's
.exe rather than its .dll, because the programs read Environment.ProcessPath
(Setup's payload, the Run keys and tray icons). The server's session keeps its
data and archive in out/debug/server instead of %ProgramData% and
C:\TitanoArchive.

The build tasks use no reused MSBuild nodes, whose cached drive-letter case
made every F5 build restore and C# Dev Kit reload, and keep MSB3026 (a copy
that succeeds on a retry) a warning so a file held for a moment no longer
stops F5.

Design-time builds skip the icon generation, which on a fresh clone ran a
Titano.Tools.dll that did not exist yet (MSB3073 in VS Code), and log WPF's
MC1000 about projects not built yet as a message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:53:12 +02:00

10 KiB
Raw Blame History

Titano (development repository)

Time-lapse ecosystem: Titano (Windows desktop client), Titano Server (Linux/Docker and Windows) and Titano Uploader (Windows), sharing one C#/.NET 10 engine with zero third-party packages. This repository is private; users get releases, the Docker image and the Unraid template from the public releases repository.

Build, test, run

Requirements: the .NET SDK pinned in global.json. Windows builds and runs everything; Linux builds everything (the Windows projects for compile checking) and runs Core, Data, Protocol, Server and Tools.

dotnet build Titano.slnx -c Release

# Tests (one program per area; --filter text|category:name, --junit file, --verbose)
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

# PostgreSQL integration tests (16 or 17); the MD5, cleartext, trust and TLS tests also read TITANO_TEST_PG_MD5,
# _CLEARTEXT, _TRUST, _TLS=1 and _ROOT_CERT (.github/scripts/postgres-ci-setup.sh prepares a server for them)
TITANO_TEST_PG="Host=127.0.0.1;Port=5432;Database=titano_test;Username=titano;Password=…;SslMode=disable" \
  dotnet run --project tests/Titano.Data.Tests -c Release

# Performance gates (500,000-photo library, 100,000-frame rebuild; minutes)
TITANO_PERF=1 dotnet run --project tests/Titano.Data.Tests -c Release -- --filter category:perf --verbose

# Checks run by CI
dotnet run --project src/Titano.Tools -- package-guard
dotnet run --project src/Titano.Tools -- i18n check
dotnet run --project src/Titano.Tools -- xaml-lint
dotnet format whitespace Titano.slnx --verify-no-changes
dotnet run --project src/Titano.Tools -- screenshots diff out/screenshots   # Windows, after --capture (tests/visual/baselines/README.md)

# CC0 RAW samples for the decoder tests (tests/fixtures/manifest.json explains how to fill in URLs)
dotnet run --project src/Titano.Tools -- fixtures

Run:

dotnet run --project src/Titano.Server          # admin panel https://localhost:8443/admin
src/Titano.App/bin/Release/net10.0-windows/Titano.exe [--capture <folder>]
src/Titano.Uploader/bin/Release/net10.0-windows/Titano.Uploader.exe
docker compose -f deploy/docker/docker-compose.yml up -d

The server reads /data/server.json (TITANO_DATA_PATH) and TITANO_* environment variables; Titano.Server --help lists them. On Linux it needs PostgreSQL; on Windows it defaults to SQLite.

Debug in VS Code (Windows)

Open the repository folder with the C# extension (.vscode/extensions.json recommends it), pick a configuration in Run and Debug and press F5. Each launch configuration builds in Debug first (.vscode/tasks.json).

Configuration Starts
Titano, Titano Uploader The desktop programs, with their usual data folder (%LOCALAPPDATA%\Titano)
Titano Server The server on SQLite, ports 8080 and 8443, data and archive in out/debug/server; then opens the admin panel
… (screenshots) --capture out/screenshots of Titano, the Uploader or Setup
Titano.Tools The command line it asks for (i18n check by default)
Tests The test program and runner options it asks for (--filter, --parallel 1, …), after building the solution
Attach to process Nothing: attaches to a running process picked from a list
  • Sessions run side by side: start the next one with the green Start button in Run and Debug once the previous build has finished (F5 starts a session only when none runs). Tests rebuilds the programs too, so stop their sessions first when the code has changed.
  • Quit an installed Titano or Uploader first: a second copy hands over to it and ends. Debugging the Uploader points an existing Start with Windows entry at the Debug build. Closing the Uploader's window keeps it in the tray (the default): end its session with Stop.
  • Stop the Docker stack or an installed Titano Server before Titano Server, which needs the same ports. The browser warns about the server's self-signed certificate; sign in as admin with the temporary password in out/debug/server/data/initial-admin-password.txt.
  • Titano, the Uploader and Setup log to files (%LOCALAPPDATA%\Titano\logs, %TEMP%\Titano Setup); the server logs to the Debug Console. Windows Firewall asks about Titano, the Uploader and the server at their first start.
  • VS Code passes the drive letter in lower case: the first build after one made with an upper-case drive letter (another terminal, Visual Studio) restores and recompiles everything.

CI

Workflow When What
.github/workflows/ci.yml push to main, pull requests Windows + Linux build (warnings are errors), all tests, package guard, i18n check, XAML lint, format check, YAML check of workflows and public issue forms, CC0 fixtures (a warning per missing sample), screenshots (--capture, also pushed to the ci-screenshots branch for same-repository PRs) and their pixel diff against tests/visual/baselines, Windows program artifacts, installer test (install, run, upgrade in place, uninstall), PostgreSQL 16/17 integration (SCRAM, MD5, cleartext, trust, TLS), Docker image smoke test
.github/workflows/docker.yml nightly ghcr.io/<owner>/titano-server:nightly (multi-arch)
.github/workflows/perf.yml weekly, manual Performance gates on SQLite and PostgreSQL 17; timings in the job summary
.github/workflows/release.yml tag v*, manual re-publish The release (below)

Release process

  1. Make sure main is green and docs/CHANGELOG.md / docs/STATUS.md are up to date.
  2. Tag and push: git tag v0.2.0 && git push origin v0.2.0 (pre-releases: v0.2.0-rc.1; they are published as GitHub pre-releases, get no :latest image and are ignored by the in-app update check).
  3. release.yml then:
    • validates the tag, builds with TitanoVersion from the tag and runs every test on Windows;
    • publishes self-contained single-file programs, signs them when signing secrets exist, packs Titano-Setup-<v>.exe and Titano-Uploader-Setup-<v>.exe (Titano.Tools pack-installer), signs the setups, zips Titano-Server-win-x64-<v>.zip and Titano-win-x64-portable-<v>.zip;
    • writes release notes from the Conventional Commits since the previous tag (Titano.Tools changelog); a stable tag starts from the previous stable tag, so its notes include what its release candidates brought;
    • once the Windows tests passed, builds and pushes ghcr.io/<owner>/titano-server:<v> for amd64 and arm64;
    • computes SHA256SUMS, checks the public issue forms, creates (or updates) the GitHub release in the public repository, then moves the image's :latest tag and updates the public repository content (README, EULA, i18n/, SHA256SUMS). :latest, Latest and the content follow the newest stable release: a pre-release, or an older tag published again, only gets its release and its :<v> image. Until the first stable release exists, every tag updates the content.
  4. To publish an existing tag again (for example after adding a secret), run Release manually with the tag.

Secrets and variables

Name Kind Purpose
RELEASES_TOKEN secret Fine-grained PAT with Contents: read and write on the public releases repository. Without it the release is created in this (private) repository, which clients cannot see.
RELEASES_REPO variable (optional) owner/name of the public repository; default <owner>/titano-releases. release.yml passes it to every build as the TitanoReleasesRepo MSBuild property, so the update check, licence and issue links of the binaries read the repository the release goes to (local builds default to alby96/titano-releases).
SIGN_PFX_BASE64 secret (optional) Base64 of the Authenticode code-signing certificate (.pfx). Without it builds are unsigned.
SIGN_PASSWORD secret (optional) Password of that .pfx.

GITHUB_TOKEN pushes the image to GHCR and moves its :latest tag; no other secret is used.

Bootstrapping the public releases repository

  1. Create a public repository named titano-releases under the same owner (or set RELEASES_REPO), with a README so it has a default branch. Enable Issues and Private vulnerability reporting (Settings › Security).
  2. Create the fine-grained PAT (repository access: only that repository; permissions: Contents read/write) and store it as the RELEASES_TOKEN secret of this repository.
  3. Push a pre-release tag (v0.1.0-rc.1). The release job copies deploy/releases-repo/ (README, EULA draft, SECURITY policy, issue forms), the Unraid template and its icon, the compose file and .env.example, the dark screenshots, i18n/ and the latest SHA256SUMS into the public repository after creating the release with the installers, rewriting links to its name and default branch.
  4. After the first image push, open the titano-server package on GHCR › Package settings and set its visibility to Public (GitHub offers no API for this; the release summary reminds you).
  5. Have the EULA draft (deploy/releases-repo/EULA.md) reviewed before the first stable release.
  6. In Unraid, add https://github.com/<owner>/titano-releases under Docker › Template repositories to validate the template.

Repository layout

src/        Titano.Core, Core.Windows, Data, Protocol, Server, Ui, App, Uploader, Setup, Tools
tests/      Titano.Testing and one test program per area; fixtures/ (manifest of CC0 samples)
i18n/       <culture>/<Area>.resx string catalogs, GLOSSARY.md
deploy/     docker/ (Dockerfile, compose), unraid/ (template), releases-repo/ (public repository content)
branding/   SVG masters of the icons
docs/       BRIEF, ARCHITECTURE, DECISIONS, STATUS, CHANGELOG, ui/