Skip to content

Latest commit

 

History

History
1131 lines (978 loc) · 75.3 KB

goal-acceptance-observations.md

File metadata and controls

1131 lines (978 loc) · 75.3 KB

Goal acceptance observations

Open a local Goal, then Overview → Delivery & evidence → Acceptance observations. The read-only card shows each observed acceptance requirement with its Agent and observation time, pending gates with their target Agent and decision scope, and the next action already projected by status. A missing human decision owner is shown as unknown; the blocked Agent is not assumed to be the approver.

The same projection is available as run_history.goals[].acceptance_observation in loopx status --format json; status Markdown includes a compact summary. The observation card requires no activation or new permission. It changes presentation only; Todo, gate, quota, settlement, and Goal completion authority are unchanged.

Acceptance requirements reuse the frontier's existing per-Agent vision rules from already-collected history before display trimming. It does not collect a complete frontier or audit all Agent lanes. History is bounded, so every result is partial: no gaps is not successful acceptance. Missing sources and truncated observations stay visible. Historical lifecycle markers have source references when available and never override current open gates.

This bounded slice uses goal_acceptance_observation_projection_v0. It is not the broader goal_artifact_lifecycle_projection_v0 contract proposed by the Goal artifact lifecycle RFC, whose phases, declared milestones and legal transitions remain unchanged. No alias accepts that broader schema as this observation payload. It does not introduce declared milestone authoring, a universal phase sequence, an exhaustive evidence audit, new legal transitions, or a completion decision. Legacy sources without the projection display unavailable, not success. The proposed Goal direction baseline material declarations and revision-bound usage receipts are not implemented here; historical progress does not establish that current direction materials were read.

Goal Overview counts only currently passing criteria within the configured scope. The acceptance owner's stale, held and task-only partial states remain visible even when the retained receipt has the same contract revision. All declared criteria remain listed; reading them does not revalidate evidence or complete the Goal. Historical receipts remain in Delivery & evidence.

中文:概览只统计当前覆盖范围内通过的条款。即使合同版本相同,依据已过期、 关联待确认和仅任务检查通过仍分别显示;所有已声明条款都保留。查看不会重新 验证依据或完成 Goal,历史回执仍可在“交付与依据”中读取。

Status also exposes a separate run_history.goals[].artifact_lifecycle readout and Markdown summary: observed phase, evidence milestones, guards and next steps. It consumes the current Goal's session-runtime work observation before display trimming. Outstanding required work keeps the phase qualifying even when Todos are complete and historical progress is reached. An absent work observation does not invent a work requirement. This v0 readout never recommends a terminal transition: closing stays a verification step with the machine-readable next_transitions[].reason_codes value acceptance_unverified, both when sources are missing and when all bounded sources were observed. Consumers use that code, not English precondition text. A Goal already recorded as terminal still displays lifecycle_phase: closed with no next transitions. Adding acceptance-driven terminal advice requires a separate contract change and producer-side validation. This readout grants no execution or completion authority; the Dashboard card above keeps its separate acceptance-observation contract.

Work observation coverage follows the supplied projection, not adapter.kind:

Source delivered to status Work observation coverage
Session-runtime adapter, or another adapter emitting the same session-runtime projection Available only with session_runtime_readonly_projection_v0, a matching Goal id, and work facts
Adapter without that projection, or a projection with a mismatched schema/Goal id Unavailable; this readout does not query quota or other lane owners

Without that source a Goal may read closing from Todo/history even when a lane outside the observation still requires work. Neither closing nor absence of work_lane_selected proves all work is complete; the lane and completion owners retain their decisions.

Validation: python -m pytest tests/control_plane/test_goal_acceptance_observation.py and python -m pytest tests/control_plane/test_goal_artifact_work_observation.py, plus node examples/dashboard-goal-acceptance-browser-smoke.mjs. The browser check consumes real status collection over a disposable synthetic Goal; set LOOPX_GOAL_ACCEPTANCE_PACKAGED=1 after the Dashboard build to check shipped assets.

Default supporting outcomes

Creating a Goal with a selected Agent and explicit Completion criteria now retains that reviewed field as a supporting outcome before the first Session can start. The App and the typed goal.create action share this path. Completing the initial Todos does not erase the criteria: unmet requirements return to the existing Goal frontier and replan owner. No acceptance-check setup or extra continuation switch is needed. Criteria without a selected Agent are refused before creation; an objective alone is not parsed into invented requirements.

Creation recovery keeps the original declaration operation and provider revision through a lost response. A known revision conflict holds the creation for reconciliation instead of silently rebasing it or starting a Host. Already dispatched historical creations retain their original semantics; this is not a retroactive migration. Stop, permissions, available budget, independent checks and natural native Goal completion retain their existing owners.

中文:创建 Goal 时,已选择执行 Agent 并明确填写的“完成标准”会在首个会话启动前 保存为持续要求。App 与 goal.create 共用这条路径;首批 Todo 做完后,尚未满足的 要求仍进入现有 Goal frontier 和重规划流程,无需另开续跑开关或配置检查命令。 未选择 Agent 时先拒绝创建;系统不会从自由文本目标中猜出新要求。响应丢失沿用原 操作和 provider revision 恢复;已知版本冲突先保留现场,不自动重基或启动模型。 已经启动过会话的旧创建记录保持原义,不自动迁移。停止、权限、预算、独立检查及 原生 Goal 的自然结束规则保持有效。

The first planning step reuses these existing creation requirements and links its actual work to them. It adds only missing source-grounded requirements; creating another outcome for unchanged completion criteria is not a prerequisite.

The shared /loopx and todo plan first-planning contract asks the Agent to declare source-grounded overall requirements through goal-acceptance refine, link the actual task Todos and read the declaration back. The caller supplies the original task and execution facts; it does not write the Agent's semantic requirements. Reuse the same outcome on continuation. Unchanged requirements need no rewrite, and independent executable checks remain optional.

An open-ended objective remains open-ended. A maximum timeout is an upper bound, not an instruction to use every remaining minute. Local Todo completion leaves unmet overall requirements with the existing frontier/replan owner; real Stop, budget, refusal and waiting conditions still apply. Benchmark's loopx-planned ready handoff checks the canonical Agent-owned work links. Blocked planning can return its actual blocker without fabricating a declaration. The structural readback proves persistence, not model comprehension or task success.

Goal Overview shows supporting outcomes recorded by a bound Agent: original objective, cumulative requirements, linked work, sources and separate Agent review/check results. The local owner can Add a requirement and read the canonical result. Refresh a stale view before rebasing; an unconfirmed write retains its operation for retry. No model starts and no check command runs.

When handing work to another Agent, inspect the original Goal. In JSON, a current outcome with owner_registration_missing: true names an owner absent from the observed Goal roster. Its ID, requirements, work, sources and previous reviews remain available for the handoff inventory. In the App, expand the outcome and open Linked work and sources to see the recorded owner. An inspection without the current roster omits the marker.

Outcome maintenance and evidence review are default, without a feature switch. Current storage/readback has no enabled switch. Every upgraded Goal uses the same feedback loop. An Agent review does not certify independent acceptance or complete the root Goal; requirements/work changes invalidate its basis and artifact edits require another review. Other runnable research and original budget/stop conditions retain precedence. See the Agent workflow for inline context, one-call writeback and upgrade/adoption limits.

When one refresh-state explicitly supplies both a new complete outcome review and an Explore result for work linked to that outcome, the review covers that same batch's exact additive Todo link. A result for separate same-Agent work does not change the reviewed outcome's basis or work links. The typed owner validates the complete result-link intent and ownership in either case, then hashes a relevant prospective link against the original CAS snapshot; it does not write the link or rebind an old review. The basis becomes current only after the Todo owner commits the expected link. Failed delivery remains stale and exact replay retains its original digest. Other work changes and additional evidence links still invalidate the review. Separately submitted and legacy completed reviews keep their original basis; no check result or independent-verification flag changes.

中文:同一次 refresh-state 显式提交完整的新自查,以及该 outcome 关联工作的 Explore 结果时,自查依据包含该批预期追加的精确 Todo 结果关联。同 Agent 的其他 工作结果不改变本 outcome 的依据或关联;typed owner 在两种情况下均先验证完整 意图和归属,再基于原 CAS 快照计算相关工作的摘要,不代替 Todo owner 写关联,也不替旧自查更新依据。只有预期关联真实提交后依据才是 current; 投递失败保持过期,原样重放保留原摘要。其他工作变化、额外证据关联仍使依据失效。 分开提交或旧版本已完成的自查保持原义,独立检查与验证标记不变。

中文:Goal 概览显示 Agent 登记的支撑成果:原始目的、累计要求、关联工作、来源, 并区分 Agent 自查与独立检查。所有者可原地补充要求并读取原生结果;过期视图先 刷新再重基,未确认写入保留原操作重试。不启动模型或执行检查命令。默认维护和 有据自查没有开关,当前存储和读回删除 enabled;升级后的所有 Goal 使用同一闭环。 自查不代表独立验收或根 Goal 完成;要求/工作变化使依据过期,产物修改后须重新核对。既有可执行研究及 原始预算/停止条件保持权威。

Native goal-acceptance and outcome-update refresh-state rejections retain their stable error code. A known outcome validation rule also supplies optional error_detail, such as source ref must be an opaque identifier (ASCII letters/digits and . _ : @ -, no '/' paths or spaces), in JSON and Markdown. This detail contains fixed rule text and validator-measured byte counts, never the rejected value or provider/IO context. Validation rejection writes nothing: after confirming that result, correct the document and retry its operation with the still-current provider revision. An uncertain write still follows the original receipt and recovery rules. Successful operations and unmarked failures keep their existing behavior.

For local_authority_provider_unavailable, Goal acceptance also returns fixed error_detail explaining that the selected PostgreSQL authority needs a service-owned store factory. This local CLI entrypoint supplies File/SQLite; a PostgreSQL host must supply the factory. The refusal does not authorize switching providers, creating a service or editing credentials. It leaves the selected authority and pending proposals unchanged. This diagnosis does not qualify a positive native PostgreSQL workflow or block independent work on other available Goals.

中文:原生 goal-acceptance 和成果更新 refresh-state 拒绝保留稳定错误码。 已知成果校验规则还会在 JSON 与 Markdown 中提供可选 error_detail,例如 source ref must be an opaque identifier (ASCII letters/digits and . _ : @ -, no '/' paths or spaces)。详情只包含固定规则及校验器实测字节数,不回显被拒值或 provider/IO 上下文。校验拒绝不写入状态;确认这一结果后,修正文档并沿用原操作和 仍有效的 provider revision 重试。写入结果不确定时继续遵循原有回执与恢复规则。 成功操作和未标记错误保持既有行为。

local_authority_provider_unavailable 还会返回固定 error_detail,说明所选 PostgreSQL 权威需要服务侧提供 store factory。本机 CLI 入口支持 File/SQLite; PostgreSQL 宿主须提供该 factory。拒绝不授予切换 provider、新建服务或修改凭证的 权限,所选权威及待审提案保持不变。这只是诊断,不代表原生 PostgreSQL 正向流程 已经验收,也不阻塞其他可用 Goal 中独立获授权的工作。

Supporting outcomes share two independent 131072-byte compact UTF-8 JSON budgets across the Goal: declarations excluding current reviews, and current reviews measured as the remaining bytes of the same normalized snapshot. A rejection identifies the failing budget and reports its candidate, retained and limit bytes. Retained means that budget before this patch in the current Goal lifetime. A fresh lifetime has zero retained bytes; no current reviews means zero retained review bytes. These are storage observations, not model tokens, packet size or measured execution cost. The 64-source limit per outcome remains independent. Omitting source on an ordinary review avoids adding provenance but cannot bypass either byte budget.

A requirement description permits 2000 UTF-16 code units so the existing creation field's full 1000 Unicode code points, including supplementary-plane characters, survive without clipping. Previously its 512-unit bound rejected that already supported input. This field alignment does not enlarge either 131072-byte aggregate envelope, source count, outcome count or execution budget; oversized declarations still fail atomically. 中文:单条要求的描述上限对齐创建表单已有的 1000 个 Unicode 码点(最多 2000 个 UTF-16 单元),保留完整确认文本;两个聚合字节 预算及其他容量、执行预算均不扩大,超限仍原子拒绝。

For review overflow, shorten only the proposed review notes and evidence references while preserving each conclusion and its provenance; keep full evidence in its owning material. For declaration overflow, shortening reviews cannot help. Preserve original requirements and origins and report the capacity blocker if no lossless update fits. Never prune history, raise a limit or create a replacement outcome to make the same work fit. Retain the failed response; no automatic compaction or retry occurs.

中文:整个 Goal 的累计成果共享两个独立的 131072 字节紧凑 UTF-8 JSON 预算: 不含当前复核的声明,以及同一规范化快照中当前复核增加的字节。拒绝时指出超限的 预算,并给出该预算的拟写入、保留状态和上限字节数;保留状态指本次修改前、当前 Goal 生命周期中的对应字节,新生命周期或尚无复核时相应值为零。这是存储体积, 不能代替模型 token、packet 大小或实测执行成本;每项成果 64 个来源的限制仍独立。 普通复核省略 source 可以避免追加来源,但不能绕过任一种字节预算。

复核超限时,仅精简拟写入复核的重复说明和证据引用,保留每项结论及溯源,完整 证据留在原材料中。声明超限时,缩短复核没有作用。保留原要求与来源,无法无损 写入时报告容量阻塞。不得清理历史、提高上限或新建替代成果规避限制;保留失败 响应。系统不自动压缩或重试。

The existing native conversation tool also retains this owner-qualified detail. Its request envelope is immutable: after a confirmed rejection, a corrected document needs a new operation id and current readback. An unchanged retry of an uncertain write still recovers the original operation. Generic provider/IO errors continue to use the existing sanitized rejection.

中文:既有原生对话工具也保留这种 owner 校验诊断。对话请求封套不可改写;确认 拒绝后,修正文档须使用新操作 ID 和当前读回。结果不确定时仍以原样请求恢复原操作。 普通 provider/IO 错误保持原有脱敏拒绝。

Executable checks within default acceptance

An owner can attach executable checks to an existing registered Goal’s requirements. The Goal must already use promoted canonical authority. These commands never promote a provider or fall back to legacy Markdown when canonical reads fail. Prefer a plan that references outcome_id and criteria IDs; the typed owner resolves objective, requirement descriptions and linked work. The owner reviews the concrete commands and scope before execution. Standalone check documents remain supported. The existing Goal authority owns the contract; the Dashboard presents its checked result and uses the same owner for authorized changes. No new capability editor or provider is introduced.

For an ordinary delivery, the Agent prepares the technical plan from the stated outcome and existing task/file context. The local owner sees its objective, criteria, coverage and command effect beside the delivery, then uses Use plan and check once. A configured contract needs only Check delivery. The advanced JSON import remains available for technical migration; it is not a prerequisite for this path.

The Overview places this interaction in its Direction brief, before work and result lists. The same acceptance readback supplies the objective, criteria and current check result; it is not a second overview controller. Desktop expands the check details, while phones fold them without hiding the required action, its command effect or failure feedback. Technical records and migration controls remain in that disclosure. A configured recheck is a quiet secondary control; a prepared plan retains its explicit Use plan and check decision.

In an explicitly enabled Goal LoopX conversation whose native tool advertises prepare_check, the Agent can call loopx_collaboration with action=prepare_check, a stable operation_id and the existing acceptance document. The host binds the Goal, registered preparing Agent and runtime; the model cannot replace those identities or roots. Paused, stopped, obsolete Turns and revoked execution configuration cannot prepare a plan. A conflicting retry retains the original proposal and requires reconciliation.

