Skip to content

v1.2.8 - Persistent Sessions and Account State

Latest

Choose a tag to compare

@maiphucgiang maiphucgiang released this 20 Sep 12:50

Persistent sessions, cooldowns and usage snapshots

Changes

  • Preserve unexpired management sessions across restarts. Logout and API-key changes revoke persisted sessions; failed revocations are reported, and startup refuses to activate a new key when an obsolete snapshot cannot be removed (#34).
  • Persist account authentication circuits and per-model cooldowns across restarts, without carrying stale blocks into refreshed or replaced credentials. Add a per-account Clear cooldown action in the WebUI and the local-only POST /admin/credentials/{id}/reset-cooldown endpoint (#35).
  • Restore cached account usage before the first dashboard request, retain stale/partial indicators, and synchronize usage publication with credential removal and replacement (#35).
  • Reorganize the English and Chinese onboarding and user guides, and add the Advanced CodeQL workflow.

Thanks to @moshouhot for #34 and #35.

Upgrade

  • Back up and preserve your existing .env and entire writable data directory, including credentials, SQLite databases and reward ledgers. New state files are admin-sessions.json, credential-cooldowns.json and usage-snapshots.json; keep them private, especially the live management sessions.
  • The first upgrade from an in-memory-session version still requires signing in once. Subsequent restarts preserve unexpired sessions under the same API key. Fix storage permissions if startup reports that an old session snapshot cannot be revoked; do not bypass the check.
  • Restarting no longer clears persisted cooldowns. Use Clear cooldown after verifying the account has recovered; it does not refresh tokens, contact upstream or change account enablement. Cached usage remains historical data, not proof that an account is currently available.
  • Native precedence remains CLI > environment > saved WebUI settings > defaults. Existing /v1/* and /admin/* addresses remain unchanged.
  • Compose keeps container binding at 0.0.0.0:8787; update the image in your existing .env to ghcr.io/maiphucgiang/codebuddy2api:1.2.8, then run docker compose pull && docker compose up -d --no-build.

Distribution and validation

codebuddy2api-1.2.8.tar.gz includes source and prebuilt WebUI assets; SHA256SUMS verifies the download. It excludes credentials, databases, .env and dependency directories. Native use requires Python 3.12+ and the locked Python dependencies, but no frontend build.

All 57 backend test scripts and 133 frontend tests pass; frontend formatting, lint, type checking and production build also pass. The extracted distribution passed isolated startup, version, health, asset, environment and authentication checks. The tmux deployment passed real minimal requests through all three protocols and OpenAI SSE, retained its 8 accounts and automation preferences, and preserved its management session and CSRF token across restart.

Release-commit CI passed for 8ba7588c8c7dc1090b88befb4bcd567ec6de6c7f. Advanced CodeQL stored all three language analyses against that exact main commit; the independent query confirmed 0 open alerts.

Tag CI passed and automatically published linux/amd64 and linux/arm64 images. Both report version 1.2.8 and revision 8ba7588c8c7dc1090b88befb4bcd567ec6de6c7f; latest matches the versioned manifest.

Full changelog: v1.2.7...v1.2.8