Minimal Electron shell over the DSH JSON-RPC runtime — a first-look at what a ChatGPT.app-style host on top of the DeepSeek Harness looks like, with the harness's normally-invisible internals (trace timeline, context surface, subagent tree, compaction, plugin registry, rubrics) brought forward as first-class UI surfaces so plugin authors and researchers can see what the agent is actually doing. Runs against three keyless-to-live profiles (stdio-echo works on master out of the box; daemon-echo / daemon-vibe-echo activate once the daemon-demo lands; stdio-deepseek and daemon-vibe hit the real DeepSeek API when you supply a key). HARNESS_DEV auto-resolves to the in-repo runtime when this shell ships under examples/desktop/, so a fresh clone launches without config; env DSH_DEV_ROOT overrides for custom layouts, and a sibling deepseek-harness-dev/ checkout is the original dev workflow. Cold-clone gate (P0 fixes for first-time-clone usability): - HARNESS_DEV: 3-candidate resolver (env → walk-up in-repo marker → sibling), unit-tested via mock fs so ordering is locked without needing either real layout on disk. - config yml leaves rewritten at assemble time so the sibling-clone paths (../../deepseek-harness-dev/examples/echo-agent/…) become the in-repo paths (../../echo-agent/…) in the released tree — source yml stays usable for local dev, released tree ships a working shape. - pnpm-workspace.yaml allowBuilds.electron = true (was placeholder). - missing-key card in stdio-deepseek offers a one-click switch to stdio-echo (the keyless profile that works on master) rather than daemon-echo (blocked on the not-yet-shipped daemon-demo). - assemble-oss-release.sh rewrites the source-side breadcrumb name 'dsh-desktop-demo' → 'dsh-desktop' for the released package.json. FOUC guard on the onboarding gate (41fc5df carried) keeps the first-launch splash from flashing before the runtime probe finishes. Test suite (1634 tests in source, 3990 in the runtime repo) covers resolver ordering, renderer classifiers, trace timeline shape, compaction diff rendering, rubric parity, and the missing-key onboarding paths.
55 lines
2.5 KiB
Bash
Executable File
55 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Rolling gate: on every new commit to HEAD, run full tests + record
|
|
# renderer/panels-c/session-tree/plugins-tab touch stats so cross-lane hunk
|
|
# leakage is visible fast. Meant to run in a foreground loop; kill with C-c.
|
|
#
|
|
# v2 (2026-07-16): tests run in a dedicated clean worktree at HEAD so
|
|
# in-flight lane WIP in the primary tree can't contaminate results (the v1
|
|
# false-alarm at 03cd26f + 3252d7f was uncommitted capabilities.js in the
|
|
# primary tree failing the IIFE-guard). The clean tree is reset to the new
|
|
# HEAD each pass via `git checkout --detach`, keeping node_modules symlinked
|
|
# from the primary.
|
|
set -u
|
|
STATE=/tmp/qa-gate-last-sha
|
|
LOG=/tmp/qa-gate.log
|
|
# Primary repo checkout defaults to the current git top-level; override
|
|
# with REPO_ROOT env var (e.g. REPO_ROOT=~/harness/dsh-desktop-demo).
|
|
PRIMARY="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
|
CLEAN=/tmp/dsh-clean-gate/tree
|
|
cd "$PRIMARY" || exit 1
|
|
touch "$STATE"
|
|
# Bootstrap the clean worktree once, symlinking node_modules from the primary
|
|
# so the loop doesn't reinstall on every commit.
|
|
if [ ! -d "$CLEAN" ]; then
|
|
mkdir -p /tmp/dsh-clean-gate
|
|
git worktree add "$CLEAN" HEAD >>"$LOG" 2>&1
|
|
ln -sf "$PRIMARY/node_modules" "$CLEAN/node_modules"
|
|
fi
|
|
while :; do
|
|
cur=$(git -C "$PRIMARY" rev-parse HEAD)
|
|
last=$(cat "$STATE" 2>/dev/null || echo '')
|
|
if [ "$cur" != "$last" ]; then
|
|
ts=$(date '+%H:%M:%S')
|
|
echo "[$ts] new HEAD $cur" | tee -a "$LOG"
|
|
# Touch stats for hunk-cross-contamination watch (five renderer hotspots)
|
|
git -C "$PRIMARY" show --stat "$cur" | grep -E "renderer\.js|panels-c\.js|session-tree\.js|context-meter\.js|plugins-tab\.js" | tee -a "$LOG"
|
|
# Sync the clean worktree to the new HEAD (detached — never a branch tip
|
|
# we could accidentally commit onto).
|
|
if git -C "$CLEAN" checkout --detach "$cur" >/tmp/qa-gate-checkout.log 2>&1; then
|
|
# Full test — capture only fail counter + tail
|
|
if (cd "$CLEAN" && npm test --silent) >/tmp/qa-gate-npmtest.log 2>&1; then
|
|
tail -5 /tmp/qa-gate-npmtest.log | tee -a "$LOG"
|
|
echo " ok tests green (clean tree)" | tee -a "$LOG"
|
|
else
|
|
echo " RED: tests failed on $cur (clean tree, not WIP)" | tee -a "$LOG"
|
|
tail -30 /tmp/qa-gate-npmtest.log | tee -a "$LOG"
|
|
fi
|
|
else
|
|
echo " ERROR: could not sync clean worktree to $cur" | tee -a "$LOG"
|
|
tail -5 /tmp/qa-gate-checkout.log | tee -a "$LOG"
|
|
fi
|
|
echo "$cur" > "$STATE"
|
|
fi
|
|
sleep 15
|
|
done
|