This reuses the existing typed action preview store. It does not add a second configuration owner or enable LoopX mode automatically. Native thread tool schemas are fixed when created: an older thread may not advertise this action, and an unfinished native Goal is never replaced just to add tools. The existing registered-Agent CLI preparation remains available independently:

loopx --format json goal-acceptance prepare --goal-id example-goal \
  --agent-id example-agent --document acceptance.json \
  --operation-id prepare-delivery-check --execute

Here --execute persists only the reviewable proposal. Omit it for a read-only validation preview. Neither form configures the Goal, approves governance or runs commands. The local owner's action applies the described configuration and executes its bounded checks; this is the existing trusted local owner surface, not an authenticated remote owner decision. Use runtime command names and safe relative file references in proposals, rather than machine-specific paths. The original operation identity and native receipts recover a lost response. Concurrent or repeated apply does not rerun a consumed intent; if a started check has no matching native receipt, the result stays uncertain until explicitly reconciled. Readback never runs checks. A stored successful receipt cannot certify changed files, independent reviewer identity, adoption or Goal completion. Managed Chat preparation uses loopx:python to bind a pinned .py checker to the interpreter running LoopX. Resolution happens only at execution; the saved definition contains no machine path. Retrying an older saved preparation keeps its original argv and review basis. If a check contract selects a single Task and that Task passes every criterion with recorded oracle versions, its completion also records verification for that exact selected scope. Overview reads the original operation and artifact versions without running the checker again. A changed or unreadable artifact still invalidates the current pass in Overview. A broader contract or an incomplete set of versioned checks keeps its existing verification. A later finished/cancelled plan does not resurrect an older draft.

Prepared plans bind the reviewed acceptance configuration and declared work, rather than every update to the Goal's provider revision. Notes and work outside an explicit selected_work scope do not require preparing the same plan again. Changed covered requirements, a new owner configuration or another Goal instance still invalidate it. TypeScript classifies that context; each actual write keeps the current provider CAS. The original operation and configuration context remain bound to native receipts, including recovery after a lost response. Historical plans without a reviewed context retain their original strict revision check.

Retrying preparation with the same operation, Goal, preparing Agent and document returns the original saved proposal, even after unrelated progress or an owner decision. It does not refresh the reviewed basis, rerun checks or reopen a cancelled, stale or applied plan. Changed intent still conflicts, and applying the recovered proposal still validates the current acceptance context. Its historical receipt is not current acceptance.

Count the complete task: with an Agent-prepared plan already delivered, the owner has one required decision. If the original request still lacks acceptance intent or authority, that missing decision is an additional round; preparing a proposal alone does not establish a one-round cold-start or live-model experience. The default outcome feedback loop continues while executable verification awaits an owner-authorized check.

中文:普通路径由 Agent 根据目标与既有上下文准备方案,负责人在交付处核对要求、覆盖范围和 执行影响,一次“采用并检查”;已有配置直接“检查交付”。JSON 导入仅保留为高级迁移入口。 prepare --execute 只保存可审阅方案,不修改 Goal 规则、不执行检查。丢失回执先对账, 不能自动重跑;历史通过不能认证变化后的版本。交互次数从原始意图算起,前置缺失的意图或 授权不能从计数中省略。成果反馈默认运行,可执行检查等待所有者授权。此入口沿用可信本机 所有者边界,不证明远程身份、独立复核或实际采用。 显式启用的 Goal LoopX 会话在原生工具声明 prepare_check 时,可直接准备相同方案; Goal、Agent 与运行目录由宿主固定,暂停、过期 Turn 或撤销配置后不能继续准备。 旧原生线程的工具声明不会自动升级,也不会为新增工具替换未完成线程;未声明时保留 CLI 准备路径。该入口不自动启用 LoopX、不配置或运行检查。 准备响应丢失后,以相同操作、Goal、准备 Agent 和文档重试会读回原方案及其当前记录状态, 不因进展或所有者决定而刷新审阅依据,也不重跑检查或重新打开已取消、过期、已采用的方案。 意图改变仍报冲突;执行原方案仍检查当前依据,历史回执不代表当前验收。 概览将同一个交付检查交互放在“方向”正文中,先于工作和成果列表;目标、条件和当前结果 使用同一验收读回。桌面展开检查细节,窄屏默认折叠条件、版本记录与高级迁移入口,但不折叠 必需动作、命令影响或失败反馈。已有配置的重查使用次要按钮,待采用方案保留明确的采用决定。 当检查合同只选中一个任务,且该任务完成时通过全部条件并记录检查器与产物版本,任务完成会同步 保存该范围的检查结果。概览直接读回原操作和产物版本。产物已变化或读不到时,概览会反映 当前状态。范围更广或版本证据不全的合同保留已有验证记录。 待采用方案绑定实际审阅的验收规则与工作声明;备注或明确范围外的工作变化,不要求重复准备。 托管会话准备检查时用 loopx:python 将固定的 .py 检查器绑定到运行 LoopX 的解释器; 执行时才解析,保存的定义不含本机路径。重试旧的已存方案仍保留其原命令与审阅依据。 覆盖任务要求、所有者配置或 Goal 实例变化仍使方案失效。TypeScript 判断依据,写入继续使用 当前 provider CAS;原操作与配置依据由原生回执保留。旧方案维持原来的严格版本检查。

For advanced CLI configuration, inspect the current provider revision:

loopx --format json goal-acceptance inspect --goal-id example-goal
loopx --format json todo list --goal-id example-goal

Prepare an owner-reviewed acceptance.json, replacing the illustrative file check and task ID with the actual artifact checks and existing advancement task:

{
  "scope": {"kind": "selected_work", "todo_ids": ["todo_deliver"]},
  "objective": "Deliver a checked artifact",
  "non_goals": ["Publish the artifact"],
  "criteria": [{
    "id": "artifact-present",
    "description": "The delivered text artifact exists and is nonempty.",
    "validation_argv": ["python3", "-c", "from pathlib import Path; assert Path('deliverable.txt').read_text().strip()"],
    "validation_timeout_seconds": 5
  }],
  "bindings": [{"todo_id": "todo_deliver", "criterion_ids": ["artifact-present"]}]
}

Every new configuration or reconfiguration must explicitly declare coverage: selected_work requires a nonempty list of existing Agent advancement Todo IDs; all_advancement explicitly covers all current and future advancement work. Prefer selected work for a bounded experiment or delegated artifact. Selection and binding are separate: selected work with no confirmed binding remains held. Bindings outside the selected set are rejected. Agents cannot change coverage; owner configuration still uses preview, provider CAS and exact operation replay.

goal checks the Goal as a whole without gating local Todo execution or completion. It requires empty bindings; it does not mean every new task needs an acceptance association. Use it for an independently checked cross-task commitment. With a retained outcome, {"outcome_id":"...","scope":{"kind":"goal"},"criteria":[...]} uses the original requirement descriptions and needs no placeholder Todo. The outcome ID binds the receipt to that outcome. A standalone Goal check reports on the Goal as a whole. An unmet configured check cannot be satisfied by an Agent's self-review or local Todo completion. Unmet requirements return to replanning when the linked advancement work ends. A Todo that changes to another class retains its identity and status in the outcome. Only current advancement Todos can cover the remaining work. If every remaining advancement Todo is blocked or deferred, review which requirements can proceed independently. This also applies when open linked work awaits another Todo or a monitor change and its independent successor work has ended. The stored open status is preserved. A review bound to the current outcome and work evidence can retain a necessary wait. Changed evidence requires a fresh review. The host Todo read also checks pending PR conditions against recorded merge evidence. It selects independent available work first and resumes the gated Todo when its matching PR is observed. Permission, Stop and budget still govern execution. A scope declaration itself never runs a checker.

