Commit Graph
27 Commits
Author SHA1 Message Date
Claude bdcd4e42ae test(server): the busy-log test writes a line a millisecond, never in a tight loop
Engine code of every test server in the process logs through the last server
started (Log.SetSink is process-wide), so the busy-log test's file lock is
shared with the classes running alongside: a loop that re-took it at once kept
a job engine of JobApiTests waiting to log a failure, and its job "running"
past the 15 s deadline (once in 40 loaded runs). The test now fills the log
with a few megabytes up front, so sending it takes a while, and adds a line
about every millisecond during the downloads; it still fails every run against
the old endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 22:03:31 +00:00
Claude 5aa7ed1e6f test(server): the busy-log test writes only to the server's log file
Its logging loop also went to the console, whose lock the loggers of the test
classes running alongside share: a job engine waiting to log a failure kept
JobApiTests' job "running" past its 15 s deadline. The loop now writes through
the server's file logger on a thread of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 21:36:24 +00:00
Claude 9f03c07fdf fix(server): the current log downloads while the server keeps writing it
GET /api/v1/logs/files/{name} served the file with Results.File, which sets
Content-Length from the file's size and then copies it to its end. The current
log grows whenever the server logs, so a line written meanwhile made Kestrel
abort the response ("too many bytes written"); AdminTests failed on it once in
three full runs. The endpoint now sends the bytes the file held when it was
listed through FileResponses.Serve, a fixed-length, range-capable slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 21:19:30 +00:00
Claude 9c00977dab test(render-node): read the node's last beat after its empty claim was answered
The heartbeat check slept 300 ms to get past the claim that finds the queue
empty and then gave heartbeats 400 ms to move the node's last sign of life: a
slow runner could fail it, or pass it on the claim's own touch. It now counts
the claims the server answered, reads the last beat after the third one, waits
for a later beat with a deadline and checks that no claim came since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 21:11:27 +00:00
Claude 9566818fd6 test(sync): the server event test waits for the comparison the edit starts
ServerEventsUpdateThisPcWithoutWaitingForTheNextComparison polled until the
server's settings reached the local copy, then expected the row in sync; the
link that records the agreement is stored after the local copy, so the row
could still read LocalAhead (1 failure in 15 loaded runs). It now waits for
SyncService.Changed, raised once the comparison stored every link and state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-06 21:11:27 +00:00
Claude 10a9db9c91 merge: client server mode (sync engine, Server screen sync table and conflicts, Library sync glyphs, render transfers)
Keeps the render node host from the processing branch and disposes the sync
host after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 10:38:05 +00:00
Claude 8396aada66 merge: analysis and render jobs, render node client and server managed fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 10:34:30 +00:00
Claude 2d40a613b9 fix(sync): resolve conflicts against the versions shown, isolate failures, renders on request
- Conflicts are settled against the versions the user was shown; a later change on
  either side refuses the choice and compares again. Title, tags, rating and notes
  changed differently on both sides are a conflict too (no silent tag union).
- Links are written under the engine's gate and forgotten only after a 404; linked
  local copies are read by id; unlinked copies with the same originals are linked
  by content.
- A failure on one sequence is recorded on its link; the others are still compared.
- Downloads hash unverified local copies first and restore originals missing here.
- Background proxy downloads give way to the user's requests; "Keep proxies offline"
  refreshes the caches of sequences opened with proxies, checks free space and backs
  off after a failure.
- Renders travel on request: Send exports (chunked, hash-verified upload keeping the
  render id; new POST /sequences/{id}/renders endpoints) and Get exports.
- Server screen: stable row buttons, mockup column grid, Tab through rows, conflict
  rows first on the card colour, localised conflict detail, Save both confirmation,
  Pause metered uploads, culture switch, Library one-word sync glyphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 10:26:56 +00:00
Claude 03da77277c fix(diagnostics): scrub whole passwords; unique bundle names; no temporary files left behind
- A secret value runs to the next ';' or the end of the line unless quoted
  (backslash and doubled-quote escapes), so passwords with spaces, commas or
  quotes never leak in part; URL passwords run to the last '@' before the path.
- Desktop bundles get " (2)", " (3)"… instead of overwriting one made in the
  same minute, and a bundle that fails half-way deletes its .tmp file.
- The server builds its bundle in a temporary file that no crash leaves behind
  (DeleteOnClose on Windows, unlinked at once elsewhere).
- Tests: passwords with spaces, commas, quotes and '@'; a DbConnectionString in
  the server bundle; bundle name collisions and failure cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 10:05:45 +00:00
