Skip to content

fix(install): adopt after an install wires the project settings - #1248

Merged
tieubao merged 3 commits into
masterfrom
fix/adopt-settings-after-install
Nov 30, 2026
Merged

tieubao merged 3 commits into
masterfrom
fix/adopt-settings-after-install

Conversation

@tieubao

@tieubao tieubao commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What

adopt run from an out-of-place install now wires the consumer repo's .claude/settings.json, and says so on stderr when it cannot.

Demo

tests/test-adopt.sh 88/88; red on the old install.sh and lib/adopt.sh (81 pass, 7 fail).

Proof

docs/verification/adopt-settings-after-install.md

  • Verdict: works.
  • Proof: test-adopt 88/88 (red on the old code), test-install-modules 67/67, test-meta 943/943; one fresh review ran fresh, upgrade, uninstall, in-place and compat installs in a sandbox.
  • Risk: the installer on every host changes; undo with a revert of this merge.
  • Needs Han: nothing.

Bookkeeping

no-board-row: installer bug found by the outline audit; tracked on the owner's devkit move item

Out-of-place install.sh copied lib/, bin/, hooks/, and kit.toml into $CLAUDE_DIR/dwarves-kit/ but omitted root settings.json, causing the installed lib/adopt.sh to silently skip writing <repo>/.claude/settings.json.

- Copy root settings.json into $CLAUDE_DIR/dwarves-kit/ on out-of-place installs, symlink it in plugin-compat mode, and remove only kit-deployed copies/symlinks on --uninstall.
- Guard in-place/symlinked checkouts from overwriting or self-truncating kit.toml during install.sh.
- Warn loudly on stderr in lib/adopt.sh when settings.json cannot be found on a non-plugin machine instead of skipping silently.
- Add regression tests in tests/test-adopt.sh covering out-of-place install + adopt, missing settings.json warning, uninstall, in-place symlink checkout, and plugin installs.
- Add Verdict: RED line to the negative-control block in docs/verification/adopt-settings-after-install.md so VER-03 passes.
- Fix all shellcheck -S warning findings across install.sh (remove dead KIT_MARKER, use literal tilde pattern in kit_mod_skip_dup, split local bak declaration), lib/adopt.sh (targeted SC2088 disable on intentional KIT_REF tilde, scope KIT_CONFIG_ROOT/KIT_PROJECT_ROOT inside command substitutions), and tests/test-adopt.sh (guard cd, targeted SC2088 disables, drop unused KFULL/E13, assert m2 mode).
- Record master AGENTS.md hash (05221e8) in lib/adopt/agents-known.sha256 so tests/test-adopt.sh passes after rebase.
@tieubao
tieubao merged commit de38da2 into master Nov 30, 2026
3 checks passed
@tieubao
tieubao deleted the fix/adopt-settings-after-install branch November 30, 2026 19:03
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.

1 participant