emrg: vibe-check session-history evidence + scheduler [task] log column (rants 10:15:43 + 10:18:44) - #863
Conversation
…mn (rants 10:15:43 + 10:18:44)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 859: both rants implemented and verified — vibe check loads the task's own session history (session_id+cwd, recent 100) as primary evidence; scheduler [task] log column via LoggerAdapter + custom Formatter (967→969 tests, doc-count guard green). CI test+test-windows PASS (run 32208885885).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (3/3): head cf8ec7a unchanged, CI test + test-windows PASS (32208885885). Both rants implemented: vibe check loads task's own session history via fixed session_id (daemon._task_vibe_check: Session.load + get_messages_for_llm, scheduler sends cwd); per-task LoggerAdapter renders [task] column in emrgd.log (37 call sites).
Uh oh!
There was an error while loading. Please reload this page.
…to 971 - test_glob_tool / test_grep_tool: intent is now a required parameter - merge master (v0.2.52 + #863) so PR CI covers full suite - Agent.md test count 969 -> 971 (net +2 intent tests)
… 10:35:24) (#864) * emrg: tool intent parameter replaces static purpose (rants 10:33:29 + 10:35:24) * emrg: fix tool definition required-list assertions + sync test count to 971 - test_glob_tool / test_grep_tool: intent is now a required parameter - merge master (v0.2.52 + #863) so PR CI covers full suite - Agent.md test count 969 -> 971 (net +2 intent tests) * emrg: fix intent e2e mock — split tool-call and final rounds The mock put the finish_reason=stop delta in the same stream as the tool call, so the daemon's Case-1 branch treated the round as a final text answer and dropped the tool calls (no tool_start broadcast). Follow the established _make_fake_chat_stream pattern: round 1 emits the tool call (finish tool_calls), round 2 the final answer (stop). --------- Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Vibe-check session-history evidence + scheduler [task] log column
Two host rants (2026-08-19T10:15:43 + 2026-08-19T10:18:44), both about scheduled-task observability.
1. Vibe-check architecture correction (rant 2026-08-19T10:15:43, host-finalized)
Problem:
#860'svibe_check.j2transportedtask_name/prompt/completion_summaryto a memoryless LLM. The host pointed out the task agent has a full session (fixedsession_id = emrg-evolution-{name}) — carrying prompt/summary is redundant and loses information (the actual 44 tool calls, analysis, memory writes all live in the session history).Fix:
daemon._task_vibe_checknow receivessession_id+cwd, loads the task's OWN session history (Session.load+get_messages_for_llm, recent 100 messages) and passes it as chat context — primary evidence, not the transported summary (kept only as auxiliary).scheduler._request_vibe_checksendscwdin thetask_vibe_checkmessage (session files are organized by cwd).vibe_check.j2rewritten: framing is now "以下是该定时任务的完整会话记录" (the full session record follows), not "任务实际信息".Tests:
test_vibe_check_uses_session_history(e2e) writes a session history on disk and asserts the daemon passes it to the LLM. Defensive paths (no session dir / empty cwd) verified.2. Scheduler log task column (rant 2026-08-19T10:18:44)
Problem:
emrgd.logmixes all scheduled tasks underemrg.server.scheduler— the task name is buried in long text (TaskHandler[emrg-task]: ...), hard to tell apart when several tasks interleave.Fix:
TaskHandlergets a per-taskLoggerAdapter(self._logger = logging.LoggerAdapter(logger, {"task": self.name})); 37 logger call sites migrated toself._logger.emrg/server/__main__.pyadds a custom Formatter rendering a dedicated[task]column:2026-08-19 00:47:00 [INFO] [emrg-task] .... Records without a task context (daemon core, TaskScheduler-level) fall back to-. In-messageTaskHandler[...]prefix retained so existing log consumers (grep TaskHandler) keep working.Tests:
test_task_handler_logger_adapter_carries_task_columnasserts the adapter extra + thetaskattribute on emitted records.Verification
py_compileall touched files ✓[system, history..., user]), no-history fallback →[system, user]✓[emrg-task]and[-]✓