Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions STAGING-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Staging notes (work branch) — Memnar #1118 / #1119

Treat **https://tanco.tangentcode.com/** as staging while on branch `work`.
Nobody else is using it for this verification window.

## What was broken (2026-09-18)

1. **tanco.service crash-loop (203/EXEC)**
Venv at `/home/michal/ver/tanco/.venv` pointed at `/bin/python3.11`, which had been removed from the host (deadsnakes packages purged). Process had kept running on a deleted inode until restart, then failed permanently. Site returned 502; `POST /auth/pre` had previously returned 500 under the dying process.

2. **Empty challenge DB**
`~/.tanco.sdb` had 0 challenges / 0 tests, so `/c.json` was `[]` and `tanco init` could not select `learntris-classic`.

3. **Import path not a drop-in restore**
`tanco migrate` + `tanco import` on `/home/michal/ver/learntris/testplan.org` failed (incomplete migrate; invalid test name `nudge.<`). Used known-good backup DB instead.

## What we changed on staging (ops, not live "production" intent)

- Created git branch `work` from `main` (`a447580`).
- Rebuilt `.venv` with **Python 3.12.3** and `pip install -e .`.
- Old broken venv renamed to `.venv-py311-broken-YYYYMMDD`.
- Restored DB: copied `~/.tanco-as-server.sdb` → `~/.tanco.sdb` (45 tests, `learntris-classic`). Empty DB backed up as `~/.tanco.sdb.empty-backup-*`.
- `sudo systemctl restart tanco.service` — active, `/` 200, `POST /auth/pre` 200, `/c.json` lists learntris-classic.

## Suggested durable follow-ups (code / ops)

- Pin or document runtime Python (3.12+) in README / unit file; avoid hard dependency on a removed 3.11 binary.
- Consider committing a bootstrap/seed path for `learntris-classic` (or fix migrate/import for `nudge.<` and full v0.1→v0.2).
- Client `tanco login` opens browser silently and blocks on `auth/jwt` with no printed URL — setup page should note the URL pattern `/auth/login?pre=...` for headless environments.
- Setup page command list is stale vs tanco 0.4.0 (missing: bind, migrate, run, send, share, spawn, status, version; wording diffs on check/next/show/test).

## Not changed

- No nginx / cert changes.
- No Firebase / Google OAuth client changes.
- Did not push `work` to origin unless explicitly requested after review.

## Memnar #1128 — learntris-classic v0.1 to v0.2 (2026-09-18)

- Suite source: /home/michal/ver/learntris/testplan.org (was v0.1: #+name: plus = / : lines inside src).
- Upgrade path: tanco migrate in this repo (tanco/driver.py).
- Migrate fixes on work: look ahead past prose for #+name:; preserve pre-src commentary; rename illegal nudge.< / nudge.> to nudge.left / nudge.right; count TEST headlines at any star level.
- Seed copy: suites/learntris-classic.org (45 tests, #+tanco-format: 0.2).
- Staging DB: deleted old challenge plus attempts/progress; tanco import suites/learntris-classic.org yields 45 tests.
- Verified without Google OAuth: /c.json lists course; JWT attempt plus /next plus /check/io.q pass/fail plus next to io.p; /c/learntris-classic 200.
- No merge to main. Restart of tanco.service not required (sqlite file reload).
Loading
Loading