goal 只验收整个 Goal,不给局部 Todo 加执行或完成门禁,bindings 必须为空。 它适用于跨任务的独立验收承诺,可直接引用既有成果要求,无需占位 Todo。 outcome_id 将检查回执绑定到对应成果。独立的 Goal 检查报告整个 Goal 的验证结果。 关联推进任务结束或全部转为监控等其他类别时,未满足的要求进入重规划。关联记录 保留任务的当前状态和变更后的类别。若剩余关联推进任务均被阻塞或延期,需核对 哪些要求仍可独立推进。开放任务等待另一项任务完成或监控变化、其独立后续工作已结束时, 也需复核。原任务仍保持开放。复核当前成果与任务证据后可以保留必要等待,依据变化后需重新判断。 宿主读取任务时会核对 PR 合并凭证。独立任务可先执行,对应 PR 的合并凭证到达后再恢复受限任务。 已配置的检查仍需独立验收,权限、Stop 和预算继续生效。

Legacy persisted documents without scope retain their Goal-wide behavior and original digest. Reading or upgrading does not narrow them. A fresh configuration without scope is rejected with an actionable error; original committed retries still recover their receipts. An older runtime that does not understand the selected coverage kind rejects it rather than silently ignoring it; update readers before an owner-approved scope change.

Unselected work retains its ordinary validation, claims, leases, permissions and continuation checks. Selected work cannot edit role/class/status to escape its contract. Changes to unrelated work do not stale a selected-work verification; changes to selected work do. The dashboard's acceptance detail, Markdown export and CLI expose coverage. Configuration continues through the same owner-authorized CAS transition. No Lark configuration operation is introduced.

恢复与范围 / Recovery and coverage. Missing/stale associations trigger scoped replanning, but a concrete blocker receipt is a wait checkpoint, not a repair or handoff. Inspect contract coverage before requesting per-task rebinding. If a bounded experiment accidentally gates independent work, prepare a correction for the authorized owner, retain all task-level validation and read back runnable work after applying it. Do not rebind every new task, remove check configuration to bypass the hold, or create another unbound repair Todo. Contract revision changes invalidate old hold checkpoints.

所有新配置与重新配置都必须明确选择覆盖范围:selected_work 只管明确列出的既有推进任务, all_advancement 明确覆盖当前和未来全部推进任务。局部实验应选择前者;选中但未绑定的任务 仍然受阻。旧合同省略范围时保持原来的全局语义和摘要,升级不会偷偷放松。 范围仅由原 owner 配置路径修改;范围外任务继续接受自身的校验、租约和权限检查。 记录阻塞只能暂停重复重规划,不能冒充修复已完成或已交接;应诊断范围、提交具体修正并验证恢复。

Keep executable declarations in the owner's local file; public readback omits command arguments and output. The configured checks run as bounded argv commands without a shell, using the existing delivery-workspace validation rules. Each criterion allows 1–25 seconds and defaults to 5 seconds. The sum of all criterion timeouts must not exceed 25 seconds. Run longer evaluations outside the completion wrapper and configure a bounded check of their resulting artifact.

The inline Python example binds its code text in the versioned document. For a script validator, optionally run sha256sum verify.py and add "validation_files": [{"path": "verify.py", "sha256": "<64-hex-digest>"}] to that criterion, using a delivery-workspace-relative path. The host checks the declared file bytes before and after the real run to detect changes. This bounded check does not prove all transitive imports or interpreter/external-tool identity.

Configure without --agent-id: registered Agent-role invocations can inspect and verify, but cannot configure or remove command checks. This is a trusted local invocation role, not an authentication boundary. The CLI relies on existing local-process and private-runtime filesystem permissions; omitting --agent-id is not authentication. Processes with the same private-runtime permissions are not isolated from owner operations.

Substitute the exact provider_revision from the preceding inspect, not the acceptance revision:

loopx goal-acceptance configure --goal-id example-goal --document acceptance.json --expected-provider-revision '<provider_revision>'
loopx goal-acceptance configure --goal-id example-goal --document acceptance.json --expected-provider-revision '<provider_revision>' --execute
loopx --format json goal-acceptance inspect --goal-id example-goal

Omitting --execute previews configuration. A revision conflict requires a new inspect and review of the changed basis before retrying. After configuring checks, the existing task claim and completion paths enforce the contract: applicable work with an unbound or stale association is held; the owner must confirm its current association by reconfiguring. Completion executes fresh bound artifact checks and retains the existing claim, lease/fence, permission and continuation gates. A prior verification receipt or a confirmed association cannot complete a task. Use loopx todo claim --help and loopx todo complete --help for the existing task arguments; this contract adds no bypass flags. When a fresh completion criterion fails, todo complete keeps the Todo open and returns goal_acceptance_validation_failure_v0 with the criterion ID, privacy-safe validation status, exit code when available, and a bounded next action. A dirty or mismatched delivery worktree is diagnosed as a workspace failure, not as a stale owner association. Commands, output, local paths and arbitrary runner summaries are not projected. Retry under the same Turn and current lease after repairing the indicated execution context.

loopx delegation read and wait return the same failure detail when a fresh check rejects an accepted delegation's artifacts. Use the reported criterion and validator status to recheck the original delegation.

Terminal observations, including no_followup, do not change the work digest: finishing a task must not stale the binding that just admitted its completion. The v0 binding matcher also accepts a prior digest when the only intervening changes are a valid append-only completion-validator revision history or added successor links, or when a previously absent resume_when scheduling condition is added. It checks reconstructible prior states rather than rewriting owner bindings, so existing ready contracts retain their stored digests. Revised validators still undergo their own fresh completion check; Goal acceptance criteria remain separately configured and checked. Text, whether completion validation is required, repository/write-scope declarations, and unknown future work fields still invalidate the association. Replacing an existing resume_when is not reconstructible from the latest Todo and remains stale. When no advancement Todo is selectable, both missing (unbound) and stale associations enter the existing agent-scoped recovery lane. Recovery preserves the original Turn/Todo identity and does not authorize execution of held work. Inspect a missing association and prepare it for owner confirmation; for a stale association, inspect the work delta and use the exact text/wait restoration when possible, or propose the changed association for owner review. An already eligible successor remains a separate execution identity. Do not create another unbound repair Todo and mistake its existence for a runnable successor.

Acceptance holds precede general vision gaps in the bounded trigger packet, so the Agent can read the exact checkpoints that recovery requires. Only an accepted, evidence-linked runnable successor or concrete blocker receipt covering the exact hold generation can quiet it. Unrelated progress, a vision rewrite, or an acknowledgement for another association cannot discharge the hold. Reconfirming the contract or changing the work rearms recovery. Disabled/absent acceptance retains its existing behavior. When quota selects replan, candidate monitors remain inventory; selected_todo and agent_lane_next_action do not advertise them as this decision's execution target. Original receipt identities remain in their settlement contracts. A genuinely Todo-bound replan still projects its selected Todo; this only removes the unrelated inventory fallback.

Existing check documents configured with a persisted no_followup field under the earlier digest rule require owner inspection and reconfiguration; no historical receipt is rewritten or automatically accepted. Disabled/absent acceptance retains its existing behavior.

For an already authorized delegation, turn plan --todo-id todo_example and turn run-once --todo-id todo_example select that exact currently eligible work through the existing quota owner. Omitting the option retains controller selection. An unavailable task cannot silently select a different one. The option does not retarget resumed Turns or host sessions and is not exposed by turn managed-step; it grants no new task, lease, budget or completion authority.

Run all configured Goal checks and read back their recorded basis:

loopx goal-acceptance verify --goal-id example-goal
loopx goal-acceptance verify --goal-id example-goal --execute
loopx --format json goal-acceptance inspect --goal-id example-goal

