diff --git a/.gitignore b/.gitignore index a1b2f4b..174e6f1 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ app.*.map.json autopilot.log .claude/worktrees/ *.bak + +# Skript-Backups vor riskanten Aenderungen (bleiben lokal als Rollback) +*.bak-* diff --git a/CHANGES.md b/CHANGES.md index 99d79d2..22add88 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1312,3 +1312,10 @@ 2026-07-05 19:03 [Edit] /home/steggi/pyramid/PROGRESS.md 2026-07-05 19:03 [Edit] /home/steggi/pyramid/PROGRESS.md 2026-07-05 19:03 [Edit] /home/steggi/.claude/projects/-home-steggi-pyramid/memory/pyramid-arbeitsstand-haupt.md +2026-07-06 11:56 [Edit] /home/steggi/pyramid/autopilot.sh +2026-07-06 11:57 [Edit] /home/steggi/pyramid/PROGRESS.md +2026-07-06 11:57 [Edit] /home/steggi/pyramid/PROGRESS.md +2026-07-06 11:57 [Edit] /home/steggi/pyramid/PROGRESS.md +2026-07-06 11:57 [Edit] /home/steggi/pyramid/PROGRESS.md +2026-07-06 11:58 [Edit] /home/steggi/.claude/projects/-home-steggi-pyramid/memory/pyramid-arbeitsstand-haupt.md +2026-07-06 11:58 [Edit] /home/steggi/.claude/projects/-home-steggi-pyramid/memory/pyramid-arbeitsstand-haupt.md diff --git a/PROGRESS.md b/PROGRESS.md index 4303576..2436a39 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -13,6 +13,64 @@ Schritt (und beim Abbruch mitten im Schritt den Zwischenstand). Format: --- +## 2026-07-06 – Fable-5-Review (aa): autopilot.sh fest auf nordmann-Konto (uncommittete Änderung geprüft, E-Mail-Leak vor Publikation gefixt, committet) + +**Erledigt:** Session-Start nach Arbeitszyklus zeigte echten neuen Anlass (also +kein reiner Protokoll-Commit, Ende-Kriterium aus (z) greift nicht): eine +uncommittete Änderung an `autopilot.sh` von heute plus Backup +`autopilot.sh.bak-20260706-vor-nordmann-pin`. Inhalt: Die Zwei-Konten-Rotation +(pyramid↔haupt) ist komplett entfernt, der Autopilot läuft laut Kommentar auf +Bernds Vorgabe (2026-07-06) nur noch mit dem nordmann-Konto +(Standard-Profil `~/.claude`). Der CHANGES-Hook hat dafür KEINEN Eintrag +(Log endet 2026-07-05 19:03) – die Änderung kam also von außerhalb einer +gehookten Claude-Session (Bernd/manuell). Als Punkt (aa) im +Fable-5-Review-Abschnitt abgehakt: + +- **Umbau korrekt:** Rotation restlos raus (repo-weit kein + `get_account`/`switch_account`/`JUST_SWITCHED`/`ACCOUNT_FILE`-Rest), + `apply_account` macht nur noch `unset CLAUDE_CONFIG_DIR` – exakt die Lehre + aus Review (w) (Hauptprofil liegt unter `~/.claude.json`, die Variable darf + nicht gesetzt sein). `bash -n` sauber. Limit-Pfad: 20 min warten statt + Konto-Wechsel, PAUSE-/Notify-Logik unverändert. +- **Am lebenden System belegt:** tmux-Session „pyramid" wurde heute 11:54 neu + gestartet, `autopilot.log` zeigt das neue Log-Format, und DIESE Session + läuft nachweislich als nordmann-Konto mit leerem `CLAUDE_CONFIG_DIR`. +- **Befund (gefixt VOR dem Commit):** Die neue Fassung enthielt Bernds + private E-Mail-Adresse im Klartext (Kommentar + `ACCOUNT_NAME`-Log-Zeile). + Das Gitea-Repo ist ÖFFENTLICH, und bisher enthielt keine einzige getrackte + Datei diese Adresse – ein Commit hätte sie erstmals veröffentlicht + (PII/Spam-Harvesting, gleiche Familie wie der Secrets-Leitsatz in + CLAUDE.md). Funktional ist die Adresse unnötig (stand nur in Kommentar und + gitignoriertem `autopilot.log`) → durch neutrales „nordmann" ersetzt, + Begründungs-Kommentar dagelassen, damit sie niemand „zur Klarheit" wieder + einträgt. +- Aufräumen drumherum: `*.bak-*` in `.gitignore` aufgenommen (das heutige + Backup bleibt als Rollback auf der Platte, hält aber den Arbeitsbaum- + Detektor künftiger Sessions sauber). Hinweis: `~/.claude-accounts/active` + (Inhalt „haupt") liegt verwaist außerhalb des Repos – wird von nichts mehr + gelesen, bewusst nicht angefasst. Memory (Haupt-Profil) auf den neuen + Ein-Konto-Stand aktualisiert. + +**ROADMAP-Check danach (Schritt 2 des Auftrags):** Unverändert kein offener +Punkt auf dem Pi sicher bearbeitbar – SQLCipher und Härtetest brauchen +PC/Gerät (Entscheidung 1, `docs/PC_TESTPLAN.md`), der M2-Call-Pilot braucht +Gerätetest (Entscheidung 2, heiliger Call-Pfad), Secrets/History ruhen +bewusst (Entscheidung 4). Keine Arbeit erfunden – Session endet sauber nach +diesem Commit. + +**Offen/Nächster Schritt:** Unverändert – nächster PC-/Gerätelauf startet mit +SQLCipher (`docs/SQLCIPHER_MIGRATION.md`), danach Call-Pilot; Härtetest nach +`docs/PC_TESTPLAN.md`. + +**Stolperfallen:** (1) Der CHANGES-Hook-Detektor sieht nur Claude-Edits – +Bernds manuelle Änderungen tauchen NUR in `git status` auf; deshalb gehört +`git status` (nicht nur das Hook-Log) an jeden Session-Start. (2) Vor dem +Committen fremder/manueller Änderungen in ein ÖFFENTLICHES Repo den Diff auf +PII/Secrets abklopfen – hier wäre sonst eine private E-Mail-Adresse +mitpubliziert worden. + +--- + ## 2026-07-05 – Fable-5-Review (z): (y)-Protokoll-Commit geprüft (kein Befund) + Ende-Kriterium geschärft **Erledigt:** Session-Start nach Arbeitszyklus: Arbeitsbaum sauber, Gitea nicht @@ -1231,6 +1289,23 @@ schließt den Review ab. Code-/Doku-Substanz (alles außer dem eigenen Review-Protokoll), sonst reviewt die Kette ewig ihr eigenes Protokoll. Details im PROGRESS-Eintrag „(z)" oben. +- [x] **(aa) Uncommittete autopilot.sh-Umstellung auf EIN Konto geprüft und + committet – 1 Befund gefixt (2026-07-06).** Die Umstellung (Konto-Rotation + raus, Autopilot fest auf dem nordmann-Konto = Standard-Profil `~/.claude`; + Bernds Vorgabe laut Kommentar, Backup + `autopilot.sh.bak-20260706-vor-nordmann-pin`) lag uncommitted im + Arbeitsbaum. Geprüft: Rotation restlos entfernt (kein + `get_account`/`switch_account`/`JUST_SWITCHED`/`ACCOUNT_FILE`-Rest, repo-weit + gegrept), `apply_account` = `unset CLAUDE_CONFIG_DIR` deckt sich mit dem + (w)-Befund, `bash -n` sauber, Limit-Pfad wartet jetzt 20 min statt zu + wechseln. Am lebenden System belegt: tmux-Session „pyramid" am 2026-07-06 + 11:54 neu gestartet, autopilot.log zeigt das neue Format, DIESE Session + läuft als nordmann-Konto mit leerem `CLAUDE_CONFIG_DIR`. **Befund (vor dem + Commit gefixt):** Die neue Fassung enthielt Bernds private E-Mail-Adresse + (Kommentar + `ACCOUNT_NAME`) – das Gitea-Repo ist ÖFFENTLICH, und bisher + enthielt keine getrackte Datei diese Adresse; ein Commit hätte sie erstmals + veröffentlicht. Durch neutrales „nordmann" ersetzt (funktionsgleich, die + Adresse stand nur in Kommentar und Log-Zeile). **Fazit:** Die Sonnet-5-Arbeit war handwerklich sauber; die zwei echten Lücken (verlorene Kommentare, fehlender Soft-Logout-Guard) hatte die abgebrochene diff --git a/autopilot.sh b/autopilot.sh index fbfdf84..23be40f 100755 --- a/autopilot.sh +++ b/autopilot.sh @@ -1,40 +1,23 @@ #!/bin/bash # Pyramid-Autopilot (Pi/Linux): startet Claude-Sessions in Endlosschleife. -# Läuft eine Session ins 5h-Limit, wird alle 20 Minuten neu versucht. +# Laeuft eine Session ins Limit, wird alle 20 Minuten neu versucht. # Start (am besten in tmux): tmux new -d -s pyramid ./autopilot.sh # Wieder reinschauen: tmux attach -t pyramid (verlassen: Strg+B, dann D) -# PAUSIEREN: touch ~/pyramid/PAUSE (greift vor der nächsten Session) +# PAUSIEREN: touch ~/pyramid/PAUSE (greift vor der naechsten Session) # FORTSETZEN: rm ~/pyramid/PAUSE # GANZ STOPPEN: tmux kill-session -t pyramid cd "$(dirname "$0")" export PATH="$HOME/.local/bin:$HOME/flutter/bin:$PATH" -# --- Zwei Claude-Konten mit automatischem Wechsel bei 5h-Limit --- -# Konto "pyramid" = Profil ~/.claude-pyramid (Standard fuer diese Arbeit), -# Konto "haupt" = Profil ~/.claude (springt ein, wenn pyramid am Limit ist). -ACCOUNT_FILE="$HOME/.claude-accounts/active" -get_account() { cat "$ACCOUNT_FILE" 2>/dev/null || echo pyramid; } - -apply_account() { - if [ "$(get_account)" = "haupt" ]; then - # Hauptkonto = Standard-Profil -> Variable NICHT setzen - # (sonst sucht Claude die Config unter ~/.claude/.claude.json statt ~/.claude.json) - unset CLAUDE_CONFIG_DIR - else - export CLAUDE_CONFIG_DIR="$HOME/.claude-pyramid" - fi -} - -switch_account() { - local cur next - cur=$(get_account) - if [ "$cur" = "pyramid" ]; then next=haupt; else next=pyramid; fi - mkdir -p "$HOME/.claude-accounts" - echo "$next" > "$ACCOUNT_FILE" - notify_matrix "🔺 Autopilot: 5h-Limit auf Konto '$cur' erreicht – wechsle auf Konto '$next' und arbeite direkt weiter." -} - -JUST_SWITCHED=0 +# --- NUR EIN Konto: das nordmann-Konto (Profil ~/.claude = Standard-Profil) --- +# Bewusst KEINE Konto-Rotation (Bernd, 2026-07-06): der Pyramid-Autopilot arbeitet +# ausschliesslich mit dem nordmann-Konto. Das Standard-Profil liegt unter +# ~/.claude / ~/.claude.json -> CLAUDE_CONFIG_DIR NICHT setzen (sonst sucht Claude +# die Config faelschlich unter ~/.claude/.claude.json). +# (Die E-Mail-Adresse des Kontos steht absichtlich NICHT hier: das Gitea-Repo +# ist oeffentlich, PII gehoert nicht hinein.) +apply_account() { unset CLAUDE_CONFIG_DIR; } +ACCOUNT_NAME="nordmann" # --- Matrix-Statusberichte (Raum "🔺 Pyramid Autopilot", Token vom Gatus-Bot) --- MATRIX_URL="http://127.0.0.1:6167" @@ -60,7 +43,7 @@ while true; do continue fi apply_account - echo "===== $(date '+%F %T') Neue Claude-Session (Konto $(get_account)) =====" | tee -a autopilot.log + echo "===== $(date '+%F %T') Neue Claude-Session (Konto $ACCOUNT_NAME) =====" | tee -a autopilot.log BEFORE=$(git rev-parse HEAD 2>/dev/null) SESSION_OUT=$(mktemp) claude -p "$PROMPT" --model claude-fable-5 --dangerously-skip-permissions 2>&1 | tee -a autopilot.log "$SESSION_OUT" @@ -75,21 +58,14 @@ $COMMITS $NEXT" fi - # 5h-Limit erkannt? -> sofort aufs andere Konto wechseln statt zu warten + # Limit erkannt? -> 20 Minuten warten (KEINE Konto-Rotation mehr) if grep -qiE "hit your.*limit|usage limit|session limit" "$SESSION_OUT"; then rm -f "$SESSION_OUT" - if [ "$JUST_SWITCHED" != "1" ]; then - switch_account - JUST_SWITCHED=1 - continue - fi - JUST_SWITCHED=0 - echo "===== $(date '+%F %T') Beide Konten am Limit - naechster Versuch in 20 Minuten =====" | tee -a autopilot.log + echo "===== $(date '+%F %T') nordmann-Konto am Limit - naechster Versuch in 20 Minuten =====" | tee -a autopilot.log sleep 1200 continue fi rm -f "$SESSION_OUT" - JUST_SWITCHED=0 echo "===== $(date '+%F %T') Session beendet - Neustart in 20 Minuten (Strg+C zum Stoppen) =====" | tee -a autopilot.log sleep 1200