chain multi-step requests across known skills
Add the run-ledger chained-run path and make a compound request run its known skills in order instead of authoring one monolithic skill. - scheduler/skill: `assess:outcome` gains a `continue` verdict; a continued step is re-dispatched with a bounded run ledger (max_reentries + a monotonic-progress guard), and the ledger is rendered into the routing and assessment state. - navigation leaf guard (`confirm_skill_fit`) becomes same/part/different and is ledger-aware, so the first step of a compound request runs instead of being rejected into `create_skill` (a real run picked calculator.calculate at 0.99 and was rejected into create_skill). - results flow forward through `request.run_ledger` (`last_result` helper); `simplex.send_message` sends the prior step's result rather than asking the LLM bridge to recompute it. Documented in CODEGEN.md. - `assess:outcome` stays the sole continuation authority: the guard only decides whether a skill contributes, never forces a continuation (a forced continue on `part` overrode a correct `done` on the final step and authored a spurious category). - verbosity levels, structured SchedulerReply fields, and a send_message hermetic test for the chained-result path.
This commit is contained in:
1 parent
9ba14fdab0
commit
ab0defca1e
20 files changed
+1046
-324
No files matched your search
@@ -720,24 +720,21 @@ def test_empty_result_is_assessed_as_success(tmp_path):
|
||||
log = DecisionLog(str(tmp_path / "decisions.jsonl"))
|
||||
runner = SkillRunner(ActionContext(engine=engine, config={}), log)
|
||||
outcome = runner.run(skill, Request("What's my next simplex message?"))
|
||||
print(f"[{outcome.success}] {outcome.summary}")
|
||||
print(f"[{outcome.outcome}] {outcome.summary}")
|
||||
|
||||
assert outcome.success is True, outcome.summary
|
||||
assert outcome.outcome == "done", outcome.summary
|
||||
phases = [row["extra"]["phase"] for row in log.read()]
|
||||
assert "assess:outcome" in phases
|
||||
assert "assess:requeue" not in phases, (
|
||||
"an empty discovery must not be retried or repaired"
|
||||
)
|
||||
|
||||
|
||||
def test_read_result_is_assessed_as_success(tmp_path):
|
||||
"""A correctly-read result is a successful run, not a failure.
|
||||
def test_read_result_is_assessed_as_done(tmp_path):
|
||||
"""A correctly-read result is a satisfied request, not a failure.
|
||||
|
||||
The assessment must see the skill's declared action; with only the skill
|
||||
label the real model marked a truthful read failed for ambiguous phrasings
|
||||
(e.g. "What's my next simplex message?"), which then looped the retry ladder
|
||||
and offered to repair a working skill. This exercises the real engine, since
|
||||
only it produces the probabilities.
|
||||
(e.g. "What's my next simplex message?"), which then looped into repair of a
|
||||
working skill. This exercises the real engine, since only it produces the
|
||||
probabilities.
|
||||
"""
|
||||
config = load_config()
|
||||
require_real(config)
|
||||
@@ -758,11 +755,8 @@ def test_read_result_is_assessed_as_success(tmp_path):
|
||||
log = DecisionLog(str(tmp_path / "decisions.jsonl"))
|
||||
runner = SkillRunner(ActionContext(engine=engine, config={}), log)
|
||||
outcome = runner.run(skill, Request("What's my next simplex message?"))
|
||||
print(f"[{outcome.success}] {outcome.summary}")
|
||||
print(f"[{outcome.outcome}] {outcome.summary}")
|
||||
|
||||
assert outcome.success is True, outcome.summary
|
||||
assert outcome.outcome == "done", outcome.summary
|
||||
phases = [row["extra"]["phase"] for row in log.read()]
|
||||
assert "assess:outcome" in phases
|
||||
assert "assess:requeue" not in phases, (
|
||||
"a truthful read must not be retried or repaired"
|
||||
)
|
||||
Reference in new issue
Block a user