Verification without --execute is a preview. In Overview → Delivery & evidence, refresh the snapshot and expand Goal acceptance contract below the delivery chain. It shows the Goal ID, contract revision/digest, criteria, task associations, and verification results with their own revision/digest. The section exists only when the server's acceptance.goal_acceptance_contract.criteria carries a check configuration. Requirements and Agent reviews remain available without commands. The existing snapshot export and status Markdown include readback without command bodies or raw logs.

Server state Readback meaning
Task ready Owner confirmed the current task association; artifact checks are separate
Task unbound / stale Association is missing / no longer current; applicable: false identifies tasks outside the current gate
Contract unverified Artifact checks have not been verified
Contract failed / stale Checks failed / their recorded basis is no longer current
Contract partial Task-scoped checks passed; Goal-wide verification remains unknown
Contract held Applicable task associations require confirmation; historical results remain inspectable
Contract accepted All configured artifact checks passed on the current basis; this does not approve or complete the Goal

Removing check configuration is an explicit owner operation against a freshly inspected provider revision. Default requirement review and replanning continue; existing task authority, permissions, and lifecycle rules still apply:

loopx --format json goal-acceptance inspect --goal-id example-goal
loopx goal-acceptance clear-checks --goal-id example-goal --expected-provider-revision '<current_provider_revision>' --execute
loopx --format json goal-acceptance inspect --goal-id example-goal

Activation grants no publication, external effect, provider-promotion or Goal completion authority. Keep objective, criterion descriptions and reasons safe for their status audience. Lark rendering, remote contract editing, semantic intent-preservation proofs and general shared amendments remain outside this local-owner slice. Follow-up belongs to #3836 and #2831; it does not close either RFC.

Readback validation: Dashboard npm run smoke:delivery-review, node smoke/goal-acceptance-contract-smoke.mjs, npm run smoke:goal-acceptance-contract-browser, and uv run --extra test python -m pytest tests/test_goal_acceptance_contract_rendering.py. After the integrated Dashboard build, npm run smoke:goal-acceptance-contract-packaged runs the same contract browser check against the shipped assets.

Reconcile obsolete work before supersession / 替代旧任务前协调检查范围

Use this owner path when an authorized correction replaces a Todo's behavior, while the original objective and unaffected acceptance remain valid. For example, todo_parse is already accepted, todo_transform_old is obsolete, todo_transform_current is its existing replacement, and todo_final still checks the delivery. Inspect acceptance and Todos on the same registry/runtime route. Keep the original owner document and correction source with the operation receipt: public inspect deliberately omits executable argv, so it cannot reconstruct the complete configuration.

With all_advancement, superseding bound work can return goal_acceptance_validation_required. Removing only its binding still leaves it in scope and can return goal_acceptance_unbound. Neither means that an Agent may disable checks. The authorized local owner must review the whole replacement document, including every retained criterion, command/pin/oracle and binding. Explicitly narrow coverage to the current accepted work; future Todos will no longer be included automatically and need owner review if they belong in scope.

For this standalone contract, save the following as acceptance-current.json. Replace the illustrative IDs and bounded artifact checks with the real reviewed ones, including the available Python executable. Preserve any existing validator pins/oracles. The checks below assert actual output, not unconditional success. Do not add outcome_id to this expanded document: the compact outcome authoring form resolves its work links and supports only omitted scope or explicit goal scope; it cannot express this explicit work subset.

{
  "scope": {"kind": "selected_work", "todo_ids": ["todo_parse", "todo_transform_current", "todo_final"]},
  "objective": "Deliver validated records",
  "non_goals": ["Publish the records"],
  "criteria": [
    {
      "id": "parse",
      "description": "The accepted parsed records remain intact.",
      "validation_argv": ["python3", "-c", "from pathlib import Path; assert Path('parsed.txt').read_text() == 'alpha\\nbeta\\n'"],
      "validation_timeout_seconds": 5
    },
    {
      "id": "transform-current",
      "description": "The corrected transform preserves the requested order.",
      "validation_argv": ["python3", "-c", "from pathlib import Path; assert Path('transformed.txt').read_text() == 'ALPHA\\nBETA\\n'"],
      "validation_timeout_seconds": 5
    },
    {
      "id": "final",
      "description": "The final delivery contains the corrected records.",
      "validation_argv": ["python3", "-c", "from pathlib import Path; assert Path('delivery.txt').read_text() == 'ALPHA\\nBETA\\n'"],
      "validation_timeout_seconds": 5
    }
  ],
  "bindings": [
    {"todo_id": "todo_parse", "criterion_ids": ["parse"]},
    {"todo_id": "todo_transform_current", "criterion_ids": ["transform-current"]},
    {"todo_id": "todo_final", "criterion_ids": ["final"]}
  ]
}

Keep explicit --registry / --runtime-root arguments on every command when using a nondefault route. Configure without --agent-id only under existing local owner authorization; omission selects a trusted local role, not authentication. Use the exact current provider_revision from inspect, never the acceptance contract's numeric revision. Preview and apply the identical reviewed document with the same operation ID and provider revision:

loopx --format json goal-acceptance inspect --goal-id example-goal
loopx --format json goal-acceptance configure --goal-id example-goal \
  --document acceptance-current.json --expected-provider-revision '<provider_revision>' \
  --operation-id reconcile-transform-v2
loopx --format json goal-acceptance configure --goal-id example-goal \
  --document acceptance-current.json --expected-provider-revision '<provider_revision>' \
  --operation-id reconcile-transform-v2 --execute

Read the returned operation_id, provider_revision, scope, criteria and tasks associations (todo_id, criterion_ids, state); the accepted parser and final check must remain, and the obsolete Todo must be absent from both scope and bindings. Retain the reviewed document, correction source and receipt together. After a lost response retry that exact operation with its original revision. After a confirmed revision conflict, inspect and review current state before creating a new operation; do not silently rebase.

Only then supersede the obsolete Todo. For canonical hard_lease work already claimed by example-agent, acquire its ordinary lease (or inspect its existing lease) and use the exact returned lease.idempotency_key and lease.version:

loopx --format json task-lease acquire --goal-id example-goal \
  --todo-id todo_transform_old --owner example-agent --idempotency-key retire-transform-v1
loopx --format json todo supersede --goal-id example-goal \
  --todo-id todo_transform_old --agent-id example-agent \
  --reason 'message:owner-correction: use the corrected transform' \
  --successor-todo-id todo_transform_current \
  --task-lease-idempotency-key '<lease.idempotency_key>' \
  --task-lease-expected-version '<lease.version>'
loopx --format json todo list --goal-id example-goal
loopx --format json goal-acceptance inspect --goal-id example-goal

This uses the raw valid lease pair; it does not require managed supersede claims. Do not reuse a released/expired lease or substitute a provider revision for its version. Read back the original Todo's successor link and the retained work/checks. Supersession records obsolete history; it does not verify the successor, rerun the accepted parser, or complete the Goal. Current/final work still needs its normal fresh checks, claims, leases and continuation handling.

保守边界: 仅在已有明确授权且原目标与未受影响的验收仍有效时,由本地 owner 审阅 完整替换文档。仅删 binding 不能让旧任务退出 all_advancement;改为上述 selected_work 保留已验收 parser、当前替代任务和最终检查,同时明确以后新增任务 不再自动纳入。每条命令沿用同一 registry/runtime,配置用最新 provider_revision, 预览与执行复用同一 operation ID;丢响应原样重试,确认冲突后重新审阅并新建操作。 保留原配置、用户更正来源、拟用文档和回执,再用实际 lease key/version 替代旧任务。 配置与 supersede 都不证明新产物通过;后续仍须执行真实检查。

This changes executable check coverage only. It does not retire or replace persisted additive outcome_requirements, erase their sources/work history, or resolve a contradictory immutable requirement. Report that conflict as unresolved unless a supported owner amendment path actually reconciles it; do not claim this recipe aligns it. 中文:本流程只协调命令检查覆盖,不撤销、覆盖或伪装满足累计的不可变 成果要求;若已持久化要求互相冲突,在受支持的 owner 修订实际解决前,必须明确保留 未解决状态。

