From 40cca627bee5295266652306039fd9bc7402dac5 Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Fri, 10 Apr 2026 14:39:16 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20address=20Devin=20review=20round=204=20?= =?UTF-8?q?=E2=80=94=20bash=20arithmetic,=20CalVer=20max,=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - smoke-test.sh: replace ((PASS++)) with PASS=$((PASS + 1)) to avoid set -e abort when counter is 0 (bash returns exit 1 for ((0))) - CalVer: use max(N) from existing tags instead of count, safe when tags are deleted (e.g. deprecated version cleanup) - CLAUDE.md: update schema version from v2 to v3 663 tests pass. --- .github/workflows/release.yml | 5 +++-- CLAUDE.md | 2 +- scripts/smoke-test.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 372e59a..3c3e436 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,8 +61,9 @@ jobs: TAG_CLAIMED=false for ATTEMPT in 1 2 3 4 5; do git fetch --tags --force - EXISTING=$(git tag -l "*-${YEAR_MONTH}.*" | wc -l | tr -d ' ') - N=$((EXISTING + 1)) + # Use max(N) not count — safe even if tags are deleted + MAX_N=$(git tag -l "*-${YEAR_MONTH}.*" | sed 's/.*\.//' | sort -n | tail -1) + N=$(( ${MAX_N:-0} + 1 )) VERSION="${YEAR_MONTH}.${N}" TAG="${CHANNEL}-${VERSION}" diff --git a/CLAUDE.md b/CLAUDE.md index b6497bb..767e0c4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -154,7 +154,7 @@ Auth providers in `app/auth/` (FastAPI-based): ## Key Implementation Details ### DuckDB Schema (src/db.py) -- Schema v2 with auto-migration from v1 +- Schema v3 with auto-migration from v1→v2→v3 - `table_registry`: id, name, source_type, bucket, source_table, query_mode, sync_schedule, etc. - `sync_state`, `sync_history`: track extraction progress - `users`, `dataset_permissions`, `audit_log`: auth + RBAC diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh index c2962b8..e422596 100755 --- a/scripts/smoke-test.sh +++ b/scripts/smoke-test.sh @@ -13,10 +13,10 @@ check() { local name="$1" ok="$2" if [ "$ok" = "true" ]; then echo " PASS $name" - ((PASS++)) + PASS=$((PASS + 1)) else echo " FAIL $name" - ((FAIL++)) + FAIL=$((FAIL + 1)) fi }