scheduler/gateway: carry skill identity structurally, not in action_log

Skill bodies prefixed their own `category.name` into `ActionResult.action_log`,
which duplicated the runner's deterministic summary prefix and leaked the name
into the text the gateways speak. Identity is not data for the output string.

- bodies (seeds, canned replies, housekeeping meta skills) write only the real
  result; the runner already owns the `category.name:` summary prefix
- `run_queue`/`submit_request`/`answer` now return a structured `SchedulerReply`
  (status, text, run_id, skill_ref, result); the gateway reads `skill_ref` and
  `result` from it instead of regex-parsing them back out of the summary
- drop the gateway's `_SKILL_REF`/`_LEADING_RUN_ID` parsing helpers
- fix a latent double-prefix when a failed run had an empty action_log
- CODEGEN.md: generated bodies must not prefix the skill name
This commit is contained in:
gabby committed 2026-10-07 00:30:37 +00:00
1 parent d0c1dccffd
commit e9a7fc73ee
22 files changed
+248 -200

No files matched your search

+4 -4
View File
@@ -255,13 +255,13 @@ class DashboardHandler(BaseHTTPRequestHandler):
with self.lock:
try:
body = self._read_json()
status, detail, request_id = self.scheduler.submit_request(
reply = self.scheduler.submit_request(
str(body.get("text", "")), source=str(body.get("source", "dashboard"))
)
except Exception as exc:
self._send_error(500, str(exc))
return
self._send(200, {"status": status, "detail": detail, "request_id": request_id})
self._send(200, {"status": reply.status, "detail": reply.text, "request_id": reply.run_id})
return
if path == "/api/relabel":
with self.lock:
@@ -277,11 +277,11 @@ class DashboardHandler(BaseHTTPRequestHandler):
with self.lock:
try:
body = self._read_json()
status, detail = self.scheduler.answer(str(body.get("text", "")))
reply = self.scheduler.answer(str(body.get("text", "")))
except Exception as exc:
self._send_error(500, str(exc))
return
self._send(200, {"status": status, "detail": detail})
self._send(200, {"status": reply.status, "detail": reply.text})
return
if path == "/api/restart":
with self.lock: