fix(projects): empty sequences, push size, version paging, delete rights, settings PATCH, change events
- An unplaced sequence (no photos) lists no projects and refuses to create one with sequence_empty, instead of writing sidecars at the archive root. - A push accepts a full-size version; a 413 is reported as too_large. - Version pages are capped in bytes and say when more follow; the summary form leaves settings out; server homes page on. - Deleting by its maker needs the same account, not just the same username. - A settings PATCH writes project.json under the sequence lease, so Main's later birth no longer wipes it. - Reconcile, read-only catch-up and a Main flip publish projectChanged. - Server homes read the frames stamp and check a version is really stored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed7452e739
commit
4f652c4025
16 files changed
+356
-53
No files matched your search
@@ -176,8 +176,17 @@ public sealed class ArchiveProjectHome(ChronosDatabase db, ProjectService projec
|
||||
/// hashed and a checksum of those hashes (a Verify hashes them, or finds other bytes, without another frames version)
|
||||
/// and how many removals it keeps (a conversion's links).
|
||||
/// </summary>
|
||||
public async Task<string?> FramesStampAsync(CancellationToken cancellationToken)
|
||||
public async Task<string?> FramesStampAsync(CancellationToken cancellationToken) =>
|
||||
await StampOfAsync(db, sequenceId, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
/// <summary>
|
||||
/// The stamp of a sequence's frames as an index holds them (<see cref="FramesStampAsync"/>): what a server answers for
|
||||
/// its sequences too (<c>GET …/projects/frames/stamp</c>).
|
||||
/// </summary>
|
||||
/// <exception cref="ProjectException">The sequence is not in the index.</exception>
|
||||
public static async Task<string> StampOfAsync(ChronosDatabase db, Guid sequenceId, CancellationToken cancellationToken)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(db);
|
||||
var row = await db.Sequences.GetAsync(sequenceId, cancellationToken).ConfigureAwait(false)
|
||||
?? throw new ProjectException(ProjectError.SequenceNotFound, $"Sequence {sequenceId} is not in the index.");
|
||||
var (hashed, checksum, removals) = await db.Frames.CountNamedAsync(sequenceId, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
Reference in new issue
Block a user