gendesign/scripts
lekss361 e4dc866e20 fixup(claude): address review-bot blockers on PR #610
🔴 Critical (3):

1. cleanup-stale-claims.sh: export CUTOFF + STALE_HOURS
   Без `export` Python heredoc child process получал "0" вместо реального
   cutoff → cron всегда видел все issues как fresh → ничего не освобождал.
   Plus added abort при CUTOFF=0 в Python heredoc для defense-in-depth.

2. cleanup-stale-claims.sh: datetime.UTC → datetime.timezone.utc
   datetime.UTC требует Python 3.11+. Forgejo runner ubuntu-latest имеет 3.10.
   datetime.timezone.utc works в 3.8+.

3. cleanup-stale-claims.sh: invert label order — DELETE wip FIRST, потом
   POST ready. Если step 2 (add ready) fails — issue в neutral state без
   status/*, менее опасно чем оба status/ready+status/wip одновременно.

🟠 + 🟡 + 🟢 (5):

4. Added pagination loop (defensive cap 10 pages × 50 = 500 issues), но
   реализована через temp file + Python parsing (не bash JSON concat).

5. Removed dead code: iso_to_epoch() shell helper не использовался.

6. _autonomous_pickup.md: fix broken `Out-Null | if (-not $?)` pattern.
   GetEnvironmentVariable НЕ throws при missing — возвращает $null. $? у
   Get* всегда $true. Заменено на прямую проверку результата.

7. stale-claims.yml: добавлен concurrency group чтобы overlapping runs
   не stomp'ились (хотя 5-min timeout делает overlap unlikely, defensive).

8. Documented updated_at != heartbeat assumption в header script'а.

Не сделано (low/optional):

- Setup script tokens в memory (UX trade-off — не critical)
- Token suffix в console output (минор info leak в shell history)

Refs: PR #610 review by review-bot (sha=297eb29, verdict=changes)
2026-05-28 00:33:27 +03:00
..
auth fix(auth): scripts/auth/*.sh — правильный SNIPPET path (#589) 2026-05-26 08:39:24 +00:00
claude-hooks chore(claude-config): align with 2026 best practices (#495) 2026-05-24 08:48:42 +00:00
bootstrap_glitchtip.sh fix(infra): bootstrap_glitchtip — \gexec instead of DO block (psql var trap) (#219) 2026-05-16 15:54:29 +00:00
bootstrap_schema_migrations.sh feat(infra): auto-apply data/sql/*.sql migrations in deploy pipeline (#150) (#151) 2026-05-15 08:06:54 +03:00
cleanup-merged-worktrees.sh chore(claude): agents view readiness — cleanup, .worktreeinclude, workflow (#497) 2026-05-24 09:20:26 +00:00
cleanup-stale-claims.sh fixup(claude): address review-bot blockers on PR #610 2026-05-28 00:33:27 +03:00
cleanup-worktrees-aggressive.py chore(claude): aggressive worktree cleanup via Forgejo PR API (#498) 2026-05-24 09:34:48 +00:00
cleanup_ghosts.py fix(worker): port objective_etl from psycopg2 → psycopg v3 2026-05-11 12:07:57 +03:00
migrate_kg_to_obsidian.py fix(worker): port objective_etl from psycopg2 → psycopg v3 2026-05-11 12:07:57 +03:00
setup-bot-env.ps1 feat(claude): env-vars refactor + stale-claim cron (Phase 2 finalization) 2026-05-28 00:24:45 +03:00
setup-couchdb.sh feat(deploy): split obsidian stack from main + path-filtered GHA 2026-05-11 09:51:31 +03:00