Restore prepared inputs and flat session products

This commit is contained in:
2026-11-30 01:53:11 +00:00
parent e19ba81406
commit 3118bc35ba
12 changed files with 282 additions and 62 deletions

View File

@@ -32,7 +32,7 @@ func TestResolveUsesExactCommittedDeclaration(t *testing.T) {
t.Fatalf("PreviousRunID = %q, want previous-run", plan.PreviousRunID)
}
got := recordRelPaths(plan.Records)
want := []string{"previous/artifacts/session_recap.md", "previous/manifest.json"}
want := []string{"inputs/previous/artifacts/session_recap.md", "inputs/previous/manifest.json"}
if strings.Join(got, ",") != strings.Join(want, ",") {
t.Fatalf("record rel paths = %#v, want %#v", got, want)
}
@@ -73,7 +73,7 @@ func TestResolveDerivesLocalPathFromCommittedDestination(t *testing.T) {
if len(plan.Records) != 2 {
t.Fatalf("records len = %d, want 2", len(plan.Records))
}
if plan.Records[0].LocalRelativePath != "previous/artifacts/session_recap.md" {
if plan.Records[0].LocalRelativePath != "inputs/previous/artifacts/session_recap.md" {
t.Fatalf("artifact local relative path = %q", plan.Records[0].LocalRelativePath)
}
}
@@ -116,7 +116,7 @@ func TestResolveUsesCommittedSourceMappingForCustomDestination(t *testing.T) {
if artifact.RemoteKey != customKey {
t.Fatalf("remote key = %q, want exact configured source destination %q", artifact.RemoteKey, customKey)
}
if artifact.LocalRelativePath != "previous/artifacts/history/recap-v2.txt" {
if artifact.LocalRelativePath != "inputs/previous/artifacts/history/recap-v2.txt" {
t.Fatalf("local relative path = %q, want committed-destination cache path", artifact.LocalRelativePath)
}
}