Repository navigation
Description
Current state: Draft RFC opened on 2026-11-01 with no assignee; a same-day scope review proposed an external side-effect and recovery contract, which the body records as a pending suggestion, not an accepted requirement.
Decision needed: Whether to adopt the proposed recovery contract (unknown/in-flight state, one execution controller, separate launch, charge and adoption counts) as an acceptance requirement, from the RFC owner (author Dong1017).
Next action: No assignee; the RFC owner decides the execution boundary; no implementation, experiment or change to #249/#268 ownership is authorized.
Status: Proposed / Draft discussion。 探索 Workbench 能否采用独立 manager thread 协调多个 loop worker threads,让主任务在等待实验时仍可处理反馈、调整后续计划。以 DSH 为首个讨论实例,参考 dsh-superagent 的分层管理。本 Issue 先澄清想法与验证方法,尚未进入实施或实验阶段,不预设异步一定更快或更省成本。
核心想法与边界
- Task、thread、environment 分开。 Task 是目标与完成条件;thread 是 agent 上下文;environment 是源码、进程和资源边界。一个 worker 可负责一个有界优化方向并进行多轮迭代,不默认“一次工具调用一个 agent”,也不把独立 thread 当作隔离环境。
- 控制异步,测量受控。 Manager 可同时接收状态、准备下一步和等待结果;worker 仍复用已有 Workbench runner、独立验证与证据。异步不意味着同设备上的 baseline/candidate 可以互相干扰,也不意味着再建一个 runner。
- 上下文有边界。 Manager 保留目标、决策与结果索引;worker 获取任务相关、固定版本的资料。优先返回简短结论、产物/证据链接和未决问题,按需读取详情,而非回灌全部转录。需讨论 worker 延续、fork、压缩或重建的时机;fork 快照不等于实时共享上下文。探索过程的上下文延续与正式对照的独立会话应分别考虑。
- 对话不能代替持久任务状态。 明确谁拥有任务、何时算启动/交付/验证,以及断线、取消、超时、重试和迟到结果如何处理。无法访问的 session 保持未知;重试不能遗忘既有执行、费用或资源占用。Worker 自报完成不等于目标验收;并发数量限制也不等于费用上限。
- 先协调已有工作。 #249 / Draft #268 已涉及 parallel round、队列和资源控制,后者仍有未解决 review,不能直接视为安全底座。本议题不接管其 owner,不重复 #152 宿主插件或 #220 compaction campaign,也不成为 [Tracking] SkillEval evolution: local evidence, PR review and optional LLM judge #253 的新前置条件。
待讨论:恢复与外部副作用
执行语义评审提出:最多采纳一个结果,不等于外部调用只执行一次或只计费一次。外部调用已接收、但确认尚未持久化时发生崩溃,应如何对账?建议保留 unknown/in-flight、明确唯一执行控制者,并分别观察实际启动次数、资源/费用保留量和采纳结果。上述为待决建议,尚未接受为实现要求;下方“不重复执行”的验证目标需结合执行端幂等或可查询收据明确适用边界,不能仅凭 stub 通过宣称 exactly-once。
要验证的事项(拟议,未执行)
- 用一个具体任务对照同步与异步流程,确定 worker 粒度、manager 何时介入,以及哪些信息必须持久保留。
- 先用无模型 stub 检查乱序完成、重复回报、断线/重启、取消及迟到结果:不重复执行、不丢负面证据、不误采纳陈旧结果;取消后核对资源清理,启动前核对资源/预算认领。
- 检查上下文裁剪/交接是否保留关键约束、版本、失败与来源,以及不同 worker 或对照组之间的信息污染。
- 若后续接受实验,事前固定任务、质量判据与总预算,对比同步 baseline:manager 响应性、独立工作重叠、完成质量、总耗时/tokens、重复工作及协调失败。保留“更快但更贵”、无收益或退化结果,不只统计并发数。
- 根据证据决定继续、缩小或停止;实现前明确与现有 round/宿主接口的职责分工。具体 schema、调度策略、实现者和实验资源留待讨论。
References
- DSH Super-agent prototype · domain · architecture:研究原型参考,部分设计未实现,不代表 InferRSI 已集成能力。
- DeepSeek Harness (DSH) · subagent tool · in-process fork。以上为当前分支文档,后续实验需固定具体 revision,并核对所选后端的 follow-up/恢复能力。
- InferRSI 当前架构与执行边界(2185656)。
Activity
Dong1017 commentedon Nov 1, 2026
范围结论(P2|待明确的执行语义,而非实施阻塞): 这个 Draft 已正确区分 task/thread/environment,也明确不得重复建设 runner。还建议把“stub 检查不重复执行”改成可判定的外部副作用与恢复契约:仅凭 manager 的 thread 状态,无法保证外部调用 exactly-once。
claimed → finished(parallel_round.py对应路径),尚不能作为已验证的安全底座。task_id / thread_id / round+attempt binding / generation的映射与唯一状态所有者。manager 只负责上下文和结果索引;启动许可、尝试身份、预算/资源 claim、deadline 和恢复对账仍由已有执行控制层拥有,不再维护第二份可独立发令的 ledger。无法确认外部调用是否已开始时应保留unknown/in-flight并先对账,不能自动把它重试成新尝试。这并非要求 #295 等待 #249 全部交付,也不建议扩大到新调度器;现阶段可先评估无外部副作用的控制面异步,具体执行边界由原 owner 取舍。
Dong1017 commentedon Nov 10, 2026
RFC owner decision on the recovery contract
This decides the pending suggestion from the scope review. Checked on 2026-11-10 against
maind699e570.Adopted as acceptance requirements for any #295 prototype:
unknown/in-flightand reconciles it before any further dispatch. It never retries that attempt automatically as a new attempt.Excluded: exactly-once external execution. An exactly-once guarantee needs an executor-side idempotency token or a queryable receipt. This RFC does not assume that either exists. Without one, a passing model-free stub cannot establish exactly-once execution, so the RFC must not claim it.
Effect on the proposed stub check. The checklist item "不重复执行" now means two things: no automatic re-dispatch of an
unknown/in-flightattempt, and at most one adopted result. Fault injection covers at least three points:Existing precedent on
main.docs/skill-eval-budget-core.md(#215) applies the same rules to paid SkillEval runs. Its states arereserved → claimed → finished. A claim is non-idempotent. On an unknown write outcome the caller does not execute. The charge counts every reservation, including ambiguous executions. A #295 prototype should reuse that boundary, or match its semantics, before it adds any new ledger.Dependencies. #268 is no longer Draft but is still open. Its claim-ordering thread is unresolved, so #268 is still not a verified safe base. This decision does not make #295 wait for #249 or #268.
This decision supersedes the "pending suggestion" paragraph in the body. The RFC stays a Draft discussion. No implementation, experiment, spending or change to #249/#268 ownership is authorized.
zengchuang-hw commentedon Nov 17, 2026
Independent bounded review of #295 at main
61303fa8150472dfbda62ec8d77908bc05c73f3b.Disposition: exploration remains unqualified, not rejected or accepted. I have not selected a manager/worker schema, scheduler, implementation owner, external framework or experiment, and this review does not authorize starting one.
Current-source findings relevant to the proposal:
agent_sessions.py already records a frozen prompt/input identity, dispatch reservation, native-session binding, host observations and retained artifact snapshots. Its lock and persistent
dispatchingstate prevent this local job from handing out a second creation permission. This is not exactly-once external execution: the native host call is outside this module, receipts are caller-exported, and an ambiguous create remains a reconciliation problem. A locally passing duplicate-dispatch fixture cannot prove the remote host created/executed exactly one worker.Lifecycle reporting deliberately preserves important limits:
deadline_enforcement=native_host_not_enforced,task_acceptance=not_assessed, and unknown monetary cost. A reported completion is not independently verified goal acceptance; recording cancellation is not evidence of process termination or resource release. The proposed manager must not silently upgrade those observations.Observation retention is not ordered-message deduplication. The existing late-delivery test explicitly appends a repeated receipt/artifact, while cumulative usage is retained rather than summed. In an additional model-free probe, reporting
needs_attentionand thenrunningfor the same bound session stored those states in arrival order; no source observation order was supplied or enforced. This is not inherently a bug in the current recording API, but it means the proposal's out-of-order/stale-report requirement is not established by reusing it unchanged. Any selected design must define how it distinguishes a genuine later recovery from a delayed earlier report, without inventing authority from arrival order.optimization_session.py already delegates measurement to the external trial runner and checks retained baseline/candidate identities around project steps. Separate worker contexts or source copies do not by themselves establish device exclusivity across different jobs. Manager overlap must therefore be evaluated separately from the isolation needed for baseline/candidate measurement; this inspection does not certify resource admission or cleanup.
Checks actually run:
pytest -o addopts='' -q tests/test_agent_sessions.py: 15 passed, one pytest-plugin deprecation warning; plus the temporary-directory observation-order probe above. These tests are local/model-free and do not launch native workers. No code changes, paid calls, device work, stopped-task restart, merges or issue-state changes occurred.Suggested decision boundary, not a selected implementation: first identify the particular blocked-wait scenario and responsibilities being compared. If an experiment is separately accepted, freeze total budget, workload/quality checks and interference controls; retain failed/unknown outcomes and measure responsiveness, useful overlap, verified quality, total time/tokens and coordination failures. Fresh formal-comparison sessions must remain distinct from ordinary continuation/fork choices. Concurrency limits alone are not spending limits.
Still unverified: live host disconnect/recovery/cancellation semantics, external execution multiplicity, cross-job resource isolation, multi-client context-contamination boundaries, and any synchronous/asynchronous benefit. The external DSH/framework examples were not evaluated or adopted in this bounded review. No general faster/cheaper claim or implementation/closure acceptance follows from these fixtures.