Skip to content

fix: hide Decisions judge selects from search when feature is withdrawn - #20231

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/settings-search-decisions-judge-leak-13850
Oct 14, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/settings-search-decisions-judge-leak-13850

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Hide the Decisions (Jev) judge-provider and judge-model settings from search when decisions_enabled is false.

DecisionsPointPanel.tsx's two SettingsSelect controls — "Which judge answers" (developer.which-judge-answers) and "Model for the small-model judge" (developer.model-for-the-small-model-judge) — are extracted into the settings registry by the shared extractor but were not listed in DECISIONS_SETTING_IDS. When decisions_enabled is false, settingEntryOffered returned true for them, so both search surfaces (the command palette and the in-page Settings search) returned these results even on a fleet where the feature is not offered. A hit navigates to a section where neither the card nor the point panel is rendered, which reads as a broken page.

Why it matters

A user on an installation where Decisions is not offered sees Settings search return "Which judge answers" and "Model for the small-model judge" when searching. Following either result navigates to a Settings page with no card, no panel and no controls — the page appears broken. The card's existing governance path already covers every other row; these two fell through because they live in DecisionsPointPanel.tsx, which the coverage test did not scan.

Not a goal

  • Adding governance signals for Settings entries not already covered by an existing capability signal (theme_install, Feature Preview cards with no backend flag, etc.) — listed as "Not in this PR" below.
  • Changing how the Decisions capability ceiling itself is enforced.
  • Any change to social share: social_share_enabled is checked — no Settings entries exist in the registry for it, so there is nothing to filter.

Intended? / Repro

Intended? No. The governance filter for the Decisions card was intentionally introduced to prevent dead search results. The two judge selects are part of that same governed card and the same ceiling applies. The omission is confirmed by the comment in DECISIONS_SETTING_IDS itself ("A control added to the card without a line here is a red test rather than a live leak") and by the extractor's PANEL_TAB_MAP, which lists DecisionsPointPanel.tsx as a scanned file.

Repro (file:line):

  • website/src/components/commandPalette/settingsSearchGovernance.test.ts — the "DECISIONS_SETTING_IDS covers the whole card" describe block reads only DecisionsCard.tsx; DecisionsPointPanel.tsx is in PANEL_TAB_MAP but not in the test.
  • website/src/components/commandPalette/settingsSearchCore.ts:95 — DECISIONS_SETTING_IDS has 6 entries; developer.which-judge-answers and developer.model-for-the-small-model-judge are absent.
  • website/src/pages/settings/DecisionsPointPanel.tsx:191,203 — two SettingsSelect elements with static i18nT(...) labels that the extractor reads and adds to the registry.

What changed (motivation → approach → change)

The registry lists every setting the build ships regardless of whether the gateway offers it. settingEntryOffered is the filter: it returns false for any id in DECISIONS_SETTING_IDS when decisionsEnabled is false. The two judge selects are extracted from DecisionsPointPanel.tsx into the registry but were absent from the governed set, so the filter passed them through.

Fix: add both ids to DECISIONS_SETTING_IDS with a comment tying them to the point panel. Extend the coverage test to also scan DecisionsPointPanel.tsx with the same extractor, so a control added to that file fails the test rather than silently entering the search corpus. Add palette-provider test cases that assert the two entries are withheld when decisions is off and offered when it is on.

Backwards compatibility

Compatible: DECISIONS_SETTING_IDS is an additive change that only widens the filter, never removes entries from it. No API or config key changes.

Removes nothing: only Settings search results are hidden — the underlying config paths remain valid and settable.

Tests

  • settingsSearchGovernance.test.ts → new it in "the palette provider honours it": asserts "Which judge answers" and "Model for the small-model judge" are withheld from both full-corpus search and tab listing when decisionsEnabled is false, and offered when true.
  • settingsSearchGovernance.test.ts → new it in "DECISIONS_SETTING_IDS covers the whole card": runs the extractor over DecisionsPointPanel.tsx and asserts every label found has its registry id in DECISIONS_SETTING_IDS.
  • Existing "names no id the registry does not have" test covers the new entries via [...DECISIONS_SETTING_IDS] expansion.

Manual verification

Verified via capture harness (website/capture/settings-search-governance-13850.tsx) with the dashboard config stub. Screenshots below show the search box with query "which judge" in both states.

Screenshots / video

Search query "which judge" — decisions_enabled: false (judge entry absent):

disabled.png

Search query "which judge" — decisions_enabled: true (judge entry shown):

enabled.png

Related Issues

Refs #13850

Not in this PR

