Commit Graph
17 Commits
Author SHA1 Message Date
Turtle ef30572e63 fix: retire leftovers of the removed $DSH_HOME/config.yaml personal overlay
The profile rework left references to the old entry modes behind. Renames
the user patch-layer API and its spec file (watchPersonalPatches ->
watchUserPatches, personal-config.spec.ts -> user-patches.spec.ts) and
retargets the prose that still named `config.yaml`, `--config`, raw-config
mode, and surface overlays: repository-plugin and mcp-memory READMEs, the
credentials-local anchor into app-boot, vendor manifest items 12-13, the
vendored include/hmr comments, and install.sh.

Restores the boot-failure guard the rework dropped with raw mode: the
built-bin case now boots `--profile web --patch <invalid>` and asserts the
settled diagnostic and exit 1, so the HMR initial-scan deadlock stays
covered; its orphaned raw fixture is renamed and the unused one deleted.
The superseded personal-config Agent Note and its superseding profile note
are now cross-linked.
2026-08-06 17:28:58 +08:00
Turtle 10bb9cbf4a cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00
Tianyi Cui 089f921663 Merge pull request #983 from deepseek-harness/codex/install-pnpm-stderr
fix(install): show pnpm version errors
2026-08-02 17:41:43 +08:00
Tianyi Cui b02b7b2e50 Merge remote-tracking branch 'origin/master' into feature/installer-adopt-checkout 2026-08-01 19:44:12 +08:00
Tianyi Cui 1d86be1b74 docs(install): correct managed-layout comments 2026-08-01 19:35:48 +08:00
Turtle c435350561 docs(install): the path bug is symlinks, not /var
The comments and Agent Note blamed macOS resolving /var through
private/var. That is only how the mismatch surfaced in temp fixtures, since
mktemp hands back a /var path there.

The real condition is broader: Git always reports resolved paths, so
comparing one against an unresolved path disagrees whenever a symlink sits
anywhere above the checkout. A symlinked home directory alone triggers it —
reproduced with no /var involved — which is common wherever homes live
behind a symlink or on a network mount.

Naming the cause correctly keeps a reader from dismissing resolve_dir as
macOS-only defensiveness.
2026-07-31 23:47:58 +08:00
Turtle db432c1e74 fix(install): correct a false claim about shell assignment semantics
Review flagged the resolve_dir comment: it claimed `x=$(cmd) || fallback`
never fires "because the assignment succeeds even when the substitution
fails." That is wrong — command substitution propagates exit status and the
fallback does fire, confirmed in sh, bash, dash, and zsh.

Reproducing the original code shows the fallback also worked, so the second
"recurrence" the Agent Note described never existed. Both real defects were
the same one: comparing a resolved path against an unresolved one. The note
now says that instead of inventing a mechanism.

resolve_dir keeps its `|| printf` because it makes every caller a plain
assignment, so no site can compare against an empty path by forgetting its
own fallback — the reason is now stated accurately.

Also from review: REPO_COMMON is now resolved on both branches, matching
REPO_ROOT, and _repo_root notes why it is already physical without its own
resolve_dir call.
2026-07-31 23:40:40 +08:00
Turtle f3a1ff41b7 cleanup(install): drop the master.path record
Nothing read it. The launcher, dsh-upgrade, and the installer's own re-run
all ignored the file, and the diagnostic it was meant to feed was never
built, so it was write-only state.

Git already owns the fact it recorded: a staging worktree's .git file names
the repository path, and `git worktree list` in that clone enumerates every
worktree depending on it. An installer-written copy only adds state that can
go stale while nothing validates it.

The containment caveat it documented is real and stays in the script header
and the Agent Note, now pointing at git's own records.
2026-07-31 21:17:28 +08:00
Turtle 00c5f2abd1 refactor(install): always adopt, dropping the link-in-place path
Retaining link-in-place behind a prompt and DSH_ADOPT kept the divergent
install shape that this change exists to remove, and cost a flag, a prompt,
a dirty-tree warning, a no-commit fallback, and a second linking path.

In-repo mode now adopts unconditionally. A dirty tree adopts silently:
`worktree add` from HEAD cannot carry uncommitted work, so a prompt only
adds a decision the user cannot act on differently.

The original reason for link-in-place — keeping the script testable against
local source — survives adoption, since the staging worktree branches from
the checkout's HEAD and runs the same code. DSH_SOURCE remains the escape
hatch for installing a separate tree.

Net 47 fewer lines in the installer.
2026-07-31 20:31:30 +08:00
Turtle 631510f54e feat(install): adopt an existing checkout into the managed layout
Running scripts/install.sh from a checkout linked `dsh` straight at that
checkout, producing an install that `dsh-upgrade` cannot upgrade (there is
no `current` to repoint), that dangles if the checkout moves, and whose
launcher resolves to an arbitrary working branch.

In-repo mode still never clones and never touches the working tree, but it
now offers to adopt the checkout, and adoption is the default. The container
owns staging worktrees and `current`; the repository is discovered via
`git rev-parse --git-common-dir` rather than owned, so a clone anywhere on
disk converges on the same upgradable layout as a curl install and both
share one worktree/exclude/lock/link sequence.

Declining, or DSH_ADOPT=0, keeps the previous link-in-place behavior with a
warning naming what it costs, preserving the path that makes this script
testable against local source.

All path comparisons run on physical paths: macOS resolves /var through a
symlink to /private/var, and comparing a resolved path against an unresolved
one misclassified an existing managed install as a foreign clone.

Verified manually (no install.spec.ts, per request) with a harness driving
the real script under a stubbed pnpm across 33 assertions, plus both
interactive outcomes under tmux.
2026-07-31 20:22:40 +08:00
Tianyi Cui 4ada0017cf fix(install): build workspace artifacts before web 2026-07-31 19:57:51 +08:00
Tianyi Cui 0d949cfe67 feat(install): choose web or tui after setup 2026-07-31 19:47:54 +08:00
Turtle 83ae7046f2 fix(install): preserve pnpm version errors 2026-07-30 17:54:48 +08:00
Turtle bd4bc84283 feat(install): consolidate checkouts under ~/.dsh/source and route PATH through a stable current symlink 2026-07-27 19:08:26 +08:00
Tianyi Cui 25f06b4e29 chore(install): flag TypeScript extraction 2026-07-22 17:31:10 +08:00
Turtle 2464d6169f feat(app-boot): move personal config to the Harness home (~/.dsh)
Squashes feat/personal-config-dsh-home: personal config.yaml and .env move
from ~/.config/dsh to the Harness home (~/.dsh), plus the module-graph,
lockfile, and i18n pairing regeneration that followed.
2026-07-22 14:29:52 +08:00
Turtle 717f301cdd feat: curl one-liner install script for dsh
Squashes feat/install-script, feat/install-default-master, and
install-skip-clone: DSH_REF defaults to master, and running the script from
inside an existing checkout reuses it and skips the clone.
2026-07-22 14:29:52 +08:00