Private files: secrets, test databases, assistant memory and sessions, restore.sh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
cdcb6891bc
33 changed files with 65839 additions and 0 deletions
11
claude/memory/MEMORY.md
Normal file
11
claude/memory/MEMORY.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
- [GitHub is a filtered mirror](github-filtered-mirror.md) — never `git push github`; publish with scripts/publish-github.sh; Forgejo keeps internal docs
|
||||
- [Release process](release-process.md) — version bump → tag → publish script → Actions → AUR PKGBUILD; port 22 blocked, use 443
|
||||
- [Website](website.md) — сайт в website/, Forgejo only; i18n перезапуск, геобаза с unpkg, скриншоты
|
||||
- [Search performance plan](search-performance-plan.md) — booster done; next: opening index with RAM check, PGN memory guard, laptop bench
|
||||
- [Use review agents](use-review-agents.md) — new UI features: independent tester + designer agents before commit (user asked)
|
||||
- [Lichess API quirks](lichess-api-quirks.md) — drops connections ~1 min after an aborted export; test nick only via CP_ONLINE_NICK
|
||||
- [GitHub needs approval](github-needs-approval.md) — no publish-github.sh, tags or releases without the owner's explicit «добро» each time
|
||||
- [No workarounds](no-workarounds.md) — fix root causes simply and reliably; no hacks (owner's rule)
|
||||
- [Android app](android-app.md) — Kotlin+Compose over Rust core via UniFFI, Android 12+, view-only, two APKs, owner keeps the signing key
|
||||
- [Android signing key](android-signing-key.md) — ~/.config/chesspenguin/android/{release.jks,.env}; copy in Forgejo `private`, never on main
|
||||
- [Private branch](private-branch.md) — Forgejo `private` branch: secrets, test DBs, memory, transcripts; restore.sh; never on main/GitHub
|
||||
22
claude/memory/android-app.md
Normal file
22
claude/memory/android-app.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: android-app
|
||||
description: "Android viewer app (androidApp/): Kotlin+Compose over our Rust crates via UniFFI; Android 12+; view-only; two APKs; owner keeps the signing key"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: project
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-21T21:22:38.448Z
|
||||
---
|
||||
|
||||
Started 2026-10-22. Decisions in docs/decisions.md §16; stack research docs/research/android-stack.md; UI spec docs/design/android-ui.md (owner: «просто, понятно, симпатично», think the design through).
|
||||
|
||||
- Kotlin + Jetpack Compose; Rust core (chess-core, chess-import, uci) through a thin UniFFI crate; cargo-ndk; code in androidApp/.
|
||||
- View-only: databases (same formats as desktop, no Mega on phones — target ≤ ~1M games), game list, game with notation under the board, paging games. No move input/saving in v1.
|
||||
- minSdk 31 (Android 12+). No iOS for now.
|
||||
- Two APKs: with Stockfish + net inside, and without (engine downloaded on request); both on GitHub and the site.
|
||||
- Stores later. Signing key: create it, give a copy to the owner, keep ours too — losing it means no updates.
|
||||
- Tooling (2026-10-22): rustup targets aarch64/x86_64-linux-android, cargo-ndk 4.1.2, SDK cmdline-tools in ~/Android/Sdk; JDK via `sudo pacman -S jdk21-openjdk` (owner runs it).
|
||||
|
||||
Status 2026-10-22 night: 0.11.0 released (GitHub, both APKs, AUR PKGBUILD) and site deployed. Android has «Добавить папку» (folders scanned two levels; .cbh sets; grants kept while an entry or a pending Undo uses them, unused grants released at start). Testing: headless emulator preferred by the owner (no window). Open: board/piece choice, a real Android 12 device test, live TalkBack check.
|
||||
|
||||
**How to apply:** add androidApp/ and its workflow to the GitHub publish filter decisions before publishing; follow [[github-needs-approval]], [[use-review-agents]], [[no-workarounds]].
|
||||
11
claude/memory/android-signing-key.md
Normal file
11
claude/memory/android-signing-key.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
name: android-signing-key
|
||||
description: Android release key lives in ~/.config/chesspenguin/android (release.jks + .env, 0600); owner must get a copy
|
||||
metadata:
|
||||
type: project
|
||||
---
|
||||
Created 2026-10-22: `~/.config/chesspenguin/android/release.jks` (PKCS12, alias `chesspenguin`, RSA 4096, valid to 2054) and `.env` with CP_KEYSTORE, CP_KEYSTORE_PASSWORD, CP_KEY_ALIAS, CP_KEY_PASSWORD. SHA-256 of the cert: ED:F3:3A:E5:06:F2:53:80:…:3E:9A.
|
||||
|
||||
**Why:** owner: «ключ дашь мне я сохраню тоже у себя, но ты тоже не забывай». Losing it means no updates over installed APKs.
|
||||
|
||||
**How to apply:** never print the passwords and never put them on `main` (it goes to GitHub). Since 2026-10-23 a copy is in the Forgejo branch `private` (owner: «можешь залить туда и ключи и секреты»), see [[private-branch]]. For CI put them into GitHub secrets only with the owner's go-ahead. See [[android-app]].
|
||||
15
claude/memory/github-filtered-mirror.md
Normal file
15
claude/memory/github-filtered-mirror.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: github-filtered-mirror
|
||||
description: "GitHub is a filtered public mirror — publish only via scripts/publish-github.sh, never git push github; Forgejo (origin) has everything"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-19T07:15:58.713Z
|
||||
---
|
||||
|
||||
GitHub (vrubelroman/chessPenguin) must never contain internal files or have them in history: the brief (техническое задание.txt), AGENTS.md/.opencode/opencode.jsonc, docs/{architecture,decisions,implementation-plan,agent-team}.md, docs/{research,design,qa,dev}, draft icons/, website/, scripts/publish-github.sh. Forgejo (`origin`, 192.168.8.174:2222) keeps the full history.
|
||||
|
||||
**Why:** the user does not want visitors of the public repo to see internal design/agent material ("внутрянняя инфа, у нас должно быть"); history was rewritten on 2026-10-19 for this.
|
||||
|
||||
**How to apply:** commit normally and `git push origin main [tags]`; publish to GitHub with `scripts/publish-github.sh` (deterministic filter-branch rewrite, pushes main + tags; `DRY_RUN=1` to check). The `github` remote's push URL is deliberately set to `DISABLED-use-scripts/publish-github.sh`. New internal paths must be added to the script's `internal` list. Release tags: push the tag to origin, then run the script so GitHub gets the rewritten tag (which triggers the release workflow). See also [[release-process]].
|
||||
15
claude/memory/github-needs-approval.md
Normal file
15
claude/memory/github-needs-approval.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: github-needs-approval
|
||||
description: "Never publish to GitHub (scripts/publish-github.sh), push tags or cut a release without the owner's explicit go-ahead each time"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-21T19:37:08.683Z
|
||||
---
|
||||
|
||||
Do not run scripts/publish-github.sh, push a version tag, or start a release (and its AUR update) on my own. Propose it ("готово к публикации на GitHub / выпуску X — даёшь добро?"), wait for an explicit yes in that conversation turn, then publish. Committing locally is fine; pushing to Forgejo (origin) — ask too unless the owner said otherwise.
|
||||
|
||||
**Why:** 2026-10-21 the owner objected: «зачем ты без моего добра опять отправляешь сразу на гитхаб? не делай так больше. предлагай, я даю добро и ты льешь». I had tagged 0.8.5 before he confirmed the test, and published a follow-up commit unasked.
|
||||
|
||||
**How to apply:** an earlier approval does not carry over to the next change; "выпущу, если всё в порядке" is a proposal, not permission. See [[github-filtered-mirror]], [[release-process]].
|
||||
17
claude/memory/lichess-api-quirks.md
Normal file
17
claude/memory/lichess-api-quirks.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: lichess-api-quirks
|
||||
description: "Lichess export API behaviour seen live (connection drops after an aborted export, ~16 games/s, test nick only via env)"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: reference
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-20T05:51:43.605Z
|
||||
---
|
||||
|
||||
Observed live while building online games (0.8.0, 2026-10-20):
|
||||
- After an export stream is cut short, Lichess drops new connections from the same IP for about a minute ("io: unexpected end of file"). online.rs retries with waits (DOWNLOAD_WAITS); the live test `online_live` can still fail if run twice in a row.
|
||||
- Anonymous export runs ~15–20 games/s (6 541 games ≈ 6–7 min).
|
||||
- `POST /api/games/export/_ids` omits unknown ids silently.
|
||||
- The owner's son's test account is passed only via `CP_ONLINE_NICK`; never commit or publish it.
|
||||
|
||||
**How to apply:** run `online_live` at most once per few minutes; keep real downloads short when testing. See [[release-process]].
|
||||
15
claude/memory/no-workarounds.md
Normal file
15
claude/memory/no-workarounds.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: no-workarounds
|
||||
description: "Fix causes with simple, reliable code; no hacks or workarounds (owner's rule)"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-21T19:47:47.713Z
|
||||
---
|
||||
|
||||
No "костыльные" solutions: fix only what can be fixed properly, prefer the simpler and more reliable change, and find the root cause before patching symptoms (e.g. a layout that grows every frame is a width bug, not something to clamp).
|
||||
|
||||
**Why:** 2026-10-21 the owner: «запиши себе что не нужно писать костыльных решений! делаем только то что нормально фиксится и можно сделать. лучше проще и надежнее».
|
||||
|
||||
**How to apply:** before a fix, say what the cause is; if the only fix is a hack, say so and propose leaving it or redesigning instead. See [[use-review-agents]].
|
||||
11
claude/memory/private-branch.md
Normal file
11
claude/memory/private-branch.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
name: private-branch
|
||||
description: Forgejo branch `private` (orphan) holds secrets, test DBs, assistant memory and session transcripts; never on main/GitHub
|
||||
metadata:
|
||||
type: project
|
||||
---
|
||||
Made 2026-10-23 so the owner can continue on another machine. Branch `private` on origin (home Forgejo, the owner's personal server), no common history with `main`: `secrets/` (Android release key + .env, ~/.config/chesspenguin credentials/settings, website.env), `test-data/` (six small PGN/.cbv/.7z databases), `claude/memory/`, `claude/transcripts/` (sessions, images stripped, zstd), `claude/settings.local.json`, `emulator/` (tap.py, shot.sh), `restore.sh`, README. Setup notes for a new machine: `docs/dev/handoff.md` on main.
|
||||
|
||||
**Why:** owner: «это мой личный репозиторий на моем домашнем сервере», asked for keys, secrets and small databases there.
|
||||
|
||||
**How to apply:** publish-github.sh pushes only `main` and tags, so this branch never reaches GitHub — never merge it into main or tag it. After changing a key, a setting or the memory, update the copy there (`git worktree add ../chessBaseLinux-private private`, copy, commit, `git push origin private`). See [[github-filtered-mirror]], [[android-signing-key]].
|
||||
19
claude/memory/release-process.md
Normal file
19
claude/memory/release-process.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: release-process
|
||||
description: How a ChessPenguin release is cut (version bump → tag → GitHub Actions builds → AUR PKGBUILD update) and network quirks
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: project
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-19T07:16:11.171Z
|
||||
---
|
||||
|
||||
Release steps that worked for 0.4–0.6 (2026-10-19):
|
||||
1. Bump `version` in root Cargo.toml, rename CHANGELOG `[Unreleased]` → `[x.y.z] — date`, add a `<release>` to packaging/*.metainfo.xml; fmt, clippy -D warnings, tests.
|
||||
2. Commit, `git tag -a vX.Y.Z`, `git push origin main vX.Y.Z`, then `scripts/publish-github.sh` (pushes the rewritten tag to GitHub; the tag triggers .github/workflows/release.yml: linux, flatpak, windows, macos → publish).
|
||||
3. Watch the run via the public API (no `gh` CLI): `curl https://api.github.com/repos/vrubelroman/chessPenguin/actions/runs`.
|
||||
4. AUR: download the linux tar.gz, check sha256 against SHA256SUMS.txt, update packaging/aur/chesspenguin-bin/PKGBUILD (pkgver, sha256sums), `makepkg --printsrcinfo > .SRCINFO`, test `makepkg -f` in target/aur-build, commit, push origin + publish script. The AUR itself is not published yet (no account; port 22 to aur.archlinux.org is blocked from this network).
|
||||
|
||||
Network: port 22 to github.com is blocked here; the `github` fetch URL uses ssh.github.com:443. Windows cross-check locally fails on `ring` (no MinGW) — rely on CI. User has no other users yet (0.6 is the "real" first release). See [[github-filtered-mirror]].
|
||||
|
||||
- 2026-10-19: подписывать Windows/macOS сборки решили НЕ (SignPath/Store/Azure обсуждались — «не заморачиваемся»). Не предлагать снова без повода; на сайте остаются инструкции обхода SmartScreen/Gatekeeper.
|
||||
30
claude/memory/search-performance-plan.md
Normal file
30
claude/memory/search-performance-plan.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
name: search-performance-plan
|
||||
description: "Large-base search performance work (2026-10-19): own booster, opening index with RAM check, PGN memory guard, --bench — done locally, not yet pushed/released"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: project
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-19T16:24:32.309Z
|
||||
---
|
||||
|
||||
On 2026-10-19 the user asked for an audit of filtering/search algorithms and said
|
||||
"делать всё как ты предлагаешь"; they want RAM used when available ("не жалел бы
|
||||
оперативку"), a slower path otherwise, and laptops to cope.
|
||||
|
||||
Done (commits a7d9d59, 1506ebd, 4b92fa3 on main, as of 2026-10-19 evening, unreleased):
|
||||
- own `.cbb`-format booster in the cache when the base has no usable one (`chessbase/booster.rs`);
|
||||
booster skipped for early positions (sampling the first 4096 records);
|
||||
- opening index `chessbase/openings.rs` (first 10 plies, 600 MB for Mega, built in the same
|
||||
pass, loaded only when `memory::available()` ≥ size + 1 GiB); misses the rare games that
|
||||
reach an opening position later by a detour (23 of 5.9M for 1.e4) — documented;
|
||||
- PGN position-table memory guard (`PgnDb::positions_blocked`), message on the search board;
|
||||
- `chesspenguin --bench <db> [report.txt]`, dev hook `CP_MEMORY_LIMIT=<MB>`.
|
||||
- Cache dir for all of it: `~/.cache/chesspenguin/boosters/<hash>.cbb|.cpo`.
|
||||
|
||||
Open: measure on a real laptop with `--bench` (4-thread taskset estimate: start 0.29 s with
|
||||
the index vs 2.2 s without). Ask before pushing/releasing.
|
||||
|
||||
**Why:** opening positions match millions of games and no prefilter helps.
|
||||
**How to apply:** keep results identical to the pass (tests compare them); document
|
||||
measurements in docs/dev/import.md. See [[release-process]] before shipping.
|
||||
21
claude/memory/use-review-agents.md
Normal file
21
claude/memory/use-review-agents.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: use-review-agents
|
||||
description: "For new user-facing features, run independent tester and designer agents before committing — the user asked for it to keep quality up"
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 86c7ee93-82be-4380-9d11-393872d0bb51
|
||||
modified: 2026-10-19T18:54:49.245Z
|
||||
---
|
||||
|
||||
For every new user-facing feature (UI, behaviour), run independent review agents before
|
||||
committing: a tester (correctness against an oracle, edge cases, regressions, perf) and a
|
||||
designer (wording, states, consistency, light/dark, plurals), as described in AGENTS.md
|
||||
roles. They report only; the orchestrator fixes. Small fixes and releases don't need it.
|
||||
|
||||
**Why:** 2026-10-19 the user asked «ты же пользуешься агентами? ну там по дизайну,
|
||||
тестированию? я не хочу чтобы падало качество нашего продукта» after a session where all
|
||||
work was done without independent review.
|
||||
**How to apply:** launch both in parallel in the background with isolated XDG dirs,
|
||||
outputs under target/<qa|design>-<feature>/, no edits to sources or pgnFilesforExample/;
|
||||
merge their findings, fix, re-verify, then commit. See [[release-process]].
|
||||
17
claude/memory/website.md
Normal file
17
claude/memory/website.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: website
|
||||
description: Product website in website/ (Forgejo only): docker compose, i18n, /stats, screenshot pipeline gotchas
|
||||
metadata:
|
||||
type: project
|
||||
---
|
||||
Сайт ChessPenguin — `website/` (Rust axum, docker compose за nginx пользователя на домашнем сервере, HTTPS делает пользователь). Только в Forgejo, исключён из GitHub через [[github-filtered-mirror]].
|
||||
|
||||
- Переводы читаются при старте сервера — после правки i18n перезапускать (пользователь видел «всегда en» из-за этого).
|
||||
- Геобаза: официальный download.db-ip.com рвёт соединение; брать DB-IP Lite City mmdb с unpkg `@ip-location-db/dbip-city-mmdb` (ipv4+ipv6, поля country_code/state1/city), атрибуция DB-IP обязательна.
|
||||
- Скриншоты: `website/shots/make-screenshots.sh` (Mega под именем «Tournament games» через hard links, только таблицы, без аннотаций), затем `shots/derive.py`. raw не коммитится.
|
||||
- Headless Firefox в песочнице не достучится до localhost: снимать страницу через file:// снимок (curl + sed путей), бинарь `/usr/lib/firefox/firefox` с MOZ_HEADLESS=1.
|
||||
- Прод: `docker-prodVM` (192.168.8.171, удалённый shell fish → `ssh host bash -s`), каталог ~/services/ChessPenguinSite (compose + .env + data/), порт **8140**. nginx на другой машине делает пользователь — про nginx не думать.
|
||||
- Обновлять прод ТОЛЬКО после явного «добро» пользователя: `website/deploy/deploy.sh` (build → docker save|ssh docker load, тег = коммит; `rollback`, `status`). Требует закоммиченный website/.
|
||||
- Локально docker поставлен 2026-10-19; группа docker без перелогина: `printf 'cmd\n' | newgrp docker`.
|
||||
- Домен: https://chess.vrubel.xyz (SITE_URL в .env на проде).
|
||||
- Статистика: посетители считаются по JS-сигналу `POST /hit`, строки классифицируются human/bot/owner/local, в итоги идёт только human. 2026-10-19 база на проде очищена до одной реальной записи (Москва, друг пользователя); бэкап `data/backup-before-cleanup-2026-10-19.sqlite`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue