fix(settings-validator): accept CC 2.1.114–181 keys + xhigh effort
Clears a cluster of active false positives where valid, documented Claude Code config was flagged as unknown/invalid (gap matrix, Batch 1). KNOWN_KEYS +11 (CC 2.1.133–181): allowAllClaudeAiMcps, disableBundledSkills, enforceAvailableModels, fallbackModel, footerLinksRegexes, parentSettingsBehavior, pluginSuggestionMarketplaces, requiredMaximumVersion, requiredMinimumVersion, sandbox, wheelScrollAccelerationEnabled. VALID_EFFORT_LEVELS += 'xhigh' (CC 2.1.154 Opus-4.8 top tier). TYPE_CHECKS += disableBundledSkills/wheelScrollAccelerationEnabled (boolean). fallbackModel intentionally NOT type-checked (string | array<=3). Tests: hermetic runtime temp-fixture (path-guard blocks committing settings.json); 29/29 SET green, full hermetic suite unaffected. Ref: docs/cc-2.1.x-gap-matrix.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ter3E2JSi1Khgmuf2kady8
This commit is contained in:
parent
315ea2259f
commit
73099354c7
2 changed files with 98 additions and 21 deletions
|
|
@ -12,26 +12,29 @@ import { extractKeys } from './lib/string-utils.mjs';
|
|||
|
||||
const SCANNER = 'SET';
|
||||
|
||||
/** Known top-level settings.json keys (as of April 2026) */
|
||||
/** Known top-level settings.json keys (as of CC 2.1.181 / June 2026) */
|
||||
const KNOWN_KEYS = new Set([
|
||||
'additionalDirectories',
|
||||
'agent', 'allowedChannelPlugins', 'allowedHttpHookUrls', 'allowedMcpServers',
|
||||
'allowManagedHooksOnly', 'allowManagedMcpServersOnly', 'allowManagedPermissionRulesOnly',
|
||||
'alwaysThinkingEnabled', 'apiKeyHelper', 'attribution', 'autoMemoryDirectory',
|
||||
'autoMemoryEnabled', 'autoMode', 'autoUpdatesChannel', 'availableModels',
|
||||
'awsAuthRefresh', 'awsCredentialExport', 'blockedMarketplaces', 'channelsEnabled',
|
||||
'cleanupPeriodDays', 'claudeMdExcludes', 'companyAnnouncements', 'defaultShell',
|
||||
'deniedMcpServers', 'disableAllHooks', 'disableAutoMode', 'disableDeepLinkRegistration',
|
||||
'agent', 'allowAllClaudeAiMcps', 'allowedChannelPlugins', 'allowedHttpHookUrls',
|
||||
'allowedMcpServers', 'allowManagedHooksOnly', 'allowManagedMcpServersOnly',
|
||||
'allowManagedPermissionRulesOnly', 'alwaysThinkingEnabled', 'apiKeyHelper',
|
||||
'attribution', 'autoMemoryDirectory', 'autoMemoryEnabled', 'autoMode',
|
||||
'autoUpdatesChannel', 'availableModels', 'awsAuthRefresh', 'awsCredentialExport',
|
||||
'blockedMarketplaces', 'channelsEnabled', 'cleanupPeriodDays', 'claudeMdExcludes',
|
||||
'companyAnnouncements', 'defaultShell', 'deniedMcpServers', 'disableAllHooks',
|
||||
'disableAutoMode', 'disableBundledSkills', 'disableDeepLinkRegistration',
|
||||
'disabledMcpjsonServers', 'effortLevel', 'enableAllProjectMcpServers',
|
||||
'enabledMcpjsonServers', 'enabledPlugins', 'env', 'extraKnownMarketplaces',
|
||||
'fastModePerSessionOptIn', 'feedbackSurveyRate', 'fileSuggestion',
|
||||
'forceLoginMethod', 'forceLoginOrgUUID', 'hooks', 'httpHookAllowedEnvVars',
|
||||
'includeCoAuthoredBy', 'includeGitInstructions', 'language', 'model',
|
||||
'modelOverrides', 'otelHeadersHelper', 'outputStyle', 'permissions',
|
||||
'plansDirectory', 'pluginTrustMessage', 'prefersReducedMotion',
|
||||
'respectGitignore', 'showClearContextOnPlanAccept', 'showThinkingSummaries',
|
||||
'spinnerTipsEnabled', 'spinnerTipsOverride', 'spinnerVerbs', 'statusLine',
|
||||
'strictKnownMarketplaces', 'useAutoModeDuringPlan', 'voiceEnabled',
|
||||
'enabledMcpjsonServers', 'enabledPlugins', 'enforceAvailableModels', 'env',
|
||||
'extraKnownMarketplaces', 'fallbackModel', 'fastModePerSessionOptIn',
|
||||
'feedbackSurveyRate', 'fileSuggestion', 'footerLinksRegexes', 'forceLoginMethod',
|
||||
'forceLoginOrgUUID', 'hooks', 'httpHookAllowedEnvVars', 'includeCoAuthoredBy',
|
||||
'includeGitInstructions', 'language', 'model', 'modelOverrides', 'otelHeadersHelper',
|
||||
'outputStyle', 'parentSettingsBehavior', 'permissions', 'plansDirectory',
|
||||
'pluginSuggestionMarketplaces', 'pluginTrustMessage', 'prefersReducedMotion',
|
||||
'requiredMaximumVersion', 'requiredMinimumVersion', 'respectGitignore', 'sandbox',
|
||||
'showClearContextOnPlanAccept', 'showThinkingSummaries', 'spinnerTipsEnabled',
|
||||
'spinnerTipsOverride', 'spinnerVerbs', 'statusLine', 'strictKnownMarketplaces',
|
||||
'useAutoModeDuringPlan', 'voiceEnabled', 'wheelScrollAccelerationEnabled',
|
||||
'worktree', '$schema',
|
||||
]);
|
||||
|
||||
|
|
@ -47,6 +50,7 @@ const TYPE_CHECKS = new Map([
|
|||
['channelsEnabled', 'boolean'],
|
||||
['cleanupPeriodDays', 'number'],
|
||||
['disableAllHooks', 'boolean'],
|
||||
['disableBundledSkills', 'boolean'],
|
||||
['effortLevel', 'string'],
|
||||
['enableAllProjectMcpServers', 'boolean'],
|
||||
['fastModePerSessionOptIn', 'boolean'],
|
||||
|
|
@ -60,10 +64,11 @@ const TYPE_CHECKS = new Map([
|
|||
['showThinkingSummaries', 'boolean'],
|
||||
['spinnerTipsEnabled', 'boolean'],
|
||||
['voiceEnabled', 'boolean'],
|
||||
['wheelScrollAccelerationEnabled', 'boolean'],
|
||||
]);
|
||||
|
||||
/** Valid effortLevel values */
|
||||
const VALID_EFFORT_LEVELS = new Set(['low', 'medium', 'high', 'max']);
|
||||
/** Valid effortLevel values (CC 2.1.154 added 'xhigh' as the Opus-4.8 top tier) */
|
||||
const VALID_EFFORT_LEVELS = new Set(['low', 'medium', 'high', 'xhigh', 'max']);
|
||||
|
||||
/** v5 M6: warn when additionalDirectories grows beyond this — each entry adds
|
||||
* a project root to walks/discovery, inflating per-turn cost and confusing scope. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue