async skill-body authoring: single-slot codegen worker, restart, re-dispatch
create_skill now authors the stub synchronously and returns immediately; the runnable body is written by a single-slot background worker (the gate stays free for new input). On success the body is materialized and hot-merged, the leaf's writing flag clears, and the original request is re-queued at its scored weight and re-runs navigation onto the new leaf. On failure the leaf stays a restartable stub and the user is notified. - scheduler: _dispatch_skill launches the async write instead of blocking; _run_skill guards writing/stub leaves (no silent no-op); restart_skill re-kicks a write for an empty not-in-progress leaf (reuses the stored request_text); RLock guards tree/queue/current across worker and main thread; awaiting_skill_body meta guard stops a re-dispatched request from authoring a second skill. - skills: Skill.writing + status/is_noop via module-level no-op sentinels; registry entries persist the originating request_text. - engine: call/generate serialized with a Lock so the worker's degeneration checks never race main-thread navigation/scoring on one llama.cpp context. - cli: restart <category> <skill> command; REPL drains the queue after input. - dashboard: POST /api/restart; /api/tree carries per-skill status; tree rows + skill_write_failed flow nodes get restart buttons; reads snapshotted. - tests: async end-to-end (real CodegenClient vs fake SSE endpoint), restart, loop guard, status derivation, dashboard endpoint/status; integration chain test rewritten to poll for async completion + assessed.
This commit is contained in:
1 parent
db35cb66dc
commit
87438c881a
11 files changed
+818
-204
No files matched your search
@@ -324,6 +324,24 @@ pre.json {
|
||||
.skill-row { display: flex; gap: 6px; align-items: baseline; padding-left: 8px; font-size: 11px; }
|
||||
.skill-row .sdesc { color: var(--muted); }
|
||||
|
||||
.sbadge {
|
||||
margin-left: auto;
|
||||
font-size: 10px;
|
||||
white-space: nowrap;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.sbadge.writing { color: var(--warn); }
|
||||
.sbadge.stub { color: var(--muted); }
|
||||
|
||||
.restart-btn {
|
||||
padding: 1px 6px;
|
||||
font-size: 10px;
|
||||
border-radius: 4px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
|
||||
.stat-grid .stat { background: var(--panel-2); border-radius: 4px; padding: 4px 6px; }
|
||||
.stat-grid .stat .v { font-weight: 700; }
|
||||
|
||||
Reference in new issue
Block a user