Files
jason.woltjeandClaude Opus 5.5 5a68df7275 agents: darkwing row 118 round 1 packet (#1612)
SAFE in packages/seat/src/checkout.mjs adds maintenance.auto=false and
gc.auto=0; probe, tests, mutants m1-m3 (all killed), targeted gate
(seat 132/0, cli 184/0) and the leftover sweep. Candidate is build.patch
against 2727dd3ec; manifest digests check out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 14:41:09 -05:00

29 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Manual probe, not a suite: which host git calls in a clone start
# auto-maintenance on this git, and do the two -c keys stop it.
set -u
P=~/darkwing-scratch/r118/probe; R=$P/run; rm -rf "$R"; mkdir -p "$R"; cd "$R" || exit 9
REAL=$(command -v git); EXEC=$(git --exec-path); W=$R/w; LOG=$R/calls; mkdir "$W"
for f in "$EXEC"/*; do b=${f##*/}; [ "$b" = git ] || ln -s "$f" "$W/$b"; done
printf '#!/bin/sh\nprintf "%%s\\n" "$*" >> %s\nGIT_EXEC_PATH=%s exec %s "$@"\n' "'$LOG'" "'$W'" "'$REAL'" > "$W/git"; chmod +x "$W/git"
E=(env -i "PATH=$W:/usr/bin:/bin" HOME=/nonexistent GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null)
SAFE=(-c core.hooksPath=/dev/null -c core.fsmonitor=false -c protocol.allow=never -c protocol.file.allow=always -c submodule.recurse=false)
U=(-c user.name=t -c user.email=[email protected])
case "${1:-}" in maonly) SAFE+=(-c maintenance.auto=false);; keys) SAFE+=(-c maintenance.auto=false -c gc.auto=0);; gconly) SAFE+=(-c gc.auto=0);; esac
"${E[@]}" "$REAL" init -q -b main root; echo one > root/R; "${E[@]}" "$REAL" -C root add R; "${E[@]}" "$REAL" "${U[@]}" -C root commit -qm one
"${E[@]}" git "${SAFE[@]}" clone -q --no-hardlinks --template= --branch main "$R/root" clone
node "$P/loose.mjs" clone/.git/objects "${2:-40}"
echo two > root/R; "${E[@]}" "$REAL" "${U[@]}" -C root commit -qam two
: > "$LOG.before"; cp "$LOG" "$LOG.clone"; : > "$LOG"
G=(--git-dir="$R/clone/.git" --work-tree="$R/clone")
"${E[@]}" git "${SAFE[@]}" "${G[@]}" fetch -q --no-tags --no-recurse-submodules origin; echo "fetch rc=$?"
cp "$LOG" "$LOG.fetch"; : > "$LOG"
"${E[@]}" git "${SAFE[@]}" "${G[@]}" merge --ff-only -q origin/main; echo "merge rc=$?"
cp "$LOG" "$LOG.merge"
for s in clone fetch merge; do echo "== $s"; sed -E 's/-c [^ ]+ //g' "$LOG.$s"; done
# A detached maintenance may still be running; give it a moment by polling, not sleep-chaining.
busy() { for p in /proc/[0-9]*; do [ "$(readlink $p/cwd 2>/dev/null)" = "$R/clone" ] && return 0; done; return 1; }
for i in $(seq 300); do busy || break; read -t 0.1 <> <(:) 2>/dev/null || true; done; echo "waited ${i} polls"
echo "== after wait"; sed -E 's/-c [^ ]+ //g' "$LOG"
echo "loose in 17: $(ls clone/.git/objects/17 2>/dev/null | wc -l) packs: $(ls clone/.git/objects/pack/*.pack 2>/dev/null | wc -l)"