From fb5df0fc46a799694a3a784c4d40f4e95eef4d54 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 11 Aug 2026 18:40:35 -0700 Subject: [PATCH] FN-8993: guard knowledge graph directory setting Classify the knowledge graph output directory as an intentionally non-surfaced setting. - Allowlist the CLI/engine-owned knowledgeGraphDir default with its rationale. - Add regression coverage that preserves its Settings-description guard classification. Files changed: .../settings-default-descriptions.test.tsx | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) Fusion-Task-Id: FN-8993 Fusion-Task-Lineage: 34d82e65-5d1d-4805-8630-f3393de8e998 Co-authored-by: Fusion (runfusion.ai) --- .../settings-default-descriptions.test.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/dashboard/app/components/settings/sections/__tests__/settings-default-descriptions.test.tsx b/packages/dashboard/app/components/settings/sections/__tests__/settings-default-descriptions.test.tsx index bfe21d94fb..c4fb8ffb25 100644 --- a/packages/dashboard/app/components/settings/sections/__tests__/settings-default-descriptions.test.tsx +++ b/packages/dashboard/app/components/settings/sections/__tests__/settings-default-descriptions.test.tsx @@ -387,6 +387,15 @@ const NOT_SURFACED_ALLOWLIST: Record = { mergerCredentialInstanceId: "inline companion for the project merger model picker; unset inherits the provider default", mergerFallbackCredentialInstanceId: "inline companion for the project merger fallback model picker; unset inherits the provider default", + /* + FNXC:SettingsDefaults 2026-08-12-01:00: + FN-8993 classifies this CLI/engine-owned graph output path as not surfaced: it has + zero dashboard render sites and i18n keys, while only `fn knowledge-graph build` + and the memory-consolidation tick consume it. Operators can find its default in + docs/settings-reference.md and docs/knowledge-graph.md rather than a Settings field. + */ + knowledgeGraphDir: "CLI/engine-owned knowledge-graph output directory (fn knowledge-graph build --dir); no Settings UI field renders it", + // Internal/engine bookkeeping, session state, or reliability telemetry — not // rendered as a plain user-facing description field anywhere in Settings. globalPause: "engine-managed pause flag, not a plain description field", @@ -659,6 +668,30 @@ describe("FN-7505 settings default-value description guard", () => { ).toEqual([]); }); + /* + FNXC:SettingsDefaults 2026-08-12-01:00: + FN-8993 prevents knowledgeGraphDir from silently returning to the unaccounted-default + census failure. The CLI/engine-owned path belongs only in the not-surfaced allowlist. + */ + it("pins FN-8993 knowledgeGraphDir as an allowlisted, non-Settings field", () => { + expect( + DEFAULT_SETTINGS, + "FN-8993 requires knowledgeGraphDir to remain a DEFAULT_SETTINGS key", + ).toHaveProperty("knowledgeGraphDir"); + expect( + NOT_SURFACED_ALLOWLIST.knowledgeGraphDir, + "FN-8993 requires knowledgeGraphDir's non-empty not-surfaced allowlist reason", + ).toEqual(expect.any(String)); + expect( + NOT_SURFACED_ALLOWLIST.knowledgeGraphDir, + "FN-8993 requires a non-empty knowledgeGraphDir allowlist reason", + ).not.toBe(""); + expect( + SETTING_DESCRIPTION_KEYS, + "FN-8993 requires knowledgeGraphDir to stay out of SETTING_DESCRIPTION_KEYS", + ).not.toHaveProperty("knowledgeGraphDir"); + }); + it("does not allowlist a key that is also mapped to a description (would mask real coverage gaps)", () => { const overlap = Object.keys(SETTING_DESCRIPTION_KEYS).filter((key) => key in NOT_SURFACED_ALLOWLIST); expect(overlap).toEqual([]);