Skip to content

fix(worker): shield planted .claude/settings.json from worker commits (#449)#450

Merged
hadamrd merged 1 commit into
trunkfrom
fix/449-shield-planted-settings
Jun 10, 2026
Merged

fix(worker): shield planted .claude/settings.json from worker commits (#449)#450
hadamrd merged 1 commit into
trunkfrom
fix/449-shield-planted-settings

Conversation

@hadamrd

@hadamrd hadamrd commented Jun 10, 2026

Copy link
Copy Markdown
Owner

A getadaptiq worker committed the planted policy file over the target
repo's TRACKED .claude/settings.json — the operator's hooks and
permissions would have been destroyed on merge (caught at review,
PR salvaged). Root cause: plant_worker_settings overwrites the path,
and nothing kept the resulting diff out of the worker's add -A.

Shield at the git level so no worker cooperation is needed:

  • tracked file → git update-index --skip-worktree (overwrite invisible
    to status/diff/add)
  • untracked → append to info/exclude (worktree-local, resolved via
    --git-path so linked worktrees hit the right file)
    Best-effort on non-git dirs (unit fixtures) — the plant still applies.

2 new tests pin both cases end-to-end (real git repos, worker-style
add -A stages nothing). 61/61 in worker suites; full suite green
(known-bad test_critic_sdk excluded, pre-existing on trunk).

Closes #449.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

…#449)

A getadaptiq worker committed the planted policy file over the target
repo's TRACKED .claude/settings.json — the operator's hooks and
permissions would have been destroyed on merge (caught at review,
PR salvaged). Root cause: plant_worker_settings overwrites the path,
and nothing kept the resulting diff out of the worker's add -A.

Shield at the git level so no worker cooperation is needed:
- tracked file  → git update-index --skip-worktree (overwrite invisible
  to status/diff/add)
- untracked     → append to info/exclude (worktree-local, resolved via
  --git-path so linked worktrees hit the right file)
Best-effort on non-git dirs (unit fixtures) — the plant still applies.

2 new tests pin both cases end-to-end (real git repos, worker-style
add -A stages nothing). 61/61 in worker suites; full suite green
(known-bad test_critic_sdk excluded, pre-existing on trunk).

Closes #449.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hadamrd hadamrd merged commit 0aca727 into trunk Jun 10, 2026
@hadamrd hadamrd deleted the fix/449-shield-planted-settings branch June 10, 2026 23:36
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.

Worker session settings leak into repo commits (.claude/settings.json clobbered)

1 participant