These Settings surfaces have no existing backend availability signal and are not covered by this PR (need a maintainer-designed signal per the conductor's decision):

  • Feature Previews cards with no capabilities.* flag (e.g. artifact deploy, crewmates, chat-on-a-crew, composable layout, webhooks)
  • Display panel's theme install (would need capabilities.theme_install wired to /api/dashboard/config)

Pattern harvest

Rule candidate: review-prompt
Pattern: A file listed in the settings extractor's PANEL_TAB_MAP that belongs to a governed card should be covered by the governance coverage test alongside the primary card file. The test scope should match the extractor's scope.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 14, 2026 09:19
@CrysisDeu
CrysisDeu requested a review from mbriones98 October 14, 2026 09:19
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of a8107a2a4ad75b4da97e76b019138f1e244cbb26 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm the two image attachments show the in-page Settings search with "which judge" both withheld and shown.

[DESIGN-REVIEWED] a8107a2

Description read

[DESCRIPTION-READ] 4fb71924ca6449b0e5b7924df0ee7639e8397ce29543b6af6f532808962e3986

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of a8107a2a4ad75b4da97e76b019138f1e244cbb26 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Check that the clipped left edge of the search results in both screenshots comes from the capture harness's 320px container, not from SettingsSearch.

[UX-REVIEWED] a8107a2

Description read

[DESCRIPTION-READ] 466dc0d88231b978ed91aed2038839746a0a0f730fb490685a689444857c2689

That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of a8107a2a4ad75b4da97e76b019138f1e244cbb26 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Confirm the per-issue capture harness and Playwright script should be committed rather than kept as local verification tooling.

Not justified as shipped

  • Item 4 — undeclared: the description mentions the harness "Verified via capture harness", but website/scripts/capture-13850-settings-search-governance.mjs is never mentioned. It follows the existing website/capture/ convention (464 files), so it carries no premise risk.

What this change ships

Inventory (4 items) — 3 justified

Intent: Settings search should stop offering two Decisions judge controls on installations where Decisions is not offered. FIX.

  1. "Which judge answers" and "Model for the small-model judge" no longer appear in palette or in-page Settings search when decisions_enabled is false — justified
  2. The coverage test now also scans DecisionsPointPanel.tsx, so an ungoverned control added there fails the test — justified
  3. A palette-provider test pins both entries withheld when off and offered when on — justified
  4. A capture harness (settings-search-governance-13850.html/.tsx) and a Playwright screenshot script are committed — undeclared

[FIRST-PRINCIPLES-REVIEWED] a8107a2

Description read

[DESCRIPTION-READ] 3e6cb76fe5bbb057dbe727c9b94c3693ce8b46ab2abe5a54f56a868cb1a8c953

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed a8107a2a4ad75b4da97e76b019138f1e244cbb26 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] a8107a2

Verdict parsed from the review's SHA-scoped output markers for commit a8107a2a4ad75b4da97e76b019138f1e244cbb26.

False positive or not applicable? A repository writer can comment:
/ai-review override fable a8107a2a4ad75b4da97e76b019138f1e244cbb26: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of a8107a2a4ad75b4da97e76b019138f1e244cbb26 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] a8107a2

False positive or not applicable? A repository writer can comment:
/ai-review override gpt a8107a2a4ad75b4da97e76b019138f1e244cbb26: <one-sentence reason>

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Frontend Tests (2) shard is failing on src/test/ChatEmbed.optimisticSend.test.tsx (5 tests, all at sendText → getByLabelText('Chat message') not found). This test was introduced by PR #19881 (merged today at 07:58 UTC) and is broken on main; PR #20212 is the open fix. No overlap with the diff on this PR (settings search governance, TypeScript only). Failure reproduced on two consecutive runs. Will clear once #20212 lands.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 14, 2026
DecisionsPointPanel.tsx's two SettingsSelect controls (judge provider
and model) were extracted into the settings registry but absent from
DECISIONS_SETTING_IDS, so Settings search returned them even when
decisions_enabled is false.

Add both ids to the governed set. Extend the coverage test to also
scan DecisionsPointPanel.tsx so a future control added to that file
fails the test rather than leaking. Add palette-provider test cases
that assert the two entries are withheld under a governance pin.

Refs #13850
@CrysisDeu
CrysisDeu force-pushed the fix/settings-search-decisions-judge-leak-13850 branch from 10c34d4 to a8107a2 Compare October 14, 2026 10:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 14, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 14, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 14, 2026 11:05

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (5 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: adds the two judge selects from the Decisions point panel to DECISIONS_SETTING_IDS so settings search hides them when the feature is withdrawn; tests assert both states and that every control in that panel is listed.

@KiroCrewCaptain
KiroCrewCaptain merged commit 999ac08 into main Oct 14, 2026
102 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/settings-search-decisions-judge-leak-13850 branch October 14, 2026 11:06
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants