Align internal publish terminology across stage, app, and artifacts

This commit is contained in:
2026-05-23 13:39:15 +00:00
parent 7d584ee6cd
commit 96b886e711
25 changed files with 306 additions and 306 deletions

View File

@@ -134,7 +134,7 @@ func previousCacheTestConfig(t *testing.T) (*config.Config, artifacts.SessionPat
func seedPreviousCurrent(t *testing.T, store *storage.FakeBackend, cfg *config.Config, m *manifest.Manifest) {
t.Helper()
previousPrefix := artifacts.S3SessionPrefix(cfg.Pipeline.Storage.S3.RootPrefix, cfg.Session.Campaign, cfg.Session.PreviousSessionID)
manifestKey, runIDKey := artifacts.ResolveArchiveCurrentStateKeys(previousPrefix)
manifestKey, runIDKey := artifacts.ResolveCurrentStateKeys(previousPrefix)
store.SeedObject(storage.FakeObject{Key: runIDKey, Data: []byte("previous-run\n")})
data, err := marshalManifestForPreviousCacheTest(m)
if err != nil {
@@ -143,7 +143,7 @@ func seedPreviousCurrent(t *testing.T, store *storage.FakeBackend, cfg *config.C
store.SeedObject(storage.FakeObject{Key: manifestKey, Data: data})
}
func previousManifestWithOutput(t *testing.T, cfg *config.Config, rel string, promoted []string) *manifest.Manifest {
func previousManifestWithOutput(t *testing.T, cfg *config.Config, rel string, publishedPaths []string) *manifest.Manifest {
t.Helper()
m := manifest.New(cfg.Session.PreviousSessionID, time.Date(2026, 4, 26, 10, 0, 0, 0, time.UTC))
m.Campaign = cfg.Session.Campaign
@@ -154,11 +154,11 @@ func previousManifestWithOutput(t *testing.T, cfg *config.Config, rel string, pr
{SourceID: "narratio.artifact.session_recap", LocalPath: filepath.Join(filepath.Dir(filepath.Dir(m.LocalWorkDir)), filepath.FromSlash(rel))},
})
}
if promoted != nil {
if publishedPaths != nil {
if m.Stages["publish"] == nil {
m.MarkStageSucceeded("publish", time.Date(2026, 4, 26, 10, 2, 0, 0, time.UTC), nil)
}
m.Stages["publish"].Metadata = map[string]any{"published_paths": promoted}
m.Stages["publish"].Metadata = map[string]any{"published_paths": publishedPaths}
}
return m
}