Skip to content

chore(compat): ship 8 CC 2.1.143 opt-ins + fix latent // strip; tested_up_to 2.1.132 → 2.1.150 - #56

Merged
tigers1997 merged 1 commit into
mainfrom
chore/cc-compat-2.1.150-unblock-batch
May 23, 2026
Merged

chore(compat): ship 8 CC 2.1.143 opt-ins + fix latent // strip; tested_up_to 2.1.132 → 2.1.150#56
tigers1997 merged 1 commit into
mainfrom
chore/cc-compat-2.1.150-unblock-batch

Conversation

@tigers1997

Copy link
Copy Markdown
Owner

Summary

SchemaStore PR #5706 merged 2026-05-23 (sync to CC v2.1.143), unblocking the nine settings.json keys + five env vars tracked in #53. This PR ships all of them as commented opt-ins (the PRs #17/#18 pattern), bumps tested_up_to 2.1.132 → 2.1.150 after a final 2.1.147–2.1.150 resurvey, and fixes a latent strip bug that had been silently dropping opt-in stubs from generated .claude/settings.json since the initial commit.

What's in this PR

Settings-key opt-ins (commented; user uncomments to activate, matching the PRs #17 prUrlTemplate and #18 sandbox.network.deniedDomains precedent):

  • skillOverridestemplates/token-efficiency/settings-patch.tier-pro.json, behind the existing tier=pro flag
  • worktree.baseRef + worktree.bgIsolation → new templates/multi-agent/settings-patch.json (multi-agent module previously shipped no settings; added settingsPatch reference)
  • autoMode.hard_deny + sandbox.failIfUnavailabletemplates/safety/settings-patch.json (failIfUnavailable nested inside the existing // sandbox block)
  • subagentStatusLine + statusLine.hideVimModeIndicatorui module extraSettings in config_schema.py
  • Hook args: string[] + continueOnBlock: boolean → doc note in safety and git-workflow settings-patch.json comment blocks (no behavioral change; forward-looking enablement for user-authored hooks)

Env vars: CLAUDE_CODE_STOP_HOOK_BLOCK_CAP shipped in safety/settings-patch.json's commented // env block (seeded value "16"). Four others (ANTHROPIC_WORKSPACE_ID, CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE, CLAUDE_CODE_PLUGIN_PREFER_HTTPS, CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY) are platform-/workspace-specific and captured in the CLAUDE_CODE_COMPAT rationale comment rather than as template defaults.

Compat bump: CLAUDE_CODE_COMPAT.tested_up_to 2.1.132 → 2.1.150 with a rewritten rationale comment. 2.1.147–2.1.150 resurvey found one new configurator-adjacent key (allowAllClaudeAiMcps, 2.1.149) — Enterprise managed setting, outside configurator territory.

Latent-bug fix

While wiring the new opt-ins I discovered that configure.py:463 was stripping ALL top-level //-prefixed keys when merging settingsPatch files, including the opt-in stubs (// sandbox, // prUrlTemplate) that PRs #17 and #18 promised users would see in their .claude/settings.json. The filter intended to drop documentation labels ("//", "//2", "//9") but was too broad.

New _is_doc_label(k) helper distinguishes label keys (key is "//" exactly, or // followed by digits only) from stub keys ("// foo" with a name). After the fix:

  • // sandbox, // prUrlTemplate, // worktree, // autoMode, // env, // skillOverrides, // subagentStatusLine, // hideVimModeIndicator, // failIfUnavailable all surface in scaffolded settings.json
  • "//", "//2", "//9" documentation strings are still filtered out

Side effect: users on existing scaffolds will see the prUrlTemplate + sandbox.network.deniedDomains stubs in their settings.json on next cc-configure --retrofit — matching the documented PRs #17/#18 behavior for the first time. No persona snapshot drift; all 50+ shell fixtures still pass.

Two source patch files corrected (templates/safety/settings-patch.slop-scan.json, templates/commands/microbit-enforcer/settings-patch.json) — their top-level "// settings-patch.slop-scan.json" / "// microbit-enforcer.json" keys were maintainer-facing docs that would otherwise leak into user settings under the new filter; rewritten as plain "//" labels.

Still held for a future schemastore sync

  • Hook output terminalSequence field (CC 2.1.147) — NOT in #5706, verified absent from head-branch schema 2026-05-21
  • Stop/SubagentStop hook input background_tasks + session_crons fields (CC 2.1.149) — NOT in #5706

Test plan

  • python3 configure.py --check → all checks passed; compat now reads 2.1.116–2.1.150
  • All 5 persona snapshot tests (solo-newer, solo-experienced, small-team, library-author, custom) match examples/persona-*/expected-tree.txt
  • All 50+ shell fixtures pass locally (microbit-enforcer, slop-scan, efficiency-placeholder, v1-legacy-upgrade, v1-upgrade-ux, cc-manifest, sessionstart-drift-check, repo-url-placeholder, stop-run-checks, repo-bootstrap, verify-setup)
  • All 6 --modules core,$mod smoke combos pass (multi-agent, github-actions, lockdown, experiments-memory, mcp, ui)
  • Manually inspected scaffolded .claude/settings.json for small-team persona — all 8 new // opt-ins present and well-formed
  • CI (check workflow) passes on this branch

Closes #53.

🤖 Generated with Claude Code

… bump tested_up_to to 2.1.150

SchemaStore PR #5706 merged 2026-05-23 (sync to CC v2.1.143), unblocking
nine settings.json keys + five env vars held in the configurator backlog.
This PR ships all of them as commented opt-ins (the PRs #17/#18 pattern)
and bumps tested_up_to 2.1.132 → 2.1.150 after the 2.1.147-2.1.150
resurvey found only one new key (allowAllClaudeAiMcps, 2.1.149 —
Enterprise managed, outside configurator territory).

Latent-bug fix: configure.py was stripping ALL top-level //-prefixed
keys when merging settingsPatch files, including the opt-in stubs
(// sandbox, // prUrlTemplate) PRs #17 and #18 promised would surface
in users' generated .claude/settings.json. New _is_doc_label helper
keeps stub keys, drops only label keys (//, //N). Two source patches
also corrected (slop-scan, microbit-enforcer) — their top-level
documentation keys would otherwise leak under the new filter.

Settings-key opt-ins shipped (commented; user uncomments to activate):
- skillOverrides → token-efficiency tier-pro patch
- worktree.baseRef + worktree.bgIsolation → new multi-agent patch
- autoMode.hard_deny + sandbox.failIfUnavailable → safety patch
- subagentStatusLine + statusLine.hideVimModeIndicator → ui extraSettings
- Hook args/continueOnBlock → doc note in safety + git-workflow patches
- CLAUDE_CODE_STOP_HOOK_BLOCK_CAP → safety patch // env block

Still held for a future schemastore sync: terminalSequence hook output
(2.1.147), Stop/SubagentStop input background_tasks/session_crons
(2.1.149). Both verified absent from #5706.

Closes #53.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@tigers1997
tigers1997 merged commit 0942e25 into main May 23, 2026
1 check passed
@tigers1997
tigers1997 deleted the chore/cc-compat-2.1.150-unblock-batch branch May 23, 2026 22:00
tigers1997 added a commit that referenced this pull request May 23, 2026
… defaults (#57)

Follow-up to PR #56's unblock batch. Two of the eight opt-ins shipped as
stubs in that PR are now active defaults, based on a per-key review
against the configurator's existing safety/efficiency goals. The other
six stay stubbed for genuine reasons (user-workflow choice,
infrastructure-dependent, or would break shipped scripts).

Promoted:

- skillOverrides: "name-only" → active in
  templates/token-efficiency/settings-patch.tier-pro.json (renders only
  when token-efficiency.tier=pro). Extends the pro tier's existing
  "aggressive context efficiency" contract by collapsing skill
  descriptions — the largest single contributor to per-turn context
  overhead, the metric /check-context flags. Model still sees skill
  names. basic tier unaffected. Personas affected: solo-experienced,
  small-team. Override by editing the patch.

- autoMode.hard_deny: ["Running executable files", "Writing to system
  directories"] → active in templates/safety/settings-patch.json. Pure
  upside: zero behavior change for standard manual sessions (auto-mode
  classifier doesn't fire without --auto-mode), meaningful safety
  backstop for --auto-mode users. Consistent with the configurator's
  existing safety-first posture (disableBypassPermissionsMode,
  PreToolUse Bash blocking, scan-secrets, slop-scan). All non-custom
  personas affected. Tune via the patch.

No tested_up_to bump (stays 2.1.150 from PR #56). No new tests required —
schema validation + persona snapshots + 50+ shell fixtures all pass.

Retrofit impact: existing users on cc-configure --retrofit will gain a
top-level autoMode block (all non-custom personas) and, for pro-tier
users, a top-level skillOverrides: "name-only". Both are no-ops in
common workflows.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
tigers1997 added a commit that referenced this pull request May 23, 2026
…ive-default promotions (#58)

Bundle release of PRs #56 + #57:

- PR #56 — chore(compat): ship 8 schema-validated opt-ins + fix latent
  // strip; bump tested_up_to 2.1.132 → 2.1.150. Closed tracking issue
  #53 after a three-resurvey watch on SchemaStore PR #5706 (merged
  2026-05-23, sync to CC v2.1.143).
- PR #57 — feat(defaults): promote skillOverrides + autoMode.hard_deny
  to active defaults. Six other opt-ins from #56 stay stubbed for
  genuine reasons documented in the patch comments.

CC_VERSION 2.5.0 → 2.6.0. Claude Code compat 2.1.116–2.1.150.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
tigers1997 added a commit that referenced this pull request May 24, 2026
…lOverrides (#60)

Dogfood from upgrading an adjacent project to the latest configurator
version surfaced two real Claude Code settings-validator complaints:

1. `templates/token-efficiency/settings-patch.tier-pro.json` shipped
   `"skillOverrides": "name-only"` (string form), but the current Claude
   Code schema requires the per-skill object map. The string form was
   based on a comment in the patch file that claimed a global "apply to
   all skills" form existed; verification against the official doc
   (code.claude.com/docs/en/settings) shows it never did. Also: the
   setting explicitly doesn't apply to plugin skills, further narrowing
   its usefulness as a tier-wide default.

2. The `// foo` "commented opt-in stub" pattern propagated literal
   top-level keys into the user's `.claude/settings.json`. PR #56's
   `_is_doc_label` filter intentionally kept `// foo` stubs (stripping
   only bare `//` and `//<digits>`) so users could uncomment them.
   Empirically, those propagated keys trigger schema-validator complaints
   in the user's editor — the intent was wrong.

A third bug was found during verification: `compute_merged_settings`
applies the doc-label filter to file-based patches but bypasses inline
`extraSettings` (ui module). So the ui module's bare `"//"` doc-labels
were also leaking to user settings.json.

Fixes:
  - `_is_doc_label` now strips ALL `//`-prefixed keys.
  - New `_strip_doc_labels()` recursively scrubs merged settings —
    catches nested cases (e.g., `statusLine.// hideVimModeIndicator`)
    the shallow per-merge filters miss.
  - `extraSettings` merge path now applies the filter.
  - `skillOverrides: "name-only"` deleted from tier-pro (replaced with
    a docstring explaining why no default is shipped).
  - All `// foo` stubs deleted from 4 source patch files + the ui
    module's inline `extraSettings`.
  - Opt-in discovery moved to
    `templates/core/dot-claude/settings.local.json.example` — the
    `.example` suffix means Claude Code doesn't parse it directly, so
    `// foo` stubs there are safe.
  - New `check_settings_validates()` runtime preflight emits a
    `[ SETTINGS WARNINGS ]` block when violations are detected.
  - New static `--check` step asserts no patch file ships
    `skillOverrides` as a non-object (regression guard — fires on the
    current bug when first run).

New tests under `test/schema-hygiene/`:
  - All 5 personas render settings.json with zero `//`-prefixed keys
  - No settings-patch ships `skillOverrides` as a non-object
  - `check_settings_validates` catches 4 violation classes + clean case
  - `_strip_doc_labels` recursively strips at all depths

Compat: existing users get the cleanup on next `cc-configure --retrofit`.
Deep-merge preserves their customizations; the new strip removes leaks.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

Tracking: SchemaStore PR #5706 merge → batch unblock 11 keys + 5 env vars

1 participant