Merge imported products into local session state

This commit is contained in:
2026-12-02 16:24:33 +00:00
parent ad8a5df97b
commit e7fada4372
26 changed files with 638 additions and 1254 deletions

View File

@@ -34,7 +34,7 @@ func TestRestoreCommandDryRunLeavesMissingWorkspaceAbsent(t *testing.T) {
fake := &storage.FakeBackend{}
cfg, _, _, _ := seedRestoreCommittedState(t, fake, pipeline, campaign, session)
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"audio/speaker.flac": []byte("synthetic audio\n")})
delete(fake.Objects, current.CurrentManifestKey)
delete(fake.Objects, artifacts.S3RunSessionManifestKey(current.SessionPrefix, current.RunID))
fake.Reads = nil
paths := artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root).SessionPathsFor(cfg.Session.Campaign, cfg.Session.SessionID)
if _, err := os.Stat(paths.Root); !os.IsNotExist(err) {
@@ -50,7 +50,7 @@ func TestRestoreCommandDryRunLeavesMissingWorkspaceAbsent(t *testing.T) {
t.Fatalf("report=%#v", report)
}
for _, read := range fake.Reads {
if read.Key == current.CurrentManifestKey {
if read.Key == artifacts.S3RunSessionManifestKey(current.SessionPrefix, current.RunID) {
t.Fatalf("dry run read obsolete execution snapshot %q", read.Key)
}
}