From 736e1ac64e64a789edb6acc630bca5538b392740 Mon Sep 17 00:00:00 2001 From: song Date: Mon, 12 Oct 2026 04:31:57 +0800 Subject: [PATCH 1/4] test(semantics): qualify missing settlement and scope input witnesses Signed-off-by: song --- scripts/settlement_receipt_source_witness.mts | 4 + ...st_settlement_receipt_source_boundaries.py | 88 +++++++++++++++---- .../decision_metadata.test.ts | 19 ++++ 3 files changed, 95 insertions(+), 16 deletions(-) diff --git a/scripts/settlement_receipt_source_witness.mts b/scripts/settlement_receipt_source_witness.mts index de620023c4..628fd664f8 100644 --- a/scripts/settlement_receipt_source_witness.mts +++ b/scripts/settlement_receipt_source_witness.mts @@ -3,6 +3,7 @@ import { readFileSync } from "node:fs"; import { reduceTurnSettlementTransaction } from "../loopx/control_plane/turn_driver/settlement.ts"; import { readQuotaSettlement } from "../loopx/control_plane/quota/settlement_readback.ts"; +import { executeTaskLeaseAcquire } from "../loopx/control_plane/work_items/task_lease_acquire.ts"; const request = JSON.parse(readFileSync(0, "utf8")); let result: unknown; @@ -13,6 +14,9 @@ switch (request.operation) { case "readback": result = await readQuotaSettlement(request.input); break; + case "lease_acquire": + result = await executeTaskLeaseAcquire(request.input); + break; default: throw new Error("unsupported settlement source witness operation"); } diff --git a/tests/architecture/test_settlement_receipt_source_boundaries.py b/tests/architecture/test_settlement_receipt_source_boundaries.py index 9b48ac3b76..a4b104ce6b 100644 --- a/tests/architecture/test_settlement_receipt_source_boundaries.py +++ b/tests/architecture/test_settlement_receipt_source_boundaries.py @@ -8,6 +8,7 @@ from __future__ import annotations +import hashlib import json import subprocess from itertools import product @@ -232,22 +233,30 @@ def forbidden(*args): # Explicit injected envelopes prove decoder admission only, never production. -@pytest.mark.parametrize( - "kind", - [ - "invalid_identity", - "receipt_missing", - "identity_mismatch", - "writeback_missing", - "writeback_rejected", - "quota_spend_rejected", - "terminal_closeout_rejected", - "cancelled", - "permission_denied", - "budget_rejected", - "effect_outcome_unknown", - ], -) +EXTERNAL_FAILURE_KINDS = [ + "invalid_identity", + "receipt_missing", + "receipt_unbound", + "identity_mismatch", + "writeback_missing", + "writeback_rejected", + "quota_spend_rejected", + "terminal_closeout_rejected", + "cancelled", + "permission_denied", + "budget_rejected", + "effect_outcome_unknown", +] + + +def test_failure_input_witnesses_cover_the_registered_wire_domain(): + registry = json.loads((ROOT / "loopx/semantics/vocabulary_v0.json").read_text()) + assert set(EXTERNAL_FAILURE_KINDS) == set( + registry["vocabularies"]["settlement_failure_kind"]["values"] + ) + + +@pytest.mark.parametrize("kind", EXTERNAL_FAILURE_KINDS) def test_external_failure_envelope_survives_ts_and_python_decoders(kind): envelope = { "value": None, @@ -264,6 +273,38 @@ def test_external_failure_envelope_survives_ts_and_python_decoders(kind): assert failure.kind.value == kind +def test_native_lease_permission_denial_is_a_real_source_without_a_write(tmp_path): + source = tmp_path / "authority.json" + source.write_text("isolated-authority-v1") + runtime = tmp_path / "runtime" + request = { + "schema_version": "loopx_task_lease_acquire_native_v0", + "runtime_root": str(runtime), "goal_id": "witness-goal", + "todo_id": "todo_witness", "owner": "witness-agent", + "idempotency_key": "witness-turn", "ttl_seconds": 120, + "write_scopes": [], "expected_version": None, + "authority": { + "handoff_mode": "legacy", + "registered_agent_candidates": [["witness-agent"]], + "todos": [{"todo_id": "todo_witness", "status": "open", + "claimed_by": None, "excluded_agents": ["witness-agent"]}], + "todo_projection_error": None, + "source_receipts": [{"source_id": "authority", "path": str(source), + "state": "file", "sha256": hashlib.sha256(source.read_bytes()).hexdigest()}], + }, + } + direct = _direct("lease_acquire", request) + bridged = effect_runtime_result("task_lease.acquire.native", request) + assert bridged == direct + assert direct["ok"] is False + # Lease settlement summaries have their own wire shape (step, not step_kind). + assert direct["settlement"]["receipts"] == [] + assert direct["settlement"]["failure"] == { + "step": "validation", "kind": "permission_denied", "code": "owner_excluded_from_todo", + } + assert not list(runtime.rglob("task-leases/*.json")) + + @pytest.mark.parametrize( "step", ["validation", "durable_writeback", "quota_spend", "terminal_closeout"] ) @@ -379,6 +420,21 @@ def event(kind, **details): } +def test_unbound_guard_readback_produces_the_distinct_failure(tmp_path, identity): + request = _readback_fixture(tmp_path, identity) + events = tmp_path / "goals" / identity["goal_id"] / "rollout-event-log.jsonl" + guard = json.loads(events.read_text().splitlines()[0]) + guard["details"] = {} + events.write_text(json.dumps(guard) + "\n") + direct = _direct("readback", request) + bridged = effect_runtime_result("quota.settlement.read", request) + assert bridged == direct + _, receipts, failure = decode_settlement_result_payload(direct["settlement"]["result"]) + assert failure.kind.value == "receipt_unbound" + assert receipts == () + assert failure.details["binding_kind"] == "unbound" + + @pytest.mark.parametrize( "completion,writeback,spend,expected", [ diff --git a/tests/control_plane_ts/decision_metadata.test.ts b/tests/control_plane_ts/decision_metadata.test.ts index 928e6e1cd7..11a3d6f9c3 100644 --- a/tests/control_plane_ts/decision_metadata.test.ts +++ b/tests/control_plane_ts/decision_metadata.test.ts @@ -42,6 +42,25 @@ test("decision metadata normalizes compact and object forms without duplicate sc ]); }); +test("declared scope inputs retain every kind and granularity without becoming authority", () => { + // These are author-input witnesses, not inferred decisions or a definition + // of when an author should choose the still-unresolved `other` kind. + for (const kind of ["private_read", "write_scope", "resource", "production", "public_claim", "direction", "other"]) { + assert.deepEqual(normalizeTodoDecisionScope(`${kind}:action:example`), { + schema_version: "decision_scope_v0", kind, granularity: "action", scope_key: "example", + }); + } + for (const granularity of ["action", "lane", "goal", "project", "global"]) { + assert.deepEqual(normalizeTodoDecisionScope(`direction:${granularity}:example`), { + schema_version: "decision_scope_v0", kind: "direction", granularity, scope_key: "example", + }); + } + for (const granularity of ["team", 42, null]) { + assert.throws(() => normalizeTodoDecisionScope({kind: "direction", granularity, scope_key: "example"}), + /unsupported|not a supported/); + } +}); + for (const [label, value] of [ ["unknown kind", {kind: "secret", granularity: "goal", scope_key: "release"}], ["invalid key", {kind: "direction", granularity: "goal", scope_key: "../release"}], From 0b0c0fd6c2cd1988c0bf43eed222f3b7e9d77e26 Mon Sep 17 00:00:00 2001 From: song Date: Mon, 12 Oct 2026 04:31:57 +0800 Subject: [PATCH 2/4] docs(semantics): reconcile registered source evidence and open decisions Signed-off-by: song --- docs/architecture/rfcs/STATUS.md | 2 +- docs/architecture/rfcs/STATUS.zh-CN.md | 2 +- ...20-settlement-receipt-source-boundaries.md | 3 + ...tlement-receipt-source-boundaries.zh-CN.md | 3 + .../2026-09-20-staged-tracker-acceptance.md | 3 + ...6-09-20-staged-tracker-acceptance.zh-CN.md | 3 + .../2026-10-12-registered-source-treatment.md | 158 ++++++++++++++++++ ...10-12-registered-source-treatment.zh-CN.md | 109 ++++++++++++ .../semantic-vocabulary-convergence-v0.md | 40 +++-- ...emantic-vocabulary-convergence-v0.zh-CN.md | 29 ++-- 10 files changed, 315 insertions(+), 37 deletions(-) create mode 100644 docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md create mode 100644 docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md diff --git a/docs/architecture/rfcs/STATUS.md b/docs/architecture/rfcs/STATUS.md index 3b29da3930..e59f7ace37 100644 --- a/docs/architecture/rfcs/STATUS.md +++ b/docs/architecture/rfcs/STATUS.md @@ -61,7 +61,7 @@ appendix may keep dated history, but no dated log heading may precede it. | [RFC: Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.md) | Accepted | none | — | | [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | Accepted | none | — | | [RFC: Research Exploration Control Plane v0](research-exploration-control-plane-v0.md) | Accepted | none | — | -| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [5 entries](ledger/semantic-vocabulary-convergence-v0/) | +| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [6 entries](ledger/semantic-vocabulary-convergence-v0/) | | [RFC: Shared Goal Alignment and Governed Amendment Protocol (v0)](shared-goal-alignment-and-governed-amendment-v0.md) | Accepted | none | [2 entries](ledger/shared-goal-alignment-and-governed-amendment-v0/) | | [RFC: LoopX Shared Control-Plane Authority and Pluggable State Providers (v0)](shared-goal-authority-state-provider-v0.md) | Accepted | none | [24 entries](ledger/shared-goal-authority-state-provider-v0/) | | [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | Accepted | none | — | diff --git a/docs/architecture/rfcs/STATUS.zh-CN.md b/docs/architecture/rfcs/STATUS.zh-CN.md index 63aadb4925..2a887bc2dc 100644 --- a/docs/architecture/rfcs/STATUS.zh-CN.md +++ b/docs/architecture/rfcs/STATUS.zh-CN.md @@ -58,7 +58,7 @@ | [RFC:Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.zh-CN.md) | 已接受 | 无 | — | | [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | 已接受 | none | — | | [RFC:研究型探索控制面 v0](research-exploration-control-plane-v0.zh-CN.md) | 已接受 | 无 | — | -| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [5 条](ledger/semantic-vocabulary-convergence-v0/) | +| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [6 条](ledger/semantic-vocabulary-convergence-v0/) | | [RFC:共享 Goal 对齐与受治理 Amendment 协议(v0)](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md) | 已接受 | 无 | [2 条](ledger/shared-goal-alignment-and-governed-amendment-v0/) | | [RFC:LoopX 共享控制面权威与可插拔状态 Provider(v0)](shared-goal-authority-state-provider-v0.zh-CN.md) | 已接受 | 无 | [24 条](ledger/shared-goal-authority-state-provider-v0/) | | [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | 已接受 | none | — | diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.md index aaacae22e2..0d3dd28037 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.md @@ -1,5 +1,8 @@ # Executed settlement and receipt source boundaries +Current readback: [registered source treatment](2026-10-12-registered-source-treatment.md). The observations below retain their original baseline; they are not current PR status. + + Measured from `36134771355f05c9bcc5657ce739bb86426383dc`, for #4447 Stage 2a. The scope revision in #4789 remains a proposal. This entry changes neither RFC acceptance nor the F1/F2 production domain: **7/26**, with these four entries diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.zh-CN.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.zh-CN.md index ac8725d381..fdb1914645 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.zh-CN.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-settlement-receipt-source-boundaries.zh-CN.md @@ -1,5 +1,8 @@ # Settlement 与 receipt 的可执行来源边界 +当前读回见[登记来源处理](2026-10-12-registered-source-treatment.zh-CN.md)。下文保留原基线观测,不代表当前 PR 状态。 + + 基线 `36134771355f05c9bcc5657ce739bb86426383dc`,对应 #4447 Stage 2a。 #4789 的范围修订仍是提案。本条不改变 RFC 验收或 F1/F2 生产域:仍为 **7/26**,本组四项仍在域外。来源处理与生产扫描纳入是不同结论。 diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.md index fe6e9f4db2..964acf5591 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.md @@ -1,5 +1,8 @@ # Staged tracker acceptance and conditional field retirement +Current readback: [registered source treatment](2026-10-12-registered-source-treatment.md). The observations below retain their original baseline; they are not current PR status. + + Status: **proposal**, not a completed migration or approval record. Baseline: `36134771355f05c9bcc5657ce739bb86426383dc`. Delivery status and the ordered work plan belong to [#4447](https://github.com/loopx-project/loopx/issues/4447); diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.zh-CN.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.zh-CN.md index b267b6815e..a356b0ffa3 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.zh-CN.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-09-20-staged-tracker-acceptance.zh-CN.md @@ -1,5 +1,8 @@ # Tracker 阶段验收与有条件字段退役 +当前读回见[登记来源处理](2026-10-12-registered-source-treatment.zh-CN.md)。下文保留原基线观测,不代表当前 PR 状态。 + + 状态:**提案**,不是迁移完成或批准记录。基线: `36134771355f05c9bcc5657ce739bb86426383dc`。 交付状态与有序工作计划归 [#4447](https://github.com/loopx-project/loopx/issues/4447) diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md new file mode 100644 index 0000000000..029ccffa3e --- /dev/null +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md @@ -0,0 +1,158 @@ +# Registered source treatment at the integrated main baseline + +Review baseline: `43173c0b8c8761abee4cdddc665f0f0f20f194f7` (2026-10-12). +This refreshes #4447 Stage 2a/2b/2c without changing its scope, scanner enrollment, +budgets or runtime behavior. The [staged scope revision](https://github.com/loopx-project/loopx/pull/4789) +is merged; delivery acceptance and the two named unresolved meanings below are +still open. **26 rows inventoried is not 26 producer proofs or tracker closure.** + +The registry still contains 26 entries, including `task_lease_lifecycle_operation` +in place of retired `lease_action`. F1/F2 remain **6/26**: five kernel entries +and the settlement-binding witness. The other twenty cross-runtime entries do +not gain F1/F2 credit from this document or from decoder tests. All owner symbols +and exact admitted values remain in `loopx/semantics/vocabulary_v0.json`; paths +in the second column below are relative to `loopx/control_plane/`. + +A runtime witness executes the shipped decision from causal facts. An injected +value witnesses a caller-input/decoder boundary only. Mixed rows retain both +obligations. Legacy acceptance needs a retained reader and an exit condition; +no row is relabeled local-only to avoid a crossing it actually has. These are +bounded source treatments, not whole-program reachability, data-flow or F6 proof. + +## Source and compatibility inventory + +| Registered entry | Owner / slot | Executed source treatment | Compatibility and remaining boundary | +| --- | --- | --- | --- | +| turn_result_kind | `turn_driver/executor.py`, `transaction.py::_result_kind` → generated result kind | Internal result selection plus caller/Host result input. Driver/executor/transaction tests exercise results and malformed input; the registered fixed decoder witnesses every admitted value. | Host input acceptance is not proof a live Host emitted it; journal/replay readers remain. | +| turn_route | `turn_driver/driver.py`, `loop_controller.py` → plan/envelope route | Internal route selection. Driver and loop-controller tests exercise host-ready, gated, repair, wait and invalid routes; generated route projection is checked. | Keep the three Turn vocabularies and explicit projection; a route is not a stored receipt. | +| loop_disposition | `turn_driver/loop_controller.py::decide_loop_disposition` → disposition | Internal decision from current route/result/iteration facts; loop-controller table and negative/retry tests execute the owner. | Generated controller rules remain distinct from route and result; no spelling-only merge. | +| agent_scope_frontier_action | `agents/agent_scope.py` → frontier action | Internal classification of candidates, dependencies and handoff; agent-scope frontier tests execute exhausted/wait/reassignment/successor branches. | Generated TS binding is a consumer, not another producer; no claim of whole-goal completion from an exhausted lane. | +| effective_action | `quota/decision_summary.py` and registered overlays → final action | Internal decision/overlay output. Quota decision tests execute current paths; the fixed producer scan still has explicit unresolved sites. | The root decision/frontier union and nested replay slots stay distinct. Source treatment does not eliminate scanner unknowns or prove every branch reachable. | +| settlement_binding_kind | `effect_program.ts::settlementIdentity` → binding_kind | Internal normalization of supplied identity. Existing settlement-binding witness executes Todo, autonomous-replan and unbound cases plus contradictions. | Unbound is not a permit to spend; exact identity remains the existing receipt owner’s responsibility. | +| task_lease_lifecycle_operation | `work_items/task_lease_lifecycle_request.ts` → operation | Caller-selected native input; lifecycle tests execute renew/transfer/release, terminal_verify/holder_verify/fence_close, bad input, CAS and retry. | Replaces retired private Python lease_action, not lease behavior. Native persisted fence receipts and omitted legacy optional fields remain readable; no F1/F2 enrollment. | +| settlement_step_kind | `effect_program.ts`, `turn_driver/settlement.ts` → receipts[].step_kind | Mixed internal receipt construction and external envelope input. Stage 2a executes all four steps on committed replay without callbacks, and rejects malformed step input. | Ordered prefixes, effect identity and historical receipts remain; injected steps prove decoding only. | +| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | Mixed internal failures and accepted envelope input. Stage 2a now includes all 12 wire values, real unbound-guard readback and native permission denial. | `cancelled` remains the named unresolved source-purpose item below. Lease summaries use failure.step, while Effect envelopes use failure.step_kind; no fabricated wire conversion. | +| receipt_bound_monitor_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → monitor_phase | Internal derivation from exact monitor commit; Stage 2a executes poll_due/settled, wrong identity and legacy monitor effect id. | settlement_pending is retained consumer compatibility only; real monitor builder does not emit it. Remove only after historical work-lane consumers migrate. | +| receipt_bound_replay_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → replay_phase | Internal open/pending/settled from isolated receipt files and completion/writeback/spend prefixes; repeated reads and identity negatives execute the bridge. | Terminal-to-replay adapter and original binding stay. Phase projection is not proof all durable writers committed correctly. | +| delivery_workspace_kind | `agents/workspace_guard.py::capture_delivery_workspace` → TS snapshot | Mixed filesystem/Git observation and snapshot input. Real primary/linked/local workspace tests plus TS normalization cover three kinds, contradictions and invalid origins. | Keep v0 Git snapshot normalization; do not turn missing/failed Git evidence into a local-goal grant. | +| delivery_workspace_identity_kind | `agents/workspace_guard.py` → `agents/delivery_workspace.ts` → identity_kind | Mixed observed git_repository/local_goal and validated snapshot input. The same real Git/local tests verify identity, ownership and peer isolation. | Local Goal identity cannot satisfy a peer-independent Git requirement; v0 Git snapshots retain their own migration path. | +| delivery_workspace_requirement | `quota/settlement_workspace_causality.ts` → requirement | Internal required/not_required/unknown from explicit work contract. Causality tests execute repository writes, non-delivery, missing metadata and event readback. | Unknown requires repair. Legacy no-workspace settlement exception needs both exact committed validation/writeback receipts; partial or wrong-Todo evidence fails. | +| todo_completion_continuation | `todos/completion_state.ts::selectTodoCompletionState` → continuation | Internal active_goal/successor/no_followup selected from intent and Todo facts, plus persisted metadata input; whole-owner and malformed-authority tests execute it. | Contradictory successor/no-followup intent rejects; retained metadata normalization remains while retired scalar RPC rejects. | +| todo_completion_recovery | `todos/completion_state.ts` → recovery | Internal same_turn_terminal_closeout/lifecycle_reentry_terminal_closeout from completed Todo, closure intent and identity source; pinned and explicit lifecycle cases execute both. | Recovery does not rewrite the original completion identity or create a successor; nullable non-recovery is distinct. | +| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | Author-declared input, not inferred by a producer. Explicit seven-kind input witnesses, malformed membership, CLI mutation and exact-kind dominance tests execute readers. | `other` authoring purpose remains unresolved below. Input acceptance does not grant authority; legacy standing-scope codec remains. | +| todo_decision_scope_granularity | `todos/decision_metadata.ts` → granularity; `decision_scope.ts` → dominance | Author-declared action/lane/goal/project/global input; explicit domain and unknown/null/numeric tests plus CLI/dominance cases execute consumers. | Broad scope cannot cross kinds or override exact target/recipient conflict; do not infer missing scope from a bounded view. | +| goal_amendment_class | `goals/goal_amendment_proposal.ts` → proposal.amendment_class | Author-declared four classes; RFC classification table, all-class/unknown-class tests and real submit/list CLI provide input and journal evidence. | Admission is retained proposal evidence with canonical_effect=none, not amendment commit or delegated protected authority. | +| goal_amendment_proposal_admission | `goals/goal_amendment_proposal.ts::admissionOutcome` → admission | Internal admitted/needs_rebase from current basis, sequence and digest; equal/stale/future/canonical/Markdown tests execute real TS owner and CLI journal. | Retain stale proposals for rebase; reject fabricated future history. Admitted never means accepted shared change. | +| goal_amendment_proposal_admission_fact | same admission owner → admission_facts[] | Internal four fact codes for sequence behind, digest mismatch, unverifiable basis and superseded basis; combined-condition and basis-transition cases execute branches. | Mixed facts remain together; Markdown or canonical zero sequence is not fabricated event-log freshness. No change to proposal schema or commit authority. | +| scheduler_cadence_transition | `scheduler/state_transition_rules.ts` → cadence transition | Internal six transitions from identity, elapsed interval, acknowledgement and failure facts; Python decision table and TS coarse-transition tests execute the shared owner. | Keep pinned old-Python characterization and state readback; cadence is not permission to execute or spend. | +| scheduler_host_transition | `scheduler/state_transition_rules.ts` → host transition | Internal apply_required/host_match_ack_required/recorded_failure_suppressed/settled; explicit table/negative tests exercise current observations and recorded failures. | Projection is not an actual host update. Current-host ACK must pass #6259’s separate readback gate; no host-success claim from these fixtures. | +| handoff_mode | `coordination/handoff_mode_vocabulary.ts`, authority/mode-plan readers → mode | Mixed configured input and retained legacy/default read. Real show/set CLI, invalid/frontmatter, quiescence, lease and replay tests exercise source and readers. | New configuration targets are soft_claim/hard_lease; legacy remains readable for upgrade/receipts. Mode parsing is not lease authority. | +| delivery_outcome | `work_items/delivery_outcome.ts`, monitor/Host/replan producers → outcome | Mixed caller declaration and machine selection: monitor/Host paths produce surface_only/progress, replan can downgrade to outcome_gap; primary_goal_outcome is an author claim. History, native monitor, executor, replan and diagnostic tests exercise these boundaries. | Decoder/claim validation does not independently verify a primary outcome. Historical contradictory claims are diagnosed, not rewritten as success. | +| delivery_continuity_preemption | `quota/should_run_packet.py::_delivery_preemptions_for_route` → `turn_driver/delivery_continuity.ts` | Internal current guard facts plus typed input: receipt, blocking lane, replan, repair and denied delivery. Continuity route/selection tests execute preemption and subsequent reselection. | Sticky delivery cannot override these facts. Same strings in a different qualifier are not automatically this vocabulary; no old receipt retargeting. | + +## Two unresolved meanings requiring owner disposition + +- **`settlement_failure_kind.cancelled` — Effect/settlement owner.** The public + `SettlementResult.failed(...).bind(...)` path admits and short-circuits it, but + searches of the settlement owners, enum/member uses and callers find no + internal cancellation producer. Tokens in chat/Host/usage cancellation belong + to different vocabularies. Decoder acceptance establishes its wire treatment, + not who may create it or when. The existing unresolved value note is retained. + Closure requires either an identified cancellation producer/contract with a + real witness, or an explicitly reviewed reserved/compatibility-only scope and + retirement condition. This change requests neither an invented producer nor + automatic acceptance of that exception. +- **`todo_decision_scope_kind.other` — Todo decision-scope owner.** The real parser + accepts it and exact-kind matching prevents it covering named kinds. No fallback + converts unknown input to `other`; malformed input rejects. The existing public + vocabulary reference lists it without an authoring criterion, and the six named + catalogue authorities do not supply one. Its meaning note remains unresolved. + Closure requires an explicit authoring contract plus examples, or a reviewed + compatibility-only retention/migration decision. Membership tests cannot choose + that product meaning on behalf of the owner. + +These are named outstanding decisions, **not approved exceptions**. They keep +Stage 2/3 open; neither blanket source labels nor green tests settle them. + +## Evidence and reproduction + +Use the intended source checkout, `uv sync --extra test`, qualified Node 22.22.3, +and `npm ci --ignore-scripts --no-audit --no-fund`. Python imports must resolve to +that checkout. Evidence groups are existing tests, not a new acceptance database: + +- Foundation: `tests/test_loopx_turn_{driver,executor,transaction}.py`, + `tests/test_loop_turn_loop_controller.py`, + `tests/control_plane/test_agent_scope_frontier_contract.py`, + `tests/control_plane/test_quota_run_decision.py`, and + `tests/architecture/test_semantic_settlement_binding_witness.py`. +- 2a: `tests/architecture/test_settlement_receipt_source_boundaries.py` and native + `turn_settlement`, `quota_settlement_readback`, `task_lease_acquire` and + `task_lease_lifecycle` TS suites. The thin source witness adds no decision rule. + Its new unbound-guard case executes real synthetic-file readback through TS and + Python; its excluded-owner case executes real native lease rejection with no + lease write. The explicit external-failure cases now cover twelve values; + registry comparison only prevents an added value silently missing its witness. +- 2b: Python `test_delivery_workspace.py`, `test_workspace_git_fact_reads.py`, + `test_delivery_workspace_causality.py`, `test_task_lease_cli_native.py`, + `test_todo_decision_scope_{cli_validation,consistency}.py`, + `test_todo_completion_state_runtime.py`; TS `delivery_workspace`, + `settlement_workspace_causality`, `todo_completion_state`, `decision_metadata` + and `decision_scope`. Input cases for every scope kind/granularity are distinct + from runtime classification and retain the unresolved `other` purpose. +- 2c: Python `test_goal_amendment_proposal{,_cli}.py`, + `test_scheduler_state_{transition_rules,runtime_integration}.py`, + `test_goal_handoff_mode_cli.py`, `test_handoff_mode_source.py`, + `test_delivery_continuity_{selection,runtime}.py`, `test_native_monitor_poll.py`, + `test_replan_writeback_projection.py`, `test_refresh_state_replan_gate.py`, + `test_final_outcome_diagnostics.py`; TS `goal_amendment_proposal`, + `scheduler_state_transition_rules`, `handoff_mode_plan`, `delivery_continuity` + and `delivery_history`. +- Historical/new-output boundary: Python `test_protocol_packet_history.py` and + `test_protocol_packet_retirement_cli.py`; generated semantic/Turn bindings + checked with their existing `--check` commands and full drift smoke. + +Run Python files with `uv run --extra test python -m pytest -q ...`; TS suite +names above mean `tests/control_plane_ts/.test.ts`, run with +`node --no-warnings --experimental-sqlite --experimental-strip-types --test ...`. +Do not substitute enum iteration for producer witnesses. Expected observations +come from the accepted contracts and causal cases, not an echo of owner output. + +At this source baseline plus the focused witness additions: Stage 2a **66 passed**; +existing Python domain groups **564 passed**, additional real-Git/monitor/replan/ +lease groups **82 passed**; native TS groups **421 passed**, no skips. TypeScript +typecheck, focused Ruff, both generators and full semantic drift pass. These are +source/isolated-backend results, not installed or live-model acceptance. +The existing semantic architecture/value-note suite adds **706 passed**; docs +governance and premerge pass. The generated RFC status index reflects the new +ledger entry; it makes no delivery-maturity claim. +The drift readback remains F1/F2 6/26, F3 0/26, F4 4/4, F5 1/1, F6 0/0; +45 producer sites are unresolved, including 17 that cannot supply producer +witnesses. No ceiling or source boundary was relaxed. + +Known integration limit, reused from an independently reproduced run on this +same immutable main baseline: three `test_quota_settlement_cli.py` cases fail at +scheduler ACK (standard settlement and both Todo-less replan variants). They +provide no current host observation required by #6259, so the owner returns +`rrule_mismatch` without writing scheduler state. They are not in the passing +source groups above and were not rerun for this documentation batch. This known +full-CLI-suite gap remains open; no rule or assertion is weakened to hide it. + + +## Integrated state and closure boundary + +The main baseline includes #4772/#4777 reporting corrections, #4775 live +composition, #4783 settled replay, #4788 rejected selection, #4786 inbox +composition, overlapping correctness #4764, binding witness #4747 and 2a #4795. +#4794 stopped new `protocol_action_packet` writes while retaining historical +reading/signature projection. The other five legacy fields remain intentionally +visible; all-field retirement is not a closure condition. #5317 supplies the +separate #4743 development-time advisory, so the old “never built/no AGENTS +instruction” claim is obsolete. Advisory findings do not become blocking proof. + +The later typed-failure repair #6251 and canonical-selection repair #6268 are open +at this measurement and are not folded into this baseline’s results. #6260 is +merged. They do not expand #4447’s accepted closing scope. Full source disposition, +maintainer acceptance and one final integrated readback still precede closure; +installed frontend/Lark/live-model and general Goal/team qualification are not +claimed by this source-evidence batch. No production provider or persistence +format is changed; raw runtime logs and local Goal state stay outside the repo. diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md new file mode 100644 index 0000000000..88f91314dd --- /dev/null +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md @@ -0,0 +1,109 @@ +# 当前集成主线上的登记来源处理 + +复核基线:`43173c0b8c8761abee4cdddc665f0f0f20f194f7`(2026-10-12)。 +本记录推进 #4447 既有 2a/2b/2c,不改变范围、扫描登记、预算或运行时行为。 +[分阶段范围修订 #4789](https://github.com/loopx-project/loopx/pull/4789) 已合入, +交付验收及下方两项含义决策仍开放。**列出 26 行不等于 26 项 producer 证明或 tracker 关闭。** + +注册表仍为 26 项,已用实际 `task_lease_lifecycle_operation` 替换退休的 `lease_action`。 +F1/F2 仍是 **6/26**:五项 kernel 和 settlement-binding witness。其余二十项跨运行时 +词表不会因本文件或 decoder 测试获得 F1/F2 分数。精确 owner 符号及允许值仍以 +`loopx/semantics/vocabulary_v0.json` 为准;表内 owner 路径相对 `loopx/control_plane/`。 + +运行时见证从因果输入执行 shipped owner;注入值只证明调用方输入/decoder 边界。 +混合来源保留两种义务。兼容项要有实际 reader 和退出条件;不把实际跨界的词表改叫 +local-only 来避开责任。本记录不证明全程序可达性、数据流或通用 F6。 + +## 来源与兼容清单 + +| 登记词表 | Owner / 槽位 | 已执行来源处理 | 兼容及剩余边界 | +| --- | --- | --- | --- | +| turn_result_kind | `turn_driver/executor.py`, `transaction.py::_result_kind` → generated result kind | 内部选择 + Host/调用方输入。driver/executor/transaction 测试执行结果与拒绝分支;固定 decoder 对每个登记值执行输入见证。 | 接纳 Host 输入不证明真实 Host 产生过该结果;保留 journal/replay 读取。 | +| turn_route | `turn_driver/driver.py`, `loop_controller.py` → plan/envelope route | 内部 route 选择。driver/controller 覆盖可执行、门控、修复、等待和非法 route;生成投影受检查。 | 保留三种 Turn 词表及显式投影;route 不是持久回执。 | +| loop_disposition | `turn_driver/loop_controller.py::decide_loop_disposition` → disposition | 内部决策,由当前 route/result/迭代事实决定;controller 表与失败/重试测试执行 owner。 | 生成 controller 规则与 route/result 分离,不因拼写相似合并。 | +| agent_scope_frontier_action | `agents/agent_scope.py` → frontier action | 内部候选/依赖/handoff 分类;frontier 测试执行耗尽、等待、重新分配和后继分支。 | TS 生成绑定是消费者;lane 耗尽不证明整个 Goal 完成。 | +| effective_action | `quota/decision_summary.py` and registered overlays → final action | 内部 decision/overlay 输出。quota 决策测试执行当前路径,固定 producer 扫描保留明确未知站点。 | 根 decision/frontier 联合与嵌套 replay 槽位分开;不把来源处理当作全部分支可达性证明。 | +| settlement_binding_kind | `effect_program.ts::settlementIdentity` → binding_kind | 对输入身份做内部归一化;既有 binding witness 执行 Todo、replan、unbound 及矛盾组合。 | unbound 不允许扣费;精确身份仍由回执 owner 验证。 | +| task_lease_lifecycle_operation | `work_items/task_lease_lifecycle_request.ts` → operation | 调用方选择的 native 输入。lifecycle 测试执行六种操作、非法输入、CAS 与重试。 | 替换退休的私有 lease_action,不删除租约行为;保留 fence 历史字段缺省,不计入 F1/F2。 | +| settlement_step_kind | `effect_program.ts`, `turn_driver/settlement.ts` → receipts[].step_kind | 内部回执构造 + 外部 envelope 输入。2a 在无 callback 的已提交回放中产生四类 step,并拒绝非法输入。 | 保留顺序前缀、effect 身份与历史回执;注入 step 只证明解码。 | +| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | 内部失败 + 接受的 envelope 输入。2a 覆盖 12 个 wire 值、真实 unbound guard 读取及 native 权限拒绝。 | cancelled 的来源用途仍待下方处理。租约摘要使用 failure.step,Effect envelope 使用 failure.step_kind,不能伪造 wire 转换。 | +| receipt_bound_monitor_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → monitor_phase | 从精确 monitor commit 内部派生;2a 执行 poll_due/settled、错误身份和旧 monitor effect id。 | settlement_pending 仅有 consumer 兼容证据,实际 builder 不产生;迁移历史 work-lane reader 后才可删除。 | +| receipt_bound_replay_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → replay_phase | 从隔离回执文件和完成/写回/扣费前缀内部派生三种 phase;重复读取与身份负例经过 bridge。 | 保留 terminal-to-replay 适配与原绑定;phase 投影不证明所有持久 writer 正确提交。 | +| delivery_workspace_kind | `agents/workspace_guard.py::capture_delivery_workspace` → TS snapshot | 真实 Git/文件观察 + snapshot 输入;主 checkout、linked worktree、本地 Goal 与 TS normalization 覆盖三类及非法 origin。 | 保留 v0 Git snapshot;不能把 Git 缺失/读取失败转换成本地 Goal 授权。 | +| delivery_workspace_identity_kind | `agents/workspace_guard.py` → `agents/delivery_workspace.ts` → identity_kind | 观察 git_repository/local_goal 并验证 snapshot;同组真实 Git/local 测试验证身份、归属与 peer 隔离。 | local Goal 身份不能满足独立 Git 工作区要求;v0 snapshot 保留迁移读取。 | +| delivery_workspace_requirement | `quota/settlement_workspace_causality.ts` → requirement | 根据明确工作合同内部派生 required/not_required/unknown;覆盖写入、非交付、缺元数据和事件读取。 | unknown 必须修复;无工作区的旧结算例外需要精确且完整的 validation/writeback 回执,部分或错 Todo 不通过。 | +| todo_completion_continuation | `todos/completion_state.ts::selectTodoCompletionState` → continuation | 根据 intent/Todo 内部选择 active_goal/successor/no_followup,同时读取持久 metadata;完整 owner 与非法 authority 测试执行。 | 后继与 no_followup 矛盾时拒绝;保留 metadata normalization,退休的标量 RPC 仍拒绝。 | +| todo_completion_recovery | `todos/completion_state.ts` → recovery | 根据已完成 Todo、关闭 intent 和 identity source 派生两类 terminal recovery;固定及显式 lifecycle 用例覆盖。 | 不重写原完成身份、不创建后继;null 表示没有恢复,与恢复类别分开。 | +| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | 作者声明输入,无自动分类 producer。七类输入见证、非法值、真实 CLI 和精确 kind dominance 测试执行 reader。 | other 作者何时选择仍待下方处理。接纳不授予权限;保留旧 standing-scope codec。 | +| todo_decision_scope_granularity | `todos/decision_metadata.ts` → granularity; `decision_scope.ts` → dominance | 作者声明五级输入,显式 domain 与未知/null/数字负例,加 CLI/dominance 用例。 | 更宽 scope 不能跨 kind 或覆盖精确目标/接收者冲突;不由有界视图推断缺失 scope。 | +| goal_amendment_class | `goals/goal_amendment_proposal.ts` → proposal.amendment_class | 作者按 RFC 声明四类;全类别/未知类别测试与真实 submit/list CLI 提供输入和 journal 证据。 | admission 是 canonical_effect=none 的提案事实,不是共享变更提交或 protected authority 委托。 | +| goal_amendment_proposal_admission | `goals/goal_amendment_proposal.ts::admissionOutcome` → admission | 根据当前 basis、sequence、digest 内部产生 admitted/needs_rebase;相等/过期/未来/canonical/Markdown 情况经过 TS 与 CLI journal。 | 保留过期提案供 rebase,拒绝虚构未来历史;admitted 不等于变更获准。 | +| goal_amendment_proposal_admission_fact | same admission owner → admission_facts[] | 内部产生四类 basis/sequence/digest 事实;组合条件和 basis 转换用例执行对应分支。 | 并存事实不能删减;Markdown/canonical 的零序号不是 event-log 新鲜度,不改变提案格式或提交权限。 | +| scheduler_cadence_transition | `scheduler/state_transition_rules.ts` → cadence transition | 由 identity、间隔、ACK 和失败事实内部产生六种 transition;Python 独立表与 TS coarse owner 用例执行。 | 保留旧 Python characterization 和状态读取;cadence 不授予执行/扣费权限。 | +| scheduler_host_transition | `scheduler/state_transition_rules.ts` → host transition | 内部产生 apply/host-match-ack/failure-suppressed/settled 四类;独立表与负例覆盖当前观察和历史失败。 | 投影不是实际宿主更新;ACK 仍须满足 #6259 当前宿主读回门,不从 fixture 推断宿主更新成功。 | +| handoff_mode | `coordination/handoff_mode_vocabulary.ts`, authority/mode-plan readers → mode | 配置输入 + legacy/default 兼容读取;真实 show/set、非法 frontmatter、quiescence、lease/replay 测试覆盖。 | 新配置仅 soft_claim/hard_lease,legacy 留作升级/回执读取;解析 mode 不等于租约权限。 | +| delivery_outcome | `work_items/delivery_outcome.ts`, monitor/Host/replan producers → outcome | 作者声明 + 机器选择:monitor/Host 产生 surface_only/progress,replan 可降级 outcome_gap;primary_goal_outcome 是作者主张。history/monitor/executor/replan/diagnostic 测试覆盖。 | decoder/claim 检查不独立证明主目标已实现;历史矛盾主张被诊断,不改写为成功。 | +| delivery_continuity_preemption | `quota/should_run_packet.py::_delivery_preemptions_for_route` → `turn_driver/delivery_continuity.ts` | guard 内部事实 + typed 输入:回执、阻塞 lane、replan、repair、拒绝交付;continuity route/selection 测试覆盖抢占与后续重选。 | 继续旧交付不能覆盖当前抢占;其他 qualifier 的同形字符串不自动归此词表,不改绑旧回执。 | + +## 两项待 owner 处置的含义 + +- **`settlement_failure_kind.cancelled`:Effect/settlement owner。** 公开的 + `SettlementResult.failed(...).bind(...)` 接受它并短路后续步骤,但核对 settlement + owner、枚举成员引用和调用方,仍没有内部取消 producer。chat/Host/usage 中的 + cancellation 属于不同词表。decoder 证明 wire 处理,不回答谁可在何时产生。 + 保留现有 unresolved value note。关闭需要找到具体取消合同/producer 并执行见证, + 或单独评审明确的 reserved/compatibility-only 范围和退出条件;本批不虚构 producer, + 也不自动批准这个例外。 +- **`todo_decision_scope_kind.other`:Todo decision-scope owner。** 真实 parser 接受它, + 精确 kind 匹配阻止它覆盖具名 kind;没有把未知输入转成 other 的 fallback,非法值被拒绝。 + 现有公开协议只列枚举,没有作者选择准则,catalog 的六类 authority 也不能补出含义。 + 保留 unresolved note。关闭需要明确的作者使用合同/例子,或获评审的兼容保留/迁移决定; + membership 测试不能代替 owner 决定产品含义。 + +以上是**未解决且未获批准的例外**,继续阻止 Stage 2/3 关闭。不能用统一来源标签或 +绿色测试替代这两个决定。 + +## 证据与复跑 + +使用目标源码 checkout、`uv sync --extra test`、合格 Node 22.22.3 及 +`npm ci --ignore-scripts --no-audit --no-fund`。确认 Python 导入来自该源码。 +[英文同版](2026-10-12-registered-source-treatment.md#evidence-and-reproduction) +逐组列出精确测试文件:基础 Turn/frontier/quota/binding;2a settlement/readback/lease; +2b workspace/completion/decision-scope;2c proposal/scheduler/handoff/outcome/continuity; +历史 packet 及生成物。这里复用既有证据,不创建新验收数据库。 + +Python 命令为 `uv run --extra test python -m pytest -q <所列文件>`;TS 命令为 +`node --no-warnings --experimental-sqlite --experimental-strip-types --test <所列文件>`。 +2a 新增的 unbound guard 通过真实临时文件读取、TS owner 和 Python bridge;排除 owner +用例执行真实 native lease 拒绝并验证无租约写入。外部失败输入现在显式覆盖 12 值, +registry 对比只防止新值遗漏其 witness,不把枚举遍历升级为 producer 证明。 +新增 scope kind/granularity 输入用例也不解决 other 的作者含义。预期来自接受的合同和 +独立因果场景,而非回显 owner 结果。 + +该源码基线加本批聚焦见证:2a **66 passed**,既有 Python 领域组 **564 passed**, +补充真实 Git/monitor/replan/lease 组 **82 passed**,native TS 组 **421 passed**、无 skip。 +TS typecheck、聚焦 Ruff、两个生成器及完整 semantic drift 通过。以上是源码/隔离后端 +证据,不是安装端或真实模型验收。drift 仍为 F1/F2 6/26、F3 0/26、F4 4/4、F5 1/1、 +F6 0/0;45 个 producer site 未解析,其中 17 个无法提供 producer 见证。 +没有放宽任何上限或扫描边界。既有 semantic architecture/value-note 组另有 +**706 passed**,docs governance 和 premerge 通过。RFC status 索引仅更新 ledger +条目数,不据此改变交付成熟度。 + +已知集成边界:复用同一不可变主线上的独立复现结果,`test_quota_settlement_cli.py` +的三个用例(普通结算及两种 Todo-less replan)在 scheduler ACK 失败。fixture 没有 +#6259 要求的当前宿主观察,owner 返回 `rrule_mismatch` 且不写 scheduler 状态。 +它们不在上述通过组中,本次文档批次未重跑;完整 CLI suite 的这个缺口仍开放, +不通过放宽规则或断言消除。 + +## 集成状态与关闭边界 + +此主线已包含 #4772/#4777 的事实修正、#4775 live composition、#4783 settled replay、 +#4788 rejected selection、#4786 inbox composition、交叠正确性 #4764、binding witness +#4747 与 2a #4795。#4794 已停止新 `protocol_action_packet` 写入,保留历史读取和签名 +投影;其余五个旧字段继续可见,全字段退休不是关闭前提。#5317 已交付独立 #4743 的 +开发期 advisory,因此旧“从未实现/AGENTS 没有指引”说法过期;advisory 仍不阻断或证明语义。 + +本次测量时,后续 typed-failure 修复 #6251 与 canonical-selection 修复 #6268 尚未合入, +不能算入该基线;#6260 已合入。它们不扩大 #4447 原关闭范围。完整来源处置、维护者验收 +及最终单一集成版本读回仍是关闭前提。本批不声称安装前端/Lark、真实模型或完整 Goal/团队 +验收;不改变生产 provider/持久格式,原始日志及本地 Goal 状态不进入仓库。 diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md index b6405d5528..8778561245 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md @@ -1036,23 +1036,21 @@ persistence proof. ## 11. Normative delivery plan -Implementation readback at `bfbb5ac60` (fact correction for -[discussion #4738, PR-03](https://github.com/loopx-project/loopx/discussions/4738#discussioncomment-18514184)): -M0/M0.5 checks run today; Q3/Q6 choices are implemented as described in Section 12; -M2 Turn generation is consumed by `transaction.py`, `settlement.ts` and the loop -controller. Milestone rows below retain their acceptance obligations; they are -not a list of work that has never started. Original measurements keep their -original SHA. This readback does not imply implementation qualification or promotion; RFC merge separately accepts the design. - -The six legacy fields are still written. `protocol_action_packet` retirement -still needs a target release, consumer scope and historical signature/rollback -contract. The `settlement_binding_kind` witness in -[PR #4747](https://github.com/loopx-project/loopx/pull/4747) is a proposed pilot, -not merged evidence on this baseline and not closure of the other cross-runtime -vocabularies. F6 remains unproved. PR-07/08 construction work must preserve -stage precedence; [PR #4764](https://github.com/loopx-project/loopx/pull/4764) -changes same-Turn deferred selection and monitor settlement on overlapping paths, -so its outcome must be reconciled before claiming combined behavior parity. +Implementation readback at `43173c0b8c8761abee4cdddc665f0f0f20f194f7` +(2026-10-12): M0/M0.5 guards and Q3/Q6 typed-slot choices are implemented; +M2 generated contracts are consumed by the transaction, settlement and controller. +The Stage 1 composition/replay/selection/inbox slices and overlapping #4764 are +merged. #4794 stopped new `protocol_action_packet` writes; historical format, +signature projection and the other five legacy fields remain. #4747 and #4795 +are merged witnesses, not pending proposals. #5317 supplies the separate #4743 +development-time advisory; it does not close this tracker's source obligations. + +The [current registered-source inventory](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md) +records all 26 entries, executed evidence, compatibility boundaries and two +unresolved meanings. F1/F2 remain 6/26; source treatment does not inflate their +producer domain. Final owner disposition and integrated delivery acceptance +remain open; F6-wide proof is not claimed. Milestone rows below retain their +acceptance obligations, while dated historical measurements keep their own SHA. | Milestone | Shipped behavior | Entry gate | Exit evidence | Rollback | | --- | --- | --- | --- | --- | @@ -1064,13 +1062,13 @@ so its outcome must be reconciled before claiming combined behavior parity. | M3 | Conditional per-field retirement where removing a field eliminates demonstrated duplicate authority or unnecessary consumer maintenance; a derived compatibility projection may remain | Document net benefit, target version, consumers, historical formats/signatures and rollback window; review unresolved and dynamic-key evidence before stopping writes | Approved migration, new-output and historical-read/rejection tests, actual removal of replaced code, and updated budgets for the approved surface; retaining a useful projection is not a failed migration | Restore the approved writer within the declared compatibility window | | M4 | Twin budget lowered with each replacement-first cutover from the migration RFC | Each cutover PR | Budget edit in the same diff | None needed; budget follows code | -**Staged acceptance proposal for #4447.** This RFC's long-range milestones are -not all prerequisites for closing one delivery tracker. The staged proposal in +**Staged acceptance for #4447.** This RFC's long-range milestones are +not all prerequisites for closing one delivery tracker. The scope revision merged in [#4789](https://github.com/loopx-project/loopx/pull/4789), tracked by [#4447](https://github.com/loopx-project/loopx/issues/4447), informed by [discussion #4738](https://github.com/loopx-project/loopx/discussions/4738), separates verified guard adoption, bounded production-path simplification, and source -evidence closure. Maintainer acceptance of that scope is required before tracker -closure; this proposal does not certify delivery or change any runtime check. +evidence closure. Maintainer acceptance of the completed delivery evidence is still required before +tracker closure; the scope revision does not certify delivery or change runtime checks. The table below records long-range targets, not an unconditional deletion quota or the acceptance checklist for #4447; each row is a registry budget or a diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md index e5237b33ca..a48ffbc589 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md @@ -832,17 +832,17 @@ uv run --extra test python scripts/generate_semantic_inventory.py --report --con ## 11. 规范性交付计划 -`bfbb5ac60` 上的实现读回([讨论 #4738 的 PR-03 事实校正](https://github.com/loopx-project/loopx/discussions/4738#discussioncomment-18514184)): -M0/M0.5 检查已执行;Q3/Q6 已按第 12 节描述实现;M2 Turn 生成物已被 -`transaction.py`、`settlement.ts` 和 loop controller 消费。下表保留各里程碑的 -验收义务,不是“从未开始的工作”清单。历史测量保留原 SHA;本次读回不证明实现资格或晋升;RFC 合入另行接受设计。 - -六个旧字段仍在写入。`protocol_action_packet` 退休仍需目标发布版本、消费者范围、 -历史签名和回滚契约。[PR #4747](https://github.com/loopx-project/loopx/pull/4747) -中的 `settlement_binding_kind` witness 是提议中的 pilot,在此基线上尚未合入, -也不构成其他跨运行时词表的闭合。F6 仍未证明。PR-07/08 构建改动必须保持阶段 -优先级;[PR #4764](https://github.com/loopx-project/loopx/pull/4764) 正在交叠路径上 -修改同一 Turn 的延期选择和 monitor 结算,声称组合行为等价前须核对其最终结果。 +`43173c0b8c8761abee4cdddc665f0f0f20f194f7` 上的实现读回(2026-10-12): +M0/M0.5 守卫和 Q3/Q6 类型化槽位已实现;M2 生成契约被 transaction、settlement 和 +controller 消费。Stage 1 的 composition/replay/selection/inbox 及交叠 #4764 已合入。 +#4794 停止新 `protocol_action_packet` 写入,保留历史格式、签名投影及其余五个旧字段。 +#4747/#4795 已是合入见证,不再是待合并提案;#5317 交付独立 #4743 的开发期 advisory, +不替代本 tracker 的来源义务。 + +[当前登记来源清单](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md) +列出 26 项、执行证据、兼容边界及两项未决含义。F1/F2 仍为 6/26,来源处理不抬高 producer +证明范围。owner 处置和最终集成交付验收仍开放,不声称通用 F6 证明;下表保留各里程碑 +验收义务,历史测量继续保留原 SHA。 | 里程碑 | 交付行为 | 进入门 | 退出证据 | 回滚 | | --- | --- | --- | --- | --- | @@ -854,11 +854,12 @@ M0/M0.5 检查已执行;Q3/Q6 已按第 12 节描述实现;M2 Turn 生成物 | M3 | 有条件逐字段退役:删除必须消除已证实的重复权威或不必要的消费者维护;派生兼容投影可以保留 | 说明净收益、目标版本、消费者、历史格式/签名和回滚窗口;停写前评审 unresolved 与计算式键证据 | 获准迁移、新输出及历史读取/拒绝测试、被替代代码实际删除、批准范围对应预算更新;保留有用投影不属于迁移失败 | 在声明的兼容窗口内恢复获准 writer | | M4 | 随迁移 RFC 的每次 replacement-first 切换调低孪生预算 | 每个切换 PR | 同 diff 中的预算修改 | 无需;预算跟随代码 | -**#4447 阶段验收提案。** 本 RFC 的长期里程碑不全部构成单个交付 tracker -的关闭条件。[#4447](https://github.com/loopx-project/loopx/issues/4447) 结合 +**#4447 阶段验收。** 本 RFC 的长期里程碑不全部构成单个交付 tracker +的关闭条件。[#4789](https://github.com/loopx-project/loopx/pull/4789) 已合入范围修订, +由 [#4447](https://github.com/loopx-project/loopx/issues/4447) 结合 [讨论 #4738](https://github.com/loopx-project/loopx/discussions/4738) 的阶段方案, 分别验收守卫的真实采用、有限生产路径的重复维护消除和来源证据闭合。 -关闭 tracker 前必须由维护者接受该范围;本提案不认证交付完成,也不改变运行时检查。 +关闭 tracker 前仍须维护者接受完整交付证据;范围修订不认证交付完成,也不改变运行时检查。 下表记录长期目标,不是无条件删除配额,也不是 #4447 的验收清单;每一行都是一个 注册表预算或 smoke 可检查的词表属性。标为*未决*的行等待第 12 节的决策,这也 From 58ce0c5195926f0bd57b9303500d228d0cf58469 Mon Sep 17 00:00:00 2001 From: song Date: Tue, 13 Oct 2026 03:38:50 +0800 Subject: [PATCH 3/4] docs(semantics): reconcile integrated sources and remaining ACK acceptance Signed-off-by: song --- .../2026-10-12-registered-source-treatment.md | 203 +++++++++++++----- ...10-12-registered-source-treatment.zh-CN.md | 166 ++++++++++---- .../semantic-vocabulary-convergence-v0.md | 10 +- ...emantic-vocabulary-convergence-v0.zh-CN.md | 6 +- 4 files changed, 277 insertions(+), 108 deletions(-) diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md index 029ccffa3e..1ba5c364c0 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md @@ -1,10 +1,14 @@ # Registered source treatment at the integrated main baseline -Review baseline: `43173c0b8c8761abee4cdddc665f0f0f20f194f7` (2026-10-12). -This refreshes #4447 Stage 2a/2b/2c without changing its scope, scanner enrollment, -budgets or runtime behavior. The [staged scope revision](https://github.com/loopx-project/loopx/pull/4789) -is merged; delivery acceptance and the two named unresolved meanings below are -still open. **26 rows inventoried is not 26 producer proofs or tracker closure.** +Current runtime baseline: `509c38c502d3d0b4eafb01550efcdc4b5b5a1d17` (2026-10-13). +This updates the existing #6270 inventory after the typed-failure, selected-work, +legacy-work-basis and reserved-value changes reached main. The production +`loopx/`, `apps/` and `packages/` trees in this source-evidence candidate are +identical to that main; only its existing witnesses and records are added. +The [staged scope revision](https://github.com/loopx-project/loopx/pull/4789) +remains the acceptance boundary. **26 rows inventoried is not 26 formal producer +proofs or tracker closure.** The source-inventory PR and the separate #6285 +Host-observation fixture repair still need integration and final owner closeout. The registry still contains 26 entries, including `task_lease_lifecycle_operation` in place of retired `lease_action`. F1/F2 remain **6/26**: five kernel entries @@ -31,7 +35,7 @@ bounded source treatments, not whole-program reachability, data-flow or F6 proof | settlement_binding_kind | `effect_program.ts::settlementIdentity` → binding_kind | Internal normalization of supplied identity. Existing settlement-binding witness executes Todo, autonomous-replan and unbound cases plus contradictions. | Unbound is not a permit to spend; exact identity remains the existing receipt owner’s responsibility. | | task_lease_lifecycle_operation | `work_items/task_lease_lifecycle_request.ts` → operation | Caller-selected native input; lifecycle tests execute renew/transfer/release, terminal_verify/holder_verify/fence_close, bad input, CAS and retry. | Replaces retired private Python lease_action, not lease behavior. Native persisted fence receipts and omitted legacy optional fields remain readable; no F1/F2 enrollment. | | settlement_step_kind | `effect_program.ts`, `turn_driver/settlement.ts` → receipts[].step_kind | Mixed internal receipt construction and external envelope input. Stage 2a executes all four steps on committed replay without callbacks, and rejects malformed step input. | Ordered prefixes, effect identity and historical receipts remain; injected steps prove decoding only. | -| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | Mixed internal failures and accepted envelope input. Stage 2a now includes all 12 wire values, real unbound-guard readback and native permission denial. | `cancelled` remains the named unresolved source-purpose item below. Lease summaries use failure.step, while Effect envelopes use failure.step_kind; no fabricated wire conversion. | +| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | Mixed internal failures and accepted envelope input. Stage 2a now includes all 12 wire values, real unbound-guard readback and native permission denial. | `cancelled` now has the reader-reserved scope and exit condition below; no internal producer or historical-use claim is made. Lease summaries use failure.step, while Effect envelopes use failure.step_kind; no fabricated wire conversion. | | receipt_bound_monitor_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → monitor_phase | Internal derivation from exact monitor commit; Stage 2a executes poll_due/settled, wrong identity and legacy monitor effect id. | settlement_pending is retained consumer compatibility only; real monitor builder does not emit it. Remove only after historical work-lane consumers migrate. | | receipt_bound_replay_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → replay_phase | Internal open/pending/settled from isolated receipt files and completion/writeback/spend prefixes; repeated reads and identity negatives execute the bridge. | Terminal-to-replay adapter and original binding stay. Phase projection is not proof all durable writers committed correctly. | | delivery_workspace_kind | `agents/workspace_guard.py::capture_delivery_workspace` → TS snapshot | Mixed filesystem/Git observation and snapshot input. Real primary/linked/local workspace tests plus TS normalization cover three kinds, contradictions and invalid origins. | Keep v0 Git snapshot normalization; do not turn missing/failed Git evidence into a local-goal grant. | @@ -39,7 +43,7 @@ bounded source treatments, not whole-program reachability, data-flow or F6 proof | delivery_workspace_requirement | `quota/settlement_workspace_causality.ts` → requirement | Internal required/not_required/unknown from explicit work contract. Causality tests execute repository writes, non-delivery, missing metadata and event readback. | Unknown requires repair. Legacy no-workspace settlement exception needs both exact committed validation/writeback receipts; partial or wrong-Todo evidence fails. | | todo_completion_continuation | `todos/completion_state.ts::selectTodoCompletionState` → continuation | Internal active_goal/successor/no_followup selected from intent and Todo facts, plus persisted metadata input; whole-owner and malformed-authority tests execute it. | Contradictory successor/no-followup intent rejects; retained metadata normalization remains while retired scalar RPC rejects. | | todo_completion_recovery | `todos/completion_state.ts` → recovery | Internal same_turn_terminal_closeout/lifecycle_reentry_terminal_closeout from completed Todo, closure intent and identity source; pinned and explicit lifecycle cases execute both. | Recovery does not rewrite the original completion identity or create a successor; nullable non-recovery is distinct. | -| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | Author-declared input, not inferred by a producer. Explicit seven-kind input witnesses, malformed membership, CLI mutation and exact-kind dominance tests execute readers. | `other` authoring purpose remains unresolved below. Input acceptance does not grant authority; legacy standing-scope codec remains. | +| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | Author-declared input, not inferred by a producer. Explicit seven-kind input witnesses, malformed membership, CLI mutation and exact-kind dominance tests execute readers. | `other` has the explicit custom-authority authoring rule below, never an unknown-input fallback. Input acceptance does not grant authority; legacy standing-scope codec remains. | | todo_decision_scope_granularity | `todos/decision_metadata.ts` → granularity; `decision_scope.ts` → dominance | Author-declared action/lane/goal/project/global input; explicit domain and unknown/null/numeric tests plus CLI/dominance cases execute consumers. | Broad scope cannot cross kinds or override exact target/recipient conflict; do not infer missing scope from a bounded view. | | goal_amendment_class | `goals/goal_amendment_proposal.ts` → proposal.amendment_class | Author-declared four classes; RFC classification table, all-class/unknown-class tests and real submit/list CLI provide input and journal evidence. | Admission is retained proposal evidence with canonical_effect=none, not amendment commit or delegated protected authority. | | goal_amendment_proposal_admission | `goals/goal_amendment_proposal.ts::admissionOutcome` → admission | Internal admitted/needs_rebase from current basis, sequence and digest; equal/stale/future/canonical/Markdown tests execute real TS owner and CLI journal. | Retain stale proposals for rebase; reject fabricated future history. Admitted never means accepted shared change. | @@ -50,29 +54,37 @@ bounded source treatments, not whole-program reachability, data-flow or F6 proof | delivery_outcome | `work_items/delivery_outcome.ts`, monitor/Host/replan producers → outcome | Mixed caller declaration and machine selection: monitor/Host paths produce surface_only/progress, replan can downgrade to outcome_gap; primary_goal_outcome is an author claim. History, native monitor, executor, replan and diagnostic tests exercise these boundaries. | Decoder/claim validation does not independently verify a primary outcome. Historical contradictory claims are diagnosed, not rewritten as success. | | delivery_continuity_preemption | `quota/should_run_packet.py::_delivery_preemptions_for_route` → `turn_driver/delivery_continuity.ts` | Internal current guard facts plus typed input: receipt, blocking lane, replan, repair and denied delivery. Continuity route/selection tests execute preemption and subsequent reselection. | Sticky delivery cannot override these facts. Same strings in a different qualifier are not automatically this vocabulary; no old receipt retargeting. | -## Two unresolved meanings requiring owner disposition - -- **`settlement_failure_kind.cancelled` — Effect/settlement owner.** The public - `SettlementResult.failed(...).bind(...)` path admits and short-circuits it, but - searches of the settlement owners, enum/member uses and callers find no - internal cancellation producer. Tokens in chat/Host/usage cancellation belong - to different vocabularies. Decoder acceptance establishes its wire treatment, - not who may create it or when. The existing unresolved value note is retained. - Closure requires either an identified cancellation producer/contract with a - real witness, or an explicitly reviewed reserved/compatibility-only scope and - retirement condition. This change requests neither an invented producer nor - automatic acceptance of that exception. -- **`todo_decision_scope_kind.other` — Todo decision-scope owner.** The real parser - accepts it and exact-kind matching prevents it covering named kinds. No fallback - converts unknown input to `other`; malformed input rejects. The existing public - vocabulary reference lists it without an authoring criterion, and the six named - catalogue authorities do not supply one. Its meaning note remains unresolved. - Closure requires an explicit authoring contract plus examples, or a reviewed - compatibility-only retention/migration decision. Membership tests cannot choose - that product meaning on behalf of the owner. - -These are named outstanding decisions, **not approved exceptions**. They keep -Stage 2/3 open; neither blanket source labels nor green tests settle them. +## Current disposition of the two previously unresolved meanings + +[#6313](https://github.com/loopx-project/loopx/pull/6313) received an exact-head +`APPROVED` review from `loopx-agent` and was merged by `huangruiteng` in +`d3f84dced555b7fa8bdffa33b750de6b1b3ea968`. The following rules are now in the +canonical registry and protocol. This records the actual review/owner integration, +not a retroactive claim of human review, a cancellation implementation or general +tracker acceptance. The [original disposition record](2026-10-12-reserved-value-disposition.md) +retains its proposal baseline. + +- **`settlement_failure_kind.cancelled` — Effect/settlement owner.** Retain the + already admitted failure input as reader-reserved compatibility. It preserves + prior receipts/details and short-circuits subsequent callbacks; it cannot + prove that an in-flight provider stopped, erase a commit, or grant retry, + rollback, resume or quota authority. There is still no identified built-in + cancellation producer or proof of historical emission. Exit requires an + owner-reviewed typed cancellation contract with actual causal witnesses, or a + versioned reader migration with stored/caller compatibility evidence. +- **`todo_decision_scope_kind.other` — Todo decision-scope owner.** Authors select + it for an explicit custom approval that none of the six named kinds describes; + uncertainty is not a fallback. Task text explains the approval and a stable + public-safe key identifies the gate and dependent work. Existing exact-kind, + key, granularity, recipient and target rules remain. Even `other:global:*` + cannot cover a named permission; unknown input rejects. The + [authoring contract](../../../../reference/protocols/decision-scope-v0.md#choosing-kindother) + supplies the rule and examples. + +The prior absence of a usage rule is no longer described as current unknown +meaning. Input/compatibility treatment still does not earn internal producer +credit. Final #4447 closure additionally requires integration of the source +inventory and a passing final revision, not just the merge of this disposition. ## Evidence and reproduction @@ -98,7 +110,7 @@ that checkout. Evidence groups are existing tests, not a new acceptance database `test_todo_completion_state_runtime.py`; TS `delivery_workspace`, `settlement_workspace_causality`, `todo_completion_state`, `decision_metadata` and `decision_scope`. Input cases for every scope kind/granularity are distinct - from runtime classification and retain the unresolved `other` purpose. + from runtime classification; custom-kind authoring now follows the current protocol. - 2c: Python `test_goal_amendment_proposal{,_cli}.py`, `test_scheduler_state_{transition_rules,runtime_integration}.py`, `test_goal_handoff_mode_cli.py`, `test_handoff_mode_source.py`, @@ -117,26 +129,98 @@ names above mean `tests/control_plane_ts/.test.ts`, run with Do not substitute enum iteration for producer witnesses. Expected observations come from the accepted contracts and causal cases, not an echo of owner output. -At this source baseline plus the focused witness additions: Stage 2a **66 passed**; -existing Python domain groups **564 passed**, additional real-Git/monitor/replan/ -lease groups **82 passed**; native TS groups **421 passed**, no skips. TypeScript -typecheck, focused Ruff, both generators and full semantic drift pass. These are -source/isolated-backend results, not installed or live-model acceptance. -The existing semantic architecture/value-note suite adds **706 passed**; docs -governance and premerge pass. The generated RFC status index reflects the new -ledger entry; it makes no delivery-maturity claim. -The drift readback remains F1/F2 6/26, F3 0/26, F4 4/4, F5 1/1, F6 0/0; -45 producer sites are unresolved, including 17 that cannot supply producer -witnesses. No ceiling or source boundary was relaxed. - -Known integration limit, reused from an independently reproduced run on this -same immutable main baseline: three `test_quota_settlement_cli.py` cases fail at -scheduler ACK (standard settlement and both Todo-less replan variants). They -provide no current host observation required by #6259, so the owner returns -`rrule_mismatch` without writing scheduler state. They are not in the passing -source groups above and were not rerun for this documentation batch. This known -full-CLI-suite gap remains open; no rule or assertion is weakened to hide it. - +### Current execution results + +The source-evidence candidate over the main baseline above was executed with +Python 3.11.7 and qualified Node 22.22.3: + +| Group | Result | Meaning | +| --- | --- | --- | +| Existing Turn/frontier/workspace/Todo/amendment/scheduler/handoff/continuity/history and local-provider paths (28 Python files listed above) | 610 passed | Actual domain owners, including isolated Git/File/SQLite paths; no live model or Host timer claim. | +| Semantic architecture (`tests/architecture/test_semantic*.py`) | 660 passed | Scanner/registry/owner/compatibility contracts, not whole-program production proof. | +| Native TypeScript (the listed suites plus action-selection admission and interaction contract) | 448 passed, no skips | Typed source and consumer boundaries; not a PostgreSQL or deployed-App qualification. | +| Full settlement CLI plus decision-scope CLI/consistency/lifecycle and Stage 2a source witnesses | 206 passed, **3 failed** | The three original current-Host ACK scenarios still lack their actual synthetic Host observation on main. | + +The failing tests are +`test_standard_codex_app_settlement_is_receipted_and_idempotent` and both +`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` variants in +`tests/control_plane/test_quota_settlement_cli.py`. They still receive +`rrule_mismatch` and no scheduler write. Main's later CI qualification changes +do not resolve these cases. No rule or assertion was weakened. + +The existing [#6285](https://github.com/loopx-project/loopx/pull/6285) fix at +`277dab815eb8dba20ff1ca6256009589a1675a85` is deliberately separate from this PR. +A disposable combination of the same main + #6270 witnesses + that unchanged +fixture fix passes all three original failing scenarios and the complete +settlement CLI suite: **101 passed**, no skips. Reproduce the combination from +this main baseline, the existing #6270 source-witness patch and the pinned #6285 +test-only commit; its temporary integration artifact is not a published release. +This does **not** make +current main green or authorize merging either PR. The fix observes a real +reader over synthetic absent/mismatched/then-correct manifests, verifies no +extra quota debit, and recovers the original ACK and byte-stable replay. + +The full drift readback retains F1/F2 6/26, F3 0/26, F4 4/4, F5 1/1 and F6 0/0. +The report still names 45 unresolved producer sites, including 17 that cannot +supply producer evidence; no ceiling or scan boundary is relaxed. The existing +cross-runtime value-note suite adds 46 passing cases. Generators, typecheck and +scoped quality results are part of the PR validation record. Earlier 66/564/82/706 Python and 421 TS counts +belong to the old `43173c0b8` snapshot; they are not relabeled as current results. + +
+Exact selections for the 610-Python and 448-TypeScript groups + +```sh +uv run --extra test python -m pytest -q \ + tests/test_loopx_turn_driver.py \ + tests/test_loopx_turn_executor.py \ + tests/test_loopx_turn_transaction.py \ + tests/test_loop_turn_loop_controller.py \ + tests/control_plane/test_agent_scope_frontier_contract.py \ + tests/control_plane/test_quota_run_decision.py \ + tests/control_plane/test_delivery_workspace.py \ + tests/control_plane/test_workspace_git_fact_reads.py \ + tests/control_plane/test_delivery_workspace_causality.py \ + tests/control_plane/test_delivery_workspace_causality_runtime.py \ + tests/control_plane/test_task_lease_cli_native.py \ + tests/control_plane/test_todo_completion_state_runtime.py \ + tests/control_plane/test_goal_amendment_proposal.py \ + tests/control_plane/test_goal_amendment_proposal_cli.py \ + tests/control_plane/test_goal_amendment_proposal_lifecycle.py \ + tests/control_plane/test_scheduler_state_transition_rules.py \ + tests/control_plane/test_scheduler_state_runtime_integration.py \ + tests/control_plane/test_goal_handoff_mode_cli.py \ + tests/control_plane/test_handoff_mode_source.py \ + tests/control_plane/test_delivery_continuity_selection.py \ + tests/control_plane/test_delivery_continuity_runtime.py \ + tests/control_plane/test_native_monitor_poll.py \ + tests/control_plane/test_replan_writeback_projection.py \ + tests/control_plane/test_refresh_state_replan_gate.py \ + tests/control_plane/test_final_outcome_diagnostics.py \ + tests/control_plane/test_protocol_packet_history.py \ + tests/control_plane/test_protocol_packet_retirement_cli.py \ + tests/control_plane/test_local_provider_settlement_journey.py + +node --no-warnings --experimental-sqlite --experimental-strip-types --test \ + tests/control_plane_ts/turn_settlement.test.ts \ + tests/control_plane_ts/quota_settlement_readback.test.ts \ + tests/control_plane_ts/task_lease_acquire.test.ts \ + tests/control_plane_ts/task_lease_lifecycle.test.ts \ + tests/control_plane_ts/delivery_workspace.test.ts \ + tests/control_plane_ts/settlement_workspace_causality.test.ts \ + tests/control_plane_ts/todo_completion_state.test.ts \ + tests/control_plane_ts/decision_metadata.test.ts \ + tests/control_plane_ts/decision_scope.test.ts \ + tests/control_plane_ts/goal_amendment_proposal.test.ts \ + tests/control_plane_ts/scheduler_state_transition_rules.test.ts \ + tests/control_plane_ts/handoff_mode_plan.test.ts \ + tests/control_plane_ts/delivery_continuity.test.ts \ + tests/control_plane_ts/delivery_history.test.ts \ + tests/control_plane_ts/action_selection_admission.test.ts \ + tests/control_plane_ts/interaction_contract.test.ts +``` + +
## Integrated state and closure boundary @@ -149,10 +233,13 @@ visible; all-field retirement is not a closure condition. #5317 supplies the separate #4743 development-time advisory, so the old “never built/no AGENTS instruction” claim is obsolete. Advisory findings do not become blocking proof. -The later typed-failure repair #6251 and canonical-selection repair #6268 are open -at this measurement and are not folded into this baseline’s results. #6260 is -merged. They do not expand #4447’s accepted closing scope. Full source disposition, -maintainer acceptance and one final integrated readback still precede closure; -installed frontend/Lark/live-model and general Goal/team qualification are not -claimed by this source-evidence batch. No production provider or persistence -format is changed; raw runtime logs and local Goal state stay outside the repo. +The current baseline includes #6251 typed-failure and #6268 canonical-selection +repairs, #6260 shared consistency, #6290 legacy-work-basis repair and #6313 source +disposition. These resolve named code/meaning gaps; they do not extend #4447's +original closure scope. The source witness additions in #6270 and ACK fixture +repair in #6285 remain proposed until merged. Current main still has the three +failures above, so Stage 3 and the issue remain open. Final owner closeout must +name a single integrated revision and its passed/failed/untested evidence. +Installed frontend/Lark/live-model, general Goal/team qualification and blanket +F6 proof are outside this tracker. No production provider, permission or +persistence format changes here; raw logs and local Goal state stay private. diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md index 88f91314dd..cb17df7a06 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md @@ -1,9 +1,11 @@ # 当前集成主线上的登记来源处理 -复核基线:`43173c0b8c8761abee4cdddc665f0f0f20f194f7`(2026-10-12)。 -本记录推进 #4447 既有 2a/2b/2c,不改变范围、扫描登记、预算或运行时行为。 -[分阶段范围修订 #4789](https://github.com/loopx-project/loopx/pull/4789) 已合入, -交付验收及下方两项含义决策仍开放。**列出 26 行不等于 26 项 producer 证明或 tracker 关闭。** +当前运行时代码基线:`509c38c502d3d0b4eafb01550efcdc4b5b5a1d17`(2026-10-13)。 +本次在结算失败、选择、旧工作基线及保留值处置合入后,更新既有 #6270 清单。 +候选的 `loopx/`、`apps/`、`packages/` 生产树与此 main 完全相同,只增加既有见证和记录。 +验收仍沿 [#4789 分阶段范围](https://github.com/loopx-project/loopx/pull/4789)。 +**26 行清单不是 26 项正式 producer 证明,也不是 tracker 关闭。** 来源清单 PR、独立的 +#6285 宿主观察 fixture 修复仍需集成,并由 owner 完成最终验收。 注册表仍为 26 项,已用实际 `task_lease_lifecycle_operation` 替换退休的 `lease_action`。 F1/F2 仍是 **6/26**:五项 kernel 和 settlement-binding witness。其余二十项跨运行时 @@ -26,7 +28,7 @@ local-only 来避开责任。本记录不证明全程序可达性、数据流或 | settlement_binding_kind | `effect_program.ts::settlementIdentity` → binding_kind | 对输入身份做内部归一化;既有 binding witness 执行 Todo、replan、unbound 及矛盾组合。 | unbound 不允许扣费;精确身份仍由回执 owner 验证。 | | task_lease_lifecycle_operation | `work_items/task_lease_lifecycle_request.ts` → operation | 调用方选择的 native 输入。lifecycle 测试执行六种操作、非法输入、CAS 与重试。 | 替换退休的私有 lease_action,不删除租约行为;保留 fence 历史字段缺省,不计入 F1/F2。 | | settlement_step_kind | `effect_program.ts`, `turn_driver/settlement.ts` → receipts[].step_kind | 内部回执构造 + 外部 envelope 输入。2a 在无 callback 的已提交回放中产生四类 step,并拒绝非法输入。 | 保留顺序前缀、effect 身份与历史回执;注入 step 只证明解码。 | -| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | 内部失败 + 接受的 envelope 输入。2a 覆盖 12 个 wire 值、真实 unbound guard 读取及 native 权限拒绝。 | cancelled 的来源用途仍待下方处理。租约摘要使用 failure.step,Effect envelope 使用 failure.step_kind,不能伪造 wire 转换。 | +| settlement_failure_kind | `effect_program.ts`, `quota/settlement_readback.ts`, native lease owners → failure kind | 内部失败 + 接受的 envelope 输入。2a 覆盖 12 个 wire 值、真实 unbound guard 读取及 native 权限拒绝。 | cancelled 已有下方 reader 保留范围与退出条件,不声称内部 producer 或历史使用。租约摘要使用 failure.step,Effect envelope 使用 failure.step_kind,不能伪造 wire 转换。 | | receipt_bound_monitor_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → monitor_phase | 从精确 monitor commit 内部派生;2a 执行 poll_due/settled、错误身份和旧 monitor effect id。 | settlement_pending 仅有 consumer 兼容证据,实际 builder 不产生;迁移历史 work-lane reader 后才可删除。 | | receipt_bound_replay_phase | `quota/settlement_readback.ts` → `settlement_phase.ts` → replay_phase | 从隔离回执文件和完成/写回/扣费前缀内部派生三种 phase;重复读取与身份负例经过 bridge。 | 保留 terminal-to-replay 适配与原绑定;phase 投影不证明所有持久 writer 正确提交。 | | delivery_workspace_kind | `agents/workspace_guard.py::capture_delivery_workspace` → TS snapshot | 真实 Git/文件观察 + snapshot 输入;主 checkout、linked worktree、本地 Goal 与 TS normalization 覆盖三类及非法 origin。 | 保留 v0 Git snapshot;不能把 Git 缺失/读取失败转换成本地 Goal 授权。 | @@ -34,7 +36,7 @@ local-only 来避开责任。本记录不证明全程序可达性、数据流或 | delivery_workspace_requirement | `quota/settlement_workspace_causality.ts` → requirement | 根据明确工作合同内部派生 required/not_required/unknown;覆盖写入、非交付、缺元数据和事件读取。 | unknown 必须修复;无工作区的旧结算例外需要精确且完整的 validation/writeback 回执,部分或错 Todo 不通过。 | | todo_completion_continuation | `todos/completion_state.ts::selectTodoCompletionState` → continuation | 根据 intent/Todo 内部选择 active_goal/successor/no_followup,同时读取持久 metadata;完整 owner 与非法 authority 测试执行。 | 后继与 no_followup 矛盾时拒绝;保留 metadata normalization,退休的标量 RPC 仍拒绝。 | | todo_completion_recovery | `todos/completion_state.ts` → recovery | 根据已完成 Todo、关闭 intent 和 identity source 派生两类 terminal recovery;固定及显式 lifecycle 用例覆盖。 | 不重写原完成身份、不创建后继;null 表示没有恢复,与恢复类别分开。 | -| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | 作者声明输入,无自动分类 producer。七类输入见证、非法值、真实 CLI 和精确 kind dominance 测试执行 reader。 | other 作者何时选择仍待下方处理。接纳不授予权限;保留旧 standing-scope codec。 | +| todo_decision_scope_kind | `todos/decision_metadata.ts::normalizeTodoDecisionScope` → kind | 作者声明输入,无自动分类 producer。七类输入见证、非法值、真实 CLI 和精确 kind dominance 测试执行 reader。 | other 已按下方 custom authority 规则编写,不能作为未知输入的 fallback。接纳不授予权限;保留旧 standing-scope codec。 | | todo_decision_scope_granularity | `todos/decision_metadata.ts` → granularity; `decision_scope.ts` → dominance | 作者声明五级输入,显式 domain 与未知/null/数字负例,加 CLI/dominance 用例。 | 更宽 scope 不能跨 kind 或覆盖精确目标/接收者冲突;不由有界视图推断缺失 scope。 | | goal_amendment_class | `goals/goal_amendment_proposal.ts` → proposal.amendment_class | 作者按 RFC 声明四类;全类别/未知类别测试与真实 submit/list CLI 提供输入和 journal 证据。 | admission 是 canonical_effect=none 的提案事实,不是共享变更提交或 protected authority 委托。 | | goal_amendment_proposal_admission | `goals/goal_amendment_proposal.ts::admissionOutcome` → admission | 根据当前 basis、sequence、digest 内部产生 admitted/needs_rebase;相等/过期/未来/canonical/Markdown 情况经过 TS 与 CLI journal。 | 保留过期提案供 rebase,拒绝虚构未来历史;admitted 不等于变更获准。 | @@ -45,23 +47,29 @@ local-only 来避开责任。本记录不证明全程序可达性、数据流或 | delivery_outcome | `work_items/delivery_outcome.ts`, monitor/Host/replan producers → outcome | 作者声明 + 机器选择:monitor/Host 产生 surface_only/progress,replan 可降级 outcome_gap;primary_goal_outcome 是作者主张。history/monitor/executor/replan/diagnostic 测试覆盖。 | decoder/claim 检查不独立证明主目标已实现;历史矛盾主张被诊断,不改写为成功。 | | delivery_continuity_preemption | `quota/should_run_packet.py::_delivery_preemptions_for_route` → `turn_driver/delivery_continuity.ts` | guard 内部事实 + typed 输入:回执、阻塞 lane、replan、repair、拒绝交付;continuity route/selection 测试覆盖抢占与后续重选。 | 继续旧交付不能覆盖当前抢占;其他 qualifier 的同形字符串不自动归此词表,不改绑旧回执。 | -## 两项待 owner 处置的含义 - -- **`settlement_failure_kind.cancelled`:Effect/settlement owner。** 公开的 - `SettlementResult.failed(...).bind(...)` 接受它并短路后续步骤,但核对 settlement - owner、枚举成员引用和调用方,仍没有内部取消 producer。chat/Host/usage 中的 - cancellation 属于不同词表。decoder 证明 wire 处理,不回答谁可在何时产生。 - 保留现有 unresolved value note。关闭需要找到具体取消合同/producer 并执行见证, - 或单独评审明确的 reserved/compatibility-only 范围和退出条件;本批不虚构 producer, - 也不自动批准这个例外。 -- **`todo_decision_scope_kind.other`:Todo decision-scope owner。** 真实 parser 接受它, - 精确 kind 匹配阻止它覆盖具名 kind;没有把未知输入转成 other 的 fallback,非法值被拒绝。 - 现有公开协议只列枚举,没有作者选择准则,catalog 的六类 authority 也不能补出含义。 - 保留 unresolved note。关闭需要明确的作者使用合同/例子,或获评审的兼容保留/迁移决定; - membership 测试不能代替 owner 决定产品含义。 - -以上是**未解决且未获批准的例外**,继续阻止 Stage 2/3 关闭。不能用统一来源标签或 -绿色测试替代这两个决定。 +## 两项原未决含义的当前处置 + +[#6313](https://github.com/loopx-project/loopx/pull/6313) 获得 `loopx-agent` 在精确 +head 上的 `APPROVED` 评审,并由 `huangruiteng` 合入 +`d3f84dced555b7fa8bdffa33b750de6b1b3ea968`。下面规则已经进入 canonical registry 和 +协议。这是具体的评审及 owner 集成记录,不补造人类评审、取消实现或整个 tracker +验收。[原处置记录](2026-10-12-reserved-value-disposition.zh-CN.md) 保留提案时基线。 + +- **`settlement_failure_kind.cancelled`:Effect/settlement owner。** 保留已接纳的 + reader-reserved 失败输入;保留此前回执/细节,短路后续 callback。它不证明在途 + provider 已停止,不抹除已提交步骤,也不授予 retry/rollback/resume/quota 权限。 + 仍没有已识别的内置取消 producer 或历史实际使用证明。退出须经过 owner 评审的 + typed cancellation 合同与真实因果见证,或带 stored/caller 兼容证据的版本化 reader + 迁移;不自动过期、不虚构生产者。 +- **`todo_decision_scope_kind.other`:Todo decision-scope owner。** 只在六种具名 + kind 均不能表达具体自定义审批时,由作者明确选择;不知道该选什么不是理由。 + Task 文本解释审批,稳定公开安全的 key 连接 gate 和工作。仍执行原 exact-kind、key、 + granularity、recipient 和 target 规则,`other:global:*` 也不能覆盖具名权限;未知 + 输入仍拒绝。[编写合同](../../../../reference/protocols/decision-scope-v0.md#choosing-kindother) + 已提供准则和例子。 + +原先缺少使用规则的问题不再写成当前含义未知;输入和兼容处置仍不获得内部 producer +证明。#4447 仍须完成来源清单集成与最终版本验收,不能仅凭这份处置已合并就关闭。 ## 证据与复跑 @@ -77,23 +85,94 @@ Python 命令为 `uv run --extra test python -m pytest -q <所列文件>`;TS 2a 新增的 unbound guard 通过真实临时文件读取、TS owner 和 Python bridge;排除 owner 用例执行真实 native lease 拒绝并验证无租约写入。外部失败输入现在显式覆盖 12 值, registry 对比只防止新值遗漏其 witness,不把枚举遍历升级为 producer 证明。 -新增 scope kind/granularity 输入用例也不解决 other 的作者含义。预期来自接受的合同和 +scope kind/granularity 用例是输入见证;other 的作者选择遵循当前协议。预期来自接受的合同和 独立因果场景,而非回显 owner 结果。 -该源码基线加本批聚焦见证:2a **66 passed**,既有 Python 领域组 **564 passed**, -补充真实 Git/monitor/replan/lease 组 **82 passed**,native TS 组 **421 passed**、无 skip。 -TS typecheck、聚焦 Ruff、两个生成器及完整 semantic drift 通过。以上是源码/隔离后端 -证据,不是安装端或真实模型验收。drift 仍为 F1/F2 6/26、F3 0/26、F4 4/4、F5 1/1、 -F6 0/0;45 个 producer site 未解析,其中 17 个无法提供 producer 见证。 -没有放宽任何上限或扫描边界。既有 semantic architecture/value-note 组另有 -**706 passed**,docs governance 和 premerge 通过。RFC status 索引仅更新 ledger -条目数,不据此改变交付成熟度。 - -已知集成边界:复用同一不可变主线上的独立复现结果,`test_quota_settlement_cli.py` -的三个用例(普通结算及两种 Todo-less replan)在 scheduler ACK 失败。fixture 没有 -#6259 要求的当前宿主观察,owner 返回 `rrule_mismatch` 且不写 scheduler 状态。 -它们不在上述通过组中,本次文档批次未重跑;完整 CLI suite 的这个缺口仍开放, -不通过放宽规则或断言消除。 +### 当前执行结果 + +在上述 main 运行时代码加来源见证上,以 Python 3.11.7、合格 Node 22.22.3 执行: + +| 组 | 结果 | 含义 | +| --- | --- | --- | +| 前述 28 个 Python 领域文件:Turn/frontier/workspace/Todo/amendment/scheduler/handoff/continuity/history/local-provider | 610 passed | 真实领域 owner,含隔离 Git/File/SQLite;不证明真实模型或 Host 定时器。 | +| `tests/architecture/test_semantic*.py` | 660 passed | scanner/registry/owner/兼容契约,不是全程序生产证明。 | +| 前述 TS 组,另含 action-selection admission 与 interaction contract | 448 passed,无 skip | 类型化来源和消费边界,不是 PostgreSQL 或部署端资格。 | +| 完整 settlement CLI、decision-scope CLI/consistency/lifecycle 与 2a 见证 | 206 passed,**3 failed** | 主干的三个原始 ACK 场景仍缺真实的合成宿主观察。 | + +失败仍是 `tests/control_plane/test_quota_settlement_cli.py` 的 +`test_standard_codex_app_settlement_is_receipted_and_idempotent` 和两个 +`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` 变体。 +它们收到 `rrule_mismatch`,没有 scheduler 写入;主干后续 CI 更正没有解决这三个 +用例。没有放宽规则或删除断言。 + +既有 [#6285](https://github.com/loopx-project/loopx/pull/6285) 的 +`277dab815eb8dba20ff1ca6256009589a1675a85` 修复仍独立于本 PR。在隔离组合中,将 +同一 main + #6270 见证加上这份未改动的 fixture 修复,三个原失败场景和完整 settlement +CLI 均通过:**101 passed**,无 skip。可由上述 main、既有 #6270 来源见证补丁和固定的 +#6285 纯测试提交复现组合;临时集成产物不是已发布版本。 +**不能据此把当前 main 写成通过,也不授予两个 PR 的合并权。** 修复让真实 reader 读取合成的 absent/mismatched/正确 manifest, +验证无额外扣费,再恢复原 ACK 和字节稳定的 replay。 + +完整 drift 仍保留 F1/F2 6/26、F3 0/26、F4 4/4、F5 1/1、F6 0/0;未知 producer +站点继续显式报告:45 个未解析,其中 17 个不能提供 producer 证据;不放宽上限或扫描 +边界。既有跨运行时 value-note 组另有 46 项通过;生成器、typecheck 和对应质量检查 +在 PR 验证记录中披露。旧 66/564/82/706 Python、421 TS 数字属于 `43173c0b8` +历史截面,不重新贴成当前结果。 + +
+610 项 Python 与 448 项 TypeScript 组的精确选集 + +```sh +uv run --extra test python -m pytest -q \ + tests/test_loopx_turn_driver.py \ + tests/test_loopx_turn_executor.py \ + tests/test_loopx_turn_transaction.py \ + tests/test_loop_turn_loop_controller.py \ + tests/control_plane/test_agent_scope_frontier_contract.py \ + tests/control_plane/test_quota_run_decision.py \ + tests/control_plane/test_delivery_workspace.py \ + tests/control_plane/test_workspace_git_fact_reads.py \ + tests/control_plane/test_delivery_workspace_causality.py \ + tests/control_plane/test_delivery_workspace_causality_runtime.py \ + tests/control_plane/test_task_lease_cli_native.py \ + tests/control_plane/test_todo_completion_state_runtime.py \ + tests/control_plane/test_goal_amendment_proposal.py \ + tests/control_plane/test_goal_amendment_proposal_cli.py \ + tests/control_plane/test_goal_amendment_proposal_lifecycle.py \ + tests/control_plane/test_scheduler_state_transition_rules.py \ + tests/control_plane/test_scheduler_state_runtime_integration.py \ + tests/control_plane/test_goal_handoff_mode_cli.py \ + tests/control_plane/test_handoff_mode_source.py \ + tests/control_plane/test_delivery_continuity_selection.py \ + tests/control_plane/test_delivery_continuity_runtime.py \ + tests/control_plane/test_native_monitor_poll.py \ + tests/control_plane/test_replan_writeback_projection.py \ + tests/control_plane/test_refresh_state_replan_gate.py \ + tests/control_plane/test_final_outcome_diagnostics.py \ + tests/control_plane/test_protocol_packet_history.py \ + tests/control_plane/test_protocol_packet_retirement_cli.py \ + tests/control_plane/test_local_provider_settlement_journey.py + +node --no-warnings --experimental-sqlite --experimental-strip-types --test \ + tests/control_plane_ts/turn_settlement.test.ts \ + tests/control_plane_ts/quota_settlement_readback.test.ts \ + tests/control_plane_ts/task_lease_acquire.test.ts \ + tests/control_plane_ts/task_lease_lifecycle.test.ts \ + tests/control_plane_ts/delivery_workspace.test.ts \ + tests/control_plane_ts/settlement_workspace_causality.test.ts \ + tests/control_plane_ts/todo_completion_state.test.ts \ + tests/control_plane_ts/decision_metadata.test.ts \ + tests/control_plane_ts/decision_scope.test.ts \ + tests/control_plane_ts/goal_amendment_proposal.test.ts \ + tests/control_plane_ts/scheduler_state_transition_rules.test.ts \ + tests/control_plane_ts/handoff_mode_plan.test.ts \ + tests/control_plane_ts/delivery_continuity.test.ts \ + tests/control_plane_ts/delivery_history.test.ts \ + tests/control_plane_ts/action_selection_admission.test.ts \ + tests/control_plane_ts/interaction_contract.test.ts +``` + +
## 集成状态与关闭边界 @@ -103,7 +182,10 @@ F6 0/0;45 个 producer site 未解析,其中 17 个无法提供 producer 见 投影;其余五个旧字段继续可见,全字段退休不是关闭前提。#5317 已交付独立 #4743 的 开发期 advisory,因此旧“从未实现/AGENTS 没有指引”说法过期;advisory 仍不阻断或证明语义。 -本次测量时,后续 typed-failure 修复 #6251 与 canonical-selection 修复 #6268 尚未合入, -不能算入该基线;#6260 已合入。它们不扩大 #4447 原关闭范围。完整来源处置、维护者验收 -及最终单一集成版本读回仍是关闭前提。本批不声称安装前端/Lark、真实模型或完整 Goal/团队 -验收;不改变生产 provider/持久格式,原始日志及本地 Goal 状态不进入仓库。 +当前基线已包含 #6251 typed-failure、#6268 canonical-selection、#6260 shared +consistency、#6290 legacy-work-basis 及 #6313 含义处置。它们消除了具体代码/含义 +缺口,不扩大 #4447 原关闭范围。#6270 来源见证和 #6285 ACK fixture 修复仍待合入; +当前 main 仍有上述三项失败,所以 Stage 3 与 issue 继续开放。最终 owner 验收须点名 +单一集成 revision 及其 passed/failed/untested 边界。安装前端/Lark、真实模型、完整 +Goal/团队资格和通用 F6 不属本 tracker;本次不改生产 provider/权限/持久格式,日志及 +本地 Goal 状态保留在私有位置。 diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md index e89e8dd90f..8d054b12dc 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md @@ -1046,11 +1046,11 @@ are merged witnesses, not pending proposals. #5317 supplies the separate #4743 development-time advisory; it does not close this tracker's source obligations. The [current registered-source inventory](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md) -records all 26 entries, executed evidence, compatibility boundaries and two -unresolved meanings. F1/F2 remain 6/26; source treatment does not inflate their -producer domain. Final owner disposition and integrated delivery acceptance -remain open; F6-wide proof is not claimed. Milestone rows below retain their -acceptance obligations, while dated historical measurements keep their own SHA. +records all 26 entries, current-main evidence and compatibility boundaries. +The owner merged both source-meaning dispositions in #6313; source-inventory +integration, #6285 ACK fixture repair and final single-revision acceptance +remain open. F1/F2 stays 6/26, with no source-domain inflation or F6-wide claim. +Milestone obligations and historical measurements retain their original scope/SHA. | Milestone | Shipped behavior | Entry gate | Exit evidence | Rollback | | --- | --- | --- | --- | --- | diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md index 5222f51197..031333dfc2 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md @@ -840,9 +840,9 @@ controller 消费。Stage 1 的 composition/replay/selection/inbox 及交叠 #47 不替代本 tracker 的来源义务。 [当前登记来源清单](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md) -列出 26 项、执行证据、兼容边界及两项未决含义。F1/F2 仍为 6/26,来源处理不抬高 producer -证明范围。owner 处置和最终集成交付验收仍开放,不声称通用 F6 证明;下表保留各里程碑 -验收义务,历史测量继续保留原 SHA。 +列出 26 项、当前主干上的执行证据及兼容边界。#6313 的两项含义处置已由 owner 合入; +来源清单、#6285 的 ACK fixture 修复和最终单一版本验收仍待集成。F1/F2 保持 6/26, +不抬高 producer 范围或声称通用 F6;历史测量保留原 SHA,下表验收义务不变。 | 里程碑 | 交付行为 | 进入门 | 退出证据 | 回滚 | | --- | --- | --- | --- | --- | From 492a7e970f9f739bf0b5b4435b34337866808dfe Mon Sep 17 00:00:00 2001 From: song Date: Tue, 13 Oct 2026 13:51:54 +0800 Subject: [PATCH 4/4] docs(semantics): retire resolved ACK blocker from integrated acceptance Signed-off-by: song --- docs/architecture/rfcs/STATUS.md | 2 +- docs/architecture/rfcs/STATUS.zh-CN.md | 2 +- .../2026-10-12-registered-source-treatment.md | 88 ++++++++++++------- ...10-12-registered-source-treatment.zh-CN.md | 73 +++++++++------ .../semantic-vocabulary-convergence-v0.md | 7 +- ...emantic-vocabulary-convergence-v0.zh-CN.md | 3 +- .../decision_metadata.test.ts | 4 +- 7 files changed, 116 insertions(+), 63 deletions(-) diff --git a/docs/architecture/rfcs/STATUS.md b/docs/architecture/rfcs/STATUS.md index e59f7ace37..ab35913d88 100644 --- a/docs/architecture/rfcs/STATUS.md +++ b/docs/architecture/rfcs/STATUS.md @@ -61,7 +61,7 @@ appendix may keep dated history, but no dated log heading may precede it. | [RFC: Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.md) | Accepted | none | — | | [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | Accepted | none | — | | [RFC: Research Exploration Control Plane v0](research-exploration-control-plane-v0.md) | Accepted | none | — | -| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [6 entries](ledger/semantic-vocabulary-convergence-v0/) | +| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [7 entries](ledger/semantic-vocabulary-convergence-v0/) | | [RFC: Shared Goal Alignment and Governed Amendment Protocol (v0)](shared-goal-alignment-and-governed-amendment-v0.md) | Accepted | none | [2 entries](ledger/shared-goal-alignment-and-governed-amendment-v0/) | | [RFC: LoopX Shared Control-Plane Authority and Pluggable State Providers (v0)](shared-goal-authority-state-provider-v0.md) | Accepted | none | [24 entries](ledger/shared-goal-authority-state-provider-v0/) | | [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | Accepted | none | — | diff --git a/docs/architecture/rfcs/STATUS.zh-CN.md b/docs/architecture/rfcs/STATUS.zh-CN.md index 2a887bc2dc..223877626c 100644 --- a/docs/architecture/rfcs/STATUS.zh-CN.md +++ b/docs/architecture/rfcs/STATUS.zh-CN.md @@ -58,7 +58,7 @@ | [RFC:Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.zh-CN.md) | 已接受 | 无 | — | | [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | 已接受 | none | — | | [RFC:研究型探索控制面 v0](research-exploration-control-plane-v0.zh-CN.md) | 已接受 | 无 | — | -| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [6 条](ledger/semantic-vocabulary-convergence-v0/) | +| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [7 条](ledger/semantic-vocabulary-convergence-v0/) | | [RFC:共享 Goal 对齐与受治理 Amendment 协议(v0)](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md) | 已接受 | 无 | [2 条](ledger/shared-goal-alignment-and-governed-amendment-v0/) | | [RFC:LoopX 共享控制面权威与可插拔状态 Provider(v0)](shared-goal-authority-state-provider-v0.zh-CN.md) | 已接受 | 无 | [24 条](ledger/shared-goal-authority-state-provider-v0/) | | [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | 已接受 | none | — | diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md index 1ba5c364c0..83e0d5e3e3 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md @@ -1,14 +1,16 @@ # Registered source treatment at the integrated main baseline -Current runtime baseline: `509c38c502d3d0b4eafb01550efcdc4b5b5a1d17` (2026-10-13). +Current runtime baseline: `60d833b13c85135587b725013b247e827663ffb9` (2026-10-13). This updates the existing #6270 inventory after the typed-failure, selected-work, legacy-work-basis and reserved-value changes reached main. The production `loopx/`, `apps/` and `packages/` trees in this source-evidence candidate are identical to that main; only its existing witnesses and records are added. The [staged scope revision](https://github.com/loopx-project/loopx/pull/4789) remains the acceptance boundary. **26 rows inventoried is not 26 formal producer -proofs or tracker closure.** The source-inventory PR and the separate #6285 -Host-observation fixture repair still need integration and final owner closeout. +proofs or tracker closure.** The source-inventory PR still needs integration +and final owner closeout. The original three Host-ACK fixture failures have +already been repaired on main through #6344; #6285 is not an additional merge +prerequisite for those same cases. The registry still contains 26 entries, including `task_lease_lifecycle_operation` in place of retired `lease_action`. F1/F2 remain **6/26**: five kernel entries @@ -137,38 +139,47 @@ Python 3.11.7 and qualified Node 22.22.3: | Group | Result | Meaning | | --- | --- | --- | | Existing Turn/frontier/workspace/Todo/amendment/scheduler/handoff/continuity/history and local-provider paths (28 Python files listed above) | 610 passed | Actual domain owners, including isolated Git/File/SQLite paths; no live model or Host timer claim. | -| Semantic architecture (`tests/architecture/test_semantic*.py`) | 660 passed | Scanner/registry/owner/compatibility contracts, not whole-program production proof. | +| Semantic architecture plus `test_cross_runtime_value_notes.py` | 706 passed | Scanner/registry/owner/value-note/compatibility contracts, not whole-program production proof. | | Native TypeScript (the listed suites plus action-selection admission and interaction contract) | 448 passed, no skips | Typed source and consumer boundaries; not a PostgreSQL or deployed-App qualification. | -| Full settlement CLI plus decision-scope CLI/consistency/lifecycle and Stage 2a source witnesses | 206 passed, **3 failed** | The three original current-Host ACK scenarios still lack their actual synthetic Host observation on main. | +| Full settlement CLI plus decision-scope CLI/consistency/lifecycle and Stage 2a source witnesses | 209 passed, no skips | The three original Host-ACK cases now pass on current main code; source-witness additions remain in this PR. | +| Current-main monitor unavailable-recovery, closeout and target-key replay | 52 passed | Real affected owner paths supplement the changed readback boundary; no live Host timer or deployed recovery claim. | -The failing tests are +The original failing tests — `test_standard_codex_app_settlement_is_receipted_and_idempotent` and both -`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` variants in -`tests/control_plane/test_quota_settlement_cli.py`. They still receive -`rrule_mismatch` and no scheduler write. Main's later CI qualification changes -do not resolve these cases. No rule or assertion was weakened. - -The existing [#6285](https://github.com/loopx-project/loopx/pull/6285) fix at -`277dab815eb8dba20ff1ca6256009589a1675a85` is deliberately separate from this PR. -A disposable combination of the same main + #6270 witnesses + that unchanged -fixture fix passes all three original failing scenarios and the complete -settlement CLI suite: **101 passed**, no skips. Reproduce the combination from -this main baseline, the existing #6270 source-witness patch and the pinned #6285 -test-only commit; its temporary integration artifact is not a published release. -This does **not** make -current main green or authorize merging either PR. The fix observes a real -reader over synthetic absent/mismatched/then-correct manifests, verifies no -extra quota debit, and recovers the original ACK and byte-stable replay. +`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` variants — +now pass individually and in the full group above. The relevant production and +settlement CLI test files equal main. Commit +`db5a298a54f47179b9be2a3b9cf2f775b71a9274` +([#6344](https://github.com/loopx-project/loopx/pull/6344)) supplied the missing +synthetic Host observation; the Todo-less scenarios also retain absent and +mismatched manifest refusals, no scheduler write and the original single debit. +The ordinary scenario still refuses the superseded Turn before acknowledging +the current one. Original ACK, persisted scheduler state and byte-stable replay +assertions pass without relaxing the Host-readback rule. + +[#6285](https://github.com/loopx-project/loopx/pull/6285) remains a separate open +proposal at `f6c8aae7a7e8ba917861992a1ad21eb29477bf26`. Its current diff still adds +shared fixture setup, extra ordinary-Turn absent/mismatched cases and explicit +applied-RRULE readback; it is not byte-identical to main or reported as merged. +Those remaining changes do not make the original three main failures recur. +Do not duplicate its patch here or require another merge merely to count the +same fixture repair twice. + +Historical results remain tied to their original snapshots: main +`509c38c502d3d0b4eafb01550efcdc4b5b5a1d17` had 206 passed / 3 failed in this group, +and a separate combination with the then-current #6285 fixture passed the +101-test settlement CLI suite. They are superseded for current acceptance by +the current-main-runtime results above, not rewritten as earlier successes. The full drift readback retains F1/F2 6/26, F3 0/26, F4 4/4, F5 1/1 and F6 0/0. The report still names 45 unresolved producer sites, including 17 that cannot -supply producer evidence; no ceiling or scan boundary is relaxed. The existing -cross-runtime value-note suite adds 46 passing cases. Generators, typecheck and +supply producer evidence; no ceiling or scan boundary is relaxed. The cross-runtime value-note cases are included in the 706-case group above, +not an additional coverage count. Generators, typecheck and scoped quality results are part of the PR validation record. Earlier 66/564/82/706 Python and 421 TS counts belong to the old `43173c0b8` snapshot; they are not relabeled as current results.
-Exact selections for the 610-Python and 448-TypeScript groups +Exact selections for the current evidence groups ```sh uv run --extra test python -m pytest -q \ @@ -201,7 +212,7 @@ uv run --extra test python -m pytest -q \ tests/control_plane/test_protocol_packet_retirement_cli.py \ tests/control_plane/test_local_provider_settlement_journey.py -node --no-warnings --experimental-sqlite --experimental-strip-types --test \ +node --no-warnings --experimental-sqlite --experimental-strip-types --test --test-concurrency=1 \ tests/control_plane_ts/turn_settlement.test.ts \ tests/control_plane_ts/quota_settlement_readback.test.ts \ tests/control_plane_ts/task_lease_acquire.test.ts \ @@ -218,6 +229,22 @@ node --no-warnings --experimental-sqlite --experimental-strip-types --test \ tests/control_plane_ts/delivery_history.test.ts \ tests/control_plane_ts/action_selection_admission.test.ts \ tests/control_plane_ts/interaction_contract.test.ts + +uv run --extra test python -m pytest -q \ + tests/control_plane/test_quota_settlement_cli.py \ + tests/control_plane/test_todo_decision_scope_cli_validation.py \ + tests/control_plane/test_todo_decision_scope_consistency.py \ + tests/control_plane/test_todo_decision_scope_lifecycle.py \ + tests/architecture/test_settlement_receipt_source_boundaries.py + +uv run --extra test python -m pytest -q \ + tests/architecture/test_semantic*.py \ + tests/architecture/test_cross_runtime_value_notes.py + +uv run --extra test python -m pytest -q \ + tests/control_plane/test_monitor_poll_unavailable_recovery.py \ + tests/control_plane/test_monitor_unavailable_closeout_cli.py \ + tests/control_plane/test_monitor_target_key_replay.py ```
@@ -236,10 +263,11 @@ instruction” claim is obsolete. Advisory findings do not become blocking proof The current baseline includes #6251 typed-failure and #6268 canonical-selection repairs, #6260 shared consistency, #6290 legacy-work-basis repair and #6313 source disposition. These resolve named code/meaning gaps; they do not extend #4447's -original closure scope. The source witness additions in #6270 and ACK fixture -repair in #6285 remain proposed until merged. Current main still has the three -failures above, so Stage 3 and the issue remain open. Final owner closeout must -name a single integrated revision and its passed/failed/untested evidence. +original closure scope. The original Host-ACK blocker is resolved in main; +the additional source witnesses and inventory in #6270 are still proposed. +Stage 3 and the issue remain open for that integration and final owner closeout +on one revision with explicit passed/failed/untested evidence. A remaining +#6285 enhancement is not a new closure condition for this tracker. Installed frontend/Lark/live-model, general Goal/team qualification and blanket F6 proof are outside this tracker. No production provider, permission or persistence format changes here; raw logs and local Goal state stay private. diff --git a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md index cb17df7a06..de06f781ef 100644 --- a/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md +++ b/docs/architecture/rfcs/ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md @@ -1,11 +1,12 @@ # 当前集成主线上的登记来源处理 -当前运行时代码基线:`509c38c502d3d0b4eafb01550efcdc4b5b5a1d17`(2026-10-13)。 +当前运行时代码基线:`60d833b13c85135587b725013b247e827663ffb9`(2026-10-13)。 本次在结算失败、选择、旧工作基线及保留值处置合入后,更新既有 #6270 清单。 候选的 `loopx/`、`apps/`、`packages/` 生产树与此 main 完全相同,只增加既有见证和记录。 验收仍沿 [#4789 分阶段范围](https://github.com/loopx-project/loopx/pull/4789)。 -**26 行清单不是 26 项正式 producer 证明,也不是 tracker 关闭。** 来源清单 PR、独立的 -#6285 宿主观察 fixture 修复仍需集成,并由 owner 完成最终验收。 +**26 行清单不是 26 项正式 producer 证明,也不是 tracker 关闭。** 来源清单 PR 仍需 +集成并由 owner 完成最终验收。原先三个 Host-ACK fixture 失败已由 #6344 在主干修复; +不再把另合一次 #6285 当作这些场景通过的前提。 注册表仍为 26 项,已用实际 `task_lease_lifecycle_operation` 替换退休的 `lease_action`。 F1/F2 仍是 **6/26**:五项 kernel 和 settlement-binding witness。其余二十项跨运行时 @@ -95,32 +96,38 @@ scope kind/granularity 用例是输入见证;other 的作者选择遵循当前 | 组 | 结果 | 含义 | | --- | --- | --- | | 前述 28 个 Python 领域文件:Turn/frontier/workspace/Todo/amendment/scheduler/handoff/continuity/history/local-provider | 610 passed | 真实领域 owner,含隔离 Git/File/SQLite;不证明真实模型或 Host 定时器。 | -| `tests/architecture/test_semantic*.py` | 660 passed | scanner/registry/owner/兼容契约,不是全程序生产证明。 | +| `tests/architecture/test_semantic*.py` 与 `test_cross_runtime_value_notes.py` | 706 passed | scanner/registry/owner/value-note/兼容契约,不是全程序生产证明。 | | 前述 TS 组,另含 action-selection admission 与 interaction contract | 448 passed,无 skip | 类型化来源和消费边界,不是 PostgreSQL 或部署端资格。 | -| 完整 settlement CLI、decision-scope CLI/consistency/lifecycle 与 2a 见证 | 206 passed,**3 failed** | 主干的三个原始 ACK 场景仍缺真实的合成宿主观察。 | - -失败仍是 `tests/control_plane/test_quota_settlement_cli.py` 的 -`test_standard_codex_app_settlement_is_receipted_and_idempotent` 和两个 -`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` 变体。 -它们收到 `rrule_mismatch`,没有 scheduler 写入;主干后续 CI 更正没有解决这三个 -用例。没有放宽规则或删除断言。 - -既有 [#6285](https://github.com/loopx-project/loopx/pull/6285) 的 -`277dab815eb8dba20ff1ca6256009589a1675a85` 修复仍独立于本 PR。在隔离组合中,将 -同一 main + #6270 见证加上这份未改动的 fixture 修复,三个原失败场景和完整 settlement -CLI 均通过:**101 passed**,无 skip。可由上述 main、既有 #6270 来源见证补丁和固定的 -#6285 纯测试提交复现组合;临时集成产物不是已发布版本。 -**不能据此把当前 main 写成通过,也不授予两个 PR 的合并权。** 修复让真实 reader 读取合成的 absent/mismatched/正确 manifest, -验证无额外扣费,再恢复原 ACK 和字节稳定的 replay。 +| 完整 settlement CLI、decision-scope CLI/consistency/lifecycle 与 2a 见证 | 209 passed,无 skip | 三个原始 ACK 场景现已在当前主干代码通过;新增来源见证仍在本 PR。 | +| 当前主干 monitor unavailable-recovery、closeout 与 target-key replay | 52 passed | 补充近期 readback 变化的真实 owner 路径;不证明真实 Host 定时器或部署端恢复。 | + +原先失败的 `test_standard_codex_app_settlement_is_receipted_and_idempotent` 和两个 +`test_todoless_autonomous_replan_settles_quota_refresh_spend_chain` 变体,现在单独运行 +及放入上述完整分组都通过。相关生产代码和 settlement CLI 测试与 main 相同。 +`db5a298a54f47179b9be2a3b9cf2f775b71a9274` +([#6344](https://github.com/loopx-project/loopx/pull/6344))已补入实际合成宿主观察; +Todo-less 场景保留缺失/不匹配 manifest 的拒绝、无 scheduler 写入和一次扣费。 +普通场景仍先拒绝过期 Turn,再确认当前 Turn。原 ACK、持久 scheduler 状态和字节 +稳定重放断言均通过,没有放宽宿主回读规则。 + +[#6285](https://github.com/loopx-project/loopx/pull/6285) 仍是独立开放提案,当前 head 为 +`f6c8aae7a7e8ba917861992a1ad21eb29477bf26`。其剩余差异包括共享 fixture、普通 Turn +额外缺失/不匹配反例和 applied-RRULE 显式回读;不能说它与 main 字节相同或已经合并。 +这些剩余增强不会使原三个主干失败重新成立,不在本 PR 复制其补丁,也不为了给同一 +fixture 修复重复记账而要求再合一次。 + +旧结果保留原截面:main `509c38c502d3d0b4eafb01550efcdc4b5b5a1d17` 的该组为 +206 passed / 3 failed;另一个加入当时 #6285 fixture 的隔离组合中,settlement CLI +101 项通过。当前验收使用上面的新主干运行时结果,不把历史失败改写成当时已成功。 完整 drift 仍保留 F1/F2 6/26、F3 0/26、F4 4/4、F5 1/1、F6 0/0;未知 producer 站点继续显式报告:45 个未解析,其中 17 个不能提供 producer 证据;不放宽上限或扫描 -边界。既有跨运行时 value-note 组另有 46 项通过;生成器、typecheck 和对应质量检查 +边界。value-note 用例已计入上方 706 项,不重复累加;生成器、typecheck 和对应质量检查 在 PR 验证记录中披露。旧 66/564/82/706 Python、421 TS 数字属于 `43173c0b8` 历史截面,不重新贴成当前结果。
-610 项 Python 与 448 项 TypeScript 组的精确选集 +当前证据各组的精确选集 ```sh uv run --extra test python -m pytest -q \ @@ -153,7 +160,7 @@ uv run --extra test python -m pytest -q \ tests/control_plane/test_protocol_packet_retirement_cli.py \ tests/control_plane/test_local_provider_settlement_journey.py -node --no-warnings --experimental-sqlite --experimental-strip-types --test \ +node --no-warnings --experimental-sqlite --experimental-strip-types --test --test-concurrency=1 \ tests/control_plane_ts/turn_settlement.test.ts \ tests/control_plane_ts/quota_settlement_readback.test.ts \ tests/control_plane_ts/task_lease_acquire.test.ts \ @@ -170,6 +177,22 @@ node --no-warnings --experimental-sqlite --experimental-strip-types --test \ tests/control_plane_ts/delivery_history.test.ts \ tests/control_plane_ts/action_selection_admission.test.ts \ tests/control_plane_ts/interaction_contract.test.ts + +uv run --extra test python -m pytest -q \ + tests/control_plane/test_quota_settlement_cli.py \ + tests/control_plane/test_todo_decision_scope_cli_validation.py \ + tests/control_plane/test_todo_decision_scope_consistency.py \ + tests/control_plane/test_todo_decision_scope_lifecycle.py \ + tests/architecture/test_settlement_receipt_source_boundaries.py + +uv run --extra test python -m pytest -q \ + tests/architecture/test_semantic*.py \ + tests/architecture/test_cross_runtime_value_notes.py + +uv run --extra test python -m pytest -q \ + tests/control_plane/test_monitor_poll_unavailable_recovery.py \ + tests/control_plane/test_monitor_unavailable_closeout_cli.py \ + tests/control_plane/test_monitor_target_key_replay.py ```
@@ -184,8 +207,8 @@ node --no-warnings --experimental-sqlite --experimental-strip-types --test \ 当前基线已包含 #6251 typed-failure、#6268 canonical-selection、#6260 shared consistency、#6290 legacy-work-basis 及 #6313 含义处置。它们消除了具体代码/含义 -缺口,不扩大 #4447 原关闭范围。#6270 来源见证和 #6285 ACK fixture 修复仍待合入; -当前 main 仍有上述三项失败,所以 Stage 3 与 issue 继续开放。最终 owner 验收须点名 -单一集成 revision 及其 passed/failed/untested 边界。安装前端/Lark、真实模型、完整 +缺口,不扩大 #4447 原关闭范围。原 Host-ACK 阻塞已在主干解决;#6270 新来源见证与 +清单仍待集成。Stage 3 与 issue 为此集成及 owner 最终验收保持开放,验收须点名一个 +revision 及其 passed/failed/untested 边界;#6285 剩余增强不是本 tracker 的新关闭条件。安装前端/Lark、真实模型、完整 Goal/团队资格和通用 F6 不属本 tracker;本次不改生产 provider/权限/持久格式,日志及 本地 Goal 状态保留在私有位置。 diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md index 8d054b12dc..6824ade2fd 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md @@ -1047,9 +1047,10 @@ development-time advisory; it does not close this tracker's source obligations. The [current registered-source inventory](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.md) records all 26 entries, current-main evidence and compatibility boundaries. -The owner merged both source-meaning dispositions in #6313; source-inventory -integration, #6285 ACK fixture repair and final single-revision acceptance -remain open. F1/F2 stays 6/26, with no source-domain inflation or F6-wide claim. +The owner merged both source-meaning dispositions in #6313. Main now includes +the original Host-ACK fixture repair through #6344, verified on `60d833b13`. +Source-inventory integration and final single-revision owner acceptance remain +open; the remaining #6285 enhancements are separate. F1/F2 stays 6/26, with no source-domain inflation or F6-wide claim. Milestone obligations and historical measurements retain their original scope/SHA. | Milestone | Shipped behavior | Entry gate | Exit evidence | Rollback | diff --git a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md index 031333dfc2..8a29ad3119 100644 --- a/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md +++ b/docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md @@ -841,7 +841,8 @@ controller 消费。Stage 1 的 composition/replay/selection/inbox 及交叠 #47 [当前登记来源清单](ledger/semantic-vocabulary-convergence-v0/2026-10-12-registered-source-treatment.zh-CN.md) 列出 26 项、当前主干上的执行证据及兼容边界。#6313 的两项含义处置已由 owner 合入; -来源清单、#6285 的 ACK fixture 修复和最终单一版本验收仍待集成。F1/F2 保持 6/26, +原 Host-ACK fixture 修复已由 #6344 进入主干,并在 `60d833b13` 重验通过;来源清单 +集成与最终单一版本 owner 验收仍开放,#6285 的剩余增强独立处理。F1/F2 保持 6/26, 不抬高 producer 范围或声称通用 F6;历史测量保留原 SHA,下表验收义务不变。 | 里程碑 | 交付行为 | 进入门 | 退出证据 | 回滚 | diff --git a/tests/control_plane_ts/decision_metadata.test.ts b/tests/control_plane_ts/decision_metadata.test.ts index 11a3d6f9c3..a5d3572c31 100644 --- a/tests/control_plane_ts/decision_metadata.test.ts +++ b/tests/control_plane_ts/decision_metadata.test.ts @@ -43,8 +43,8 @@ test("decision metadata normalizes compact and object forms without duplicate sc }); test("declared scope inputs retain every kind and granularity without becoming authority", () => { - // These are author-input witnesses, not inferred decisions or a definition - // of when an author should choose the still-unresolved `other` kind. + // These are author-input witnesses, not inferred decisions or proof + // that an author followed the separate kind=other authoring contract. for (const kind of ["private_read", "write_scope", "resource", "production", "public_claim", "direction", "other"]) { assert.deepEqual(normalizeTodoDecisionScope(`${kind}:action:example`), { schema_version: "decision_scope_v0", kind, granularity: "action", scope_key: "example",