中文

打开本机 Goal,选择 概览 → 交付与依据 → 验收观察。 只读卡片展示已有验收要求、对应 Agent、观测时间、待处理门禁的目标 Agent 和决策范围, 以及 status 已给出的下一步。人类决策责任人未提供时显示未知,不把被阻塞的 Agent 当作审批人。loopx status --format json 中的 run_history.goals[].acceptance_observation 提供相同投影,Markdown 提供简要摘要。

原有观察卡片无需启用或增加权限。仅改变展示,不改变 Todo、gate、quota、settlement 或 Goal 完成权威。 验收要求复用执行前沿已有的 Agent vision 规则,并消费展示截断前已读取的历史,不额外读取文件。 不收集完整执行前沿,也不审计所有 Agent 通道。历史是有界输入,因此始终显示部分观测: 没有缺口不等于通过验收。 缺少来源及观测截断会明确提示;历史生命周期记录不能覆盖当前未关闭的门禁。

此有界切片使用 goal_acceptance_observation_projection_v0,不是 RFC 中的完整 goal_artifact_lifecycle_projection_v0;后者的阶段、声明式里程碑和合法迁移设计保持不变。 不保留把完整协议误认作该观察结构的别名。此切片不增加里程碑声明入口、统一阶段序列、完整证据审计、 新的合法迁移或完成判定。Goal direction baseline 提案中的材料声明和绑定版本的阅读回执 不在此次实现范围;历史进展不能证明已阅读当前方向材料。旧来源不提供投影时显示不可用。 status 同时在独立的 run_history.goals[].artifact_lifecycle 和 Markdown 摘要中展示 观测阶段、证据里程碑、门禁和下一步。它在展示截断前读取当前 Goal 的 session-runtime 工作观察:即使 Todo 全部完成且历史进展已达成,只要仍有必须执行的工作,阶段就保持 qualifying。缺少工作观察不会凭空产生执行要求。此 v0 读出始终不建议终态迁移: closing 保持为验收核验步骤,无论是否缺少来源,均通过 next_transitions[].reason_codes 中的 acceptance_unverified 表达本读出未验证验收。 机器消费者读取该 code,无需匹配英文 precondition。已记录为终态的 Goal 仍展示 lifecycle_phase: closed,下一步列表为空。未来若增加基于验收的终态建议,必须另行变更合同并验证产出侧。 此读出不授予执行或完成权威,Dashboard 卡片仍使用独立的验收观察合同。

工作观察覆盖取决于实际提供的投影,不按 adapter.kind 名称判断:

status 接收的来源 工作观察覆盖
session-runtime adapter,或提供相同 session-runtime 投影的其它 adapter schema 为 session_runtime_readonly_projection_v0、Goal id 匹配且包含工作事实时可用
不提供该投影的 adapter,或 schema/Goal id 不匹配的投影 不可用;此读出不会额外查询 quota 或其它工作通道权威

缺少该来源时,即使观察范围外仍有必须执行的工作,Todo/历史也可能让 Goal 显示 closing。 closing 或缺少 work_lane_selected 均不证明所有工作完成,工作通道与完成权威仍保留各自的判断。 上面的测试命令覆盖合成 Goal 的生产 refresh-state 写入、 真实 status 收集和浏览器入口;打包验证使用 LOOPX_GOAL_ACCEPTANCE_PACKAGED=1。

默认验收中的命令检查

旧任务被新任务替代时,使用上方检查范围协调示例: 完整保留仍有效的检查与工作绑定,由 owner 明确排除旧任务后,再按真实租约执行 supersede。

已注册且已提升到 canonical authority 的 Goal 可为已有成果要求配置命令检查。 命令不会自动提升 provider,canonical 读取失败也不回退到旧 Markdown。 优先引用 outcome_id 和要求 ID,由类型化 owner 解析目标、条件描述和关联任务; 所有者审阅实际命令及范围后采用。不设整体启用开关。 合同归既有 Goal authority 所有,Dashboard 展示其检查结果,并通过同一 owner 执行授权操作; 不新增独立配置 owner 或 provider。普通路径采用上方的 Agent 准备与原位检查,以下 CLI/JSON 步骤保留给高级配置及迁移。

在 Goal 的交付工作区先运行 loopx --format json goal-acceptance inspect --goal-id example-goal, 并用 loopx --format json todo list --goal-id example-goal 查看任务。 按上方 JSON 示例准备所有者审阅过的 acceptance.json,将文件检查与任务 ID 替换为实际产物 检查和已有推进任务。argv 检查不经过 shell,沿用既有交付工作区验证规则;命令声明保留在本地, 公开读回不含参数、输出或原始日志。每个条件允许 1–25 秒,默认 5 秒;所有条件的 超时总和不得超过 25 秒。较长评估在完成包装器之外运行,再配置有界的产物检查。

上方内联 Python 示例的代码文本绑定在版本化文档中。脚本型验证器可选地运行 sha256sum verify.py,并在该条件中加入 "validation_files": [{"path": "verify.py", "sha256": "<64-hex-digest>"}], 路径相对于交付工作区。host 在真实运行前后检查声明文件的字节以发现变更; 这项有界检查不证明全部传递导入或解释器/外部工具身份。

所有者使用 goal-acceptance configure --goal-id example-goal --document acceptance.json --expected-provider-revision '<provider_revision>' 预览,再加 --execute 保存配置; 这里填写最近 inspect 返回的 provider revision,不是合同版本。配置时不传 --agent-id: 已注册 Agent 角色调用可 inspect/verify,但不能配置或移除命令检查。 所有者角色依赖受信任的本地调用,不是身份认证边界。 CLI 沿用本地进程与私有 runtime 文件系统权限;省略 --agent-id 不构成身份认证,具有相同私有 runtime 权限的进程 不会与所有者操作隔离。发生版本冲突时重新 inspect, 审阅变化后再重试,配置后再次 inspect 确认。

配置命令检查后,现有任务 claim/complete 路径执行真实门禁:适用任务缺少关联或关联过期时受阻, 所有者通过重新配置确认当前关联;完成任务必须执行当前绑定的产物检查,并继续满足原有 claim、lease/fence、权限和后续工作要求。既有验证回执或已确认的关联不能代替本次任务完成验证。 任务参数沿用 loopx todo claim --help、loopx todo complete --help,没有绕过门禁的新参数。 本次完成验收失败时,todo complete 保持 Todo 未完成,返回 goal_acceptance_validation_failure_v0:验收项 ID、脱敏的验证状态、可得的退出码和有界 下一步动作。工作区不干净或不匹配会明确归类为工作区失败,而非所有者关联过期;命令、输出、 本地路径和执行器任意摘要不会投影。修复执行环境后沿原 Turn 和当前 lease 重试。

loopx delegation read 和 wait 重新校验已验收的委派成果时,校验失败会返回同一结构。 根据报告的验收项与验证状态,检查原委派的成果。

终态观察不会让刚完成的任务关联过期。对既有 v0 绑定,若差异仅来自可校验的完成验证命令 修订历史追加、后继任务链接追加,或此前不存在的 resume_when 调度条件新增,读出会比对 可重建的旧状态并自动保留 ready,无需所有者 重复确认,也不改写已保存的绑定摘要。修订后的命令仍须在完成时重新验证,Goal 验收条件 也仍独立执行。任务文本、是否要求完成验证、仓库与写入范围等实质工作声明变化仍使关联 过期;未知的新工作字段默认按实质变化处理。已有 resume_when 被替换时,当前 Todo 无法证明旧值,仍保持 stale。无可选推进任务时,缺失关联(unbound)与过期关联 (stale)统一进入现有 Agent 范围的恢复路径。缺失关联需要准备关联方案供所有者确认; 过期关联需要核查工作变化、恢复误改或提交变更后的关联。恢复保留原 Turn/Todo 身份, 不授权执行或完成受阻任务,也不自动重绑。不要再新建一个同样 unbound 的修复 Todo, 然后将其当作可运行后继。

