@zq-silk/yui 2.17.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commandCatalog.js +2 -1
- package/dist/commands/controllerCommands.js +14 -4
- package/dist/commands/durableJobCommands.js +50 -3
- package/dist/commands/globalRoleCommands.js +18 -12
- package/dist/commands/inboxCommands.js +1 -0
- package/dist/commands/operatorCommands.js +10 -2
- package/dist/controlPlaneCli.js +21 -4
- package/dist/controller/clientRuntime.js +34 -13
- package/dist/controller/controller.js +45 -22
- package/dist/controller/diagnosticJournal.js +214 -0
- package/dist/controller/fileSchedulerStoreAdapter.js +143 -101
- package/dist/controller/globalInputDelivery.js +6 -2
- package/dist/controller/globalRuntimeAttention.js +11 -3
- package/dist/controller/jobControl.js +1 -1
- package/dist/controller/jobDefinitionControl.js +24 -13
- package/dist/controller/jobSupervisor.js +4 -0
- package/dist/controller/messageHealth.js +354 -0
- package/dist/controller/runtime.js +75 -5
- package/dist/controller/taskHostTerminalRecovery.js +11 -0
- package/dist/controller/workerSchedulerStore.js +24 -0
- package/dist/core/boundedRpc.js +4 -0
- package/dist/core/controllerServer.js +1 -1
- package/dist/core/controllerTelemetry.js +92 -19
- package/dist/job/globalShell.js +51 -0
- package/dist/job/jobBusinessResult.js +4 -3
- package/dist/job/jobDefinition.js +6 -1
- package/dist/job/jobRunner.js +9 -0
- package/dist/job/scheduleService.js +2 -0
- package/dist/message/globalInboxRecovery.js +30 -19
- package/dist/message/globalProviderRetry.js +7 -1
- package/dist/runtime/builtinAgentErrorMappers.js +4 -0
- package/dist/runtime/globalSessionHealth.js +39 -0
- package/dist/scheduler/roleRunStall.js +10 -10
- package/dist/storage/contextRecords.js +16 -0
- package/dist/storage/persistenceWorker.js +41 -19
- package/dist/storage/sqliteSchema.js +35 -11
- package/dist/storage/sqliteStore.js +102 -8
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +25 -11
- package/dist/storage/taskReadRevisionSchema.js +39 -0
- package/dist/web/assets/client/app/catalog.js +0 -29
- package/dist/web/assets/client/app/jobs.js +115 -0
- package/dist/web/assets/client/app/main.js +17 -6
- package/dist/web/assets/client/app/manage.js +1 -0
- package/dist/web/assets/client/app/settings.js +1 -5
- package/dist/web/assets/client/i18n/en.js +203 -18
- package/dist/web/assets/client/i18n/zh-CN.js +202 -17
- package/dist/web/assets/client/index.js +2 -0
- package/dist/web/assets/client/layout/manageShell.js +61 -15
- package/dist/web/assets/client/layout/router.js +2 -1
- package/dist/web/assets/client/lib/prefs.js +1 -1
- package/dist/web/assets/client/views/jobs.js +1042 -160
- package/dist/web/assets/client/views/sidebar.js +3 -0
- package/dist/web/assets/shared/manageNav.js +3 -1
- package/dist/web/assets/shell/appRail.js +2 -1
- package/dist/web/assets/shell/manage.js +7 -2
- package/dist/web/assets/shell/models.js +4 -3
- package/dist/web/assets/shell/settingsContent.js +0 -3
- package/dist/web/assets/shell/sidebar.js +0 -1
- package/dist/web/assets/styles/views/jobs.js +301 -12
- package/dist/web/assets/styles/views/sidebar.js +1 -2
- package/dist/web/webServer.js +28 -1
- package/docs/global-shell-jobs.md +78 -0
- package/docs/job-runs.md +6 -3
- package/docs/managed-turn-and-session-runtime.md +170 -0
- package/docs/managed-turn-and-session-runtime.zh-CN.md +116 -0
- package/docs/release-workflow.md +63 -0
- package/docs/release-workflow.zh-CN.md +44 -0
- package/docs/storage-baseline.md +14 -1
- package/docs/storage-baseline.zh-CN.md +6 -1
- package/docs/testing/verification-levels.md +2 -2
- package/docs/testing/verification-levels.zh-CN.md +2 -2
- package/package.json +1 -1
|
@@ -11,6 +11,80 @@ notifications cannot restart an explicitly stopped Session; normal Host detach
|
|
|
11
11
|
preserves an active Session and remains reconnectable. A switch after a partial
|
|
12
12
|
failure still settles the retained input before selecting a new conversation.
|
|
13
13
|
|
|
14
|
+
Local stop waits for its durable cleanup obligation, not for the Home-wide
|
|
15
|
+
`scheduler.scan` loop to empty. A signal only requests reconciliation; the
|
|
16
|
+
existing physical-stop proof and cleanup transaction remain the completion
|
|
17
|
+
boundary. A timeout retains the obligation and blocks replacement. Selection
|
|
18
|
+
failure and unconfirmed startup are reported separately; neither permits
|
|
19
|
+
replaying an uncertain native operation.
|
|
20
|
+
|
|
21
|
+
`operator status` and Session context distinguish desired/effective launch
|
|
22
|
+
revisions and selected-writer state from Host observation health. Old-conversation
|
|
23
|
+
failures remain audit evidence, not the new Session's current failure.
|
|
24
|
+
An exact rejected input can be explicitly retired when obsolete; accepted,
|
|
25
|
+
submitting, unknown and interrupt-owned input still retain their handling path.
|
|
26
|
+
|
|
27
|
+
`controller status --json` exposes bounded observations under
|
|
28
|
+
`identity.runtime.observations`: authenticated requests, scheduler pending
|
|
29
|
+
scopes, phase/read costs and sampled event-loop lag are separate facts.
|
|
30
|
+
Samples use a process-monotonic clock and hashed target/request labels, with
|
|
31
|
+
at most 16 recent and 16 active samples plus the slowest completed sample.
|
|
32
|
+
In-flight request count is not queue depth, and pre-routing wait is not
|
|
33
|
+
measured. These observations neither identify an old incident retroactively
|
|
34
|
+
nor establish quiescence; restarting a Controller does not refresh live Hosts.
|
|
35
|
+
|
|
36
|
+
`observations.persistence` separates main-thread database lock/body/commit
|
|
37
|
+
costs from persistence-worker round trips, worker execution and worker reads.
|
|
38
|
+
Worker summaries travel on existing replies and retain a worker-instance ID;
|
|
39
|
+
status reads only cached facts, never performs a diagnostic worker RPC.
|
|
40
|
+
Match hashed request targets when comparing round trip and execution. The
|
|
41
|
+
difference includes startup, queueing, transport and main-loop delay, not a
|
|
42
|
+
pure queue-time measurement. Nested database/read durations overlap worker
|
|
43
|
+
execution and must not be added to it. Historical maxima may belong to other
|
|
44
|
+
requests; the latest/slowest samples retain their own timestamps.
|
|
45
|
+
|
|
46
|
+
With the default persistence worker, periodic Project-sync configuration checks,
|
|
47
|
+
expired Input recommendations and run-progress/stall diagnostic transactions
|
|
48
|
+
execute on that worker as complete read/check/write operations. Their callers
|
|
49
|
+
await completion; lock waiting does not block the socket thread. Existing
|
|
50
|
+
transaction fences and idempotent folds remain unchanged. Explicit worker-off
|
|
51
|
+
mode and injected adapters retain synchronous behavior. This is not blanket
|
|
52
|
+
isolation of all database writes: launch admission, mailbox claims, due Job
|
|
53
|
+
admission and other lifecycle writes still require their own boundary analysis.
|
|
54
|
+
Status responsiveness during these maintenance operations is not proof that
|
|
55
|
+
every possible Controller stall has been eliminated.
|
|
56
|
+
|
|
57
|
+
Idle Global inbox recovery and already-settled retry checks use read-only
|
|
58
|
+
snapshots, without reserving SQLite's writer. Creating a recovery notice or
|
|
59
|
+
settling an outstanding retry still rechecks the current Session/claim/input
|
|
60
|
+
inside the original write transaction. This removes no-op lock waits, not
|
|
61
|
+
contention from actual writes.
|
|
62
|
+
|
|
63
|
+
Production Controller startup (including handover promotion) retains operational
|
|
64
|
+
diagnostics in `runtime/controller-diagnostics.jsonl`, with two rotated files.
|
|
65
|
+
Each file is bounded to 1 MiB and owner-readable/writable only. An asynchronous
|
|
66
|
+
writer admits at most 32 queued records (16 KiB each); it never writes the
|
|
67
|
+
business database. Scheduler/startup errors retain a classification, fingerprint
|
|
68
|
+
and build-relative source frames, not raw messages, arguments or credentials.
|
|
69
|
+
A 250 ms memory-only sampler records new failed/slow observations (at least
|
|
70
|
+
1 second), active slow work or its own loop delay at most once per second.
|
|
71
|
+
Records carry wall time, monotonic time, PID, process-instance ID and version;
|
|
72
|
+
bounded phase snapshots retain hashed request/target identities. It is sampled
|
|
73
|
+
evidence, not a trace of every request or the exact cause of pre-routing delay.
|
|
74
|
+
`observations.diagnostics` reports written/dropped/pending records and write
|
|
75
|
+
failures. No successful diagnostic write is assumed when storage fails.
|
|
76
|
+
Rotation, queue overflow and abrupt termination can lose evidence; a blocked
|
|
77
|
+
loop cannot emit a snapshot until it resumes. No automatic restart or operation
|
|
78
|
+
replay is introduced. These disposable operational logs are not Task state,
|
|
79
|
+
acceptance, a second recovery authority or a Home schema migration.
|
|
80
|
+
|
|
81
|
+
Scheduler caches load families lazily and use transaction-maintained Task
|
|
82
|
+
read revisions. Another Task or Global message does not invalidate an unchanged
|
|
83
|
+
Task history; updates, deletions and external writers still do. Compound folds
|
|
84
|
+
pin a read snapshot, uncommitted writes cannot publish a reusable cache token,
|
|
85
|
+
and only 16 recent Task projections are retained. Cache entries never authorize
|
|
86
|
+
dispatch or replace exact mutation-time checks.
|
|
87
|
+
|
|
14
88
|
A newly created global Operator conversation requests the native title
|
|
15
89
|
`Yui · Operator · MMdd`, using Yui's configured time zone. The request is made
|
|
16
90
|
only after the provider returns the exact new conversation identity; restore
|
|
@@ -569,3 +643,99 @@ Operator storage diagnosis/upgrade also reaches the dedicated migration entry
|
|
|
569
643
|
without first requiring the Home to already have the target storage version.
|
|
570
644
|
Completion, cancellation and archive have distinct authority and resource
|
|
571
645
|
boundaries. Storage changes use the single [upgrade contract](sqlite-control-plane-design.md).
|
|
646
|
+
|
|
647
|
+
## Message delivery health
|
|
648
|
+
|
|
649
|
+
The Controller's existing full reconciliation observes Task Role notification
|
|
650
|
+
mailboxes, Assignment continuations, Global Role input and the Operator attention
|
|
651
|
+
mailbox. It reads the real `pending` suffix separately from `processing`, never
|
|
652
|
+
the compatibility `getPendingWakeup` projection. It does not run an Agent polling
|
|
653
|
+
loop, acknowledge input, release a claim, resend an uncertain input or start an
|
|
654
|
+
unavailable Operator.
|
|
655
|
+
|
|
656
|
+
`yui controller status --verbose --json` exposes a cached, timestamped
|
|
657
|
+
`identity.runtime.observations.messageHealth` view (the Controller RPC exposes
|
|
658
|
+
`runtime.messageHealth`). It includes counts, oldest wait/occupancy, exact
|
|
659
|
+
Session/attempt/wake/message references, answered input references, recorded
|
|
660
|
+
delivery outcome, retry ownership and the existing Host reconciliation evidence.
|
|
661
|
+
`unobserved` is not proof of Host health. Inspect its exact Event/Message read
|
|
662
|
+
commands for durable originals. Status reads perform no database scans or probes.
|
|
663
|
+
The view shows at most 64 owners and reports omissions; records remain readable
|
|
664
|
+
through the existing Task event and Global Role message commands after restart.
|
|
665
|
+
|
|
666
|
+
An eligible stalled delivery warns after 5 minutes and escalates once at
|
|
667
|
+
30 minutes, or after 15 minutes if the queue at least doubles and reaches eight
|
|
668
|
+
items. A single old input is sufficient. Sampling is on the configured full-pass
|
|
669
|
+
interval (default 120 seconds, permitted 5–300 seconds): with a responsive
|
|
670
|
+
Controller, detection occurs on the first completed pass after the threshold.
|
|
671
|
+
These are not wall-clock delivery guarantees during downtime, blocked I/O or
|
|
672
|
+
unavailable Providers. Accepted long Turns without contrary exact Host evidence
|
|
673
|
+
are busy, not faults; explicit stops, disabled Roles, human ownership, native
|
|
674
|
+
pause and matching open input waits are distinct from blocked delivery. Valid
|
|
675
|
+
bounded retry remains owned by its existing recovery mechanism. Historical
|
|
676
|
+
missing ACKs without a new waiting suffix do not generate backlog alerts.
|
|
677
|
+
|
|
678
|
+
Each affected delivery owner has one open diagnostic episode: at most a warning,
|
|
679
|
+
one escalation and a backlog-clear observation. Concurrent arrivals coalesce;
|
|
680
|
+
they do not each call a model. Task evidence uses ordinary `message.health.<role>`
|
|
681
|
+
Events; Global evidence uses record-only system Messages. These are append-only
|
|
682
|
+
content in the existing open Event/Message formats, not a new storage envelope,
|
|
683
|
+
schema version or scheduling aggregate. The newest evidence reconstructs
|
|
684
|
+
notification deduplication after restart. Each notice reuses the ordinary
|
|
685
|
+
Operator Global Message queue with a stable request ID, independent of the
|
|
686
|
+
affected Task's occupied mailbox. Only one unsent engineering notice is admitted;
|
|
687
|
+
later evidence stays durable and is reconsidered on subsequent full passes.
|
|
688
|
+
|
|
689
|
+
If Operator is absent/stopped/uncontrolled, evidence remains generated but no
|
|
690
|
+
new Session is started. If it is busy, the notice stays saved; failures retain
|
|
691
|
+
their exact message and reason and are not replayed. Diagnostics distinguish
|
|
692
|
+
generated evidence, saved notice, transport acceptance, Provider delivery and
|
|
693
|
+
explicit handling. An alert ACK is never recovery. Only an observed empty
|
|
694
|
+
delivery backlog closes an episode; an explicit pause or merely releasing the
|
|
695
|
+
old processing claim while a pending suffix remains does not. Backlog clearance
|
|
696
|
+
itself proves neither business handling nor completion, and grants no recovery
|
|
697
|
+
authority. Moving all pending work to a new processing owner is not clearance:
|
|
698
|
+
retained processing with a deferred delivery remains observable, including its
|
|
699
|
+
exact attempt and rejection detail, even when the current Turn is completed.
|
|
700
|
+
|
|
701
|
+
### Management recovery guidance
|
|
702
|
+
|
|
703
|
+
Notices include the current observation time, exact identities, original read
|
|
704
|
+
commands and conditional recovery guidance, also available in the cached
|
|
705
|
+
`recovery` field. A notice delayed by Operator unavailability uses current facts
|
|
706
|
+
when it is finally saved, not the original incident's intervention advice.
|
|
707
|
+
Already-saved notices remain immutable evidence and are not resent merely to
|
|
708
|
+
update advice: always refresh status and exact Session/wake/message evidence
|
|
709
|
+
before acting. A command template is neither authorization nor proof that a
|
|
710
|
+
later invocation still targets the observed Session; current CLI fences apply.
|
|
711
|
+
|
|
712
|
+
An affected Leader is supervised by Operator; a subordinate Task Role by its
|
|
713
|
+
authorized Leader or Operator. Normal busy work, legitimate pause and owned
|
|
714
|
+
bounded retry receive non-intervention guidance. For an established retained
|
|
715
|
+
Task Host barrier, the supervisor may consider the existing targeted
|
|
716
|
+
`task role session stop` path without waiting for a complete engineering repair
|
|
717
|
+
or perfect historical projections. Inspect exact native/background execution,
|
|
718
|
+
event persistence, authority and cleanup consequences first. Unpersisted Host
|
|
719
|
+
facts must not be destroyed. A saved stop request is not successful physical
|
|
720
|
+
cleanup; retain failure evidence when cleanup cannot be proven. Existing
|
|
721
|
+
authorized lifecycle/delivery may reuse the retained conversation after proven
|
|
722
|
+
stop; verify its identity. Deliberate `task role session new` is a different,
|
|
723
|
+
explicit replacement decision, requiring durable progress and fenced cleanup.
|
|
724
|
+
Goal `stalled` alone neither establishes the cause nor warrants clearing Goal.
|
|
725
|
+
|
|
726
|
+
In this candidate, `task wake retry` requires a proven-rejected, unconsumed
|
|
727
|
+
exact claim, a corrected cause and no accepted/uncertain native execution.
|
|
728
|
+
`task wake resolve` supports an unknown exact claim after shared-native
|
|
729
|
+
quiescence; it releases scheduling without replay or semantic acknowledgement.
|
|
730
|
+
Deferred delivery meets neither precondition. Do not assume another recovery
|
|
731
|
+
package's extended behavior is installed. For Global Roles, this candidate
|
|
732
|
+
does not establish a dedicated targeted Host-stop command: inspect original
|
|
733
|
+
input/control and `session retry <role> show`, then discover current authorized
|
|
734
|
+
capabilities. There is no guessed Task equivalent or stop-all fallback.
|
|
735
|
+
|
|
736
|
+
On refusal or failure, preserve the exact receipt, original inputs and work,
|
|
737
|
+
and escalate only the missing authority, capability or cleanup evidence.
|
|
738
|
+
Verify management request, physical stop, conversation reuse/replacement,
|
|
739
|
+
actual subsequent Provider acceptance and business handling separately.
|
|
740
|
+
Missing evidence remains unverified; no automatic recovery, replay, forced
|
|
741
|
+
ACK, model/account/permission change or Controller-wide restart is introduced.
|
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Session、AgentRun 与通知
|
|
4
4
|
|
|
5
|
+
局部停止等待自身的持久清理义务完成,不等待整个 Home 的 `scheduler.scan`
|
|
6
|
+
循环排空。signal 只请求调度;完成仍以现有物理停止证明及清理事务为准。
|
|
7
|
+
超时保留义务并阻止替换;选择失败和新会话启动未确认分别报告,不允许重放未知效果。
|
|
8
|
+
|
|
9
|
+
`operator status` 与 Session context 区分 desired/effective 配置版本、选定写入者
|
|
10
|
+
状态和 Host 观测健康。旧会话失败保留为审计证据,不是新会话的当前失败。
|
|
11
|
+
明确 rejected 的过时输入可以显式退役;accepted、submitting、unknown 和
|
|
12
|
+
interrupt-owned 输入仍保留原处理路径。
|
|
13
|
+
|
|
14
|
+
`controller status --json` 的 `identity.runtime.observations` 分别呈现已认证请求、
|
|
15
|
+
调度待处理范围、阶段/读取成本及采样的事件循环延迟。样本使用进程单调时钟,
|
|
16
|
+
目标/请求标签仅保存哈希;每组最多保留 16 个近期样本、16 个活动样本及最慢完成样本。
|
|
17
|
+
in-flight 请求数不是排队数,路由前等待尚未测量。观测不能反推旧事故的唯一根因,
|
|
18
|
+
也不构成静止证明;重启 Controller 不会刷新存活 Host。
|
|
19
|
+
|
|
20
|
+
`observations.persistence` 将主线程数据库锁等待/事务体/提交成本,与持久化
|
|
21
|
+
worker 的往返耗时、执行和读取成本分开。worker 摘要搭载既有响应,保留 worker
|
|
22
|
+
实例标识;status 只读缓存观测,不另发诊断 RPC。比较往返和执行时间时须匹配
|
|
23
|
+
同一个请求哈希,其差值还包括启动、排队、传输和主线程延迟,不是纯排队时长。
|
|
24
|
+
嵌套的数据库/读取耗时已包含在 worker 执行中,不能重复相加;历史最大值可能
|
|
25
|
+
来自其他请求,latest/slowest 样本保留各自时间戳。
|
|
26
|
+
|
|
27
|
+
默认启用持久化 worker 时,周期性 Project-sync 配置检查、到期 Input 建议执行、
|
|
28
|
+
运行进展及停滞诊断事务,作为完整的读/检查/写操作在 worker 内执行,调用方等待
|
|
29
|
+
完成;等锁不再阻塞 socket 主线程。既有事务校验和幂等折叠保持不变。
|
|
30
|
+
显式关闭 worker 或注入自定义 adapter 时仍沿用同步行为。这不是全部数据库写入的
|
|
31
|
+
隔离:启动准入、邮箱领取、到期 Job 准入及其他生命周期写入仍需分别分析边界。
|
|
32
|
+
这些维护操作期间状态请求可响应,不代表 Controller 的所有长停顿都已消除。
|
|
33
|
+
|
|
34
|
+
空闲 Global 收件箱恢复检查、已处分的重试检查使用只读快照,不申请 SQLite
|
|
35
|
+
写锁。真正创建恢复通知或处分未完成重试时,仍在原写事务内复核当前
|
|
36
|
+
Session/claim/输入。这消除的是空操作等锁,不是所有实际写入的竞争。
|
|
37
|
+
|
|
38
|
+
生产 Controller(含升级接管后的启动)将运行诊断保存至
|
|
39
|
+
`runtime/controller-diagnostics.jsonl`,另保留两个轮转文件,每个最多 1 MiB,
|
|
40
|
+
仅文件所有者可读写。异步写入器最多排队 32 条记录,每条最多 16 KiB,
|
|
41
|
+
不写业务数据库。调度及启动错误只保留分类、指纹和构建内相对源码位置,
|
|
42
|
+
不保留原始错误正文、参数或凭据。每 250 ms 仅检查内存指标;出现新的失败/
|
|
43
|
+
至少 1 秒慢操作、仍在进行的慢操作或自身事件循环延迟时,每秒最多记录一次快照。
|
|
44
|
+
记录包含墙钟、单调时间、PID、进程实例及版本,阶段摘要使用请求/目标哈希。
|
|
45
|
+
这是采样证据,不是逐请求追踪,也不直接证明路由前阻塞原因。
|
|
46
|
+
`observations.diagnostics` 显示写入、丢弃、待写数量和写入失败;磁盘故障不伪装为
|
|
47
|
+
记录成功。轮转、队列溢出、突然终止均可能丢失证据,主线程恢复前也无法输出快照。
|
|
48
|
+
不新增自动重启或操作重放。这些可丢弃运行日志不是 Task 状态、验收依据的替代物、
|
|
49
|
+
第二套恢复权威或 Home 数据格式迁移。
|
|
50
|
+
|
|
51
|
+
调度缓存按需加载记录族,并使用事务维护的 Task 读取修订号。其他 Task 或 Global
|
|
52
|
+
消息不会使未变化的本 Task 历史失效;更新、删除、其他进程写入仍正确失效。
|
|
53
|
+
组合折叠固定在一个读取快照,未提交写入不产生可复用缓存标识,最多保留最近
|
|
54
|
+
16 个 Task 的投影。缓存不授权派发,也不替代变更时的精确身份检查。
|
|
55
|
+
|
|
5
56
|
## 当前身份与持久处理回执
|
|
6
57
|
|
|
7
58
|
桌面与 TUI 使用相同的当前 Session 授权。只有 `CODEX_THREAD_ID` 的桌面命令
|
|
@@ -429,3 +480,68 @@ Task。Operator 诊断和 Controller 重启不先要求一个健康的 Controlle
|
|
|
429
480
|
也能到达专用的迁移入口,而不先要求 Home 已经处于目标存储版本。完成、取消和归档具有
|
|
430
481
|
彼此不同的权限和资源边界。存储变更使用唯一的
|
|
431
482
|
[升级合同](sqlite-control-plane-design.zh-CN.md)。
|
|
483
|
+
|
|
484
|
+
## 消息投递健康度
|
|
485
|
+
|
|
486
|
+
Controller 在既有 full reconciliation 中观察 Task Role 通知 mailbox、
|
|
487
|
+
Assignment continuation、Global Role 输入及 Operator attention mailbox。
|
|
488
|
+
分别读取真实 `pending` 后缀与 `processing`,不把 `getPendingWakeup` 的兼容投影
|
|
489
|
+
当作底层队列;不启动 Agent 私有轮询、不自动 ACK、释放占用或重放未知输入。
|
|
490
|
+
|
|
491
|
+
`yui controller status --verbose --json` 的
|
|
492
|
+
`identity.runtime.observations.messageHealth` 提供带采样时间的缓存诊断;Controller RPC 对应
|
|
493
|
+
`runtime.messageHealth`。可查看数量、最老等待与占用时长、精确 Session/attempt/wake/
|
|
494
|
+
message、已回答输入、投递证据、重试归属与既有 Host 核对结果。`unobserved` 不代表
|
|
495
|
+
Host 健康。按其中的 Event/Message 读取命令核对持久原始证据。状态读取不会扫描数据库
|
|
496
|
+
或发起探测;最多展示 64 个 owner 并显式报告省略数量,重启后原始记录仍可读取。
|
|
497
|
+
|
|
498
|
+
符合异常条件的投递等待在 5 分钟后预警,30 分钟后最多升级一次;若队列至少翻倍且达到
|
|
499
|
+
8 条,可在 15 分钟后提前升级。仅一条长期不推进的输入也会检测。采样复用 full-pass
|
|
500
|
+
间隔(默认 120 秒,可设 5–300 秒),健康响应的 Controller 在超过阈值后的首次完整
|
|
501
|
+
检查发现;停机、I/O 堵塞和 Provider 不可用期间不保证墙钟时限或即时送达。没有精确
|
|
502
|
+
Host 反证的 accepted 长 Turn 视为忙碌;显式停止、Role 禁用、human 所有权、原生
|
|
503
|
+
暂停、匹配的未回答输入等待单独区分。有效的有界重试仍由既有恢复机制拥有。只有历史
|
|
504
|
+
缺 ACK、没有新待投递后缀,不会生成积压告警。
|
|
505
|
+
|
|
506
|
+
按受影响的投递 owner 合并一个未关闭异常,最多保存预警、升级和积压消除三个阶段,
|
|
507
|
+
并发到达不会逐条调用模型。Task 使用普通 `message.health.<role>` Event,Global
|
|
508
|
+
使用 record-only system Message,都是既有开放内容格式中的追加证据,不新增存储
|
|
509
|
+
envelope、schema 或调度权威。最新证据用于重启后的去重。告警使用稳定 request ID,
|
|
510
|
+
走独立于受影响 Task 占用的 Operator Global Message 通道;最多保留一条未发送的
|
|
511
|
+
工程通知,其余待告警证据持久保留并在后续 full pass 检查。
|
|
512
|
+
|
|
513
|
+
Operator 缺席、已停止或没有受控 binding 时,不自动创建 Session;忙碌时保留已保存
|
|
514
|
+
通知,失败时保留原 Message 和原因、不重放。诊断区分已生成证据、已保存通知、传输
|
|
515
|
+
接受、Provider 送达与显式处置。告警 ACK 不关闭异常。只有观察到投递积压消失才记录
|
|
516
|
+
恢复;显式暂停、或仅释放旧 processing 但 pending 仍在,不算恢复。积压消除也不证明
|
|
517
|
+
业务处理完成、Task 验收或获得任何额外恢复权限。
|
|
518
|
+
pending 全部转入新 processing owner 也不算清除:即便当前 Turn 已完成,持续 deferred
|
|
519
|
+
的 processing 仍保留监测及精确 attempt、投递拒绝详情。
|
|
520
|
+
|
|
521
|
+
### 管理恢复引导
|
|
522
|
+
|
|
523
|
+
通知直接包含当前观测时间、精确身份、原始读取命令及有前提的恢复引导,缓存诊断的
|
|
524
|
+
`recovery` 字段也提供同一引导。Operator 不可用导致延迟保存的通知使用保存当时的
|
|
525
|
+
当前观测,不复制旧异常的操作建议;已保存通知不重写,也不为更新建议重复发送。
|
|
526
|
+
执行前必须刷新 status 和准确 Session/wake/message 原始证据。命令模板不是授权,
|
|
527
|
+
也不能固定未来调用的目标身份;实际操作仍受现有 CLI 围栏约束。
|
|
528
|
+
|
|
529
|
+
Leader 自身受阻由 Operator 处理,下属 Task Role 由有权限的 Leader 或 Operator
|
|
530
|
+
处理。正常忙碌、合法暂停、有界重试仍拥有恢复时,不推荐打断。确认 Task Host 遗留
|
|
531
|
+
占用后,可评估已有准确 `task role session stop` 管理路径,不必等待完整工程修复包
|
|
532
|
+
或所有历史投影对齐;先核对准确原生/后台执行、事件持久化、权限和清理影响,不能丢失
|
|
533
|
+
Host 中尚未持久化的事实。stop 请求保存不等于物理清理成功,失败时保留原证据。
|
|
534
|
+
证明停止后,既有授权生命周期/投递可在支持时复用原 conversation,须验证实际身份。
|
|
535
|
+
`task role session new` 则是另行明确选择新 Session,需保存进展并通过清理围栏。
|
|
536
|
+
仅显示 Goal stalled 不能确定根因,也不能据此要求清 Goal。
|
|
537
|
+
|
|
538
|
+
本候选的 `task wake retry` 仅适用已纠正原因、原准确 claim 仍未消费的明确 rejected,
|
|
539
|
+
且不能存在已接受或不确定原生执行;`task wake resolve` 仅支持准确 unknown claim
|
|
540
|
+
在共享原生静止证明后释放调度,不重放、不 ACK。deferred 不满足二者前提,不能假定
|
|
541
|
+
其他恢复包的扩展行为已经安装。GlobalRole 未确认有专用准确 Host-stop 命令时,读取
|
|
542
|
+
原输入/control 和 `session retry <role> show`,再发现当前权限下的能力;不臆造
|
|
543
|
+
Task 等价命令,也不退化为 stop-all。
|
|
544
|
+
|
|
545
|
+
动作拒绝或失败后,保留精确回执、原输入和工作区,只升级缺失的权限、能力或清理证据。
|
|
546
|
+
分别验证管理请求、物理停止、原会话复用/显式替换、后续实际 Provider 接受及业务处置;
|
|
547
|
+
缺证据仍标为未验证。不新增自动恢复、重放、强制 ACK、模型/账号/权限变更或全局重启。
|
package/docs/release-workflow.md
CHANGED
|
@@ -51,6 +51,69 @@ merely to avoid a version decision. Package versions remain distinct from protoc
|
|
|
51
51
|
and persistent-storage contracts: their compatibility checks and required migrations
|
|
52
52
|
are unchanged, and the storage rules below do not authorize a package release.
|
|
53
53
|
|
|
54
|
+
### 2.19.0 compatibility and migration notes
|
|
55
|
+
|
|
56
|
+
This minor adds message backlog and blocked-delivery monitoring with Operator
|
|
57
|
+
alerts (PR #492). Observations distinguish live work, paused execution and bounded
|
|
58
|
+
retry from stalled delivery, retain original evidence, and deduplicate alerts
|
|
59
|
+
across Controller restarts. Alerts include evidence-matched management guidance:
|
|
60
|
+
inspect the exact input and execution first, distinguish rejected retry from
|
|
61
|
+
unknown-result resolution, and require scoped stop proof or explicit replacement
|
|
62
|
+
authority where applicable. Monitoring never retries, stops or replaces execution
|
|
63
|
+
automatically; an alert is not recovery authority or proof of a unique root cause.
|
|
64
|
+
|
|
65
|
+
Storage remains **1.24**, and Controller/Host protocols remain v1. Existing
|
|
66
|
+
messages and events are preserved; this release adds no storage migration.
|
|
67
|
+
Older supported Homes still use the centralized contiguous migration chain.
|
|
68
|
+
With separate update authority, the Operator verifies the published artifact
|
|
69
|
+
then runs `yui update --version 2.19.0`. Compatible live Sessions are retained;
|
|
70
|
+
publishing alone does not update the installed program or recover other Tasks.
|
|
71
|
+
Exact-merge Core CI and the same tarball's fresh-install platform/Node matrix
|
|
72
|
+
remain release gates. These checks do not establish real-model behavior.
|
|
73
|
+
|
|
74
|
+
### 2.18.0 compatibility and migration notes
|
|
75
|
+
|
|
76
|
+
This minor includes the already-merged independent Jobs workspace and global
|
|
77
|
+
Shell script Jobs (PR #490), plus Controller reliability and diagnostics.
|
|
78
|
+
Exact Session stop/replacement no longer waits for unrelated global scheduling
|
|
79
|
+
to drain. Stop proof, single-writer ownership and unknown-input replay fences
|
|
80
|
+
remain required. Session health distinguishes historical failures from the
|
|
81
|
+
current authority; conclusively rejected obsolete inputs can be retired without
|
|
82
|
+
erasing their original evidence.
|
|
83
|
+
|
|
84
|
+
Task-scoped lazy read caches, indexed observation queries and persistence
|
|
85
|
+
timings reduce projection work and separate request/worker/database costs.
|
|
86
|
+
With the default persistence worker, periodic maintenance lock waits no longer
|
|
87
|
+
block the socket thread; idle Global recovery and settled retry checks are
|
|
88
|
+
read-only. Actual admission and other business writes may still contend.
|
|
89
|
+
Bounded, redacted asynchronous diagnostics retain incident evidence in
|
|
90
|
+
`runtime/controller-diagnostics.jsonl` and two rotated files. These changes
|
|
91
|
+
address reproduced mechanisms, not a proven unique cause of every historical
|
|
92
|
+
timeout. See [managed runtime](managed-turn-and-session-runtime.md).
|
|
93
|
+
|
|
94
|
+
Storage advances from **1.22 through 1.23 to 1.24**: 1.23 declares revisioned
|
|
95
|
+
global Shell script definitions and Run snapshots; 1.24 adds Task read-revision
|
|
96
|
+
tokens and triggers without rewriting historical payloads. A production 1.21
|
|
97
|
+
Home first applies the existing 1.22 Role/Profile availability transition.
|
|
98
|
+
Use the centralized contiguous same-major migration, never manual schema edits.
|
|
99
|
+
Controller RPC and Host control/event protocols remain v1. Compatible live
|
|
100
|
+
Hosts/Sessions are retained, not hot-upgraded; unreported Host capabilities and
|
|
101
|
+
unknown results remain explicit.
|
|
102
|
+
|
|
103
|
+
With separate production authority, the Operator uses
|
|
104
|
+
`yui update --version 2.18.0` after verifying the published artifact. Refresh a
|
|
105
|
+
consistent maintenance backup and capture the current executable/Controller
|
|
106
|
+
identity before migration. An earlier online DB snapshot alone is not a complete
|
|
107
|
+
rollback point and cannot overwrite subsequently accepted input. Do not open a
|
|
108
|
+
1.24 Home with an older binary; rollback requires the matching pre-upgrade
|
|
109
|
+
program and consistent Home backup, with intervening effects reconciled.
|
|
110
|
+
|
|
111
|
+
Release gates require exact-merge-commit Core CI and the same runtime archive's
|
|
112
|
+
fresh-install platform/Node matrix before npm publication. Local deterministic
|
|
113
|
+
tests and prior smoke evidence do not replace those gates or prove real-model
|
|
114
|
+
behavior. Publication does not itself update a production Home or resolve
|
|
115
|
+
another Task's execution.
|
|
116
|
+
|
|
54
117
|
### 2.17.0 compatibility and migration notes
|
|
55
118
|
|
|
56
119
|
This minor adds persistent Role/Profile enable and disable controls in CLI and
|
|
@@ -36,6 +36,50 @@ Agent 选择一个预先声明的计划,设施从持久状态驱动该计划
|
|
|
36
36
|
不能将不兼容冒称为兼容,也不为回避版本选择新增历史兼容机制。包版本与协议、
|
|
37
37
|
持久存储契约仍然独立:兼容性检查和必要迁移要求不变,下文存储规则不授予发版权限。
|
|
38
38
|
|
|
39
|
+
### 2.19.0 兼容性及迁移说明
|
|
40
|
+
|
|
41
|
+
本 minor 新增消息积压、投递阻塞监测及 Operator 告警(PR #492)。观测区分正常执行、
|
|
42
|
+
暂停、有界重试与投递停滞,保留原始证据,并跨 Controller 重启去重告警。
|
|
43
|
+
告警包含按证据匹配的管理恢复引导:先检查精确输入和执行状态,区分明确拒绝后的
|
|
44
|
+
retry 与未知结果的 resolve,并在需要时要求精确停止证明或显式替换授权。
|
|
45
|
+
监测不会自动重试、停止或替换执行;告警本身不是恢复授权,也不证明唯一根因。
|
|
46
|
+
|
|
47
|
+
存储仍为 **1.24**,Controller/Host 协议仍为 v1。已有消息与事件保留,本版本
|
|
48
|
+
不新增存储迁移;较早受支持 Home 仍通过集中式连续迁移链升级。
|
|
49
|
+
另行获得更新授权后,由 Operator 核验实际发布包,再执行
|
|
50
|
+
`yui update --version 2.19.0`。兼容的存活 Session 保留;发布本身不更新运行安装,
|
|
51
|
+
也不恢复其他 Task。精确 merge commit 的 Core CI 与同一 tarball 的全新安装
|
|
52
|
+
平台/Node 矩阵仍为发布门禁,这些验证不代表真实模型行为验证。
|
|
53
|
+
|
|
54
|
+
### 2.18.0 兼容性及迁移说明
|
|
55
|
+
|
|
56
|
+
本 minor 包含已合入的独立 Jobs 工作区和全局 Shell 脚本 Job(PR #490),以及
|
|
57
|
+
Controller 可靠性与诊断改进。精确 Session 停止/替换不再等待无关全局调度排空;
|
|
58
|
+
停止证明、单写者和未知输入防重放仍受保护。Session 健康区分历史故障与当前权限,
|
|
59
|
+
明确拒绝的过期输入可以合法退役,原始证据保留。
|
|
60
|
+
|
|
61
|
+
Task 局部惰性缓存、索引查询和持久化耗时观测减少投影开销,并区分请求、worker
|
|
62
|
+
和数据库成本。默认持久化 worker 承担周期维护事务的锁等待;空闲 Global 恢复和
|
|
63
|
+
已处分重试检查只读。实际启动准入和其他业务写入仍可能竞争。异步脱敏诊断保存到
|
|
64
|
+
`runtime/controller-diagnostics.jsonl` 及两个有界轮转文件。这些改进解决已复现机制,
|
|
65
|
+
不代表已证明每次历史超时的唯一根因。参见[托管运行时](managed-turn-and-session-runtime.zh-CN.md)。
|
|
66
|
+
|
|
67
|
+
存储从 **1.22 经 1.23 升至 1.24**:1.23 声明全局 Shell 脚本定义及精确 Run 快照;
|
|
68
|
+
1.24 增加 Task 读取修订号与触发器,不改写历史载荷。生产 1.21 Home 会先执行已有的
|
|
69
|
+
1.22 Role/Profile 启停字段迁移。必须使用集中式同 major 连续迁移,不手工修改数据库。
|
|
70
|
+
Controller RPC、Host control/event 协议仍为 v1;兼容的存活 Host 和 Session 保留,
|
|
71
|
+
而非热更新。Host 未报告能力及未知结果仍明确保留。
|
|
72
|
+
|
|
73
|
+
另行获得生产授权后,由 Operator 核验实际发布包,再执行
|
|
74
|
+
`yui update --version 2.18.0`。迁移前刷新一致的维护备份,记录当时程序与 Controller
|
|
75
|
+
身份。较早的在线数据库快照不是完整回滚点,不可覆盖后续已接受输入。
|
|
76
|
+
旧二进制不能打开 1.24 Home;回滚需要匹配的旧程序和升级前一致 Home 备份,
|
|
77
|
+
并核对期间发生的效果。
|
|
78
|
+
|
|
79
|
+
发布门禁要求精确 merge commit 的 Core CI,以及同一运行包的全新安装平台/Node
|
|
80
|
+
矩阵通过后才能发布 npm。本地确定性测试与既有 smoke 不替代这些门禁,也不证明
|
|
81
|
+
真实模型行为。发布本身不更新生产 Home,不代表其他 Task 执行问题已解决。
|
|
82
|
+
|
|
39
83
|
### 2.17.0 兼容性及迁移说明
|
|
40
84
|
|
|
41
85
|
本 minor 在 CLI 和 Web 设置中新增持久化的 Role/Profile 启用、停用控制。
|
package/docs/storage-baseline.md
CHANGED
|
@@ -2,7 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
# Storage baseline 1.0
|
|
4
4
|
|
|
5
|
-
Current storage is 1.
|
|
5
|
+
Current storage is 1.24. The 1.23 → 1.24 transition adds transaction-maintained
|
|
6
|
+
Task read-cache revisions for the scheduler's nine source tables. Inserts,
|
|
7
|
+
updates and deletions invalidate only the affected Task; rollback also rolls
|
|
8
|
+
back the token. These tokens are derived cache identities, never Task authority
|
|
9
|
+
or a replacement for the Home revision CAS. Historical payloads are unchanged,
|
|
10
|
+
and existing Tasks start with an implicit zero token until their first mutation.
|
|
11
|
+
Two partial indexes support exact runtime-observation identity lookup without
|
|
12
|
+
scanning or deserializing the historical observation set.
|
|
13
|
+
|
|
14
|
+
The 1.22 → 1.23 transition adds global Shell Job
|
|
15
|
+
definitions with revisioned script files and per-Run executable snapshots.
|
|
16
|
+
It preserves existing payloads without rewriting any Job, schedule or history.
|
|
17
|
+
|
|
18
|
+
The 1.21 → 1.22 transition admits an optional boolean
|
|
6
19
|
`enabled` on Roles and Profiles. Absence means enabled. SQL layout, historical
|
|
7
20
|
payloads, existing Task bindings, Session snapshots and input receipts are
|
|
8
21
|
unchanged; upgrade does not launch or stop execution.
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# 存储基线 1.0
|
|
4
4
|
|
|
5
|
-
当前存储为 1.
|
|
5
|
+
当前存储为 1.24。1.23 → 1.24 为调度器的九类来源表增加事务维护的 Task 读取缓存修订号。插入、更新和删除只使对应 Task 的缓存失效,回滚同时回滚修订号。该值仅是派生缓存标识,不是 Task 权限或 Home revision CAS 的替代。历史 payload 不变,旧 Task 在首次修改前使用隐含的零修订号。
|
|
6
|
+
同时增加两个局部索引,支持按精确运行观测身份查找,不再扫描或反序列化历史观测集合。
|
|
7
|
+
|
|
8
|
+
1.22 → 1.23 新增全局 Shell Job、版本化脚本文件及每次运行的配置快照,不改写已有 Job、计划和历史记录。
|
|
9
|
+
|
|
10
|
+
1.21 → 1.22 为 Role/Profile 声明可选布尔字段 `enabled`,
|
|
6
11
|
缺省表示启用。SQL 布局、历史 payload、已有 Task 绑定、Session 快照和输入回执
|
|
7
12
|
保持不变;升级不启动或停止执行。
|
|
8
13
|
|
|
@@ -53,12 +53,12 @@ is required.
|
|
|
53
53
|
Both include `test/core` and `test/platform`. For an already built checkout,
|
|
54
54
|
`npm run test:business` runs only `test/core` and `npm run test:platform` runs
|
|
55
55
|
only `test/platform`; neither rebuilds. CI owns one explicit build per job.
|
|
56
|
-
The stable suite owns current storage 1.
|
|
56
|
+
The stable suite owns current storage 1.24 and its declared 1.0 through 1.23 minor
|
|
57
57
|
transition. It contains no undeclared historical format compatibility path.
|
|
58
58
|
|
|
59
59
|
Current coverage includes:
|
|
60
60
|
|
|
61
|
-
1. Fresh storage 1.
|
|
61
|
+
1. Fresh storage 1.24, exact schema/record validation, no initialization over
|
|
62
62
|
unknown data, and rejection of old integer formats without mutation.
|
|
63
63
|
2. Exact-version staging, mismatched-target refusal, same-major contiguous
|
|
64
64
|
minor preflight, explicit maintenance-owner identity across handover, and
|
|
@@ -39,12 +39,12 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
|
|
|
39
39
|
两者均包含 `test/core` 和 `test/platform`。已构建的 checkout 可分别运行
|
|
40
40
|
`npm run test:business` 与 `npm run test:platform`,它们不会再次构建。
|
|
41
41
|
CI 每个作业只显式构建一次。
|
|
42
|
-
稳定套件维护当前存储 1.
|
|
42
|
+
稳定套件维护当前存储 1.24 和明确声明的 1.0 至 1.23 连续小版本迁移,
|
|
43
43
|
不包含未声明的历史格式兼容路径。
|
|
44
44
|
|
|
45
45
|
当前覆盖包括:
|
|
46
46
|
|
|
47
|
-
1. 新建存储 1.
|
|
47
|
+
1. 新建存储 1.24、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
|
|
48
48
|
2. 精确版本暂存、目标不匹配拒绝、同主版本连续小版本预检、交接锁显式所有者,
|
|
49
49
|
以及恢复时核对捕获的协议和存储身份,不接受缺失字段。
|
|
50
50
|
3. 持久 Task/Message/Decision 上下文、Draft 激活权威、mailbox 认领、
|