diff --git a/LOG_REFACTOR_CONTRACT.md b/LOG_REFACTOR_CONTRACT.md index 4770a09..155d6a5 100644 --- a/LOG_REFACTOR_CONTRACT.md +++ b/LOG_REFACTOR_CONTRACT.md @@ -102,7 +102,7 @@ Build HAKs ────────── • Refreshing credits cache • Validating project • Collecting asset resources • Writing autogen manifests - sow-parts-manifest.json -- sow-head-vfx-manifest.json +- sow-accessory-vfx-manifest.json • Planning HAK chunks • Resolving module HAK order • Reusing unchanged HAKs diff --git a/internal/pipeline/pipeline_test.go b/internal/pipeline/pipeline_test.go index cf75a57..0822661 100644 --- a/internal/pipeline/pipeline_test.go +++ b/internal/pipeline/pipeline_test.go @@ -2207,8 +2207,8 @@ func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T) }, "manifest": { "release_tag": "head-vfx-manifest-current", - "asset_name": "sow-head-vfx-manifest.json", - "cache_name": "sow-head-vfx-manifest.json" + "asset_name": "sow-accessory-vfx-manifest.json", + "cache_name": "sow-accessory-vfx-manifest.json" }, "accessory_visualeffects": { "groups": { @@ -2260,7 +2260,7 @@ func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T) t.Fatalf("expected no parts manifest, got stat error %v", err) } - headRaw, err := os.ReadFile(filepath.Join(root, "build", "sow-head-vfx-manifest.json")) + headRaw, err := os.ReadFile(filepath.Join(root, "build", "sow-accessory-vfx-manifest.json")) if err != nil { t.Fatalf("read head visualeffects manifest: %v", err) } @@ -2314,8 +2314,8 @@ func TestBuildHAKsWritesFolderCategoryInHeadVisualeffectsAutogenManifest(t *test }, "manifest": { "release_tag": "head-vfx-manifest-current", - "asset_name": "sow-head-vfx-manifest.json", - "cache_name": "sow-head-vfx-manifest.json" + "asset_name": "sow-accessory-vfx-manifest.json", + "cache_name": "sow-accessory-vfx-manifest.json" }, "accessory_visualeffects": { "groups": { @@ -2362,7 +2362,7 @@ func TestBuildHAKsWritesFolderCategoryInHeadVisualeffectsAutogenManifest(t *test if _, err := BuildHAKs(p); err != nil { t.Fatalf("build haks: %v", err) } - headRaw, err := os.ReadFile(filepath.Join(root, "build", "sow-head-vfx-manifest.json")) + headRaw, err := os.ReadFile(filepath.Join(root, "build", "sow-accessory-vfx-manifest.json")) if err != nil { t.Fatalf("read head visualeffects manifest: %v", err) } diff --git a/internal/project/project_test.go b/internal/project/project_test.go index 4d6f411..6da4cfa 100644 --- a/internal/project/project_test.go +++ b/internal/project/project_test.go @@ -1336,8 +1336,8 @@ func TestValidateLayoutRejectsInvalidAutogenConsumerConfig(t *testing.T) { Derive: AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"}, Manifest: AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "nested/sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.txt", + AssetName: "nested/sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.txt", }, }, }, @@ -1382,8 +1382,8 @@ func TestValidateLayoutRejectsInvalidHeadVisualeffectsConfig(t *testing.T) { Derive: AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"}, Manifest: AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, HeadVisualeffects: HeadVisualeffectsConfig{ Groups: map[string]HeadVisualeffectGroupConfig{ @@ -1438,8 +1438,8 @@ func TestValidateLayoutRejectsInvalidHeadVisualeffectsNamingConfig(t *testing.T) Derive: AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"}, Manifest: AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, HeadVisualeffects: HeadVisualeffectsConfig{ Groups: map[string]HeadVisualeffectGroupConfig{ diff --git a/internal/topdata/topdata_test.go b/internal/topdata/topdata_test.go index 307a6bb..155d67f 100644 --- a/internal/topdata/topdata_test.go +++ b/internal/topdata/topdata_test.go @@ -7345,7 +7345,7 @@ func TestApplyAutogenConsumersAugmentsHeadVisualeffectsFromLocalOverride(t *test Root: "vfxs", Include: []string{"head_accessories/**/*.mdl", "head_decorations/**/*.mdl", "head_features/**/*.mdl"}, Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"}, - Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-head-vfx-manifest.json", CacheName: "sow-head-vfx-manifest.json"}, + Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-accessory-vfx-manifest.json", CacheName: "sow-accessory-vfx-manifest.json"}, LocalOverrideRoot: "autogen-assets", }, } @@ -7425,7 +7425,7 @@ func TestApplyAutogenConsumersUsesFolderDrivenSlashHeadVisualeffectsNames(t *tes Root: "vfxs", Include: []string{"head_features/**/*.mdl"}, Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"}, - Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-head-vfx-manifest.json", CacheName: "sow-head-vfx-manifest.json"}, + Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-accessory-vfx-manifest.json", CacheName: "sow-accessory-vfx-manifest.json"}, LocalOverrideRoot: "autogen-assets", HeadVisualeffects: project.HeadVisualeffectsConfig{ Groups: map[string]project.HeadVisualeffectGroupConfig{ @@ -7522,8 +7522,8 @@ autogen: group_from: first_path_segment manifest: release_tag: head-vfx-manifest-current - asset_name: sow-head-vfx-manifest.json - cache_name: sow-head-vfx-manifest.json + asset_name: sow-accessory-vfx-manifest.json + cache_name: sow-accessory-vfx-manifest.json local_override_root: autogen-assets accessory_visualeffects: groups: @@ -12847,8 +12847,8 @@ func TestBuildNativeWithReleasedHeadVisualeffectsManifest(t *testing.T) { switch r.URL.Path { case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current": w.Header().Set("Content-Type", "application/json") - _, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`)) - case "/downloads/sow-head-vfx-manifest.json": + _, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`)) + case "/downloads/sow-accessory-vfx-manifest.json": w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(manifestJSON)) default: @@ -12884,8 +12884,8 @@ func TestBuildNativeWithReleasedHeadVisualeffectsManifest(t *testing.T) { }, Manifest: project.AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, }, }, @@ -12937,7 +12937,7 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache mkdirAll(t, filepath.Join(projRoot, "reference")) writeFile(t, filepath.Join(projRoot, "reference", "build.py"), "print('ok')\n") - cachePath := filepath.Join(projRoot, ".cache", "sow-head-vfx-manifest.json") + cachePath := filepath.Join(projRoot, ".cache", "sow-accessory-vfx-manifest.json") writeFile(t, cachePath, `{ "id": "accessory_visualeffects", "generated_at": "2026-04-25T00:00:00Z", @@ -12971,8 +12971,8 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache switch r.URL.Path { case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current": w.Header().Set("Content-Type", "application/json") - _, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","updated_at":"2026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`)) - case "/downloads/sow-head-vfx-manifest.json": + _, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","updated_at":"2026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`)) + case "/downloads/sow-accessory-vfx-manifest.json": w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(manifestJSON)) default: @@ -13008,8 +13008,8 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache }, Manifest: project.AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, }, }, @@ -13051,7 +13051,7 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test setTopDataSourceTimes(t, root, sourceTime) setCompiledOutputTimes(t, result, outputTime) - cachePath := filepath.Join(root, ".cache", "sow-head-vfx-manifest.json") + cachePath := filepath.Join(root, ".cache", "sow-accessory-vfx-manifest.json") writeFile(t, cachePath, `{"id":"accessory_visualeffects","generated_at":"2026-04-25T10:00:00Z","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n") setFileTime(t, cachePath, time.Now()) @@ -13060,8 +13060,8 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test switch r.URL.Path { case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current": w.Header().Set("Content-Type", "application/json") - _, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","updated_at":"3026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`)) - case "/downloads/sow-head-vfx-manifest.json": + _, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","updated_at":"3026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`)) + case "/downloads/sow-accessory-vfx-manifest.json": w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`)) default: @@ -13088,8 +13088,8 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test }, Manifest: project.AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, }, } @@ -13413,12 +13413,12 @@ func TestBuildPackageFailsWhenAutogenManifestCacheIsStale(t *testing.T) { }, Manifest: project.AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, }, } - cachePath := filepath.Join(root, ".cache", "sow-head-vfx-manifest.json") + cachePath := filepath.Join(root, ".cache", "sow-accessory-vfx-manifest.json") writeFile(t, cachePath, `{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n") setFileTime(t, cachePath, time.Now().Add(-2*autogenManifestCacheMaxAge)) @@ -14361,8 +14361,8 @@ func testProject(root string) *project.Project { }, Manifest: project.AutogenManifestConfig{ ReleaseTag: "head-vfx-manifest-current", - AssetName: "sow-head-vfx-manifest.json", - CacheName: "sow-head-vfx-manifest.json", + AssetName: "sow-accessory-vfx-manifest.json", + CacheName: "sow-accessory-vfx-manifest.json", }, }, },