Claude 1585b88e63 test(render-node): heartbeat assertion starts after the last claim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 09:49:35 +00:00
Claude 5cac49efea fix(render-node): a dropped proxy download starts over instead of resuming
Originals are resumed from their partial file because their SHA-256 checks
the result. Proxies have no hash on the server and can be rebuilt between
two attempts, so appending to what a dropped attempt left could mix two
versions; a retry now fetches the proxy whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 09:42:19 +00:00
Claude 4007293833 feat(server): render MP4 jobs no render node can take as MJPEG, and say so
BRIEF §14.7: the server falls back to managed formats when no node is
available and says so in the job log. An MP4 job waits for render nodes at
least the node timeout, then as long as an online node can encode its codec
at its size; after that the server's engine takes it and writes each output
it cannot encode as MJPEG in AVI at the same size and frame rate, with a job
log line. A job the server started resumes there. Selective acceptance is
asynchronous for that; when node availability cannot be read the job keeps
waiting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 09:39:17 +00:00
Claude 1e255fb075 fix(render-node): match job sizes per encoder; blank batch entries name no preset
A node announced one size limit, the largest of all its encoders (managed
MJPEG at 65535 px), so it claimed H.264 jobs larger than its H.264 encoder
takes. Each offered encoder now carries its own limit and the server matches
codec and size per encoder; the node-wide limit is the largest offered one,
for encoders that announce none. A hand-written batch with null or blank
entries no longer throws when a job is posted or examined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-03 09:39:17 +00:00
Claude c7ca1ef463 fix(processing): concurrent renders keep their own names; analysis status under the lock; server announces changes
A render reserves the output name it picks, so the same preset queued twice
no longer overwrites one output with the other; render rows take ids from
their job and entry, so a resumed job recognises only its own outputs and
never deletes another render's file. A light pass records its status under
the sequence lock and cannot clear a deep pass's. Renders and Auto value
changes made by the server engine publish sequenceChanged events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 23:16:23 +00:00
Claude 23c40ece6f fix(render-node): a restarted node frees its job; downloads resume; batches split on arrival
A node registering again gives back the job its previous run abandoned, so
a restart within the heartbeat timeout no longer leaves it running forever.
Frame downloads retry dropped connections from the partial file; a 404 at
registration waits for the next poll; render remarks reach the job log; a
render the server engine started stays with it. POST /jobs splits a batch
into one job per preset, and a node fails a batch it cannot send back
instead of reporting it done. Renders honour Settings > Rendering: hardware
encoders only where the preference allows them, also for what a node offers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 23:16:23 +00:00
Claude c02d1867d0 test(sync): upload, download, resume, proxies and live events against the real server
The first original of an upload now creates the server sequence through its
session key (the archive ingest files API-created empty sequences nowhere), and
settings sent after an upload are retried when the server's own analysis edits
the new sequence meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 22:44:20 +00:00
Claude 2650aa31fb feat(diagnostics): scrubbed diagnostics bundles on the desktop and the server
SecretScrubber removes passwords, tokens, keys, cookies, authorisation
headers, URL credentials and private-key blocks from text and JSON;
DiagnosticsArchive zips reports, settings, failed jobs and log tails through
it. The desktop bundle (Settings > Advanced, About) now adds the codec and
encoder inventory, the settings and recent failed jobs; the server serves
the same as GET /api/v1/server/diagnostics (ManageArchive, audited), linked
from admin > Logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 22:29:26 +00:00
Claude ccb7e03fee test(processing): render node loop, batch note, complete partial downloads
A light analysis that overlaps a deep one of the same sequence re-reads the
report before recording its status, so it neither drops the deep status nor
undercounts warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 17:07:54 +00:00
Claude db98385eb0 feat(app): render node follows the opt-in and the server session
RenderNodeHost starts, restarts or stops this PC's render node in order and
off the UI thread whenever the opt-in, the session or the index changes;
a node that cannot start is retried by the next change and exit stops it.
The server test covers managed renders on the server and MP4 jobs left
queued for render nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 17:05:43 +00:00
Claude 14cdbf1f7d feat(processing): selective render claims, analysis follow-ups, per-sequence failures
- JobEngine: ISelectiveJobHandler lets a host decline jobs of a kind it runs;
  declined jobs stay queued for other claimers without holding up the rest.
  JobContext.EnqueueFollowUpAsync queues follow-up work on the same engine.
- Server renders the jobs whose every output a managed encoder produces
  (ManagedRenderJobHandler); MP4 jobs stay for render nodes. Program.cs
  registers ProcessingModule next to ArchiveModule. Server renders ignore a
  client's export folder.
