{selected.observation.read_state === "unavailable" ? (locale === "zh-CN" ? "审查存储不可读,当前判断未知。" : "Review storage unavailable; current judgment unknown.") + : selected.observation.read_state === "missing" ? (locale === "zh-CN" ? "尚无审查回执。" : "No review receipts yet.") + : `${selected.observation.receipt_count} ${locale === "zh-CN" ? "条已读取回执" : "loaded receipts"}`}
+{locale === "zh-CN" ? "过期 / 拒收" : "Stale / rejected"}: {selected.observation.stale_receipts} / {selected.observation.rejected_receipts}
+ {selected.observation.latest ? <> +{locale === "zh-CN" ? "最新审查" : "Latest review"}: {selected.observation.latest.status}
+{locale === "zh-CN" ? "与目标的关系" : "Relation to goal"}: {selected.observation.latest.judgments.choice?.relation ?? "unknown"}
+{locale === "zh-CN" ? "新证据增量" : "Evidence increment"}: {selected.observation.latest.judgments.choice?.increment ?? "unknown"}
+ {selected.observation.latest.evidence_scope ? <> +{selected.observation.latest.evidence_scope.criterion_binding.origin === "goal_acceptance" + ? (locale === "zh-CN" ? "绑定任务的规范验收条款" : "Bound to canonical task acceptance criteria") + : (locale === "zh-CN" ? "依据操作者研究条款;不证明规范验收关联" : "Operator study basis; canonical acceptance binding is unverified")}
+ {selected.observation.latest.criterion_current === false ?{locale === "zh-CN" ? "条款或任务关联已变化,旧判断不可作为当前依据。" : "Criteria or task binding changed; the old judgment is unavailable for current use."}
: null} +{locale === "zh-CN" ? "仅观察声明文件在两个检查点之间的净变化" : "Observed only the net change of declared files between two checkpoints"}
+{selected.observation.latest.evidence_scope.criterion_binding.criteria_sha256}
+ {selected.observation.latest.evidence_scope.criterion_binding.criterion_ids?.join(", ")}
+{selected.observation.latest.evidence_scope.files.join(", ")}
+{locale === "zh-CN" ? "旧回执未记录所选条款及文件覆盖范围。" : "Legacy receipt did not record selected criteria or file coverage."}
} + > : null} +{locale === "zh-CN" ? "此观察不证明任务完成;未命中漂移条件也不等于工作符合目标。" : "This observation does not prove completion; a drift condition not met does not establish on-goal work."}
+{t("capabilities.chooseGoal")}
; diff --git a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css index 32040d72f4..95ad18a5cc 100644 --- a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css +++ b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css @@ -902,6 +902,12 @@ button.personal-execution-chip:focus-visible { outline: 2px solid #0070f3; outli .personal-capability-editor-status p { margin-top: 3px; } .personal-capability-editor-status.is-preview { background: var(--pw-blue-soft); color: var(--pw-blue-ink); } .personal-capability-editor-status.is-read-only { background: #fff5e8; color: #9a5a10; } +.personal-capability-observation { display: grid; gap: 10px; margin: 20px 24px; min-width: 0; overflow-wrap: anywhere; } +.personal-capability-observation h3 { margin: 0; font-size: 14px; font-weight: 600; } +.personal-capability-observation button { justify-self: start; min-height: 44px; padding: 8px 12px; border: 1px solid var(--pw-line-strong); border-radius: 6px; background: var(--pw-card); color: var(--pw-text); font: inherit; font-size: 12px; cursor: pointer; } +.personal-capability-observation details { font-size: 12px; } +.personal-capability-observation summary { min-height: 32px; cursor: pointer; } +.personal-capability-observation code { display: block; font-size: 11px; overflow-wrap: anywhere; } .personal-capability-linked-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 0 24px 20px; padding: 14px; border: 1px solid var(--pw-line); border-radius: 10px; background: var(--pw-bg); } .personal-capability-linked-setting > div { display: grid; gap: 4px; } .personal-capability-linked-controls { min-width: 0; justify-items: start; } diff --git a/docs/architecture/agent-failure-containment-and-recovery.md b/docs/architecture/agent-failure-containment-and-recovery.md index 307e792287..fbd7ae43c5 100644 --- a/docs/architecture/agent-failure-containment-and-recovery.md +++ b/docs/architecture/agent-failure-containment-and-recovery.md @@ -197,8 +197,7 @@ contracts; passing them does not establish live model correction, arbitrary remote exactly-once effects or production recovery time. Diagnostics deployment, overhead and long-running non-interference need separate evidence. -The RFCs specify three remaining integration gaps in these partially implemented -paths: +The RFCs track three integration paths with separate implementation checkpoints: 1. [Current-use checks for explicit delegation ancestry](rfcs/shared-goal-alignment-and-governed-amendment-v0.md#38-invalid-evidence-and-affected-consumers): refuse new dependent use when its declared basis is unavailable, preserving diff --git a/docs/architecture/agent-failure-containment-and-recovery.zh-CN.md b/docs/architecture/agent-failure-containment-and-recovery.zh-CN.md index 26c4017824..fabc6a84c2 100644 --- a/docs/architecture/agent-failure-containment-and-recovery.zh-CN.md +++ b/docs/architecture/agent-failure-containment-and-recovery.zh-CN.md @@ -88,7 +88,7 @@ Note 能保留尝试过的路径与下一步,但 summary 仍由发送者提供 这些测试设计包含失败、陈旧来源、输入改变和 effect 中断等负例。Fixture provider 与一次性本地状态验证各自合同;通过不等于真实模型纠错、任意远端 exactly-once 或生产恢复时间合格。诊断部署、开销与长时间 non-interference 需要独立证据。 -RFC 明确了这些部分实现路径中仍需补齐的三项整合缺口: +RFC 将以下三项整合路径分别记录为独立 checkpoint: 1. [显式委派来源链的当前使用检查](rfcs/shared-goal-alignment-and-governed-amendment-v0.zh-CN.md#38-失效证据与受影响消费者):声明依据不可用时拒绝新的依赖使用,保留历史完成,限制遍历与验证成本。 2. [原任务修复与复验](rfcs/composable-state-machines-recovery-verification-v0.zh-CN.md#基于源码的实现顺序):把独立失败依据传入可操作恢复路径,按当前 criterion 复验,再对账原效果。 diff --git a/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.md b/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.md index 2b68db8414..7d92d0726c 100644 --- a/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.md +++ b/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.md @@ -304,15 +304,13 @@ lease/GoalRef fence, followed by M3's actual delivery callers. ### Source-grounded implementation sequence -These are unimplemented composition deltas within existing M2/M3 and roadmap -R2/R3/R4, not new milestones. Source owners were rechecked at -`44931b6d22a50b949d43354e6ea498fb6b68d231`. +The table tracks independent composition boundaries within M2/M3 and roadmap R2/R3/R4. Candidate checkpoints do not establish installed behavior or full M2 acceptance. The source baseline is `233cc76fd22760947d73e1501032b8b77e28148b`. -| Bounded outcome | Existing entry and owner | Current gap and decisive exit | +| Bounded outcome | Existing entry and owner | Current checkpoint and decisive exit | | --- | --- | --- | | Unavailable declared ancestry prevents new dependent use | `Delegations._read_current/start`, `delegation_results.require_dependencies/adoption_evidence`, `delegation.ts` | Alignment §3.8: source → A → B with A input invalidated must refuse current dependent use even if A output is unchanged. Qualify real read/start/adopt/settlement and packaged evidence readback; keep historical completion. | | Independent check failure reaches an actionable original-task recovery journey | `executor._task_validation_stage`, `ValidatedTurnReceipt`, canonical `turn_loop_controller_contract_v0.json`, `turn_journal.ts` | Preserve qualified failure scope and repair/replan detail; complete bounded repair or verifier-only retry, current validation and original-effect settlement. Host assertions cannot become trusted validation. | -| Optional semantic review explains its evidence and coverage | Existing progress-review receipt/loader and canonical Goal acceptance inspection | Bind a selected criterion and evidence coverage in shadow readback; show missing/stale basis and separate judgment dimensions. Model quality and intervention qualify separately. | +| Shadow review explains criteria and coverage | progress-review receipt/context, `progress_review_evidence.ts`, canonical acceptance inspect | Select current canonical task criteria; exact GoalRef preserves instance identity, while changed tasks or recreated instances withdraw old judgments. Independent older cores retain only the legacy manual-study shape; canonical scope never downgrades. Show separate dimensions, declared-file net change, missing evidence and unreadable storage. Default off and existing assist trigger rules retain their semantics. | For the second outcome, `_task_validation_stage` already saves the independent result and blocks settlement. `ValidatedTurnReceipt` omits that validation's @@ -345,6 +343,15 @@ complete the journey. Bound repeated verification and source-chain traversal using measured workloads. Roll back code through its owner while retaining receipts, completed effects and unresolved recovery obligations. +An optional `acceptance_scope` refers only to registry/runtime paths inside the +selected workspace. Criteria come from the current owner; private commands and +paths stay out of model questions. Hashes, versions and declared coverage are +observations, not proof of model correctness, a durable business checkpoint or +whole-task completion. Existing team evidence and capability settings carry App +readback, and CLI/MCP share the owner; no Lark-specific protocol is introduced. +Live correction, remote exactly-once, takeover, observer quality and intervention +retain their existing RFC acceptance owners. + ## 12. Open decisions The first M2 implementation must choose its smallest sufficient exploration diff --git a/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.zh-CN.md b/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.zh-CN.md index 95bf06b563..e24de651af 100644 --- a/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.zh-CN.md +++ b/docs/architecture/rfcs/composable-state-machines-recovery-verification-v0.zh-CN.md @@ -249,14 +249,13 @@ PostgreSQL authority、successor 调度和 App/Lark 送达尚未覆盖。因此 ### 基于源码的实现顺序 -以下是既有 M2/M3 与路线图 R2/R3/R4 中尚未实现的组合增量,不新增里程碑。 -Source owner 在 `44931b6d22a50b949d43354e6ea498fb6b68d231` 复核。 +以下表格记录既有 M2/M3 与路线图 R2/R3/R4 的独立组合边界;候选 checkpoint 不表示已安装能力或完整 M2 验收。源码基线为 `233cc76fd22760947d73e1501032b8b77e28148b`。 -| 有界结果 | 既有入口与 owner | 当前缺口与决定性出口 | +| 有界结果 | 既有入口与 owner | 当前 checkpoint 与决定性出口 | | --- | --- | --- | | 声明来源链不可用时,阻止新的依赖使用 | `Delegations._read_current/start`、`delegation_results.require_dependencies/adoption_evidence`、`delegation.ts` | 遵循对齐 §3.8:source → A → B 中 A input 失效,即使 A output 不变也须拒绝当前依赖使用;验证真实 read/start/adopt/settlement 和打包证据读回,保留历史完成。 | | 独立检查失败进入原任务可操作的恢复旅程 | `executor._task_validation_stage`、`ValidatedTurnReceipt`、canonical `turn_loop_controller_contract_v0.json`、`turn_journal.ts` | 传递已资格化失败范围与 repair/replan 细节;完成有界修复或只运行 verifier 的重试、当前验证与原效果结算。Host 声明不能冒充可信验证。 | -| 可选语义审查说明证据和覆盖范围 | 既有 progress-review receipt/loader 与 canonical Goal acceptance inspect | 在 shadow 读回绑定选中 criterion 和证据覆盖;显示缺失/陈旧依据及独立判断维度。模型质量和干预另行资格化。 | +| shadow 说明条款及观察范围 | progress-review receipt/context、`progress_review_evidence.ts`、canonical acceptance inspect | 可选择任务当前规范 criterion;精确 GoalRef 保持实例身份,任务变化或实例重建撤回旧判断。独立旧核心只保留手工研究的旧格式;规范 scope 不降级。显示独立维度、净文件变化覆盖、缺失及存储未知。默认 off 和 assist 既有触发规则保持不变。 | 第二项中,`_task_validation_stage` 已保存独立结果并阻断结算;`ValidatedTurnReceipt` 未携带该验证的 `recovery_kind`,canonical controller 有意将 legacy @@ -280,6 +279,13 @@ result,只重跑 validation,不再次调用 Host。**实际修复工作**需 复制命令按钮或后端 receipt 不能独自完成旅程。用实际测量限制重复验证和来源链遍历 成本;经既有 owner 回退代码,同时保留 receipt、已提交效果和未解决恢复义务。 +规范审查 basis 的 `acceptance_scope` 只引用选定 workspace 内的 registry/runtime, +条款内容从当前 owner 读取,原命令及私有路径不进入模型问题。criterion hash、 +版本和覆盖是来源观察,不证明模型答案正确、完整业务 checkpoint 或全部任务完成。 +前端沿既有团队证据和能力设置入口读回;受影响 CLI/MCP 共用 owner,未新增 +Lark 专有协议。真实模型纠错、远端 exactly-once、接管、observer 质量与受控干预 +仍由原 RFC 验收所有者负责。 + ## 12. 未决事项 首个 M2 实现由测试与领域维护者选择足够小的探索方法及边界。优先复用 fixture diff --git a/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.md b/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.md index 3d4af87063..2f721a9d93 100644 --- a/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.md +++ b/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.md @@ -238,24 +238,29 @@ delay, false intervention against legitimate work and missed failures. Sample cases that never generated an alert as well as alerted cases; alert-only review cannot estimate missed failures. -Source recheck at `44931b6d22a50b949d43354e6ea498fb6b68d231`: -the optional `packages/loopx-jev` capture reads a declared file set and its net -change; it does not observe every intermediate assertion. Core -[`external_progress_review_trigger`](../../../loopx/control_plane/work_items/external_progress_review.py) -consumes attributable receipts at a pinned assessment revision. In `assist`, a -qualified streak can open the existing replan obligation; a newer completed -non-triggering verdict can end that streak. This is the current signal policy, -not a business-correctness certificate. The -[`progress-review` contract](../../../loopx/capabilities/progress_review/README.md) -and its owner retain off/shadow/assist compatibility. Any change to the combined -signal or its clearing policy needs explicit disclosure and counterexamples; -this design does not silently change it. - -The downstream contract is [evidence invalidation in shared work](shared-goal-alignment-and-governed-amendment-v0.md#38-invalid-evidence-and-affected-consumers) +The local candidate now binds an explicitly selected canonical task criterion +through [`progress_review_evidence.ts`](../../../loopx/control_plane/work_items/progress_review_evidence.ts). +The optional observer's `acceptance_scope` reads the existing acceptance owner; +private registry/runtime references stay outside the model packet. A manual +basis remains an `operator_study`. Receipts declare selected-file net-change +coverage. Capture and core receipt decoding require the canonical Goal/Agent/Todo +scope to match the actual run; mismatches never reach model dispatch or drift +consumption. Core readback also rechecks bindings against current criteria. A changed or unavailable basis withdraws that receipt's signal without +rewriting its history. Legacy receipt handling and default-off isolation remain. + +The packaged capability editor separately displays relationship and increment, +criterion origin, coverage, stale/missing/unavailable states and an explicit +refresh. `off_goal` plus `new_evidence` does not become an on-Goal verdict; a +non-triggering combined signal retains the existing streak behavior. File/SQLite +canonical criterion edits and the production HTTP/frontend journey have local +validation; no new live model-quality experiment or automatic intervention was +performed. See the [capability contract](../../../loopx/capabilities/progress_review/README.md) +and [observer guide](../../../packages/loopx-jev/DRIFT_SHADOW.md). + +These observations connect to [shared evidence invalidation](shared-goal-alignment-and-governed-amendment-v0.md#38-invalid-evidence-and-affected-consumers) and [recovery qualification](composable-state-machines-recovery-verification-v0.md#detection-containment-and-recovery-evidence). -First connect existing verifier results and dependency readback to those owners. -Additional model inference is conditional on the comparison in section 6; it is -not a prerequisite for fixing a demonstrated deterministic gap. +Model reasoning remains subject to the comparisons in section 6 and is not a +prerequisite for repairing an evidenced deterministic gap. ### 5.3 Provider facts and deferred mechanisms diff --git a/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.zh-CN.md b/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.zh-CN.md index 286e7354d2..1c14b45a14 100644 --- a/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.zh-CN.md +++ b/docs/architecture/rfcs/optional-semantic-assistance-jev-v0.zh-CN.md @@ -224,19 +224,25 @@ D1 分别研究目标关系与证据增量。保留必要前置、合理阻塞 行为。可选评估不可用时,必要的确定性检查仍生效。除检测延迟外,还要测量对合法 工作的误干预与漏报。告警和从未告警的记录都要抽查;只审查告警记录无法估计漏报。 -源码在 `44931b6d22a50b949d43354e6ea498fb6b68d231` 复核:可选 -`packages/loopx-jev` capture 读取声明文件集合及净变化,不观察每条中间断言。 -核心 [`external_progress_review_trigger`](../../../loopx/control_plane/work_items/external_progress_review.py) -消费身份可归属、评估版本已固定的回执。`assist` 可把合格连续信号转为既有 replan -义务;较新的已完成、未触发 verdict 可以结束该连续信号。这是当前信号政策,不是 -业务正确证明。[progress-review 合同](../../../loopx/capabilities/progress_review/README.zh-CN.md) -继续拥有 off/shadow/assist 兼容性。修改组合信号或解除政策须明确披露并提供反例, -本设计不隐式改变当前行为。 - -后续连接[共享工作中的证据失效](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md#38-失效证据与受影响消费者) +本地候选实现通过 +[`progress_review_evidence.ts`](../../../loopx/control_plane/work_items/progress_review_evidence.ts) +绑定显式选中的规范任务 criterion。可选观察器的 `acceptance_scope` 读取既有验收 +owner;私有 registry/runtime 引用不进入模型请求。手写 basis 仍为 `operator_study`。 +回执声明选中文件的净变化覆盖;采集与核心回执解码共用 Goal/Agent/Todo 身份约束, +不匹配时拒绝模型派发及漂移消费。核心读回也把新 canonical binding 与当前 criterion +复核;依据变化或不可用时撤回该回执信号,不改历史。旧回执兼容性与默认关闭隔离 +保持原合同。 + +打包能力编辑器分别展示目标关系与证据增量、criterion 来源、覆盖范围及过期/缺失/ +不可用状态,提供显式刷新。`off_goal` 加 `new_evidence` 不被改写为符合目标;组合 +信号未触发仍遵循原连续段政策。File/SQLite 下规范 criterion 编辑及真实 HTTP/界面 +流程已做本地验证;未开展新的真实模型质量实验或自动干预。见 +[能力合同](../../../loopx/capabilities/progress_review/README.zh-CN.md)与 +[观察器指南](../../../packages/loopx-jev/DRIFT_SHADOW.zh-CN.md)。 + +这些观察衔接[共享工作中的证据失效](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md#38-失效证据与受影响消费者) 与[恢复资格](composable-state-machines-recovery-verification-v0.zh-CN.md#检测控制与恢复证据)。 -优先把现有 verifier 结果与依赖读回接到这些 owner;增加模型推理仍取决于第 6 节 -比较,不能成为修复已证实确定性缺口的前置条件。 +增加模型推理仍取决于第 6 节比较,不能成为修复已证实确定性缺口的前置条件。 ### 5.3 提供方事实与延后机制 diff --git a/loopx/capabilities/progress_review/README.md b/loopx/capabilities/progress_review/README.md index 0f2d6f5650..6d25063e3f 100644 --- a/loopx/capabilities/progress_review/README.md +++ b/loopx/capabilities/progress_review/README.md @@ -44,7 +44,7 @@ loopx configure-goal --goal-id