Repository navigation
v0.3.1 — distillation keeps going past failing input; upgrade.sh backs up PostgreSQL 17
Why this release
Distillation no longer stalls on a batch it cannot process, and upgrade.sh can back up PostgreSQL 17. First, upgrade.sh could not back up an external PostgreSQL 17 (or newer) server. With your own server (AGENT_MEMORY_POSTGRES_URL, no bundled postgres profile), the backup ran the pg_dump from postgres:16-alpine. pg_dump refuses a server newer than itself, so the backup failed with aborting because of server version mismatch and the upgrade stopped. The only way past it was to back up by hand and re-run with UPGRADE_SKIP_BACKUP=1.
Upgrading
No data, configuration or client changes since 0.3.0. Jobs already queued keep working. From 0.3.0:
git fetch --tags && git checkout v0.3.1
./upgrade.shFrom an earlier version, follow docs/UPGRADE.md → To 0.3.0; upgrade.sh from this release does it in one run, including the backup on PostgreSQL 17. amem 0.3.0 keeps working; 0.3.1 is the same client.
Changed
-
Distillation no longer stalls on input it cannot process (#38). L1 (per session) and L2 (per agent) used to retry a batch that failed every attempt forever, and nothing after it in that session or agent was distilled. On the last attempt the batch is now dropped:
- the cursor moves on;
- the run is logged as
droppedwith its error and the ids of the skipped input; - the dead letter keeps a job that redoes exactly that input (
range), so an admin can re-run it after changing the model.
Nothing is deleted, and no model gets any new capability (see #37).
-
Panel:
- a Dropped column per layer and a "Dropped input" link on the dashboard;
- the
droppedlog filter; - the dropped range on dead letters.
-
CLI:
memory-server generations --status dropped.
Fixed
upgrade.shdumps an external Postgres with the matchingpg_dump(#35).- It first reads the server's version.
- It then runs
pg_dumpfrompostgres:<major>-alpine, so it keeps working on 16, 17 and later. - If the version can't be read (unreachable server, wrong credentials), it stops with a clear message.
- The bundled Postgres was not affected.
- Upgrade guide: the settings step now lists the 0.3.0
.envrename (CORE_INSTANCE_ID→CORE_DEPARTMENT_ID).
為什麼要發這個版本
蒸餾不再卡在無法處理的那一批,upgrade.sh 也能備份 PostgreSQL 17 了。 首先,upgrade.sh 無法備份外部的 PostgreSQL 17(或更新)伺服器。 使用自己的伺服器時(AGENT_MEMORY_POSTGRES_URL,沒有啟用內建的 postgres profile),備份用的是 postgres:16-alpine 裡的 pg_dump。pg_dump 不接受比自己新的伺服器,所以備份會失敗並出現 aborting because of server version mismatch,升級也跟著中止。唯一的繞法是先手動備份,再加 UPGRADE_SKIP_BACKUP=1 重跑。
升級
和 0.3.0 相比,資料、設定和 client 都沒有改變,佇列中既有的 job 也照常運作。從 0.3.0 升級:
git fetch --tags && git checkout v0.3.1
./upgrade.sh從更早的版本升級,請依 docs/UPGRADE.zh-tw.md →「升級到 0.3.0」 進行;這一版的 upgrade.sh 可以一次完成,在 PostgreSQL 17 上也能正常備份。amem 0.3.0 可以繼續使用,0.3.1 的 client 內容相同。
變更
-
蒸餾不再卡在無法處理的內容上(#38)。L1(以 session 為單位)和 L2(以 agent 為單位)以前遇到每次嘗試都失敗的一批,會一直重試,同一個 session 或 agent 後面的內容就都不會被蒸餾。現在在最後一次嘗試仍失敗時,這一批會被 drop:
- 游標繼續前進;
- 這次執行記錄為
dropped,附上錯誤和被略過輸入的 id; - dead letter 保存只重做這一段的 job(
range),admin 換了模型後可以重跑。
不會刪除任何資料,也不會給任何模型新的權限(見 #37)。
-
Panel:
- dashboard 每層多一欄 Dropped,並有「Dropped input」連結;
- 生成紀錄可以篩選
dropped; - dead letter 顯示被 drop 的範圍。
-
CLI:
memory-server generations --status dropped。
修正
upgrade.sh用版本相符的pg_dump備份外部 Postgres(#35)。- 先讀取伺服器的版本。
- 再用
postgres:<主版本>-alpine執行pg_dump,所以 16、17 以及之後的版本都能正常備份。 - 讀不到版本時(連不上或帳密錯誤),會停下來並顯示清楚的訊息。
- 內建的 Postgres 不受這個問題影響。
- 升級指南:設定那一步補上 0.3.0 的
.env改名(CORE_INSTANCE_ID→CORE_DEPARTMENT_ID)。