- Light analysis is queued after imports and after scans that indexed new
  sequences, so the advisor's Auto values exist without user action.
- Analysis jobs log a failing sequence and go on; the job then fails and a
  retry analyses only the failed ones. The advised frame rate follows the
  user's fit-to duration.
- ProcessingJobs.RenderEach splits a batch into one job per preset for
  servers; render nodes say which batch presets they did not render, fetch
  each content once and stop on a changed certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 17:01:50 +00:00
Claude fee198f627 wip(processing): analysis and render job handlers, render node client (interrupted)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 16:33:27 +00:00
Claude f4e2f285a9 fix(server): Windows startup test asks for PostgreSQL; TITANO_LOG_LEVEL
The connection-string test built options with the platform default,
which is SQLite on Windows, so it parsed a file path as a PostgreSQL
connection string. The server gains a log level setting
(TITANO_LOG_LEVEL, also in compose and the Unraid template); the test
servers log warnings only, which cuts the suite's output from 511 to 80
lines so failures stay findable in CI logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 13:20:03 +00:00
Claude ac9a150027 feat(server): run on the real archive engine
ArchiveModule registers the archive engine as the server's ingest, its
proxy/thumbnail locator and its job handlers (through the new
IJobHandlerProvider); Program.cs passes it to ServerHost.Build. The
server opens its archive through ArchiveService so archive.json always
exists. The server's path-safety helper is renamed ArchivePathGuard to
stop clashing with the archive layout's ArchivePaths, and the server
migration is renumbered 0003. An end-to-end test uploads a photo, finds
it in the layout and fetches the thumbnail built by the queued job.
CI's PostgreSQL jobs now run the server tests too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 13:00:38 +00:00
Claude 80b91d0585 test(server): auth, uploads, ranges, sync, jobs, render nodes, events
Covers bootstrap admin, sign-in failure, lockout and rate limit, token
revocation and expiry, 401 versus 403, CSRF on cookie sessions, the error
shape and API header, chunked upload happy path, resume, hash
short-circuit, damaged chunk, quota, Range on originals, thumbnails and
exports, path traversal, settings_version conflicts, job state
transitions with a fake handler, render node claim, heartbeat timeout and
reassignment, output upload, WebSocket progress events, the discovery
beacon, the Windows service command line and status rules, and a
PostgreSQL run (TITANO_TEST_PG).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 12:28:47 +00:00
Claude c78747053e feat(server): API v1 with auth, uploads, sync, jobs, render nodes and events
- Security: PBKDF2-SHA512 (210,000 iterations) hashes, opaque bearer tokens
  stored as SHA-256 with sliding expiry and revocation, HttpOnly/Secure/
  SameSite=Strict admin cookie with a session-bound CSRF token, sign-in rate
  limit and lockout, role/permission metadata on every endpoint, audit log,
  first-run administrator bootstrap.
- Sequences with keyset paging, ETags and settings_version conflicts; sync
  manifest; frames, proxies, thumbnails and exports streamed with Range.
- Chunked resumable uploads with hash short-circuit, quota and disk checks,
  staging on the archive volume, SHA-256 verification and IArchiveIngest.
- Job engine host, jobs API, render nodes with heartbeat timeout and
  reassignment, WebSocket events, LAN discovery beacon, upload cleanup.
- Windows service host over advapi32 (--service, --install-service,
  --uninstall-service); fails fast without the archive module services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 11:32:19 +00:00
Claude c40b6a7cd3 feat: Phase 0 shells, design system, server skeleton, Docker and CI
- Titano.Ui: DESIGN.md tokens (dark/light), generated 16-px icon set,
  styles for all standard controls, custom chrome window with snap
  layouts, rail, job bar, Auto/manual slider, chips, toasts.
- Titano desktop shell with sections, Settings (language, theme),
  About and a --capture screenshot mode.
- Titano Server skeleton: env/server.json configuration, self-signed
  TLS with fingerprint, /health, /server/info, i18n endpoint and the
  embedded admin panel; in-process server tests.
- Docker image (multi-arch, PUID/PGID, health check), compose file,
  Unraid template; CI, release and nightly workflows; changelog tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 09:35:03 +00:00
Claude 83a54fb57b chore: bootstrap repository foundation
Solution layout, build rules with zero-package guard, in-house test
framework, localization runtime, brand mark rasteriser with ICO/PNG
generation, Core contracts (imaging, video, domain model, TIFF reader),
Titano.Tools (make-icon, i18n, xaml-lint, package-guard) and docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 08:59:40 +00:00