feat: owner review 2 phase 2: scheduled jobs and log settings (#10)
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
- Jobs > Scheduled on the desktop and the admin panel. Every timer that queued work is now a visible system schedule: archive scan, upload clean-up, index backup, job-history and audit clean-ups, desktop housekeeping. New actions: verify, thumbnails, proxies, analysis, maintenance, backup, clean-ups, reports. - The scheduler: migration 0007, in-house recurrence, compare-and-set claim, catch-up, scan at start. - Log settings: levels, retention, size parts, total limit, daily or hourly rotation, audit retention, diagnostics share; the server writes Debug/Trace to its files again; logging never fails a job. Upgrade: CHRONOS_LOG_LEVEL set in an existing container locks both levels; migration 0007 is one-way. 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 #10.
This commit is contained in:
1 parent
1f089888e8
commit
af9eeaab9b
349 files changed
+28341
-1304
No files matched your search
+37
-6
@@ -109,7 +109,7 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-02 | Native RAW: the sensor saturation point only marks clipping (never rescales); white balance before demosaic, colour matrix after; highlight recovery lifts clipped channels to the unclipped mean then fades to grey; camera matrices match the exact model name; CR2 black level from masked columns; Sony as-shot WB falls back to daylight. | Per-frame white adjustment / prefix match / SR2 decryption | Per-frame rescaling would flicker a timelapse; D750 ≠ D7500. |
|
||||
| 2026-10-02 | Frame-window spill stores 32-bit floats; DNG DefaultScale stretches the axis with the larger factor; ForcePreview uses an embedded JPEG preview only when it is at least the requested size. | Half floats / shrink / always preview | Renders stay bit-identical under memory pressure; full resolution; no blurry thumbnails. |
|
||||
| 2026-10-02 | A job engine claims only kinds it has handlers for (intersected with `Kinds` when set) and starts no workers without any; crash recovery requeues the node's numbered workers (`node#0`, `node#1`, …). | Empty filter = every kind / exact node id | A host without a render handler must leave render jobs to render nodes; with several workers the old exact match never requeued crashed jobs. |
|
||||
| 2026-10-02 | Desktop: the archive engine uses WIC first, then managed decoders; the last archive is reopened at start (relinking a moved one, finishing interrupted renames) and incrementally rescanned every 10 minutes; Welcome and Library create/adopt through the archive engine and queue a full scan; failures become a toast. | File-system watchers / no periodic scan | BRIEF §7: polling by mtime/size plus manual rescan. |
|
||||
| 2026-10-02 | (Partly superseded by the 2026-10-26 system schedules rows: the rescans are the desktop's `archive-scan` schedule.) Desktop: the archive engine uses WIC first, then managed decoders; the last archive is reopened at start (relinking a moved one, finishing interrupted renames) and incrementally rescanned every 10 minutes; Welcome and Library create/adopt through the archive engine and queue a full scan; failures become a toast. | File-system watchers / no periodic scan | BRIEF §7: polling by mtime/size plus manual rescan. |
|
||||
| 2026-10-02 | Desktop thumbnails: widths rounded up to 64 px, LRU of 2000 items, at most cores/2 (2–6) decodes, "no image" cached but failures not, a decode is cancelled when its card scrolls away; job list updates batched to ~10 Hz keeping the latest per job. | Fixed size per card / update per event | Fewer decodes, bounded memory, a free UI thread during fast renders. |
|
||||
| 2026-10-02 | Server sign-in in the client: an unknown certificate fingerprint is confirmed before any password is sent, a changed certificate never receives the saved token, the token is stored only DPAPI-encrypted. | Trust on login | BRIEF §14.2. |
|
||||
| 2026-10-02 | The client update check reads the latest non-draft, non-prerelease GitHub release of `ChronosReleasesRepo` and only opens its page; Clear cache deletes only folders carrying a `.chronos-cache` marker, after confirmation; `--capture` runs on a temporary data folder with fake server, encoders and update check. | Download updates / clear any folder / real data | No external processes; never delete user data; CI never touches user data. |
|
||||
@@ -139,7 +139,7 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-03 | Renders keep their id on both sides and are offered for transfer only once the originals agree; render downloads are size-checked (the server keeps no render hash). Uploads on metered networks pause through the OS network cost API when the option is on. | Hash renders | No server field exists; uploads are hash-verified by the server. |
|
||||
| 2026-10-03 | Not built: "Free local space" (deletes originals; needs an archive-engine offload state), the footer user count (admin-only data) and "changed by" in the conflict detail (no API field). | Build them in the sync layer | Data-destroying or privacy/API choices for the owner (§0.2.7). |
|
||||
| 2026-10-03 | Update Download fetches the package for this copy (setup, or the portable zip for a portable copy), verifies it against the release's SHA256SUMS and shows it in Explorer; the user runs it. Files go to `%TEMP%\Chronos\updates\<tag>`, `.part` resumed with Range, 60 s idle timeout, Cancel; without the package or SHA256SUMS, Download opens the release page. | Start the installer as §18 says | §8.6 allows only open-URL, explore-folder and SHFormatDrive; the stricter rule wins. |
|
||||
| 2026-10-03 | Diagnostics bundles (desktop and `GET /api/v1/server/diagnostics`, ManageArchive, audited): environment, codecs and encoders, scrubbed settings or configuration, recent failed jobs (50/100), newest 14 logs (last 4 MB each); never photos. Secret-named JSON values are removed; in text a secret runs to `;` or end of line. | Remove whole lines / omit settings | Err towards removing too much while keeping bundles useful. |
|
||||
| 2026-10-03 | (Partly superseded by the 2026-10-26 log defaults row: the 4 MB are the *Diagnostics logs* setting.) Diagnostics bundles (desktop and `GET /api/v1/server/diagnostics`, ManageArchive, audited): environment, codecs and encoders, scrubbed settings or configuration, recent failed jobs (50/100), newest 14 logs (last 4 MB each); never photos. Secret-named JSON values are removed; in text a secret runs to `;` or end of line. | Remove whole lines / omit settings | Err towards removing too much while keeping bundles useful. |
|
||||
| 2026-10-03 | Public releases repo content, GitHub Latest and GHCR `:latest` follow the newest stable release; the image is pushed after the Windows tests and `:latest` moves after the GitHub release exists; public content is updated last. Stable notes start at the previous stable tag. | Tag `:latest` in the docker job | No downgrade for compose/Unraid users and nothing public before a release exists. |
|
||||
| 2026-10-03 | Perf gates (opt-in, weekly `perf.yml`): Library open through a new connection pool with warm OS cache; filters as the median of 5 runs; rebuild at one fifth of §1.1 (400 × 250 real photos, 120 s budget) on SQLite and PostgreSQL. No perf migration was needed. | Drop OS caches / full 500k files | Portable on CI runners while still catching plan and index regressions. |
|
||||
| 2026-10-03 | `fixtures --allow-missing` prints a warning annotation per missing sample and exits 0; without it, 1. `Chronos.Tools.Tests` covers tool behaviour CI relies on. | continue-on-error | CI shows the gap instead of a silent pass. |
|
||||
@@ -253,7 +253,7 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-12 | Archive › Maintenance › Restore database… opens Settings › Advanced, where the restore lives. | A second restore flow on the Archive screen | BRIEF §12.5 lists restore under Maintenance and §6.2 under Settings › Advanced: one flow reached from both places. |
|
||||
| 2026-10-12 | Background priority raises the interface thread to AboveNormal while Chronos is the active app, instead of lowering the jobs. | Lower the job threads' priority | Jobs run on shared pool threads whose priority cannot be set per job. |
|
||||
| 2026-10-12 | The quality profile maps to the render preparation long edge (Best 1024, Balanced 512, Fast 256), the read-ahead (8 for Best, else 4) and the optical-flow quality of projects that set none. | Change the spill policy per profile | Best 'doubles sampling' and Fast is for previews, as the tooltips say; spilling stays governed by the memory budget. |
|
||||
| 2026-10-12 | Index backups: a `VACUUM INTO` copy at start when the newest is a day old, then checked hourly, the newest three kept, on the desktop and on a server using SQLite. PostgreSQL servers use PostgreSQL's own tools. | A fixed nightly time | A desktop is rarely running at night, so a fixed time would rarely fire; the brief's 'nightly ×3' is met as 'daily ×3'. |
|
||||
| 2026-10-12 | (Superseded by the 2026-10-26 index backup row: the copies are the Backup jobs of the `index-backup` schedule; the daily loop is gone.) Index backups: a `VACUUM INTO` copy at start when the newest is a day old, then checked hourly, the newest three kept, on the desktop and on a server using SQLite. PostgreSQL servers use PostgreSQL's own tools. | A fixed nightly time | A desktop is rarely running at night, so a fixed time would rarely fire; the brief's 'nightly ×3' is met as 'daily ×3'. |
|
||||
| 2026-10-12 | Maintenance vacuums the SQLite index only when at least 10 % of it is free pages; the dry run reports the reclaimable size. | Vacuum on every run | Rewriting a large index for a few pages holds every writer for nothing. |
|
||||
| 2026-10-12 | Settings › Formats Install opens the Microsoft Store page of the missing extension (ms-windows-store:), falling back to its web page. | Download or bundle codecs | No external processes except OS dialogs (BRIEF §8.6); the Store is the OS route for HEIF/HEVC/RAW extensions. |
|
||||
| 2026-10-12 | Settings › Archive rows show and edit the open archive's archive.json and also seed the archives this PC creates later. The rescan interval is a PC setting. | Keep separate 'defaults for new archives' rows | One set of rows matches Settings.html; the archive is the source of truth (BRIEF §7). |
|
||||
@@ -277,11 +277,11 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-12 | Client migration 0006 adds `sync_links.diff_remote_updated_at`. While the copy may make proxies for the server (some were counted, or it holds originals the server cannot decode and this PC can), the link keeps the server's update time of the last comparison and is compared again when that time moves. | Store the ProxiesBuilt bit; a wanted-proxies counter in `SequenceDto`; in-memory only | Proxy arrivals and policy changes leave the frame counters alone, but they always change the update time through the follow-up passes. The bit misses partial arrivals and policy switches, a per-sequence counter costs the server a frame scan in every listing, and memory is lost on restart. Numbered 0006 so it does not clash with WS-C1's 0005 (renumber if another branch takes 0006). |
|
||||
| 2026-10-12 | The proxy pass drops a HEIF proxy whose long edge is under 90 % of the policy's for the frame (the frame's own size when smaller, or at full size), and the server refuses one sent that small (422 `proxy_too_small`). Frames of unknown size are not judged. | Exact size; keep the proxies earlier versions made | Earlier versions made thumbnail-sized proxies here from previews. The slack spares decoders that crop a few pixels, and a small original of unknown size would otherwise be refused forever. Older archives get the check on their next proxy pass (new frames, an arriving proxy, or a Proxies job queued by an administrator). |
|
||||
| 2026-10-12 | Render nodes skip frames flagged missing, corrupt or excluded, fetch originals the server has not hashed into the job folder with a two-attempt size check, and keep the server's Undecodable flag except for a format the server cannot decode and the node can. | Fail the job; queue a Verify first; trust only the node's decoders | The node renders the same frames as the server's own render (§11, §14.7). |
|
||||
| 2026-10-12 | The server queues an incremental archive scan at start and every 10 minutes at background priority, except while a scan or rebuild of that archive is queued, running or paused. | Rescans only when an administrator asks | BRIEF §7: polling by mtime and size, the desktop's rhythm. |
|
||||
| 2026-10-12 | (Superseded by the 2026-10-26 system schedules and scan at start rows: the `archive-scan` schedule, run once at start.) The server queues an incremental archive scan at start and every 10 minutes at background priority, except while a scan or rebuild of that archive is queued, running or paused. | Rescans only when an administrator asks | BRIEF §7: polling by mtime and size, the desktop's rhythm. |
|
||||
| 2026-10-12 | Mass rename carries the sequences nested in a folder that moves (`RenameStep.Carried`, listed in the dry run). Selected inner sequences move out first, and a target inside a sequence folder or another target is refused (`NestedRenameException`). A moving step holds the sequence leases, then the thumbnail leases, of itself and of the sequences it carries, by id, until their sidecars and index rows follow; they are journaled together. | Refuse to rename folders that hold sequences; lock only the moving sequence | The index must follow the files (§7), one sequence is never nested in another, and no ingest, editor save or thumbnail pass writes in a folder while it moves. |
|
||||
| 2026-10-12 | Sync applies the server's payload to a local sequence in one step under the sequence lease, and only while the local settings version is still the one compared. If an edit was saved in the meantime, nothing is written and the change is settled as a conflict, never overwritten. | Apply after the fact; last writer wins | BRIEF §14.5: neither side's edit is lost unseen. |
|
||||
| 2026-10-12 | Monetization is a build switch: `ChronosAdsEnabled` (Directory.Build.props, default false) is stamped into the assembly metadata and read by `ProductFeatures.AdsEnabled`; without it the usage counts consent is not shown at first run or in Settings, and the Settings search does not find it | Remove the consent until Phase 9, or a conditional-compilation constant | BRIEF §21 ships monetization disabled until the human sets `ChronosAdsEnabled=true`; assembly metadata needs no `#if`, and the setting stays ready for when it is enabled. |
|
||||
| 2026-10-12 | Job endings that raise a toast: finished renders, deep analyses, verifies, rebuilds, maintenance, uploads, moves and adoptions, and every failure except upkeep (scan, thumbnails, proxies, light analysis). Background-priority jobs, cancelled jobs, finished imports (the Import screen says them) and finished downloads (Library card, Server row) stay silent | Toast every job ending | The scan every 10 minutes and the work queued behind an import would bury the endings the user asked for (BRIEF §12.1 "toasts … for job completion"). |
|
||||
| 2026-10-12 | (Partly superseded by the 2026-10-26 desktop toasts row: a schedule's background run that fails is said, unless it is upkeep.) Job endings that raise a toast: finished renders, deep analyses, verifies, rebuilds, maintenance, uploads, moves and adoptions, and every failure except upkeep (scan, thumbnails, proxies, light analysis). Background-priority jobs, cancelled jobs, finished imports (the Import screen says them) and finished downloads (Library card, Server row) stay silent | Toast every job ending | The scan every 10 minutes and the work queued behind an import would bury the endings the user asked for (BRIEF §12.1 "toasts … for job completion"). |
|
||||
| 2026-10-12 | Finished jobs of one kind wait until no non-background job of that kind is queued or running; then one toast says how many ("12 jobs finished", action Jobs). Paused jobs do not hold the batch. Failures are said at the end of the update that brought them, several in one toast | One toast per job; also wait for paused jobs | Server › Upload all queues one upload per sequence, which made 100 toasts and 100 Windows notifications; uploads paused on a metered network would hold the batch's toast indefinitely. |
|
||||
| 2026-10-12 | A click on a Windows notification restores the window. It runs the toast's action only when the toast opts in (`Toast.RunsFromNotification`: card detected → Import, interrupted import → Resume, job finished → Open, navigation to Import or Jobs) and it is the only notification shown since the tray icon appeared | Run every toast's action; track which balloon was clicked | People click a notification to bring the window back, so a Cancel, Undo or Retry there would act before they read why; NIN_BALLOONUSERCLICK does not say which of several notifications was clicked. |
|
||||
| 2026-10-12 | Toasts also become Windows notifications while no Chronos window is active, not only while the window is minimised or hidden; Settings › General › Notifications turns them off | Only when minimised, as BRIEF §12.1 words it | A window behind another program is as unseen as a minimised one; card prompts (§12.4) and job endings would expire unseen after 8 s. |
|
||||
@@ -345,7 +345,7 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-12 | Applying a mass rename refuses (`StaleRenamePlanException`) a plan when a folder that moves holds an indexed sequence the plan does not take along. It checks before anything moves, and again under the step's leases just before each move. A resumed journal drops such a step while its folder has not moved yet. | Carry the newcomer silently; re-plan on Apply | The dry run is what the user approved (destructive operations rule). Moving an unlisted sequence would leave its index row behind (the CD-4 state). |
|
||||
| 2026-10-12 | The chunk route carries a 64 MiB request body limit (the largest chunk size a server accepts), which routing applies before authentication answers. The service also keeps the limit at least at the upload's and the server's chunk size and never lowers it. | Raise the limit only in the handler; read and discard the body on every early answer; a middleware between routing and authentication | Kestrel drains a body left unread after the answer, and closes the connection when that body exceeds the limit. A chunk sent again after a lost answer, sent to an unknown or finished upload, or sent with a revoked session then never got its 200, 404, 409, 401 or 403, and the client retried until it failed. Endpoint metadata is the framework's own hook and runs before any answer. |
|
||||
| 2026-10-12 | `PUT /api/v1/archive/settings` answers 409 `archive_policy`, with `thumbnailPolicy` or `proxyPolicy` in details, when archive.json holds a thumbnail size or proxy quality out of range that the API cannot set. | 400 (the request is valid); 409 `archive_manifest` (the file parses); normalising the values on write | The admin must correct the file, not the form. A 400, or a details value equal to a form field, would mark the valid proxy-size field invalid in the admin panel. Silently rewriting a policy another tool set is unsafe. |
|
||||
| 2026-10-12 | Desktop archive polling runs for the whole session. Each tick rescans the archive the Import and Archive screens use: the one registered at this PC's archive folder, else the first of the index. A folder chosen later (first run, Settings, relink, imported settings) is rescanned from the next tick. The start folder is reopened (relink, interrupted renames) once its archive.json is there, unless the folder changed meanwhile; a damaged or newer one is not retried. | Restart the polling loop on every folder change; keep polling the archive opened at start | One loop cannot race the code that opens the new archive, and Rescan every always reaches a live timer. A first-run session or a drive unplugged at start no longer goes without rescans. |
|
||||
| 2026-10-12 | (Superseded by the 2026-10-26 system schedules and scan at start rows: the `archive-scan` schedule follows the folder, and an archive unplugged at start is looked for every minute.) Desktop archive polling runs for the whole session. Each tick rescans the archive the Import and Archive screens use: the one registered at this PC's archive folder, else the first of the index. A folder chosen later (first run, Settings, relink, imported settings) is rescanned from the next tick. The start folder is reopened (relink, interrupted renames) once its archive.json is there, unless the folder changed meanwhile; a damaged or newer one is not retried. | Restart the polling loop on every folder change; keep polling the archive opened at start | One loop cannot race the code that opens the new archive, and Rescan every always reaches a live timer. A first-run session or a drive unplugged at start no longer goes without rescans. |
|
||||
| 2026-10-12 | When another process sharing the archive (a server's admin panel, another PC) changes archive.json, this index catches up when Settings › Archive loads it, before each rescan (desktop and server) and when the server's admin panel opens its archive form. Name, templates and proxy size are registered again from the file without the settings lease. A file that cannot be read, was written by a newer Chronos, or belongs to another archive leaves the row alone. The server serves the re-read archive only when the refresh registered a change, and never over an administrator's edit saved since it read the archive (compare-and-swap). | Read the templates from archive.json at every import and upload; refresh only at start | Imports, uploads and the admin panel use the index row, and the admin form saves every field: a stale row lasts only until the next refresh, and an edit made meanwhile registers its own row. |
|
||||
| 2026-10-12 | While the open archive's archive.json cannot be read, Settings › Archive shows the index's templates and proxy size and keeps this PC's thumbnail size, which the index does not store. | Show and save the default thumbnail policy | The stand-in 320 replaced the user's default for new archives whenever the archive was offline. |
|
||||
| 2026-10-12 | An Archive row edited (or Reset section) while the archive at a just-chosen folder is opening waits for that open. The edit then goes to the archive registered at that folder, or stays this PC's default when the folder holds none. An edit made before a later folder change still goes to the folder it was made for, and the rows show the archive at the folder chosen last. | Disable the Archive rows while the folder opens | The edit is neither lost silently nor written into another archive's shared archive.json. Nothing is disabled under the user's typing, where a field losing focus would commit anyway. |
|
||||
@@ -442,3 +442,34 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-10-26 | Desktop About becomes the last Settings page (`SettingsPage.About`); `SectionKey.About` and `AboutView` are gone and the rail keeps Settings alone at the bottom. `AboutViewModel` (now `Chronos.App.About`) stays a view model owned by the shell (`Shell.About`), not a section, so the Updates page's bindings and the update check on start are unchanged. The page shows identity only (version, build, runtime, system, licence, third-party notice, translation notice outside English) and has no Reset section; the Releases link moved to Updates › Latest version; About's own diagnostics bundle and Open data folder buttons are removed (Advanced has both). (Owner review 2, R5.) | Move `UpdateFlow` into `SettingsViewModel`; embed the old AboutView inside Settings; repeat the data folder, diagnostics and update rows on About | Smallest change that keeps every `Shell.About` binding and the update check on start; one place per action avoids duplicates inside Settings, and saving space is what the owner asked for. Nothing navigated to the About section, so no link needed redirecting. |
|
||||
| 2026-10-26 | Import › Folder… *Whole folder* (`ImportGrouping.WholeFolder`) makes one sequence per file format: camera bodies and pauses are ignored, formats are not; only the user's splits break it (the session splitter runs with no gap and a minimum of 1). The title defaults to the folder's name and fills `{title}`; a typed title wins. A repeated import gives the folder's name only to a sequence without a title: the archive applies a title only when it creates the sequence, and a server import reads the sequence first and names it only when it has none, so a rename made on the server survives (a typed title is still set). The plan row shows "Canon EOS R5 · CR3" or "2 cameras · JPEG", with both dates when the photos span several days, and a split part merges back into the part before it of the same format. Switching the grouping clears the user's splits and merges. (Owner review 2, R9.) | One sequence holding every file; one sequence per camera body | A folder shot RAW+JPEG would otherwise hold every instant twice, doubling the time-lapse; formats also decode and render differently. Bodies are ignored because the owner asked for the folder's sequence "in its entirety". |
|
||||
| 2026-10-26 | A whole folder's session key is `folder-` + the first 16 hex digits of SHA-256 of "PC name, full path (trailing separator trimmed, upper-cased on Windows), format", plus `-yyyyMMdd-HHmmss` of the first photo for a part the user split off. The grouping is not stored in card profiles: a folder starts on Sessions, and cards and drives are always planned by sessions. (Owner review 2, R9.) | Hash of path and format only; remember the grouping per folder | The same key for the same folder lets an interrupted or repeated import continue its sequence through the existing session-key lookup. The server files client uploads by session key without user scope, so the same `D:\Photos\Trip` on two PCs must not land in one sequence; renaming the PC starts a new one (hash duplicate detection still prevents doubled frames). Folder sources have no profile today, so the simplest safe default applies. |
|
||||
| 2026-10-26 | Schedule recurrences use an in-house text form: `every:<n>m\|h\|d` (5 minutes to a day, 1–168 hours or 1–366 days), `daily:HH:MM`, `weekly:mon,thu@HH:MM`, `monthly:<1–28>@HH:MM`, with a structured form (`RecurrenceDto`) for the editors. Intervals are fixed durations on the grid of the previous due time (a day of an interval is 24 h); daily, weekly and monthly times are wall-clock times of the host's zone: a time a spring-forward gap skips moves forward by the gap, and a time the clocks go back over runs once, at its first occurrence. (Owner review 2, R10.) | Cron expressions; a calendar rule engine (RRULE) | No package may parse cron (rule 1), and an in-house cron would be more code than four shapes that cover every action and fit a form. Day 28 exists in every month; 5 minutes keeps the queue sane. |
|
||||
| 2026-10-26 | A schedule's run is claimed with a compare-and-set on `next_run` (`UPDATE schedules SET next_run = <next> WHERE id = … AND enabled AND next_run = <expected>`); only the process that wins queues the jobs. An edit that keeps the recurrence never writes `next_run`, so it cannot undo a run claimed at the same moment. A crash between the claim and the queueing loses that one run (the claim is logged at Debug). (Owner review 2, R10.) | Advisory locks or a leader election; the claim and the jobs in one transaction | The same SQL works on SQLite and on several servers sharing one PostgreSQL, and the jobs go through the engine's own queueing. Losing one run of a recurring job is harmless: the next one comes. |
|
||||
| 2026-10-26 | System schedules are seeded at every start with `INSERT … ON CONFLICT (system_key) DO NOTHING`: a row that exists, edited or not, is never overwritten, so the user's edits survive restarts and upgrades. They can be edited, turned off and reset to the host's defaults (built from its options as they are at the reset), never deleted, and keep their name and action; clients show them by key in the user's language (the stored name is English). A row whose key a host no longer defines stays and can no longer be reset. Rows seeded together are stamped a microsecond apart to keep the host's order. (Owner review 2, R10.) | Overwrite the defaults at start; allow deleting them | The owner wants no hidden timers: each one is a row the user sees and controls, and an upgrade must not undo a change. A deleted system schedule would come back at the next start. |
|
||||
| 2026-10-26 | The timers that queued work are gone: on the server `ArchivePolling`, `DatabaseBackupService` and the periodic sweep of `UploadMaintenance` (which now only recovers interrupted commits at start); on the desktop the rescan loop and `DatabaseBackups.RunDailyAsync`; in both the job engine's history purge at start. Their work is done by system schedules, with keys shared by both hosts: on the server `archive-scan` (every 10 minutes, no catch-up), `upload-cleanup` (the `uploads` step), `index-backup` (SQLite only), `housekeeping` (`job-history`) and `audit-cleanup` (`audit`); on the desktop `archive-scan`, `index-backup` and `housekeeping` (`job-history`, `cache-trim`). The audit log has a schedule of its own because a clean-up job has one age limit. No other schedule is pre-seeded. (Owner review 2, R10.) | Keep the timers beside visible schedules; one housekeeping schedule for job history and audit | "No pre-scheduled job may be missing from this page"; one place for recurring work. Job history (90 days) and audit (forever by default) need two limits. |
|
||||
| 2026-10-26 | A run more than 5 minutes late was missed, checked on every pass and not only at start (a PC that slept): with catch-up it fires once, otherwise the schedule moves to its next occurrence without running. A next run more than two periods ahead means the clock went back and is computed again. A new interval schedule first runs one interval after it is created or seeded. A run is `skipped-pending` while the schedule's previous job is queued, running or paused, checked before the action's own checks. (Owner review 2, R10.) | Catch-up only at start; run interval schedules at once | One rule covers a host that was off and a laptop that slept. Running at once would surprise a user who just created a schedule; Run now does it on request. |
|
||||
| 2026-10-26 | Live services are not schedules: on the server the read of archive.json every 10 minutes, the render-node monitor and the LAN beacon; on the desktop the sync agent, the render node, card and drive detection, the look for an unplugged archive every minute and the update check at start. They queue no recurring job and change no user data; the transfers the sync agent decides are jobs in the queue. (Owner review 2, R10.) | Make every timer a schedule | They keep a connection, a device or the archive's settings current from moment to moment and show in their own screens. As schedules they would fill the job history with runs nobody would edit, and turning one off would break sync, discovery or uploads. |
|
||||
| 2026-10-26 | No schedule empties the trash: the clean-up step `trash-report` lists the trash entries older than its limit (30 days by default) with their sizes in the job log and deletes nothing; no system schedule uses it. Clean-up steps delete only what the product made and no longer needs (job history, audit entries, temporary and cache files). (Owner review 2, R10; BRIEF §0.2 rule 8.) | A timed emptying of the trash | Deleting user data needs an explicit user action, and the trash is the user's last copy. |
|
||||
| 2026-10-26 | The job engine no longer purges finished jobs at start (`JobEngineOptions.HistoryRetention` is removed): the `job-history` step of the housekeeping schedule does, daily at 04:00 with catch-up, with the schedule's own age limit (90 days). On the server `JobHistoryDays` (server.json or API) is only what that schedule is seeded and reset with: its field left the admin panel's Settings, and a new value needs no restart. The audit log is purged the same way, by the `audit` step. (Owner review 2, R10.) | Keep the purge in the engine as well; keep the Settings field and copy it into the schedule | One place for each retention, shown to the user, and a host that rarely restarts still purges. Two editable places for one value would disagree after an edit in either. |
|
||||
| 2026-10-26 | The audit retention has one source, the `audit-cleanup` schedule. `ServerOptions.AuditRetentionDays` (default 0 = forever, 0–3650, `CHRONOS_AUDIT_RETENTION_DAYS`) is what it is seeded and reset with; at 0 it is seeded off, so an upgrade deletes nothing. Settings › Logs › *Keep audit* shows the limit in force (the schedule's age limit, 0 while it is off) wherever it was last set; saving a different value sets the schedule (on with that limit, off at 0, no restart) and stores it as the reset default, and saving it unchanged writes neither. The variable is put into the schedule at every start before the first pass (`Scheduler.StartAsync(host, beforeFirstPass)`), so a run caught up at start already uses it; changing its days, or turning the schedule off while they are above 0, is then 409 `setting_locked`, and the panel field is read-only. (Owner review 2, R10, R11.) | A default of 365 days; the setting and the schedule as two sources; the variable as a seed only | Audit entries are product data an upgrade must not delete unasked. One value shown in two places that disagree misleads, and so would a variable that did nothing on an existing install or that a caught-up run ignored. |
|
||||
| 2026-10-26 | The archive scan still runs at start: the server runs `archive-scan` once when it starts; the desktop once the archive is reopened at start, and again when an unplugged archive is back (`Scheduler.RunSystemNowAsync`). It does not when the schedule is off, has run since the start, or its scan is pending. The schedule itself has no catch-up. (Owner review 2, R10.) | Wait for the first interval; catch-up on | The former polling scanned at start, so photos added while the program was closed appear at once; catch-up would also fire after every short pause. Turned off, nothing runs. |
|
||||
| 2026-10-26 | A scan schedule's `deep` parameter is optional; unset, the host decides at every run (`IScheduleHost.DeepAnalysisAfterScan`): the desktop reads Settings › Analysis › After a scan then, as for scans started by hand, and the server says no. The desktop's `archive-scan` is seeded without it. (Owner review 2, R10.) | Seed `deep` from the setting once | A setting changed after the upgrade would otherwise never reach the scheduled scans. |
|
||||
| 2026-10-26 | The server's `upload-cleanup` runs every 6 hours (`UploadSweepHours`) with catch-up, keeping finished upload records 90 days. An idle upload still expires after `UploadRetentionHours` (48), up to 6 hours later than with the former half-hourly sweep. (Owner review 2, R10.) | Every 30 minutes, as the timer did | 48 clean-up jobs a day would bury the job history; four are enough for a 48-hour expiry. |
|
||||
| 2026-10-26 | Scheduled is a tab inside Jobs: on the desktop a *Queue · Scheduled* segmented control first in the toolbar (*New schedule* at its end), on the admin panel header tabs (`#/jobs?tab=schedules`, *New schedule* only on that tab); not a rail or sidebar entry. A job a schedule queued carries a *Scheduled* pill linking to it, and a schedule's runs link to their jobs. (Owner review 2, R10.) | A page of its own; a section under Archive | The owner asked for a space within job management; the rail and the sidebar stay as R4/R5 left them, and a schedule sits next to the queue its runs fill. |
|
||||
| 2026-10-26 | New job kinds `Backup` and `Cleanup` (stored as 16 and 17) and read-only report handlers for `Duplicates` and `Orphans`, all four registered by `ArchiveService.CreateJobHandlers`, so both hosts run them (`POST /api/v1/jobs` with `duplicates` or `orphans` now queues a report instead of answering 409 `job_unavailable`); their priority-queue level is Low. Hosts add their own clean-up steps through `ArchiveServiceOptions.CleanupSteps`; a step that fails fails the job after the others ran. The scheduler lives in `Chronos.Data/Scheduling`, the handlers and steps in `Chronos.Data/Housekeeping`; migration 0007 adds `schedules` and `jobs.schedule_id`. (Owner review 2, R10.) | A handler provider each host registers; backups and clean-ups outside the job queue | Logged, cancellable and shown in Jobs like everything else; one registration point means neither host forgets a handler. |
|
||||
| 2026-10-26 | A run queues at most 500 sequences per job (a larger set becomes several jobs, and the schedule records the first one's id) and leaves out the sequences a pending job of the same kind already covers. Verify takes `percent` of the archive's sequences (rounded up), never-verified first, then the least recently verified, only those unverified for `olderThanDays` (defaults 100 % and 30 days); at 100 % and 0 days it is one verify of the whole archive. (Owner review 2, R10.) | One job per run whatever its size | Small `target_ids`, resumes and cancels in manageable pieces; a rolling verify spreads the hashing of a large archive over several runs. |
|
||||
| 2026-10-26 | Index backups are the Backup jobs of the `index-backup` system schedule: desktop `every:1d`, server `daily:03:00`, both with catch-up and *Copies kept* 3, into `backups` next to the index; SQLite index files only (not seeded on a PostgreSQL server, unavailable for an index in memory). `DatabaseBackups.RunDailyAsync` is removed. The backups folder has one retention, the largest *Copies kept* of the backup schedules (enabled or not; 3 without any): *Back up now*, *Back up database* and the copy kept before a restore prune to it, and a backup job keeps the larger of its own value and that one, so a schedule that keeps fewer never deletes copies another keeps. A newly seeded system schedule whose work was last done a whole period ago (`SystemSchedule.LastDone`; for `index-backup` the newest copy) is due at once, so the first start after the upgrade copies when the newest copy is a day old; otherwise, and on a fresh install, the first copy comes at the first occurrence (on the desktop a day after the first start, on the server at the next 03:00). (Owner review 2, R10.) | A fixed nightly time on the desktop too; a count of its own for each way of copying; the first copy at the first occurrence after an upgrade as well | A desktop rarely runs at night, a server always does. Two counts on one folder would delete each other's copies. An upgrade must not leave an index without a recent copy for another day. |
|
||||
| 2026-10-26 | The server reads archive.json every 10 minutes on a timer of its own in `SchedulerHost`, whatever the `archive-scan` schedule does (pending, daily or off); the timer queues no job. Every schedule run also reads it first (`ServerScheduleHost.GetArchiveAsync`). (Owner review 2, R10.) | Read it only in the scan schedule's runs; read it in `Scheduler` before the pending check | Uploads follow the settings a desktop sharing the archive wrote, as with the former polling, also while a long scan is pending or the schedule is off; the Data layer stays the same for both hosts. |
|
||||
| 2026-10-26 | Schedule API `/api/v1/schedules` (ManageArchive): `PUT` and `PATCH` both change the fields given (`parameters` replaced as a whole); 400 `invalid_schedule` names the field; 409 `schedule_system` for deleting a system schedule, `schedule_no_defaults` for resetting a user's, and `schedule_pending` for Run now while the last job is queued, running or paused (checked first, so nothing is recorded); a run that skips for another reason is 200 with its outcome. Audit actions are `schedule_created`, `schedule_updated`, `schedule_deleted`, `schedule_run` and `schedule_reset`, with details `name · action · recurrence[ · off]` (a run: `name · outcome`), after `system:<key> · ` for a system schedule; the admin panel shows them in words, a system schedule by its name in the panel's language. (Owner review 2, R10.) | Only PUT; dotted action names; map skipped-pending to 409 | `UpdateScheduleRequest` has partial semantics like users and sequences; the existing actions are snake_case; a refused request must not overwrite the last outcome; the key makes the entry readable in every language. |
|
||||
| 2026-10-26 | Schedule changes are a WebSocket event, `scheduleChanged {scheduleId, deleted}`, published for every create, edit, reset, delete and run (skipped and unavailable runs included) and every move of a next run; the admin panel's Scheduled tab reloads on it and on `jobState`, debounced 800 ms. Older clients ignore the unknown type. (Owner review 2, R10.) | Reload only on `jobState` and after the panel's own actions | A run that queued nothing, a moved next run or another administrator's edit would otherwise show only at the next reload. |
|
||||
| 2026-10-26 | The server's schedule zone is `TimeZoneInfo.Local` (the container's `TZ`), reported by its IANA id where the platform maps one; off Windows a `TZ` the system does not know falls back to UTC with a warning. Every time on the admin panel's Scheduled tab (next run, last result, runs) is in that zone, named on the tab, and in the browser's only when `Intl` does not know it. The desktop uses the PC's zone. (Owner review 2, R10.) | Show the times in the browser's zone | "Daily at 03:00" next to a next run shown at 04:00 for a browser elsewhere would contradict itself. |
|
||||
| 2026-10-26 | Desktop cache trim (step `cache-trim`, `CacheStore.Trim`) brings the cache down to Settings › Storage › Cache limit, the least recently written files first; files that cannot be opened exclusively are skipped, and `proxies/`, `render-node/` and `server-import/` are never trimmed (they still count towards the size); a folder Chronos did not create is left alone. (Owner review 2, R10.) | Trim everything, oldest first | Those folders hold the complete proxy sets the sync keeps, the render node's own cache at the same limit and copies waiting for upload; Settings › Storage › Clear still empties all of it. |
|
||||
| 2026-10-26 | Desktop toasts: a schedule's Background run raises one only when it fails, unless it is upkeep the next run repeats (scan, thumbnails, proxies, light analysis, clean-up), so a failed index backup or verify is said. Run now raises one only when it queued nothing (skipped, unavailable, failed). Delete and Reset are confirmed; the editor has no default button (Enter never closes it unsaved) and Esc cancels. (Owner review 2, R10.) | Background jobs always silent, as before; a toast for every scheduled run | A failed backup must be noticed, while a scan failing every 10 minutes is no useful toast (the rail badge still counts it); queued runs show in the job bar and the row. |
|
||||
| 2026-10-26 | Desktop texts: next runs read Today, Tomorrow or Yesterday and a time, else a short date and a time; weekly days follow the UI language's first day of the week in the table, the editor's summary and its toggles; system schedules show by key in the UI language, and the editor's choices switch language live. `--capture` runs the scheduler on a stopped clock (`SampleData.Now`) with two sample schedules, so `jobs-scheduled` and `jobs-schedule-editor` are the same on every run. (Owner review 2, R10.) | Monday first everywhere; the stored English names | Short, unambiguous texts in every language; screenshots must not change between runs. |
|
||||
| 2026-10-26 | Desktop: the archive is reopened before the scheduler starts, whose first pass settles the runs missed while Chronos was closed; an archive unplugged at start is looked for every minute (`ReopenInterval`; before, every rescan interval), then scanned and the scheduler woken. Settings › Archive › Rescan every is removed: `ScanIntervalMinutes` stays in settings.json only as the seed and the Reset value of `archive-scan` (clamped to 5–1440 minutes). When the index does not open, the Scheduled tab says the schedules do not run. (Owner review 2, R10.) | Keep Rescan every and copy it into the schedule | The user's interval survives the upgrade, with one editable place for it. |
|
||||
| 2026-10-26 | Log defaults: level Information, files kept 14 days, a numbered part from 50 MB, 1,024 MB for all of a program's files, daily files, audit kept forever (0), 4 MB of the end of each log in the diagnostics zip; an MB is 2²⁰ bytes. Server ranges: retention 1–3650 days, file 0–10240 MB, total 0–1048576 MB and not below the file size (0 = no limit for either), audit 0–3650 days, diagnostics 1–1024 MB; a value out of range stops the start or is 400 `invalid_setting`. The desktop offers presets in combos, lists a value set elsewhere with them once it is brought within range, and raises a total below the file size to that size (`LogFileOptions.TotalBelowFile`). The Uploader and Setup keep daily files with the default limits. (Owner review 2, R11.) | No size limits, as before; refuse the desktop's out-of-range values | Bounded disk use with about the history kept before; a combo cannot hold an invalid value, so the desktop corrects what a file brings instead of refusing it. |
|
||||
| 2026-10-26 | Log rotation is daily or hourly by the UTC clock: `prefix-yyyyMMdd.log` or `prefix-yyyyMMdd-HH.log`; a full file continues in `prefix-yyyyMMdd[-HH].N.log`, and a restart continues the period's newest part. Pruning runs at every new file and when the options change: by age (last write), then the oldest while the sink's own files exceed the total; only names of the sink's own pattern are touched, never the file being written, and the total counts one prefix. (Owner review 2, R11.) | Size-only rotation; weekly files; delete any `*.log` | Names sort and read as before; other programs' logs and files placed by hand are never deleted. |
|
||||
| 2026-10-26 | Bug fixed: the server's file logger enabled only Information and above, so `CHRONOS_LOG_LEVEL=Debug` or `Trace` never reached `/data/logs`, and the engine's `Log.MinimumLevel` was never set. The logging pipeline now runs at Trace with one filter per provider (console, file) that reads a level switch at every line; ASP.NET Core's categories stay at Warning or above and `Microsoft.Hosting.Lifetime` at Information or above; `Log.MinimumLevel` is the lower of the two levels. (Owner review 2, R11.) | Rebuild the logger factory at every change | A change in Settings › Logs applies at once, without a restart; a line per request below Warning would bury everything else. |
|
||||
| 2026-10-26 | `CHRONOS_LOG_LEVEL` keeps its meaning (files and console) and sets and locks both levels; `CHRONOS_LOG_CONSOLE_LEVEL`, read after it, sets the console alone and wins for it. In server.json `LogLevel` now sets the files only and `ConsoleLogLevel` the console. Levels are names in any case (also `info`, `warn`, `off`); numbers are refused. `GET/PUT /server/settings` carries `lockedBy`, the variable that fixes each locked setting (of two, the one that wins; ignored when saving), and the panel's tooltip names it; the panel's own map of variables is gone. The deploy files no longer set the variable (the Unraid *Log level* is empty, compose has it commented out), and the upgrade note tells existing containers to remove it. (Owner review 2, R11.) | A nullable console level meaning "as the files"; keep `Information` in the deploy files | Existing environments keep working with a simple two-level model; a variable left by an old template would otherwise lock both levels without a word, and only the server knows which variable won. |
|
||||
| 2026-10-26 | `ServerSettingsDto` carries the log group as a nested `LogSettingsDto`; a `PUT` without it (an older panel) keeps the log settings, and saving applies them at once (`ServerLogging.Apply`). Desktop: Settings › Advanced gets six log rows, applied to the files at once and from the first log line of every launch (`AppLogging.Open`, also a launch that only hands over to the running Chronos), and Advanced gets a Reset section that restores them. (Owner review 2, R11.) | Flat DTO fields; apply the desktop's settings once the app has started | The group mirrors the panel's Logs group. The first line opens a file and prunes, so the defaults would delete what the user keeps longer. |
|
||||
| 2026-10-26 | Logging never fails what logs: `Log.Write` drops a line its sink throws on (anything but `OutOfMemoryException`), `TeeLogSink` isolates each sink, `FileLogSink` drops a line it cannot write (folder removed, disk full, file locked) and tries again at the next line without creating a removed folder again, and the server's `LoggerSink` drops the `AggregateException` Microsoft.Extensions.Logging throws. Before, an unwritable log left a failed job Running and could stop the job engine's worker and the scheduler's loop (seen as intermittent test failures). (Owner review 2, R10, R11.) | Let logging errors surface; create the folder again | Logging runs inside error handling (a job marked failed, a scheduler pass): the job's state and the next run matter more than a line. A removed log folder stays removed, its lines lost until the next start, rather than reappearing behind the user's back. |
|
||||
| 2026-10-26 | Setting a system schedule's age limit above 0 (Settings › Logs › Keep audit, or `CHRONOS_AUDIT_RETENTION_DAYS` at start) also ticks its default steps back on; while an environment variable fixes the age above 0, turning the schedule off, changing the age or unticking those steps is 409 `setting_locked`, and the panel disables those controls. The audit retention in force is 0 while the audit step is unticked. Keep audit and Jobs › Scheduled are last-writer-wins, like every panel setting. (Owner review 2, R10, R11.) | Leave the steps as edited; a separate lock per step | A limit set in Settings must take effect, and a variable's limit must not be undone from the panel. |
|
||||
Reference in new issue
Block a user