Complete safety and transfer remediation verification

This commit is contained in:
2026-12-01 20:47:59 +00:00
parent f59a53e31b
commit 75eddf8adc
27 changed files with 309 additions and 328 deletions

View File

@@ -32,7 +32,7 @@ func TestDownloadObjectToTempSuccess(t *testing.T) {
func TestDownloadObjectToTempFailedDownloadRemovesTempFile(t *testing.T) {
sentinel := errors.New("download failed")
store := &FakeBackend{DownloadErr: sentinel}
store := &FakeBackend{ReadErr: sentinel}
pattern := "narratio-test-fail-*.txt"
before, err := filepath.Glob(filepath.Join(os.TempDir(), "narratio-test-fail-*.txt"))
if err != nil {
@@ -57,7 +57,7 @@ func TestDownloadObjectToTempFailedDownloadRemovesTempFile(t *testing.T) {
func TestDownloadObjectToTempCallerContextWrappingPreservesCause(t *testing.T) {
sentinel := errors.New("object missing")
store := &FakeBackend{DownloadErr: sentinel}
store := &FakeBackend{ReadErr: sentinel}
_, err := DownloadObjectToTemp(context.Background(), store, "sessions/a/runs/run-123/metadata.txt", "narratio-test-*.txt", nil)
if err == nil {