Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Complete global-risk read ownership — 2026-11-02

The existing `loopx global-risks` CLI now sends one complete source-observation
request to `presentation.global_risks.project`, owned by
`control_plane/presentation/global_risk_read.ts`. It validates the status
projection, normalizes diagnostics and stale warnings, derives stale host-poll
risks, filters Agent scope, aggregates occurrences, escalates severity, sorts,
limits and constructs success/error results. It composes the existing projection
envelope owner in process. Rollback candidates remain deliberately empty; this
read grants no execution authority and adds no product entrypoint.

The synthetic 37-case compatibility corpus is green against the unchanged
Python owner in an immutable baseline archive. Its complete JSON and Markdown bytes and
one-crossing expectations remain unchanged. Instrumentation measures one
`projection.envelope.seal` crossing before and one
`presentation.global_risks.project` crossing after, including source errors and
Agent-scope failures. The receipt decoder still distinguishes missing and
unreadable persisted sources. Stale decisions require explicit expected
continuation and compare UTC instants at the inclusive 240-minute threshold,
including microsecond and offset cases.

Deleted Python includes diagnostic expansion/normalization, stale-warning and
stale-host-poll decisions, Agent filtering, aggregation, severity ordering,
grouping, ordinary result construction and envelope composition. The sole
production caller of `stale_host_poll_risk` moved, so that helper and its threshold
constant are removed. Its implementation-only tests move to the typed owner;
complete public-output fixtures remain compatibility evidence.

Python retains status/registry/receipt acquisition and the persisted receipt
codec because their host IO owners have not migrated. The acquisition cap mirrors
the existing bounded-source read contract; TypeScript owns result eligibility
and truncation. Python also retains Markdown rendering and its shared public
text codec. TypeScript mirrors the canonical Python path patterns from
`loopx/public_safe_text.py` under an ordered source-and-flags parity test. Normal error payloads are
constructed in TypeScript. A transport-failure-only wire codec remains in Python
because an unavailable Node runtime cannot construct its own failure response;
it reports no envelope and preserves the existing public-safe error fallback.
It does not derive risks or certify freshness.

The Python facade and bridge operation exit when the CLI's existing status and
project-receipt acquisitions plus Markdown rendering are hosted by the typed
caller, with equivalent public error and host-unavailability behavior. There is
no new leaf RPC, persisted schema, cache, provider default or Python/TypeScript
same-basename pair. The registered `SOURCE_SURFACES` context moves to the typed
owner without changing vocabulary budgets.

CLI parity uses an immutable archive of baseline `867615e2c` and a synthetic
empty registry/home, comparing actual JSON and Markdown commands. Only current
observation timestamps are normalized. This is source-checkout evidence, not
installed-artifact qualification. Full-tree vocabulary checks enumerate tracked
sources, so an unstaged new owner is invisible until normal review staging;
that limitation does not authorize staging or budget changes. Validation results
and physical line accounting belong to the delivery report.

No latency, sustained runtime or long-horizon effectiveness/efficiency benefit
is claimed. Fewer Python decision lines and a coarser request establish an owner
boundary, not performance qualification or a completed migration stage.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 完整全局风险读取的所有权 — 2026-11-02

现有 `loopx global-risks` CLI 现在将完整来源观察一次发送到
`presentation.global_risks.project`,其所有者为
`control_plane/presentation/global_risk_read.ts`。该所有者验证状态投影,
规范化诊断和过期警告,推导宿主轮询过期风险,过滤 Agent 范围,聚合出现记录,
提升严重程度,排序、限制并构建成功或错误结果。它在进程内组合现有投影信封所有者。
回滚候选仍刻意保持为空;此读取不授予执行权限,也不新增产品入口。

37 个合成兼容用例已在不可变基线归档中通过未修改的 Python 所有者。完整 JSON、Markdown
字节及一次跨运行时调用的预期保持不变。插桩测得修改前一次
`projection.envelope.seal` 调用,修改后一次
`presentation.global_risks.project` 调用,包括来源错误和 Agent 范围失败。
收据解码器仍区分持久化来源缺失与不可读。过期判定要求明确的预期继续标志,
按 UTC 时刻比较包含边界的 240 分钟阈值,并覆盖微秒及偏移量情况。

删除的 Python 包括诊断展开与规范化、过期警告及宿主轮询过期判定、Agent 过滤、
聚合、严重程度排序、分组、常规结果构建及信封组合。
`stale_host_poll_risk` 的唯一生产调用方已迁移,因此删除该辅助函数及阈值常量。
实现专属测试移至类型化所有者;完整公开输出夹具保留为兼容性证据。

