Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/loopover-engine/src/focus-manifest-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
activeReviewReconciliationConfigToJson,
loopEscalationConfigToJson,
federatedIntelligenceConfigToJson,
experimentalConfigToJson,
fairnessAnalyticsConfigToJson,
settingsOverrideToJson,
type FocusManifest,
type FocusManifestSource,
Expand Down Expand Up @@ -103,6 +105,10 @@ function focusManifestToNormalizedJson(manifest: FocusManifest): Record<string,
if (loopEscalation !== null) normalized.loopEscalation = loopEscalation;
const federatedIntelligence = federatedIntelligenceConfigToJson(manifest.federatedIntelligence);
if (federatedIntelligence !== null) normalized.federatedIntelligence = federatedIntelligence;
const experimental = experimentalConfigToJson(manifest.experimental);
if (experimental !== null) normalized.experimental = experimental;
const fairnessAnalytics = fairnessAnalyticsConfigToJson(manifest.fairnessAnalytics);
if (fairnessAnalytics !== null) normalized.fairnessAnalytics = fairnessAnalytics;

return normalized;
}
14 changes: 14 additions & 0 deletions test/unit/focus-manifest-validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ loopEscalation:
expect(result.normalized).not.toHaveProperty("activeReviewReconciliation");
expect(result.normalized).not.toHaveProperty("loopEscalation");
expect(result.normalized).not.toHaveProperty("federatedIntelligence");
expect(result.normalized).not.toHaveProperty("experimental");
expect(result.normalized).not.toHaveProperty("fairnessAnalytics");
});

it("includes a configured activeReviewReconciliation block in the normalized settings-preview output (#webhook-reorder-clobber)", () => {
Expand All @@ -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");
Expand Down