emrg: persist task execution records to JSONL + fix task-row flex-wrap - #876
Conversation
…p (rants 2026-08-19T20:49:52 + 20:50:36)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
Verified: full suite 986 passed + 1 skipped (987 collected); import + CLI checks green; doc-count guard green (Agent.md 983→987 Python, 259→260 GUI); GUI smoke 131 pass. CI test + test-windows both PASS (32256088924). Persistence is fault-tolerant (corrupt line skipped, write failure → warning only) and the in-memory list stays the primary status() source.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
Fresh re-review (head 601bd14 unchanged): persistence is fault-tolerant per host Plan B (corrupt line skipped individually, unreadable file → empty list, write failure → warning only, cycle unaffected); bounded append trims to 50; status()/recent_runs still read the in-memory list. CSS fix is the minimal flex-wrap addition with a guarding assertion. CI test + test-windows PASS.
Uh oh!
There was an error while loading. Please reload this page.
Fixes two host rants from 2026-08-19 (GUI task management):
rant 2026-08-19T20:49:52 (subtable position bug): the task-row CSS lacked
flex-wrap— with the accordion subtable'sflex-basis: 100%the detail row got squeezed to the right of the card instead of wrapping below. Fix: addflex-wrap: wrapto.task-row+ a smoke assertion guarding both the wrap and the 100% basis.rant 2026-08-19T20:50:36 (host Plan B — execution-record persistence): execution records lived only in the in-memory
self.evolutionslist (lost on daemon restart). Plan B: append each completed cycle as one JSON line to~/.emrg/logs/task-runs/<task>.jsonl(TaskHandler._append_task_runat the cycle end), restore the last 50 on init (_load_task_runs), bounded append (trim to 50), fully fault-tolerant (corrupt line skipped / unreadable file → empty, write failure → warning only, cycle unaffected). In-memory list stays the primary source for status()/recent_runs; JSONL is the durable copy.Tests: +4 scheduler unit tests (restart restore, 50-cap, corrupt-file tolerance, write-failure tolerance); +1 smoke assertion (flex-wrap). Full suite 986 passed + 1 skipped (987 collected); GUI smoke 131 pass; doc-count guard green (Agent.md 983→987 Python, 259→260 GUI).