Python 保留状态、注册表和收据获取以及持久化收据编解码器,因为这些宿主 IO
所有者尚未迁移。获取上限遵循现有有界来源读取合同;TypeScript 拥有结果资格及
截断判定。Python 也保留 Markdown 渲染及其共享公开文本编解码器。TypeScript
镜像 `loopx/public_safe_text.py` 中的 Python 规范路径模式,并通过按顺序比较
模式源文本及标志的一致性测试保护。常规错误载荷由 TypeScript 构建。Python 仅保留传输失败时的线格式
编解码器,因为不可用的 Node 运行时无法构建自身失败响应;它不报告信封,
并保留现有公开安全错误降级行为,不推导风险或证明新鲜度。

当 CLI 现有状态和项目收据获取及 Markdown 渲染迁入类型化调用方,且公开错误及
宿主不可用行为等价时,删除 Python 门面及桥接操作。本次不新增叶级 RPC、
持久化模式、缓存、提供方默认值或 Python/TypeScript 同名文件对。
已登记的 `SOURCE_SURFACES` 上下文迁至类型化所有者,词汇预算不变。

CLI 对比使用不可变基线 `867615e2c` 的归档以及合成空注册表与主目录,比较实际
JSON 和 Markdown 命令,仅规范化当前观察时间戳。这是源码检出证据,不是安装
产物资格。全树词汇检查只枚举已跟踪来源,因此未暂存的新所有者在正常审阅暂存前
不可见;此限制不授权暂存或修改预算。验证结果和物理行数核算属于交付报告。

不宣称延迟、持续运行时或长程效果与效率收益。更少的 Python 判定代码和更粗粒度
请求证明的是所有权边界,不是性能资格或迁移阶段完成。
Original file line number Diff line number Diff line change
Expand Up @@ -2837,3 +2837,4 @@ with shared write/read status-phase checks. See the [2026-10-02 checkpoint](ledg
- Summary-display final-head qualification and preserved tail cohorts: [2026-10-27 follow-up](ledger/typescript-control-plane-migration-v0/2026-10-27-todo-summary-qualification.md).
- Quota summary composition in one `todo.quota_planning.project` crossing with source references: [2026-11-02 cutover](ledger/typescript-control-plane-migration-v0/2026-11-02-quota-summary-transaction.md).
- Complete global summary and gate read transactions: [2026-11-02 checkpoint](ledger/typescript-control-plane-migration-v0/2026-11-02-global-manager-reads.md).
- Complete global-risk read ownership: [2026-11-02](ledger/typescript-control-plane-migration-v0/2026-11-02-global-risks-read.md).
Original file line number Diff line number Diff line change
Expand Up @@ -2102,3 +2102,4 @@ SQLite 中位数略升,收益不能外推为全面加速。这只资格化本
- 摘要展示最终 head 验收与历史尾延迟批次:[2026-10-27 后续记录](ledger/typescript-control-plane-migration-v0/2026-10-27-todo-summary-qualification.zh-CN.md)。
- 配额摘要经来源引用在一次 `todo.quota_planning.project` 跨运行时调用内完成组合:[2026-11-02 切换记录](ledger/typescript-control-plane-migration-v0/2026-11-02-quota-summary-transaction.zh-CN.md)。
- 完整全局摘要与门禁读取事务:[2026-11-02 检查点](ledger/typescript-control-plane-migration-v0/2026-11-02-global-manager-reads.zh-CN.md)。
- 完整全局风险读取所有权:[2026-11-02](ledger/typescript-control-plane-migration-v0/2026-11-02-global-risks-read.zh-CN.md)。
1 change: 1 addition & 0 deletions loopx/control_plane/effect_runtime_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ export function createEffectRuntimeHandlers(
["task_lease.write_scopes.overlap", lazyHandler(() => import("./work_items/task_lease_acquire_decision.ts"), ({evaluateTaskLeaseWriteScopesOverlap}) => evaluateTaskLeaseWriteScopesOverlap)],
["quota.task_orchestration.write_scope_overlap", lazyHandler(() => import("./work_items/task_lease_acquire_decision.ts"), ({evaluateQuotaSchedulingWriteScopesOverlap}) => evaluateQuotaSchedulingWriteScopesOverlap)],
["quota.monitor_poll.commit", lazyHandler(() => import("./quota/monitor_poll_commit.ts"), ({evaluateQuotaMonitorPollCommit}) => evaluateQuotaMonitorPollCommit)],
["presentation.global_risks.project", lazyHandler(() => import("./presentation/global_risk_read.ts"), ({projectGlobalRisks}) => projectGlobalRisks)],
["presentation.decision_notice.project", lazyHandler(() => import("./presentation/decision_notice.ts"), ({projectDecisionNotice}) => projectDecisionNotice)],
["presentation.decision_notice.validate_references", lazyHandler(() => import("./presentation/decision_notice.ts"), ({validateDecisionNoticeReferences}) => validateDecisionNoticeReferences)],
["presentation.global_summary.project", lazyHandler(() => import("./presentation/global_manager_read.ts"), ({projectGlobalSummary}) => projectGlobalSummary)],
Expand Down
Loading
Loading