有界触发项优先保留验收阻塞及其精确检查点,再展示通用 vision 缺口。只有覆盖该阻塞 代次、被接纳的有据可运行后继或具体阻塞回执,才会消解重复唤醒。无关进展、改写 vision、 其他关联的确认均不能代替;重新确认合同或改变工作会重新触发恢复。未配置命令检查时,默认要求核对和 replan 仍然可用。 配额选择重规划时,候选观察任务仍可见于清单,但不再同时成为 selected_todo 或 agent_lane_next_action;原回执身份仍由结算合同保留。真正绑定 Todo 的重规划仍展示原 Todo, 本次仅移除从无关观察清单补出的选择。

loopx goal-acceptance verify --goal-id example-goal 仅预览;加 --execute 执行全部配置条件, 再运行 inspect 读回。进入 概览 → 交付与依据,刷新并展开交付链下方的 Goal 验收合同。 命令检查区块按实际 criteria 配置展示;无命令时仍展示成果要求与 Agent 自查。整体没有启用开关。 区块及导出展示 Goal ID、合同版本/摘要、条件、任务关联,以及带独立版本/摘要的历史验证结果。

任务 ready 只表示所有者确认关联;unbound / stale 表示缺失 / 过期; applicable=false 表示不属于当前任务门禁范围。合同 unverified 表示未验证, failed / stale 表示检查失败 / 检查基线过期,partial 表示任务检查通过但 Goal 整体验证未知, held 表示适用任务关联需要确认。accepted 仅表示当前基线上的全部配置产物检查通过, 不代表自动批准或完成 Goal。

移除检查配置前重新 inspect,随后执行 loopx goal-acceptance clear-checks --goal-id example-goal --expected-provider-revision '<current_provider_revision>' --execute, 并再次 inspect。该操作移除命令检查约束,保留版本栅栏和历史记录;默认目标核对与 replan 继续生效。 检查配置不会授予发布、外部副作用、provider 提升或 Goal 完成权威;目标、条件描述与原因必须适合其 status 受众。 Lark 呈现、远端合同编辑、语义意图保持证明与通用共享 amendment 留给 #3836 / #2831 后续切片, 不宣称任一 RFC 已完成。合同浏览器检查用 npm run smoke:goal-acceptance-contract-browser; 前端集成打包后,npm run smoke:goal-acceptance-contract-packaged 对已发布资源跑同一项检查。 Python renderer 测试和 API/export smoke 覆盖缺失、停用、过期、失败及通过的区别。

Restore an unintended text/wait edit after lease release

A hard-lease Todo may become stale after its claimed Agent accidentally changes its text or clears an existing resume_when, then releases the execution lease. The same claimed Agent can use a reviewed update to restore the exact original work declaration, without first acquiring a lease over stale work:

loopx goal-acceptance inspect --goal-id example
loopx todo update --goal-id example --todo-id todo_artifact --agent-id agent-a \
  --resume-when 'resume_at:2026-01-01T00:00:00Z' \
  --update-operation-id restore-original-wait \
  --update-expected-provider-revision '<revision from inspect>'

Supply the actual original wait/text, not the example value. TS compares the entire candidate work digest with the existing owner-confirmed binding. It rejects a different scope, wrong revision, foreign/excluded actor, active lease, stale execution proof, or a bundled lifecycle/validator/ownership edit. The restoration writes neither an owner rebind nor an execution grant. Acquire a fresh lease through the usual command before executing work; an exact update retry reads the old operation receipt and cannot alter the new lease generation. It does not complete a Todo or settle/spend a Turn.

This is not a general history rollback. If the previous declaration is unknown, other work fields changed, or compatible subsequent revisions prevent an exact match, prepare the current intent for owner review and explicit rebind. The CLI and managed replan guidance name that route instead of prescribing a lease / restore loop. Existing ready, unbound and work without configured checks keeps its ordinary admission rules. Frontend and Lark consume the resulting canonical state; this introduces no separate editor or authority owner.

硬租约 Todo 因误改文本或原有等待条件而 stale、且租约已释放时,同一 claimed Agent 可带当前 provider revision 和稳定 operation id,通过原来的 todo update 精确还原。 TS 校验整个候选工作声明的摘要必须等于 owner 当初确认的摘要;不会把任意修改当成 无害变化,也不修改验收标准、owner 绑定或租约。恢复后仍须正常获取新租约才能执行。 重复请求仅恢复旧回执,不会重复结算 Turn 或改变新一代租约。

必须提供真实的原文本/等待条件。若不知道原声明、改动涉及其他字段,或后续兼容修订 使完整摘要无法精确匹配,应请 owner 审核并显式重新绑定。不能猜测旧值、伪造完成, 也不能先取得 stale 工作的租约来绕过这条边界。

Owner-pinned oracle and exact versions

In Goal settings → Task ownership → Goal acceptance contract, the local owner can import a complete approved JSON document, review its scope and command, save it, run configured checks, read back the result, or remove check configuration. Existing configured contracts offer the same operations in Delivery & evidence. Saving does not run a command. Reading does not run checks. Failed or uncertain operations retain a readback/retry path; an uncertain check is never replayed automatically. These actions use the existing acceptance owner and provider CAS. Agent callers still cannot configure the owner's contract or submit a verdict.

An optional criterion oracle declares an owner-pinned checker, rather than inferring independent acceptance from a worker's name, report or artifact hash:

{
  "kind": "owner_pinned_oracle",
  "source_id": "export-checker",
  "input_refs": ["expected.txt"],
  "output_refs": ["result.txt"]
}

Add this object to a criterion in the existing document format. That criterion must explicitly pin the invoked checker in validation_files, with its actual SHA-256, and invoke that file directly or as Python's immediate script argument. The supported interpreter names are python, python3, and versioned python3.<digits>, optionally ending in .exe; absolute host paths to those interpreters are allowed. Relative interpreter wrappers must themselves be pinned and directly invoked; they cannot borrow Python's script-argument rule. For example, use validation_argv: ["python3", "checks/export.py"] with a pin for checks/export.py. Interpreter options before the script (including -c, -m and --) are unsupported. Arbitrary commands such as true checks/export.py or cat checks/export.py cannot attest execution of that pinned source and are rejected before configuration is written. Script arguments after the file are allowed. Other runtimes can use a directly executed pinned entry point with a relative path containing / (for example checks/export), not a bare name resolved through PATH. This grammar does not authenticate the local interpreter binary, which remains part of the trusted host environment. Declare every input/output file whose version the receipt is meant to cover; there must be at least one output. Source, input and output roles are distinct. All refs are bounded repository-relative files; symlinks and unavailable files fail closed. Ordinary criteria without oracle retain their previous execution, canonical document bytes and result shape.

The host copies the pinned source and declared inputs/outputs into a temporary workspace, verifies their bytes, executes the approved command there, and checks those copies and the original workspace again before returning evidence. The successful criterion result contains oracle_evidence: source identity and digest, UTC check time, and exact input/output SHA-256 versions. A changed or missing source/output, failed check or timeout does not produce a success receipt. Completion still has its existing fresh checks and transaction; an ordinary completion receipt is not substituted for this explicit oracle record.

This is file-snapshot isolation, not an OS sandbox. The local interpreter, environment, external services and unpinned imports remain trusted host inputs. The owner must approve the checker's meaning, provenance and any effects before running it. The source label is not an authenticated remote reviewer's identity; file hashes do not prove independent authorship. The checker record does not resolve an objection, establish requester adoption, or complete a Goal.

