From d0ace57f4e237bb364e6c0885148063095151602 Mon Sep 17 00:00:00 2001 From: shin-core <153108882+shin-core@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:32:31 +0900 Subject: [PATCH] fix(engine): include experimental and fairnessAnalytics in the manifest preview focusManifestToNormalizedJson was missing the experimentalConfigToJson and fairnessAnalyticsConfigToJson calls, even though both blocks carry a .present flag like the other 17 wired blocks and config-lint's TOP_LEVEL_FIELDS already lists them (so no unrecognized-field warning fired). A configured experimental or fairnessAnalytics block therefore never appeared in the .loopover.yml validation preview. This is the same two-sibling-enumeration-site omission fixed once for federatedIntelligence (1c80fb84b). Add the two missing serializer calls, matching the existing per-block pattern. Adds regression tests mirroring the federatedIntelligence block: a configured experimental/fairnessAnalytics block now shows in the preview, and both are absent when unconfigured. Closes #8867 --- .../src/focus-manifest-validation.ts | 6 ++++++ test/unit/focus-manifest-validation.test.ts | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/packages/loopover-engine/src/focus-manifest-validation.ts b/packages/loopover-engine/src/focus-manifest-validation.ts index 09de925c0d..1c44f92369 100644 --- a/packages/loopover-engine/src/focus-manifest-validation.ts +++ b/packages/loopover-engine/src/focus-manifest-validation.ts @@ -16,6 +16,8 @@ import { activeReviewReconciliationConfigToJson, loopEscalationConfigToJson, federatedIntelligenceConfigToJson, + experimentalConfigToJson, + fairnessAnalyticsConfigToJson, settingsOverrideToJson, type FocusManifest, type FocusManifestSource, @@ -103,6 +105,10 @@ function focusManifestToNormalizedJson(manifest: FocusManifest): Record { @@ -169,6 +171,18 @@ loopEscalation: expect(result.normalized).toMatchObject({ federatedIntelligence: { enabled: true } }); }); + it("includes a configured experimental block in the normalized settings-preview output (#8867)", () => { + const result = buildFocusManifestValidation({ content: "experimental:\n gittensor: true\n" }); + expect(result.warnings).toEqual([]); + expect(result.normalized).toMatchObject({ experimental: { gittensor: true } }); + }); + + it("includes a configured fairnessAnalytics block in the normalized settings-preview output (#8867)", () => { + const result = buildFocusManifestValidation({ content: "fairnessAnalytics:\n enabled: true\n" }); + expect(result.warnings).toEqual([]); + expect(result.normalized).toMatchObject({ fairnessAnalytics: { enabled: true } }); + }); + it("returns error when manifest content is not a mapping", () => { const result = buildFocusManifestValidation({ content: "[1, 2, 3]" }); expect(result.status).toBe("error");