fix(transport): pin a compressed copy of the decrypted bundle on the import session, release the upload buffer early, document the footprint (review 2026-10-21 04/M2)

This commit is contained in:
Joseph Doherty
2026-10-22 09:20:31 -04:00
parent 55cebf2397
commit 93fbd2e030
5 changed files with 180 additions and 76 deletions
@@ -16,7 +16,12 @@ public sealed class BundleSession
public Guid SessionId { get; init; }
/// <summary>Parsed manifest from the uploaded bundle.</summary>
public BundleManifest Manifest { get; init; } = null!;
/// <summary>Decrypted bundle content bytes; empty until the bundle is successfully unlocked.</summary>
/// <summary>
/// The decrypted bundle content, held Brotli-compressed by the importer (review
/// 2026-10-21 04/M2) — still sensitive (it decompresses to the plaintext content,
/// secret values included), so every release path zeroes it before dropping the
/// session. Empty until the bundle is successfully unlocked.
/// </summary>
public byte[] DecryptedContent { get; init; } = Array.Empty<byte>();
/// <summary>UTC timestamp after which this session is considered expired and must be re-uploaded.</summary>
public DateTimeOffset ExpiresAt { get; init; }