From 2b3ce1c7e34bceb709ace2724ce7396df97bfa79 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:14:16 +0000 Subject: [PATCH] Observer autosync: a failed fast-forward names git's reason and the dirty files the incoming commits also touch Co-Authored-By: Claude Fable 5.1 --- tools/observer/autosync.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/observer/autosync.sh b/tools/observer/autosync.sh index 78df973e7..2847d32c7 100755 --- a/tools/observer/autosync.sh +++ b/tools/observer/autosync.sh @@ -32,10 +32,13 @@ while :; do local_sha=$(git rev-parse HEAD); remote_sha=$(git rev-parse origin/master) if [ "$local_sha" != "$remote_sha" ]; then if [ -z "$(git status --porcelain -- $PATHS)" ] && git merge-base --is-ancestor HEAD origin/master; then - if git merge -q --ff-only origin/master; then + if git merge -q --ff-only origin/master 2>/tmp/igneum-devnet/autosync-ff.err; then echo "$(date -u +%FT%TZ) fast-forwarded to $(git rev-parse --short HEAD)" else - echo "$(date -u +%FT%TZ) fast-forward failed (local $local_sha, origin $remote_sha)" + # name what blocks it: files dirty here that the incoming commits also change (4 October 2026, 20:05: results + # files edited in the shared checkout against a commit of the same files; the observer sat behind master) + blocking=$(comm -12 <(git status --porcelain | awk '{print $2}' | sort) <(git diff --name-only HEAD origin/master | sort) | head -5 | tr '\n' ' ') + echo "$(date -u +%FT%TZ) fast-forward failed (local ${local_sha:0:7}, origin ${remote_sha:0:7}): $(head -c 200 /tmp/igneum-devnet/autosync-ff.err | tr '\n' ' ') blocking: ${blocking:-none found}" fi else echo "$(date -u +%FT%TZ) not fast-forwardable or dirty in $PATHS (local $local_sha, origin $remote_sha); waiting"