From 2b3c488f1ca6f9947ee47239b567c968d1cf35ef Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 14 Mar 2026 12:14:42 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20STATE.md=20entries=20without=20status=20?= =?UTF-8?q?prefix=20=E2=80=94=20reads=20as=20done=20once=20merged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/dev-agent.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dev/dev-agent.sh b/dev/dev-agent.sh index b263fef..5bfe2a9 100755 --- a/dev/dev-agent.sh +++ b/dev/dev-agent.sh @@ -93,21 +93,20 @@ trap cleanup EXIT # STATE.MD helpers (must be defined before use at worktree setup) write_state_entry() { - local status_word="${1:-in-progress}" local target="${WORKTREE:-$REPO_ROOT}" local state_file="${target}/STATE.md" local today today=$(date -u +%Y-%m-%d) local description description=$(echo "$ISSUE_TITLE" | sed 's/^feat:\s*//i;s/^fix:\s*//i;s/^refactor:\s*//i') - local line="- [${today}] [${status_word}] ${description} (#${ISSUE})" + local line="- [${today}] ${description} (#${ISSUE})" if [ ! -f "$state_file" ]; then printf '# STATE.md — What harb currently is and does\n\n' > "$state_file" fi echo "$line" >> "$state_file" log "STATE.md: ${line}" } -append_state_log() { write_state_entry "done"; } +append_state_log() { write_state_entry; } # --- Log rotation --- if [ -f "$LOGFILE" ] && [ "$(stat -c%s "$LOGFILE" 2>/dev/null || echo 0)" -gt 102400 ]; then @@ -564,8 +563,8 @@ else git checkout -B "$BRANCH" origin/master 2>/dev/null git submodule update --init --recursive 2>/dev/null || true - # Write STATE.md entry — will be included in the first commit - write_state_entry "in-progress" + # Write STATE.md entry — included in the first commit, reads as done once PR merges + write_state_entry # Symlink lib node_modules from main repo (submodule init doesn't run npm install) for lib_dir in "$REPO_ROOT"/onchain/lib/*/; do