goal-acceptance inspect observes current files without executing checks. It shows current only when the current contract/work, pinned source and declared versions match the stored receipt. Changed bytes show stale; unavailable files or missing receipts cannot become current success. Raw canonical/status snapshots without host file observations show recorded, which does not certify current bytes. Delegation evidence includes the checker only when the acceptance owner observed it current and its tested outputs cover that execution's exact outputs. Requester adoption remains a separate record.

Export the evidence. The existing Delivery & evidence → Export delivery snapshot action includes each oracle criterion's observed state and the saved checker's source identity, digest, UTC check time and exact input/output versions. The witness remains under the historical check record when files change or current observations are unavailable. It cannot turn a recorded or stale check into current acceptance. Downloading reads the snapshot; it does not execute a checker. Missing witness fields stay missing. Ordinary criteria retain their export format; absent checks add no command verification section. Supporting outcomes remain visible independently.

导出依据。 现有「交付与依据 → 导出交付快照」保留检查器来源、摘要、实际检查时间 及输入/输出版本,并分别显示条件的观测状态与历史检查记录。文件变化或当前观测缺失时, 旧依据仍可回看,但不表示当前通过;下载不会重跑检查,也不会补造缺失的回执。 普通条件保留原有导出格式;未配置检查时不增加命令验证段,子成果仍独立可见。

The same local-owner journey is available through the existing CLI:

loopx --format json goal-acceptance inspect --goal-id GOAL
loopx --format json goal-acceptance configure --goal-id GOAL --document owner-contract.json --expected-provider-revision REVISION --execute
loopx --format json goal-acceptance verify --goal-id GOAL --execute
loopx --format json goal-acceptance inspect --goal-id GOAL
loopx --format json goal-acceptance clear-checks --goal-id GOAL --expected-provider-revision CURRENT_REVISION --execute

Use revision tokens from fresh inspect results. clear-checks removes the current command document and oracle projection while retaining the revision fence and historical evidence; removing every oracle through an explicit owner reconfiguration restores ordinary criterion behavior and withdraws the current oracle receipt. The immutable operation journal retains its historical evidence; ordinary checks must run again. Current storage is loopx_goal_acceptance_v2, without enabled. Upgrade readers normalize v0/v1 state into the same runtime model; older binary writers do not understand v2. Clearing checks is not a storage downgrade. No worker, model, transport, budget or permission is enabled by this change. Local HTTP operations share the same owner through /api/chat/goal-acceptance; remote/missing authority and stale revisions remain explicit failures.

The packaged regression runs Agent preparation and the in-place owner decision against a disposable real SQLite/HTTP/CLI source, including changed output, failure/recovery, optional configuration, removal of checks, 390px and keyboard/reduced-motion:

uv run --extra test python scripts/chat_bundle.py build --install
LOOPX_PERSONAL_WORKSPACE_PACKAGED=1 LOOPX_PLAYWRIGHT_PACKAGE="$PWD/apps/presentation/dashboard/node_modules/playwright" uv run --extra test node examples/personal-workspace-browser/goal-acceptance-oracle.mjs

Workspace discovery in this regression is synthetic; it does not establish installed-App adoption or the live L1 correction episode.

Packaged composition comparison on the canonical synthetic showcase workspace. The images illustrate placement and disclosure; the disposable SQLite regression above separately qualifies the operation. Neither proves installed-App adoption, model preparation or a complete one-round request.

View Before Contextual check
Desktop Earlier desktop Check in the Goal brief
390px Earlier phone Phone check and folded details

Long-horizon record storage

An authorized correction can now outlive the legacy declaration's 128 KiB, 32-requirement, 24-outcome and 64-origin collection limits. Keep the original Goal and outcome. In goal-acceptance refine, add "storage_format":"records" to the usual refinement document, preview it without --execute, then execute with the same inspected provider revision and operation id. The first committed refinement losslessly selects loopx_goal_outcome_records_v1 in the existing atomic authority transaction. Reads, previews and installation do not migrate. App Supporting outcomes → Add a requirement selects that format with the requested addition. Native refine_outcome accepts the same field; Lark's native conversation uses that tool owner, with no separate acceptance configuration.

{
  "outcome_id": "release-readiness",
  "storage_format": "records",
  "requirements": [{"id": "restart", "description": "Recovery preserves the original work identity."}],
  "source": {"ref": "owner:recovery", "summary": "Authorized recovery requirement"}
}

For native conversations, use source_summary instead of source; the host retains its source/actor identity. Prepare a new operation id when changing intent after a confirmed rejection. Recover an ambiguous operation unchanged before preparing a different request. Restart and exact retries preserve the original outcome, requirements, sources, work links and exactly-once operation. Unsupported old readers must be upgraded; after a record-format commit, use a compatible runtime for rollback, never restore an old backup over new requirements.

The format separates retained records from the mutation budget: each operation and collection page remains at most 128 KiB UTF-8; a page has at most 32 records. Individual text/evidence bounds remain unchanged. Additions still contain at most 32 requirements at a time. Each outcome's ordered collection digest detects missing or altered pages. These pages remain inside the existing authority snapshot: this release does not provide an indexed store, constant-cost reads, record-level concurrency, unlimited transport or less model context. Existing capture/field selectors provide bounded detail from one complete capture; do not silently truncate a full acceptance read. Full snapshot and transport costs still grow and retain their existing limits.

For large outcomes, review_patch contains up to 32 named requirement reviews with the existing {id, conclusion, evidence_refs, note} shape. It changes only those reviews. Each item retains its own reviewed basis; reviewing one item cannot refresh older evidence for another. review retains its complete-review meaning. Independent configured checks remain authoritative, and an Agent's self-assessment never becomes an independent acceptance result.

A correction to success conditions uses this refinement path; a change of the shared purpose still uses the existing objective proposal/apply/adopt path. Replacement/withdrawal and atomic objective-plus-condition amendments are not introduced by a storage migration. Other Agents retain their work ownership, leases, permissions and their own objective adoption obligations. Subsequent context and replan read the same preserved requirements; Vision remains the execution response, not an alternative acceptance ledger.

中文:已有 Goal 满额后,沿用原成果,在 refinement 文档中加入 storage_format: "records",以同一 revision/operation 预演、提交。App 的 “补充要求”随这次明确的写入选择新格式;读取、安装和预演不迁移。 新格式把长期记录与单次写入/分页预算分开,保留每条原始要求、来源、身份和 顺序。分页仍存在原 authority 快照中,并非独立索引存储;整份快照的读写和 传输成本仍随内容增长。大成果可用 review_patch 分批自查,每条证据保留自己的 依据,不能借复审另一条刷新旧证据。修改整体目标继续走已有 proposal/apply/adopt, 本次不授予替换、撤销、跨 Agent 采用或完成验收的权限。已确认拒绝后改变意图需新 operation;结果不明时先恢复原操作。旧运行时不能读写新格式,回滚须使用兼容版本, 不能用旧备份覆盖新要求。

Transfer selected outcomes after an Agent retires

In the local Goal's supporting outcomes, expand Transfer retired Agent outcomes, select the retired identity, its successor and the individual outcomes, then preview and apply. Refresh ownership to see the receiver and original declaration. Each Agent continues to refine only the outcomes it owns.

The equivalent local owner command is loopx goal-acceptance handoff --goal-id GOAL --document selection.json --expected-provider-revision REV --operation-id ID. Take the provider revision and each outcome revision from the same fresh goal-acceptance inspect. The selection document is:

{"from_agent_id":"retired","to_agent_id":"receiver","outcomes":[{"id":"export","revision":2}]}

The default previews the complete selection. Add --execute to commit it atomically. After an uncertain response, retry with the same document, revision and operation ID to recover its receipt. For a rejected or changed selection, inspect again and prepare a new operation. A current source Agent, an unregistered receiver or a stale outcome prevents the whole handoff. Historical reviews retain their original lane. Checks, Todos, leases and quota history remain under their existing owners. The first handoff introduces attribution metadata in the outcome state; older runtimes that cannot read it need a compatible upgrade.