bailinghub 0.9.2 → 0.9.3
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/README.en.md +6 -6
- package/README.md +6 -6
- package/docker-compose.images.yml +2 -2
- package/docs/CHANGELOG.en.md +12 -1
- package/docs/CHANGELOG.md +12 -1
- package/docs/CORE_RELIABILITY.en.md +22 -2
- package/docs/CORE_RELIABILITY.md +22 -2
- package/docs/IMPLEMENTATION_STATUS.en.md +19 -15
- package/docs/IMPLEMENTATION_STATUS.md +19 -15
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/OPERATIONS.en.md +13 -0
- package/docs/OPERATIONS.md +12 -0
- package/docs/README.en.md +3 -1
- package/docs/README.md +3 -1
- package/docs/RELEASE_NOTES_v0.9.3.en.md +51 -0
- package/docs/RELEASE_NOTES_v0.9.3.md +51 -0
- package/docs/TOOLS_DESIGN.md +1 -0
- package/docs/UPGRADE_v0.9.3.en.md +63 -0
- package/docs/UPGRADE_v0.9.3.md +63 -0
- package/package.json +1 -1
- package/scripts/check-doc-links.mjs +2 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +4 -0
- package/scripts/verify-github-repo.mjs +4 -0
- package/security/dependency-audit-exceptions.json +1 -1
- package/sql/067_delivery_dlq_replay.sql +10 -0
- package/sql/README.en.md +6 -0
- package/sql/README.md +6 -0
- package/src/adapters/llm/file.test.ts +59 -0
- package/src/adapters/llm/file.ts +11 -4
- package/src/app/agent-tool-invocations.test.ts +3 -1
- package/src/app/approval-continuations.test.ts +27 -1
- package/src/app/approval-continuations.ts +44 -3
- package/src/app/channels-attachments.test.ts +63 -0
- package/src/app/channels.ts +7 -4
- package/src/app/delivery-dlq-replay.mysql.test.ts +139 -0
- package/src/app/delivery-dlq-replay.test.ts +75 -0
- package/src/app/delivery-dlq-replay.ts +41 -0
- package/src/app/delivery.ts +3 -2
- package/src/app/kernel-notification-lifecycle.test.ts +49 -0
- package/src/app/kernel.ts +9 -0
- package/src/app/notification-outbound.test.ts +53 -0
- package/src/app/operational-metrics.test.ts +37 -1
- package/src/app/operational-metrics.ts +25 -2
- package/src/app/outbound.ts +13 -2
- package/src/app/runtime-lifecycle.test.ts +89 -0
- package/src/app/runtime-lifecycle.ts +20 -18
- package/src/app/tool-approvals.ts +2 -1
- package/src/core/contracts/delivery-replay.ts +41 -0
- package/src/core/contracts/tools-idempotency.test.ts +121 -5
- package/src/core/contracts/tools.ts +21 -11
- package/src/core/contracts/types.ts +2 -0
- package/src/core/observability/openmetrics.test.ts +28 -0
- package/src/core/observability/openmetrics.ts +91 -0
- package/src/core/platform/http-body.test.ts +185 -0
- package/src/core/platform/http-body.ts +58 -0
- package/src/core/runtime/finish-runtime.test.ts +2 -0
- package/src/core/runtime/finish-runtime.ts +10 -7
- package/src/core/runtime/notification-background-work.test.ts +50 -0
- package/src/core/runtime/notification-background-work.ts +101 -0
- package/src/core/state/delivery-replay.ts +19 -0
- package/src/core/state/state-codec.ts +1 -0
- package/src/core/state/state-contracts.ts +3 -0
- package/src/infrastructure/config/config-delivery-dlq-ledger.ts +36 -10
- package/src/infrastructure/config/configstore.ts +2 -1
- package/src/infrastructure/state/state-jsonl.ts +16 -1
- package/src/infrastructure/state/state-mysql.ts +27 -0
- package/src/modules/usage/background-work.test.ts +28 -0
- package/src/modules/usage/background-work.ts +43 -7
- package/src/modules/usage/billing-reconciliation.test.ts +16 -2
- package/src/modules/usage/billing-repository.ts +9 -0
- package/src/modules/usage/maintenance.test.ts +18 -2
- package/src/modules/usage/maintenance.ts +8 -0
- package/src/routes/admin-runtime.ts +14 -0
package/README.en.md
CHANGED
|
@@ -29,13 +29,13 @@ You choose which business APIs become available. BailingHub connects the convers
|
|
|
29
29
|
<img src="assets/readme-product-overview.en.svg" width="100%" alt="BailingHub connects conversational entry points to governed business capabilities while the business system remains the authority">
|
|
30
30
|
</picture>
|
|
31
31
|
|
|
32
|
-
## v0.9.
|
|
32
|
+
## v0.9.3: bounded bodies and reliable notification shutdown
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Tool responses and remote attachments are bounded during reading. Oversized write responses retain the original unknown outcome without redispatch. Graceful close drains actual callbacks, notifications and DLQ writes. Executor dead letters replay only the original notification child, with permanent markers deduplicating admission for the same DLQ. New read-only metrics expose background maintenance.
|
|
35
35
|
|
|
36
|
-
The component set is **Core 0.9.
|
|
36
|
+
The component set is **Core 0.9.3 + MCP / Agent Client SDK 0.7.0 + DSH 0.7.0**. Explicitly apply **067** before new MySQL DLQ reads/writes; earlier upgrades also apply missing preceding migrations. Shared USD allowance, the unified multiplier and client orchestration remain unchanged. Notification drain covers graceful shutdown, without a full durable notification outbox. A release does not establish a deployment has upgraded.
|
|
37
37
|
|
|
38
|
-
[Release notes](docs/RELEASE_NOTES_v0.9.
|
|
38
|
+
[Release notes](docs/RELEASE_NOTES_v0.9.3.en.md) · [Upgrade guide](docs/UPGRADE_v0.9.3.en.md) · [Reliability and migrations](docs/CORE_RELIABILITY.en.md) · [Previous release](docs/RELEASE_NOTES_v0.9.2.en.md)
|
|
39
39
|
|
|
40
40
|
## Operate the System by Conversation
|
|
41
41
|
|
|
@@ -125,7 +125,7 @@ To explore before installing, use the [online experience](https://trial.bailingh
|
|
|
125
125
|
To run the complete disposable loop locally:
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
|
-
git clone --branch v0.9.
|
|
128
|
+
git clone --branch v0.9.3 --depth 1 https://github.com/bailinghub/bailinghub.git
|
|
129
129
|
cd bailinghub
|
|
130
130
|
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
131
131
|
docker compose up --build
|
|
@@ -214,7 +214,7 @@ Run separate BailingHub deployments for mutually isolated organizations. A `clie
|
|
|
214
214
|
- [HTTP Contract](docs/CONTRACT.en.md) — stable network and identity boundaries.
|
|
215
215
|
- [Architecture](docs/ARCHITECTURE.en.md) — runtime layers and dependency direction.
|
|
216
216
|
- [English Documentation Map](docs/README.en.md) — the complete public documentation index.
|
|
217
|
-
- [Changelog](docs/CHANGELOG.en.md) and [v0.9.
|
|
217
|
+
- [Changelog](docs/CHANGELOG.en.md) and [v0.9.3](docs/RELEASE_NOTES_v0.9.3.en.md) — current release changes and upgrade notes.
|
|
218
218
|
|
|
219
219
|
## Feedback and Ecosystem
|
|
220
220
|
|
package/README.md
CHANGED
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
|
|
28
28
|
在线体验环境只用于了解产品和配置方式。请勿上传生产凭据、敏感数据或接入真实业务;正式使用请自行部署开源版。
|
|
29
29
|
|
|
30
|
-
## v0.9.
|
|
30
|
+
## v0.9.3:有限收包与通知可靠收尾
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
HTTP 工具正文与远程附件在收包时执行限额,超限写操作保留原调用的未知结果,不自动重发。正常关闭等待回调、通知和死信记录的实际收尾;执行器死信只重投原通知子任务,并以持久标记防止同一死信重复入队。新增只读后台维护指标。
|
|
33
33
|
|
|
34
|
-
配套为 **Core 0.9.
|
|
34
|
+
配套为 **Core 0.9.3 + MCP / Agent Client SDK 0.7.0 + DSH 0.7.0**。升级须显式应用 **067**,更早版本补齐前序迁移;新 MySQL DLQ 读写须先就绪。共享 USD 额度、统一倍率与客户端编排保持。通知排空覆盖正常关闭,未提供全量持久通知 outbox;发行不代表具体环境已升级。
|
|
35
35
|
|
|
36
|
-
[版本说明](docs/RELEASE_NOTES_v0.9.
|
|
36
|
+
[版本说明](docs/RELEASE_NOTES_v0.9.3.md) · [升级指南](docs/UPGRADE_v0.9.3.md) · [可靠性与迁移](docs/CORE_RELIABILITY.md) · [上一版本](docs/RELEASE_NOTES_v0.9.2.md)
|
|
37
37
|
|
|
38
38
|
## 适合哪些团队
|
|
39
39
|
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
在本机启动中枢、MySQL、Demo 业务系统、工具源、路由和接入方:
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
git clone --branch v0.9.
|
|
118
|
+
git clone --branch v0.9.3 --depth 1 https://github.com/bailinghub/bailinghub.git
|
|
119
119
|
cd bailinghub
|
|
120
120
|
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
121
121
|
docker compose up --build
|
|
@@ -199,7 +199,7 @@ BailingHub Core 是独立服务,只通过稳定网络契约与业务系统协
|
|
|
199
199
|
| 集中开启本地智能体与工具 | [四步配置指南](docs/LOCAL_AGENT_SETUP.md) · [系统说明](docs/AGENT_SYSTEM_INFO.md) |
|
|
200
200
|
| 查 API 与边界契约 | [HTTP 契约](docs/CONTRACT.md) · [Client API](docs/CLIENT_API.md) |
|
|
201
201
|
| 理解架构与长期取舍 | [架构](docs/ARCHITECTURE.md) · [项目愿景](VISION.md) |
|
|
202
|
-
| 查看版本变化 | [CHANGELOG](docs/CHANGELOG.md) · [v0.9.
|
|
202
|
+
| 查看版本变化 | [CHANGELOG](docs/CHANGELOG.md) · [v0.9.3](docs/RELEASE_NOTES_v0.9.3.md) |
|
|
203
203
|
|
|
204
204
|
完整中英文文档地图见 [docs/README.md](docs/README.md)。公共 API、SDK、Schema、Docker Demo 与代码标识保持语言中立。
|
|
205
205
|
|
|
@@ -18,7 +18,7 @@ services:
|
|
|
18
18
|
retries: 30
|
|
19
19
|
|
|
20
20
|
demo-business:
|
|
21
|
-
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.9.
|
|
21
|
+
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.9.3}
|
|
22
22
|
environment:
|
|
23
23
|
DEMO_HOST: 0.0.0.0
|
|
24
24
|
DEMO_PORT: 19080
|
|
@@ -29,7 +29,7 @@ services:
|
|
|
29
29
|
- "${BAILING_DEMO_PUBLIC_PORT:-19080}:19080"
|
|
30
30
|
|
|
31
31
|
bailinghub:
|
|
32
|
-
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.9.
|
|
32
|
+
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.9.3}
|
|
33
33
|
depends_on:
|
|
34
34
|
mysql:
|
|
35
35
|
condition: service_healthy
|
package/docs/CHANGELOG.en.md
CHANGED
|
@@ -12,7 +12,7 @@ For the current integration contract, use:
|
|
|
12
12
|
|
|
13
13
|
## Recording Rules
|
|
14
14
|
|
|
15
|
-
Lead each release with a familiar business-assistant or enterprise-service scenario: the previous problem, changed behavior, affected users and developers, upgrade steps, observable checks and limits. Keep English and Chinese facts aligned and distinguish additions, fixes and existing features. See [the release scenario notes](RELEASE_NOTES_v0.9.
|
|
15
|
+
Lead each release with a familiar business-assistant or enterprise-service scenario: the previous problem, changed behavior, affected users and developers, upgrade steps, observable checks and limits. Keep English and Chinese facts aligned and distinguish additions, fixes and existing features. See [the release scenario notes](RELEASE_NOTES_v0.9.3.en.md).
|
|
16
16
|
|
|
17
17
|
Each public version should describe:
|
|
18
18
|
|
|
@@ -22,6 +22,17 @@ Each public version should describe:
|
|
|
22
22
|
- validation commands;
|
|
23
23
|
- related docs.
|
|
24
24
|
|
|
25
|
+
## v0.9.3 - Bounded bodies and reliable notification shutdown
|
|
26
|
+
|
|
27
|
+
Version date: 2026-10-14. A patch from Core 0.9.2; MCP / Agent Client SDK 0.7.0 and DSH 0.7.0 remain unchanged. See [release notes](RELEASE_NOTES_v0.9.3.en.md) and the [upgrade guide](UPGRADE_v0.9.3.en.md).
|
|
28
|
+
|
|
29
|
+
- Fix full buffering before body/attachment checks: tool bodies default to 5 MiB, files retain configured limits and channel attachments use 20 MiB, counting actual fetch-decoded bytes while reading. Model/audit views use UTF-8 byte budgets. Overflow discards partial bodies; dispatched writes retain original identity, idempotency and unknown outcome without redispatch.
|
|
30
|
+
- Fix graceful close omitting notification work: per-Kernel tracking covers actual callbacks, delivery creation, approval webhooks, alerts and DLQ writes, sharing the close budget with dynamic children and started maintenance producers. Timeouts preserve resources for same-instance retry. No durable outbox for all notification intents is added.
|
|
31
|
+
- Fix executor DLQs selecting native senders: verify original bindings and requeue only the original notification child, retaining full input and request/job identity. Atomic admission/markers deduplicate concurrent calls, lost acknowledgements and failed resolve/store reopening for the same DLQ. queued does not mean receipt; the business parent is never rerun.
|
|
32
|
+
- Add read-only, fixed-label background snapshots for in-flight/failures/recent runs, drain timeouts, latest settlement/approval pages and backoff. Read no business details, start no model request and do not claim persisted backlog counts.
|
|
33
|
+
- Add 067 DLQ kind/original-child/replay identity and Job admission markers. Explicitly migrate before new Core MySQL DLQ reads/writes and match adapters. Rollback retains queues/markers/history and separately verifies old schema-manifest compatibility in isolation. Dependency versions and the exact Mammoth exception expiry are unchanged.
|
|
34
|
+
- Add public synthetic and dedicated MySQL regressions for bodies, Unicode, close, old-data upgrade, concurrency and exceptions after real COMMIT. Notification tests cover storage interruption, not full SIGKILL recovery or production receipt. ACC, independent Hosts, clients and separate adapters do not release with this Core patch.
|
|
35
|
+
|
|
25
36
|
## v0.9.2 - Secure installation and persisted continuation
|
|
26
37
|
|
|
27
38
|
Version date: 2026-10-13. A patch from Core 0.9.1; MCP / Agent Client SDK 0.7.0 and DSH 0.7.0 remain unchanged. See [release notes](RELEASE_NOTES_v0.9.2.en.md) and the [upgrade guide](UPGRADE_v0.9.2.en.md).
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
## 记录规则
|
|
7
7
|
|
|
8
|
-
每次先用业务助手、企业服务等通用场景说明原问题与本版行为,再按使用者、业务后端与客户端开发者交代升级影响。中英文使用同一事实,新增能力、修复和已有能力分别标明;参考[本版场景说明](RELEASE_NOTES_v0.9.
|
|
8
|
+
每次先用业务助手、企业服务等通用场景说明原问题与本版行为,再按使用者、业务后端与客户端开发者交代升级影响。中英文使用同一事实,新增能力、修复和已有能力分别标明;参考[本版场景说明](RELEASE_NOTES_v0.9.3.md)。
|
|
9
9
|
|
|
10
10
|
每个公开版本至少说明:
|
|
11
11
|
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
- **验证方式**:部署方如何确认该版本运行正常;
|
|
16
16
|
- **相关文档**:对应的契约、指南或示例。
|
|
17
17
|
|
|
18
|
+
## v0.9.3 - 有限收包与通知可靠收尾
|
|
19
|
+
|
|
20
|
+
版本日期:2026-10-14。相对 Core 0.9.2 的补丁;MCP / Agent Client SDK 0.7.0、DSH 0.7.0 不变。[版本说明](RELEASE_NOTES_v0.9.3.md)、[升级指南](UPGRADE_v0.9.3.md)。
|
|
21
|
+
|
|
22
|
+
- 修复 HTTP/附件先完整缓冲再检查限额:工具正文默认 5 MiB,文件沿配置限额、渠道附件 20 MiB,逐块累计 fetch 解码后的实际字节;模型/审计视图按 UTF-8 字节截断。超限丢弃部分正文,已外发写操作保留原 ID、幂等和未知结果,不自动重投。
|
|
23
|
+
- 修复正常关闭遗漏通知工作:每个 Kernel 登记真实回调、通知派生、审批 webhook、告警和 DLQ 写入;共同关闭预算等待动态子工作及已开始维护生产者,超时保留资源供同实例重试。未提供覆盖全部通知意图的持久 outbox。
|
|
24
|
+
- 修复执行器死信错误走原生渠道:核原绑定,只重排原通知子任务,保留完整输入及 request/job;同一 DLQ 入队与标记原子保存,并发、确认丢失、resolve 失败/仓储重开不二次入队。queued 不等于收件方收到,业务父任务不重跑。
|
|
25
|
+
- 增加只读、固定标签的后台维护快照:在途/失败/最近运行、关闭超时、结算/审批最近一页和退避;不读业务明细,不触发模型请求,不冒充持久积压量。
|
|
26
|
+
- 新增 067 的 DLQ 类型/原通知/重投标识与 Job 入队标记;新 Core MySQL DLQ 读写前显式迁移并配套仓储。回退保留队列/标记/账本,旧制品 schema manifest 兼容性须在隔离副本另验。依赖版本和精确 Mammoth 例外期限不变。
|
|
27
|
+
- 公开合成回归及专用 MySQL 专项新增收包、Unicode、关闭、旧数据升级、并发和真实 COMMIT 后的异常检查;通知专项是仓储断点测试,不是 SIGKILL 全通知恢复或生产送达验收。ACC、独立 Host、客户端和其他独立适配层不随本版发行。
|
|
28
|
+
|
|
18
29
|
## v0.9.2 - 安全安装与原记录补续
|
|
19
30
|
|
|
20
31
|
版本日期:2026-10-13。相对 Core 0.9.1 的补丁;MCP / Agent Client SDK 0.7.0、DSH 0.7.0 不变。[版本说明](RELEASE_NOTES_v0.9.2.md)、[升级指南](UPGRADE_v0.9.2.md)。
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Core reliability: secrets, continuation, bounded bodies and notifications
|
|
2
2
|
|
|
3
3
|
[简体中文](CORE_RELIABILITY.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Installation, settlement and approval fixes are available from Core 0.9.2; the final HTTP/notification section is available from Core 0.9.3. Historical artifacts do not contain later fixes. Verify each deployment's source, artifact and migration ledger separately; updated documentation does not establish an upgrade.
|
|
6
6
|
|
|
7
7
|
## Installation secrets
|
|
8
8
|
|
|
@@ -57,3 +57,23 @@ node --import tsx --test --test-concurrency=4 \
|
|
|
57
57
|
Fixtures require a dedicated MySQL on local `127.0.0.1:16307`, an empty root password, and permission to create/drop test databases. Never point them at shared or production databases. Approval acceptance includes actual child-process SIGKILL, recovery in a different PID, lost COMMIT acknowledgements, concurrent continuation and missing-migration rollback. This establishes behavior in the fixtures, not real-provider availability, physical power-loss durability or production business acceptance. Skipped database tests do not count as passes.
|
|
58
58
|
|
|
59
59
|
See the [capability and public evidence index](IMPLEMENTATION_STATUS.en.md) for implementation and test links.
|
|
60
|
+
|
|
61
|
+
## Core v0.9.3 HTTP and notification fixes
|
|
62
|
+
|
|
63
|
+
Tool HTTP bodies have a separate default transport budget of 5 MiB. Content-Length can reject early, while streaming checks count actual fetch-decoded bytes even when the length is absent or understated. Excess bodies are cancelled and partial contents discarded. HTTP 200 headers cannot establish a completed write: body loss/overflow retains the original unknown-outcome and idempotency path without automatic redispatch. Model and audit views have separate UTF-8 byte budgets. Remote files retain configured max_bytes (20 MiB by default); channel attachments have a 20 MiB download limit. These bound downloads, not decompression or parser resources. See [bounded body tests](../src/core/platform/http-body.test.ts), [tool recovery tests](../src/core/contracts/tools-idempotency.test.ts) and [file tests](../src/adapters/llm/file.test.ts).
|
|
64
|
+
|
|
65
|
+
Each Kernel tracks actual callback, delivery, approval webhook, alert and DLQ continuations, draining them before resource closure within the shared close budget. Accepted work can register children during drain. Stopped standalone timers also drain already-started maintenance producers, so a monitor waiting on SQL cannot register an alert after notification drain. Timeouts preserve resources for another close attempt on the same instance. See the [tracker](../src/core/runtime/notification-background-work.ts), [real Kernel close tests](../src/app/kernel-notification-lifecycle.test.ts), [scheduler tests](../src/app/runtime-lifecycle.test.ts) and [outbound tests](../src/app/notification-outbound.test.ts). This covers graceful close. A durable outbox for all notification intents is still absent; it does not promise complete HTTP notification recovery after SIGKILL.
|
|
66
|
+
|
|
67
|
+
[Migration 067](../sql/067_delivery_dlq_replay.sql) adds DLQ kind, original notification child and replay identity, plus an independent state-store queue marker. Native channels retain their sender. Executor DLQs requeue only the verified original notification child, retaining recipient, full input and request/job identities; they never rerun the business parent. queued acknowledges admission, not receipt. Concurrent calls and lost queue/resolve acknowledgements cannot re-admit the same DLQ identity. A later failed notification produces a new DLQ that an operator may separately handle. JSONL remains single-writer.
|
|
68
|
+
|
|
69
|
+
Apply 067 before new Core MySQL DLQ reads/writes, including native-channel record/get. Custom stores need the optional ensureExecutorReplay and requeueDeliveryJobOnce methods; without them, executor replay is explicitly unavailable rather than sent through the wrong channel. Before rollback, stop related writers and retain migration, queue and marker evidence. Deleting markers and resubmitting is not recovery. Older artifact schema manifests may reject 067 history; verify rollback compatibility in an isolated copy without deleting migration rows to bypass checks. Deployment and independent Host upgrades/rollbacks remain separate operational actions.
|
|
70
|
+
|
|
71
|
+
Default tests cover [original notification replay](../src/app/delivery-dlq-replay.test.ts). The MySQL fixture uses dedicated localhost MySQL and random schemas to check old-data upgrade, concurrent admission, injected acknowledgement exceptions after real COMMIT, resolve failure and store reopening, invalid business bindings and long Unicode content. It tests storage interruption boundaries, not real process killing or production receipt:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
BAILING_NOTIFICATION_TEST_MYSQL=1 BAILING_NOTIFICATION_TEST_MYSQL_PORT=16307 \
|
|
75
|
+
BAILING_NOTIFICATION_BASELINE_ROOT=/absolute/clean/core-v0.9.2 \
|
|
76
|
+
node --import tsx --test src/app/delivery-dlq-replay.mysql.test.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
[Fixed-label metrics](OPERATIONS.en.md) expose process-local pending work, failures, drain timeouts and the latest settlement/approval page. Scrapes read memory without starting model requests. Test links do not establish executed passing runs or deployed environments. Verify formal artifact identity and deployment acceptance separately.
|
package/docs/CORE_RELIABILITY.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Core 可靠性:凭据、补续、收包与通知
|
|
2
2
|
|
|
3
3
|
[English](CORE_RELIABILITY.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
安装凭据、结算维护和审批补续从 Core 0.9.2 提供,末节的 HTTP/通知修复从 Core 0.9.3 提供。历史制品不包含后续版本的修改;具体部署需核对其源码、制品与迁移账本,不能从新版文档推导已经升级。
|
|
6
6
|
|
|
7
7
|
## 安装凭据
|
|
8
8
|
|
|
@@ -57,3 +57,23 @@ node --import tsx --test --test-concurrency=4 \
|
|
|
57
57
|
数据库 fixture 需要本机 `127.0.0.1:16307` 的专用 MySQL、root 空密码及创建/删除测试库权限,禁止指向共享或生产数据库。审批专项含实际子进程 SIGKILL、不同 PID 恢复、COMMIT 确认丢失、并发补续和缺迁移回滚。测试证明给定 fixture 的机制;不证明真实供应商、物理断电持久性或生产业务已验收。跳过的数据库测试不计为通过。
|
|
58
58
|
|
|
59
59
|
公开实现和测试入口见[能力与证据索引](IMPLEMENTATION_STATUS.md)。
|
|
60
|
+
|
|
61
|
+
## Core v0.9.3 的 HTTP 与通知修复
|
|
62
|
+
|
|
63
|
+
工具 HTTP 正文有独立的 5 MiB 默认传输预算;收到 Content-Length 后可以提前拒绝,仍逐块按 fetch 解码后的实际字节检查,缺少或低报长度不能绕过。超限停止下载并丢弃部分正文。HTTP 200 响应头不足以确认写入完成:正文超限/丢失沿原结果未知路径处理,保留原调用及幂等标识,不自动重投。模型视图和审计载荷分别按 UTF-8 字节截断。远程文件读取沿用配置的 max_bytes(默认 20 MiB),渠道附件下载为 20 MiB,均在收包时检查;这些是下载预算,不是解压/解析器资源保证。见[有限收包测试](../src/core/platform/http-body.test.ts)、[工具恢复测试](../src/core/contracts/tools-idempotency.test.ts)和[文件测试](../src/adapters/llm/file.test.ts)。
|
|
64
|
+
|
|
65
|
+
每个 Kernel 登记回调、通知、审批 webhook、告警与 DLQ 写入的实际收尾工作,在资源关闭前使用共同关闭预算排空;已有工作可以在排空期间登记子工作。standalone 定时器停止后也等待已开始的巡检等维护生产者,避免等待数据库的巡检在通知排空后才登记告警。超时保留资源及同实例重试能力。见[登记器](../src/core/runtime/notification-background-work.ts)、[实际 Kernel 关闭测试](../src/app/kernel-notification-lifecycle.test.ts)、[调度器回归](../src/app/runtime-lifecycle.test.ts)和[通知出口测试](../src/app/notification-outbound.test.ts)。此机制覆盖正常关闭;尚未建立覆盖全部通知意图的持久 outbox,不能据此承诺 SIGKILL 后所有 HTTP 通知都会补投。
|
|
66
|
+
|
|
67
|
+
[067 迁移](../sql/067_delivery_dlq_replay.sql)新增 DLQ 类型、原通知子任务及重投标识,并新增状态仓独立入队标记。原生渠道仍调用原生送达;执行器死信只重排已核对的原通知子任务,保留原收件人、完整输入和 request/job 标识,不重跑业务父任务。返回 queued 表示入队,不表示收件方已收到。并发或入队成功但确认/resolve 写入失败时,同一死信标识不再二次入队;重新失败产生的新死信可由运营者另行处理。JSONL 仍限单 writer。
|
|
68
|
+
|
|
69
|
+
启动新 Core 的 MySQL DLQ 读写前必须应用 067,包括原生渠道的 record/get;自定义仓储需实现可选的 ensureExecutorReplay 与 requeueDeliveryJobOnce,否则执行器重投明确 unavailable,不降级到错误渠道。回退前停止相关写入并保留迁移账本、队列和标记;删除标记再重投不是恢复。旧制品的 schema manifest 未必接受 067 账本,代码回退须先在隔离副本核验兼容,不能删除迁移记录绕过检查。具体部署与独立 Host 的升级/回滚需各自协调,不由 Core 发行自动部署。
|
|
70
|
+
|
|
71
|
+
默认测试覆盖[原通知重投](../src/app/delivery-dlq-replay.test.ts)。MySQL 专项使用专用本机 MySQL 和随机测试库,检查旧数据升级、并发入队、真实提交后的确认异常注入、resolve 失败后仓储重开、错误业务绑定及长中文内容;这是仓储断点测试,不是实际杀进程或生产送达验收:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
BAILING_NOTIFICATION_TEST_MYSQL=1 BAILING_NOTIFICATION_TEST_MYSQL_PORT=16307 \
|
|
75
|
+
BAILING_NOTIFICATION_BASELINE_ROOT=/absolute/clean/core-v0.9.2 \
|
|
76
|
+
node --import tsx --test src/app/delivery-dlq-replay.mysql.test.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
后台维护可通过[固定标签指标](OPERATIONS.md)观察在途、失败、关闭超时、最近一页结算/审批进度;抓取只读内存,不触发模型请求。测试入口不等于实际通过记录或已部署环境;正式制品身份和部署验收分别核验。
|
|
@@ -6,10 +6,10 @@ This index separates **ownership, release availability, public evidence, and lim
|
|
|
6
6
|
|
|
7
7
|
## Version and evidence conventions
|
|
8
8
|
|
|
9
|
-
- Formal release baseline: [v0.9.
|
|
9
|
+
- Formal release baseline: [v0.9.3](https://github.com/bailinghub/bailinghub/releases/tag/v0.9.3), with the [v0.9.3 source Tag](https://github.com/bailinghub/bailinghub/tree/v0.9.3). The table's mechanisms are included in this release; versioned fixes retain their first-release identities. This does not mean that every optional feature is enabled by a default installation.
|
|
10
10
|
- Historical baseline: [v0.9.0](https://github.com/bailinghub/bailinghub/releases/tag/v0.9.0), commit [`dae5260ede6565080d21e94ae63d52f3a7d23556`](https://github.com/bailinghub/bailinghub/tree/dae5260ede6565080d21e94ae63d52f3a7d23556). Its asynchronous shutdown gap remains documented below. Verify source, npm, images, and deployments separately; updated documentation does not fix old artifacts.
|
|
11
11
|
- Test links identify **public test source and the conditions it checks**, not passing runs newly produced by this page. Unit tests, simulated provider responses, MySQL integration tests, and the complete demo have different scopes. Skipped or unexecuted tests are not passing evidence, and do not make an existing mechanism a planned feature.
|
|
12
|
-
- Use the [v0.9.
|
|
12
|
+
- Use the [v0.9.3 release notes](RELEASE_NOTES_v0.9.3.en.md) and [upgrade guide](UPGRADE_v0.9.3.en.md) for release contents and prerequisites. Compatible clients, application migrations, provider credentials, storage, and business authorization still require their own configuration and acceptance.
|
|
13
13
|
|
|
14
14
|
## Ownership and release availability
|
|
15
15
|
|
|
@@ -17,18 +17,18 @@ Core defaults to one organization's management and audit domain. Clients, routes
|
|
|
17
17
|
|
|
18
18
|
| Capability and owner | Release availability | Public implementation and evidence | Scope and limitations |
|
|
19
19
|
|---|---|---|---|
|
|
20
|
-
| Declarations, tool discovery, and governed calls: Core parses/governs; the business system executes | Included in Core v0.9.
|
|
21
|
-
| Agent Auth: Core binds client sessions; the business authorization page supplies trusted identity | Included in Core v0.9.
|
|
22
|
-
| Agent Client Runtime: Core exposes workspaces, turns, discovery, and tool invocation | Included in Core v0.9.
|
|
23
|
-
| Approvals, original invocation snapshots, and read-only receipts: Core governs; the business system owns the outcome | Included in Core v0.9.
|
|
24
|
-
| Cross-turn task controls: Core persists original members, write-call allowance, and concurrency occupancy | Included in Core v0.9.
|
|
25
|
-
| Visible conversation audit: the client explicitly uploads; Core validates members and persists events | Included in Core v0.9.
|
|
26
|
-
| Current-thread context and optional rolling summaries: Core route/thread mechanisms | Included in Core v0.9.
|
|
27
|
-
| Attachment space: the host supplies approved images; Core uploads and returns usable URLs | Included in Core v0.9.
|
|
28
|
-
| Optional model gateway and USD allowance settlement: Core connects/meters; the client host orchestrates | Included in Core v0.9.
|
|
29
|
-
| Model-tool directory, text-to-image, and original-request lookup: optional Core gateway extensions | Included in Core v0.9.
|
|
30
|
-
| Kernel Host API, explicit migrations, and managed lifecycle: Core provides an embedding entry point; the Host manages processes and isolation | Included in Core v0.9.
|
|
31
|
-
| Installation, smoke checks, and optional operational metrics: Core provides entry points; operators configure and accept deployments | Included in Core v0.9.
|
|
20
|
+
| Declarations, tool discovery, and governed calls: Core parses/governs; the business system executes | Included in Core v0.9.3 | [Tool model](TOOLS_MODEL.en.md); [tool-index source](../src/services/tools-index.ts) / [tests](../src/services/tools-index.test.ts); [execution governance tests](../src/core/runtime/execution-runtime.test.ts) | Discoverability is not permission to call. The receiving API must verify the signature and recheck the subject, tenant, permissions, and business state. A declaration cannot create authority the caller did not have. |
|
|
21
|
+
| Agent Auth: Core binds client sessions; the business authorization page supplies trusted identity | Included in Core v0.9.3 | [Agent Auth contract](AGENT_AUTH_API.en.md); [route source](../src/routes/agent-auth.ts); [lifecycle HTTP tests](../src/routes/agent-auth-lifecycle-http.test.ts) / [race tests](../src/infrastructure/config/config-agent-auth-lifecycle-race.test.ts) | PKCE, authorization binding, refresh, and revocation are implemented. They do not replace business login, role management, or final authorization, or let the model choose a trusted principal through text. |
|
|
22
|
+
| Agent Client Runtime: Core exposes workspaces, turns, discovery, and tool invocation | Included in Core v0.9.3 | [Runtime API](AGENT_CLIENT_RUNTIME_API.en.md); [runtime source](../src/app/agent-client-runtime.ts) / [tests](../src/app/agent-client-runtime.test.ts); [invocation tests](../src/app/agent-tool-invocations.test.ts) | The local Agent host owns model selection, its reasoning loop, and tool orchestration. Core's existing `/run` pipeline is a separate public integration path; the two must not be presented as one client execution mode. |
|
|
23
|
+
| Approvals, original invocation snapshots, and read-only receipts: Core governs; the business system owns the outcome | Included in Core v0.9.3 | [Receipts versus recovery](INVOCATION_RECEIPTS.md); [invocation source](../src/app/agent-tool-invocations.ts) / [tests](../src/app/agent-tool-invocations.test.ts); [approval-ledger tests](../src/infrastructure/config/config-approval-ledger.test.ts) | Reading an original receipt differs from resume, which may continue execution. Unknown outcomes do not permit replaying a write, and missing historical arguments must not be invented. Approval does not prove business success or guarantee rollback of a distributed business transaction. |
|
|
24
|
+
| Cross-turn task controls: Core persists original members, write-call allowance, and concurrency occupancy | Included in Core v0.9.3 (introduced in v0.8.0) | [Task control contract](AGENT_TASK_CONTROL.en.md); [runtime source](../src/core/runtime/agent-task-control.ts) / [tests](../src/core/runtime/agent-task-control.test.ts); [MySQL journal integration tests](../src/infrastructure/config/config-agent-task-control-journal-mysql.test.ts) | These controls govern business invocations, not model-turn subscriptions. Write-call counts are not refund amounts, successful transactions, or Tokens. Pause/cancel cannot undo a permitted or completed business effect. |
|
|
25
|
+
| Visible conversation audit: the client explicitly uploads; Core validates members and persists events | Included in Core v0.9.3 | [Conversation audit contract](AGENT_CONVERSATION_AUDIT.en.md); [runtime tests](../src/core/runtime/agent-conversation-audit.test.ts) | Hidden reasoning is not collected. Membership confirmation and a write API do not prove all history was uploaded. Audit archives do not merge authorization, sessions, or runtime memory. Cross-binding use retains the same-Hub and individual-identity boundaries. |
|
|
26
|
+
| Current-thread context and optional rolling summaries: Core route/thread mechanisms | Included in Core v0.9.3 | [Memory configuration/rendering](../src/core/runtime/memory.ts); [thread injection source](../src/core/runtime/memory-runtime.ts) / [tests](../src/core/runtime/memory-runtime.test.ts); [summary tests](../src/core/runtime/summary-runtime.test.ts) | Summaries are disabled by default and still read from the original thread when enabled. This is not a complete user-level memory system across new conversations. Visible audit archives do not automatically enter model context. |
|
|
27
|
+
| Attachment space: the host supplies approved images; Core uploads and returns usable URLs | Included in Core v0.9.3 (introduced in v0.8.0) | [Image attachment contract](GENERATED_ARTIFACTS.en.md); [artifact source](../src/app/agent-artifacts.ts) / [tests](../src/app/agent-artifacts.test.ts) | The first increment accepts PNG/JPEG/WebP, not documents or video. Operators configure storage and retention. Core cannot read the client's filesystem. Uploading an image and changing a business record with its URL are separate actions. |
|
|
28
|
+
| Optional model gateway and USD allowance settlement: Core connects/meters; the client host orchestrates | Included in Core v0.9.3 | [Model billing contract](MODEL_BILLING.en.md); [gateway source](../src/modules/usage/model-gateway.ts); [model-gateway MySQL tests](../src/modules/usage/model-gateway.mysql.test.ts); [ledger unit tests](../src/modules/usage/billing-ledger.test.ts) | Shared USD allowances use a uniform multiplier and separate periodic price from allowance. They do not restore turn/step billing. Reference prices are not provider invoices; raw Tokens are not the allowance denominator. Missing authoritative usage does not permit inventing Tokens or fees. |
|
|
29
|
+
| Model-tool directory, text-to-image, and original-request lookup: optional Core gateway extensions | Included in Core v0.9.3 | [Tool-description source](../src/modules/usage/model-tools.ts) / [tests](../src/modules/usage/model-tools.test.ts); [provider adapter tests](../src/modules/usage/model-tool-provider.test.ts); [asynchronous-image MySQL tests](../src/modules/usage/model-tool-gateway.mysql.test.ts) | Executable adapters include Alibaba-compatible Images, native DashScope, and OpenRouter Images. A video, voice, or custom-service directory declaration does not provide an execution adapter. The completion/shutdown boundary is described below. |
|
|
30
|
+
| Kernel Host API, explicit migrations, and managed lifecycle: Core provides an embedding entry point; the Host manages processes and isolation | Included in Core v0.9.3 | [Kernel Host API](KERNEL_HOST_API.en.md); [Kernel source](../src/app/kernel.ts) / [tests](../src/app/kernel.test.ts); [artifact-manifest tests](../src/kernel-api/v1/artifact.test.ts); [migration tests](../src/infrastructure/schema/core-schema-migrator.test.ts) | Separate MySQL schemas/runtimeRoots, trusted instanceKeys, explicit migrations, and Host-owned tick/close calls are prerequisites. The API does not provide tenant signup, platform plans, cluster directories, or multi-replica upgrade orchestration. The optional usage gateway is not the Host's platform billing product. |
|
|
31
|
+
| Installation, smoke checks, and optional operational metrics: Core provides entry points; operators configure and accept deployments | Included in Core v0.9.3 | [Quickstart](QUICKSTART.en.md); [installer](../scripts/install.sh); [smoke script](../scripts/smoke.ts); [OpenMetrics tests](../src/core/observability/openmetrics.test.ts); [independent reproduction task](INDEPENDENT_VALIDATION.en.md) | A health response does not establish that all business operations/providers are available. Metrics require explicit enablement and access protection. Installation/diagnostic entry points do not establish continuous monitoring, staffed alerts, or acceptance of a particular deployment. |
|
|
32
32
|
|
|
33
33
|
## What the public validation paths establish
|
|
34
34
|
|
|
@@ -40,7 +40,7 @@ Simulated provider responses establish adapter/protocol behavior for the specifi
|
|
|
40
40
|
|
|
41
41
|
### Public demo and independent reproduction task
|
|
42
42
|
|
|
43
|
-
The [Docker demo](DEMO.en.md) and [independent validation task](INDEPENDENT_VALIDATION.en.md) provide a public path from installing v0.9.
|
|
43
|
+
The [Docker demo](DEMO.en.md) and [independent validation task](INDEPENDENT_VALIDATION.en.md) provide a public path from installing v0.9.3 through smoke checks and `npm run demo:e2e`. Orders, tickets, refunds, and failure tools use repository demo data. Real model keys, customer APIs, and production credentials are unnecessary.
|
|
44
44
|
|
|
45
45
|
The task requires concrete results for service startup, console access, anonymous-preview boundaries, smoke checks, and the complete business loop. The README's images and animation show that same public fixture, not customer adoption. Publishing a task card does not establish that an external developer completed it. Reports should retain the actual version, environment, checks, and failure scope.
|
|
46
46
|
|
|
@@ -79,3 +79,7 @@ Keep this page and its Chinese companion aligned. Retain the distinction between
|
|
|
79
79
|
## Reliability fixes in Core v0.9.2
|
|
80
80
|
|
|
81
81
|
[Installation secrets, settlement maintenance and approval continuation](CORE_RELIABILITY.en.md) covers failing closed without secure installation randomness, settlement without new traffic and durable continuation of approval decisions. It adds incremental migrations 065/066. Public checks include [installer failure tests](../scripts/install-secrets.test.mjs), [settlement MySQL acceptance](../src/modules/usage/billing-reconciliation.mysql.test.ts), [approval continuation tests](../src/app/approval-continuations.test.ts) and [approval MySQL/process acceptance](../src/app/approval-continuations.mysql.test.ts). These describe Core v0.9.2 implementation and coverage; they do not expand the historical v0.9.1 artifact guarantees.
|
|
82
|
+
|
|
83
|
+
## Core v0.9.3 body and notification fixes
|
|
84
|
+
|
|
85
|
+
The [HTTP and notification fixes](CORE_RELIABILITY.en.md#core-v093-http-and-notification-fixes) index public source and synthetic regression entry points for bounded bodies, UTF-8 views, graceful notification drain, original executor notification DLQ admission deduplication and migration 067. [Operational metrics](OPERATIONS.en.md) document read-only maintenance snapshots. These changes are available from Core v0.9.3, not in historical v0.9.2 artifacts. Graceful-close and storage-interruption tests do not establish complete crash recovery of all notification intents or production receipt. Verify Tag, npm, images and each deployment separately.
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
## 版本与阅读口径
|
|
8
8
|
|
|
9
|
-
- 正式发行基线:[v0.9.
|
|
9
|
+
- 正式发行基线:[v0.9.3](https://github.com/bailinghub/bailinghub/releases/tag/v0.9.3),对应 [v0.9.3 源码 Tag](https://github.com/bailinghub/bailinghub/tree/v0.9.3)。下表机制均包含在该版本中,各次修复仍标注首次发行版本;不代表默认安装后已启用所有可选功能。
|
|
10
10
|
- 历史基线:[v0.9.0](https://github.com/bailinghub/bailinghub/releases/tag/v0.9.0),对应提交 [`dae5260ede6565080d21e94ae63d52f3a7d23556`](https://github.com/bailinghub/bailinghub/tree/dae5260ede6565080d21e94ae63d52f3a7d23556)。原 Tag 的异步关闭缺口在后文保留;源码、npm、镜像和具体部署应分别核验,不能从新版文档推导旧制品已修复。
|
|
11
11
|
- 表中的测试链接是**公开测试代码及其检查范围**,不是本页重新执行所得的通过记录。单元测试、模拟供应商响应、MySQL 集成测试和完整 demo 验证分别说明各自覆盖的条件。未执行或跳过的测试不能写成已通过,也不能据此把已有机制写成“计划实现”。
|
|
12
|
-
- 版本发行内容与升级前提以 [v0.9.
|
|
12
|
+
- 版本发行内容与升级前提以 [v0.9.3 说明](RELEASE_NOTES_v0.9.3.md) 和 [升级指南](UPGRADE_v0.9.3.md) 为准。适配客户端、应用迁移、模型凭据、存储和具体业务授权仍需各自配置、验证。
|
|
13
13
|
|
|
14
14
|
## 能力归属与发行状态
|
|
15
15
|
|
|
@@ -17,18 +17,18 @@ Core 默认是一个组织的管理与审计域。不同 Client、route 或工
|
|
|
17
17
|
|
|
18
18
|
| 能力与责任方 | 发行状态 | 公开实现与证据入口 | 范围与限制 |
|
|
19
19
|
|---|---|---|---|
|
|
20
|
-
| 能力声明、工具发现、受控调用:Core 解析和治理,业务系统执行 | Core v0.9.
|
|
21
|
-
| Agent Auth:Core 绑定客户端会话,业务授权页提供可信身份 | Core v0.9.
|
|
22
|
-
| Agent Client Runtime:Core 提供工作区、turn、搜索和工具调用接口 | Core v0.9.
|
|
23
|
-
| 审批、原调用快照和只读回执:Core 治理,业务系统保留执行结果 | Core v0.9.
|
|
24
|
-
| 跨轮任务控制:Core 持久化原成员、写调用预算与并发占用 | Core v0.9.
|
|
25
|
-
| 可见对话审计:客户端显式上传,Core 校验成员和保存事件 | Core v0.9.
|
|
26
|
-
| 当前线程上下文和可选滚动摘要:Core 的路由/线程机制 | Core v0.9.
|
|
27
|
-
| 附件空间:宿主提供获准图片,Core 上传并返回可用 URL | Core v0.9.
|
|
28
|
-
| 可选模型网关与美元额度结算:Core 接入、计量,客户端宿主编排 | Core v0.9.
|
|
29
|
-
| 模型工具目录、文生图和原请求核对:Core 的可选网关扩展 | Core v0.9.
|
|
30
|
-
| Kernel Host API、显式迁移和托管生命周期:Core 提供稳定嵌入入口,Host 管理进程与隔离 | Core v0.9.
|
|
31
|
-
| 安装、体检与可选运维指标:Core 提供入口,部署者配置和验收 | Core v0.9.
|
|
20
|
+
| 能力声明、工具发现、受控调用:Core 解析和治理,业务系统执行 | Core v0.9.3 已包含 | [工具模型](TOOLS_MODEL.md);[工具索引源码](../src/services/tools-index.ts) / [测试](../src/services/tools-index.test.ts);[执行治理测试](../src/core/runtime/execution-runtime.test.ts) | 工具可发现不等于当前调用获准。业务接口还需验签,并重新检查主体、租户、权限和业务状态;声明不能赋予调用方原本没有的权力。 |
|
|
21
|
+
| Agent Auth:Core 绑定客户端会话,业务授权页提供可信身份 | Core v0.9.3 已包含 | [Agent Auth 契约](AGENT_AUTH_API.md);[路由源码](../src/routes/agent-auth.ts);[生命周期 HTTP 测试](../src/routes/agent-auth-lifecycle-http.test.ts) / [竞态测试](../src/infrastructure/config/config-agent-auth-lifecycle-race.test.ts) | PKCE、授权绑定、刷新和撤销有公开实现;不接管业务系统的登录、角色管理或最终授权,也不允许模型从文本指定可信主体。 |
|
|
22
|
+
| Agent Client Runtime:Core 提供工作区、turn、搜索和工具调用接口 | Core v0.9.3 已包含 | [Runtime API](AGENT_CLIENT_RUNTIME_API.md);[运行面源码](../src/app/agent-client-runtime.ts) / [测试](../src/app/agent-client-runtime.test.ts);[调用测试](../src/app/agent-tool-invocations.test.ts) | 本地 Agent 的模型选择、推理循环和工具编排由客户端宿主负责。Core 的原有 `/run` 管线是另一种公开接入路径,不能把两者混为同一客户端执行模式。 |
|
|
23
|
+
| 审批、原调用快照和只读回执:Core 治理,业务系统保留执行结果 | Core v0.9.3 已包含 | [只读回执与恢复](INVOCATION_RECEIPTS.md);[调用源码](../src/app/agent-tool-invocations.ts) / [测试](../src/app/agent-tool-invocations.test.ts);[审批账本测试](../src/infrastructure/config/config-approval-ledger.test.ts) | 原调用回执读取与可能继续业务的 resume 分开。未知结果不构成重发写操作的许可;没有历史参数时不能补造。审批本身不证明业务已成功,也不是分布式业务事务的回滚保证。 |
|
|
24
|
+
| 跨轮任务控制:Core 持久化原成员、写调用预算与并发占用 | Core v0.9.3 已包含(v0.8.0 引入) | [任务控制契约](AGENT_TASK_CONTROL.md);[运行面源码](../src/core/runtime/agent-task-control.ts) / [测试](../src/core/runtime/agent-task-control.test.ts);[MySQL 日志集成测试](../src/infrastructure/config/config-agent-task-control-journal-mysql.test.ts) | 这是受治理业务调用的控制,不是模型轮次套餐。写调用次数不等于退款金额、成功业务数或 Token 数;暂停/取消不能撤回已放行或已完成的业务效果。 |
|
|
25
|
+
| 可见对话审计:客户端显式上传,Core 校验成员和保存事件 | Core v0.9.3 已包含 | [对话审计契约](AGENT_CONVERSATION_AUDIT.md);[运行面测试](../src/core/runtime/agent-conversation-audit.test.ts) | 不采集隐藏推理。确认成员和具备写接口不证明宿主已上传全部历史;审计归档不合并业务授权、会话或运行时记忆。跨绑定仍受同一中枢及各自身份边界约束。 |
|
|
26
|
+
| 当前线程上下文和可选滚动摘要:Core 的路由/线程机制 | Core v0.9.3 已包含 | [记忆配置与渲染](../src/core/runtime/memory.ts);[线程注入源码](../src/core/runtime/memory-runtime.ts) / [测试](../src/core/runtime/memory-runtime.test.ts);[摘要测试](../src/core/runtime/summary-runtime.test.ts) | 摘要默认关闭,启用后仍按原线程读取。它不是完整的用户级跨新会话长期记忆模块;公开的可见对话审计也不会自动变成模型上下文。 |
|
|
27
|
+
| 附件空间:宿主提供获准图片,Core 上传并返回可用 URL | Core v0.9.3 已包含(v0.8.0 引入) | [图片附件契约](GENERATED_ARTIFACTS.md);[附件源码](../src/app/agent-artifacts.ts) / [测试](../src/app/agent-artifacts.test.ts) | 首期 PNG/JPEG/WebP,不接受文档或视频。存储和保留策略需运营者配置;Core 不能读取客户端文件系统。上传图片与使用 URL 改变业务是两个独立动作。 |
|
|
28
|
+
| 可选模型网关与美元额度结算:Core 接入、计量,客户端宿主编排 | Core v0.9.3 已包含 | [模型计费契约](MODEL_BILLING.md);[网关源码](../src/modules/usage/model-gateway.ts);[模型网关 MySQL 测试](../src/modules/usage/model-gateway.mysql.test.ts);[账本单元测试](../src/modules/usage/billing-ledger.test.ts) | 共享 USD 额度、统一倍率、周期售价与额度分离;不恢复按轮次/任务步数收费。参考价格不是供应商实际账单,原始 Token 不是额度分母。未取得权威 usage 的结果不能编造 Token 或费用。 |
|
|
29
|
+
| 模型工具目录、文生图和原请求核对:Core 的可选网关扩展 | Core v0.9.3 已包含 | [工具描述源码](../src/modules/usage/model-tools.ts) / [测试](../src/modules/usage/model-tools.test.ts);[供应商适配测试](../src/modules/usage/model-tool-provider.test.ts);[异步图片 MySQL 测试](../src/modules/usage/model-tool-gateway.mysql.test.ts) | 公开可执行适配器包括阿里云兼容 Images、原生 DashScope 与 OpenRouter Images。视频、语音或自定义服务的目录声明不等于存在可执行适配器;异步完成与关闭边界见下文。 |
|
|
30
|
+
| Kernel Host API、显式迁移和托管生命周期:Core 提供稳定嵌入入口,Host 管理进程与隔离 | Core v0.9.3 已包含 | [Kernel Host API](KERNEL_HOST_API.md);[Kernel 源码](../src/app/kernel.ts) / [测试](../src/app/kernel.test.ts);[制品清单测试](../src/kernel-api/v1/artifact.test.ts);[迁移测试](../src/infrastructure/schema/core-schema-migrator.test.ts) | 独立 MySQL schema 与 runtimeRoot、可信 instanceKey、显式迁移和 Host 的 tick/close 都是前提。此 API 不提供租户注册、平台套餐、集群目录或多副本升级编排;可选 usage 网关也不等于 Host 的平台计费产品。 |
|
|
31
|
+
| 安装、体检与可选运维指标:Core 提供入口,部署者配置和验收 | Core v0.9.3 已包含 | [快速开始](QUICKSTART.md);[安装脚本](../scripts/install.sh);[体检脚本](../scripts/smoke.ts);[OpenMetrics 测试](../src/core/observability/openmetrics.test.ts);[独立复现任务卡](INDEPENDENT_VALIDATION.md) | 健康响应不证明全部业务或供应商可用。指标端点需显式启用并保护访问;有安装/诊断入口不等于已建立持续监控、告警值守或完成特定部署验收。 |
|
|
32
32
|
|
|
33
33
|
## 公开验证能说明什么
|
|
34
34
|
|
|
@@ -40,7 +40,7 @@ Core 默认是一个组织的管理与审计域。不同 Client、route 或工
|
|
|
40
40
|
|
|
41
41
|
### 公开 demo 与独立复现任务卡
|
|
42
42
|
|
|
43
|
-
[Docker Demo](DEMO.md) 与 [独立验证任务卡](INDEPENDENT_VALIDATION.md) 提供从 v0.9.
|
|
43
|
+
[Docker Demo](DEMO.md) 与 [独立验证任务卡](INDEPENDENT_VALIDATION.md) 提供从 v0.9.3 安装、基础体检到 `npm run demo:e2e` 的公开路径。其订单、工单、退款和故障工具均为仓库 demo 数据;不需要真实模型 Key、客户接口或生产凭据。
|
|
44
44
|
|
|
45
45
|
任务卡要求记录服务、控制台、匿名预览边界、基础体检和完整业务闭环的具体结果。README 的 demo 图像与动画展示同一公开样例,不能当作客户采用证据。任务卡存在也不意味着已有外部开发者完成验证;报告结果应保留验证者实际版本、环境、检查项和失败范围。
|
|
46
46
|
|
|
@@ -79,3 +79,7 @@ Core v0.9.1 增加了每个 `UsageRepository` 独立拥有的 [后台工作登
|
|
|
79
79
|
## Core v0.9.2 的可靠性修复
|
|
80
80
|
|
|
81
81
|
[安装凭据、结算维护与审批补续](CORE_RELIABILITY.md)记录新安装安全随机源失败关闭、无新流量的结算维护及审批决策的持久补续。配套新增 065/066 增量迁移。公开测试包括[安装器故障回归](../scripts/install-secrets.test.mjs)、[结算 MySQL 回归](../src/modules/usage/billing-reconciliation.mysql.test.ts)、[审批补续回归](../src/app/approval-continuations.test.ts)与[审批 MySQL/进程回归](../src/app/approval-continuations.mysql.test.ts)。这些是Core v0.9.2的实现与检查范围;不扩展历史v0.9.1制品的保证。
|
|
82
|
+
|
|
83
|
+
## Core v0.9.3 的收包与通知修复
|
|
84
|
+
|
|
85
|
+
[HTTP 与通知修复](CORE_RELIABILITY.md#core-v093-的-http-与通知修复)汇聚有限收包、UTF-8 视图预算、正常关闭通知排空、原执行器通知死信防重复入队与 067 迁移的公开源码和合成回归入口;[运维指标](OPERATIONS.md)记录只读维护快照边界。这些修改从 Core v0.9.3 提供,历史 v0.9.2 制品不包含;正常关闭和仓储断点测试不证明全部通知意图的崩溃补投或生产送达。Tag、npm、镜像与具体部署仍需分别核验。
|
|
@@ -7,7 +7,7 @@ It is not certification, a benchmark, or evidence of production adoption. Passin
|
|
|
7
7
|
## Scope
|
|
8
8
|
|
|
9
9
|
- Target: the open-source BailingHub Docker demo;
|
|
10
|
-
- Stable baseline: `v0.9.
|
|
10
|
+
- Stable baseline: `v0.9.3`;
|
|
11
11
|
- Data: the bundled demo orders, tickets, refunds, and failure probe;
|
|
12
12
|
- Expected time: about 20 minutes after images and dependencies are available;
|
|
13
13
|
- Not required: a real model key, production API, production credential, or real business data.
|
|
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
|
32
32
|
cd "$HOME/bailinghub"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The installer pulls the official `v0.9.
|
|
35
|
+
The installer pulls the official `v0.9.3` images by default, generates random tokens and an admin password, starts the services, and runs the smoke test. The initial administrator is created only when the administrator table is empty; restarting, upgrading, recreating containers, or reinstalling against the same persistent database does not overwrite a changed password. The optional `/metrics` endpoint remains disabled and does not affect core validation. Keep the reported version, install mode, elapsed time, and the commands printed under `常用命令`, but never include passwords or tokens in your report. After Docker is installed, the current non-root login usually still needs the printed `sudo docker compose ...` commands; Docker group membership may not take effect until the next login.
|
|
36
36
|
|
|
37
37
|
If the default directory is already in use, choose a new empty directory instead of overwriting an existing deployment:
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
|
|
|
46
46
|
### Path B: local source reproduction
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
git clone --depth 1 --branch v0.9.
|
|
49
|
+
git clone --depth 1 --branch v0.9.3 https://github.com/bailinghub/bailinghub.git
|
|
50
50
|
cd bailinghub
|
|
51
51
|
git rev-parse HEAD
|
|
52
52
|
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
@@ -167,7 +167,7 @@ After the core task passes, you may continue with:
|
|
|
167
167
|
- [Trusted rich rendering and chat reliability](RELEASE_NOTES_v0.1.15.en.md).
|
|
168
168
|
- [Bounded tool runtime and resilient semantic retrieval](RELEASE_NOTES_v0.1.16.en.md).
|
|
169
169
|
- [Composable Core and Kernel Host API v1](RELEASE_NOTES_v0.3.0.en.md).
|
|
170
|
-
- [Current stable release notes](RELEASE_NOTES_v0.9.
|
|
170
|
+
- [Current stable release notes](RELEASE_NOTES_v0.9.3.en.md).
|
|
171
171
|
|
|
172
172
|
Select the relevant track in the same Issue form and disclose whether you received direct maintainer assistance.
|
|
173
173
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## 验证范围
|
|
8
8
|
|
|
9
9
|
- 验证对象:BailingHub 开源版 Docker demo;
|
|
10
|
-
- 稳定基线:`v0.9.
|
|
10
|
+
- 稳定基线:`v0.9.3`;
|
|
11
11
|
- 数据范围:仓库自带的 demo 订单、工单、退款和故障工具;
|
|
12
12
|
- 预计用时:镜像和依赖下载完成后约 20 分钟;
|
|
13
13
|
- 不需要:真实大模型 Key、生产 API、生产凭据或真实业务数据。
|
|
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
|
32
32
|
cd "$HOME/bailinghub"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
脚本默认拉取 `v0.9.
|
|
35
|
+
脚本默认拉取 `v0.9.3` 官方镜像,生成随机 Token 与后台密码,启动服务并自动运行基础体检。首次管理员只在数据库管理员表为空时创建;对同一持久化数据库进行重启、升级、容器重建或重新安装,不会覆盖已经修改的管理员密码。可选 `/metrics` 端点默认关闭,不影响基础验证。请保留终端输出中的版本、安装模式、耗时和“常用命令”,但不要把密码或 Token 写入反馈。新安装 Docker 后,当前非 root 会话通常仍需使用脚本打印的 `sudo docker compose ...` 命令;重新登录后 Docker 组权限才可能生效。
|
|
36
36
|
|
|
37
37
|
如果默认目录已被占用,请使用一个新的空目录,不要覆盖现有部署:
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
|
|
|
46
46
|
### 路径 B:本地源码复现
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
git clone --depth 1 --branch v0.9.
|
|
49
|
+
git clone --depth 1 --branch v0.9.3 https://github.com/bailinghub/bailinghub.git
|
|
50
50
|
cd bailinghub
|
|
51
51
|
git rev-parse HEAD
|
|
52
52
|
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
@@ -167,7 +167,7 @@ docker compose exec -T bailinghub npm run demo:e2e
|
|
|
167
167
|
- [可信富内容渲染与聊天可靠性](RELEASE_NOTES_v0.1.15.md)。
|
|
168
168
|
- [工具运行时收敛与语义检索韧性](RELEASE_NOTES_v0.1.16.md)。
|
|
169
169
|
- [可组合 Core 与 Kernel Host API v1](RELEASE_NOTES_v0.3.0.md)。
|
|
170
|
-
- [当前稳定版发布说明](RELEASE_NOTES_v0.9.
|
|
170
|
+
- [当前稳定版发布说明](RELEASE_NOTES_v0.9.3.md)。
|
|
171
171
|
|
|
172
172
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
173
173
|
|
package/docs/OPERATIONS.en.md
CHANGED
|
@@ -96,14 +96,24 @@ Primary metrics:
|
|
|
96
96
|
| `bailinghub_approvals_pending` | Tool approvals awaiting a decision |
|
|
97
97
|
| `bailinghub_executors` | Registered executors by online or offline heartbeat state |
|
|
98
98
|
| `bailinghub_audit_write_failures_total` | Audit-write failures observed by this process |
|
|
99
|
+
| `bailinghub_background_work_in_flight` / `bailinghub_background_work_oldest_pending_age_seconds` | Accepted background work and oldest in-flight age by fixed source / kind |
|
|
100
|
+
| `bailinghub_background_work_finished_total` | Continuation completion/failure outcomes observed by this owner, by fixed outcome |
|
|
101
|
+
| `bailinghub_background_work_last_run_timestamp_seconds` / `bailinghub_background_work_last_run_age_seconds` | Latest started / completed / failed time and age; timestamp=0 and no age sample when never observed |
|
|
102
|
+
| `bailinghub_background_draining` / `bailinghub_background_drain_timeouts_total` | Usage/notification tracker drain state and drain calls that exhausted their budget |
|
|
103
|
+
| `bailinghub_maintenance_last_page_records` / `bailinghub_maintenance_last_page_has_more` | Current/latest usage and approval continuation page progress; usage has_more=1 when the bounded page size is reached |
|
|
104
|
+
| `bailinghub_usage_maintenance_consecutive_failures` / `bailinghub_usage_maintenance_retry_after_seconds` | Bounded usage reconciliation failure streak and remaining retry backoff |
|
|
99
105
|
| `bailinghub_metrics_collector_available` | Whether each optional collector is implemented |
|
|
100
106
|
| `bailinghub_metrics_collector_success` | Whether each collector succeeded during this scrape |
|
|
101
107
|
| `bailinghub_metrics_scrape_duration_seconds` | Collection and rendering duration |
|
|
102
108
|
|
|
103
109
|
Labels are fixed and low-cardinality. They never include job IDs, tenants, principals, route arguments, or business payloads. If an optional collector times out or fails, the endpoint still returns the remaining metrics and sets that collector's `bailinghub_metrics_collector_success` to 0. Logs contain only the collector class and failure class, never exception text or business data. The JSONL state backend can expose job metrics; without the MySQL control-plane aggregation, `control_plane` is reported as unavailable.
|
|
104
110
|
|
|
111
|
+
The `maintenance` collector reads owner-local memory only. It does not query records, trigger reconciliation or call a model provider. Fixed sources are `usage`, `notification` and `approval`; kinds cover only existing model completion, settlement, response cleanup, usage reconciliation, reference price refresh, callbacks, delivery, approval notifications, alerts, delivery DLQ and approval continuation work. Completion counters describe Promise/continuation outcomes, not recipient delivery acknowledgements. An approval pass can complete with failed individual records; check the last-page `failed` sample as well. Counters reset when the process/owner is recreated. Last-page progress is not the persisted pending/unknown backlog or its oldest age, and has_more is not an exact backlog size. Unavailable optional modules do not emit invented zero samples.
|
|
112
|
+
|
|
105
113
|
At minimum, alert on collector failures, expired leases, sustained oldest-queue age above the service objective, increases in audit-write failures, expected executors becoming offline, and abnormal recent error or rejection ratios.
|
|
106
114
|
|
|
115
|
+
Also watch increases in failed background continuations or drain timeouts, sustained in-flight age beyond the work/shutdown objective, and recent-run age plus last-page failures to confirm maintenance is progressing.
|
|
116
|
+
|
|
107
117
|
Metrics feed external monitoring. They do not replace `/health/ready`, final business authorization, the audit ledger, or console diagnostics.
|
|
108
118
|
|
|
109
119
|
## 4. Concurrency And Database Connections
|
|
@@ -160,6 +170,9 @@ Recovery order:
|
|
|
160
170
|
- Approval intents remain durable in MySQL.
|
|
161
171
|
- Tool and model failures are recorded in job trace; retry behavior depends on route policy and error type.
|
|
162
172
|
- Security-critical tool audit is fail-closed. Best-effort operational audit must still feed metrics and alerts.
|
|
173
|
+
- Graceful close drains accepted callback, delivery, approval-notification, alert and DLQ continuations within the shared Kernel budget before closing database/channel resources. A timeout preserves resources for another close attempt. Background failure logs contain fixed work kinds only.
|
|
174
|
+
- Native delivery DLQs retain channel credentials. Custom `X-notify` DLQs requeue only the original failed notification child; queued acknowledges executor admission, not receipt. A permanent DLQ marker is saved atomically with admission, so repeated calls or lost resolve replies do not admit it again or rerun the business parent. Legacy entries are checked against the original job; binding conflicts return 409 and adapters without replay ports return 503.
|
|
175
|
+
- This drain does not provide a complete SIGKILL-safe notification outbox. Created executor jobs retain durable queue recovery; direct webhooks and the gap between parent termination and child creation remain separate recovery boundaries. Receivers should deduplicate original event identities; partial or unknown receipt must not be blindly resent.
|
|
163
176
|
|
|
164
177
|
## 8. Security Baseline
|
|
165
178
|
|
package/docs/OPERATIONS.md
CHANGED
|
@@ -121,18 +121,27 @@ scrape_configs:
|
|
|
121
121
|
| `bailinghub_approvals_pending` | 待决策的工具审批数 |
|
|
122
122
|
| `bailinghub_executors` | 按 online / offline 统计的执行器数 |
|
|
123
123
|
| `bailinghub_audit_write_failures_total` | 当前进程累计审计写入失败数 |
|
|
124
|
+
| `bailinghub_background_work_in_flight` / `bailinghub_background_work_oldest_pending_age_seconds` | 按固定 source / kind 统计已接纳的后台工作及最老在途年龄 |
|
|
125
|
+
| `bailinghub_background_work_finished_total` | 当前 owner 的 continuation 完成/失败数,按固定 outcome 区分 |
|
|
126
|
+
| `bailinghub_background_work_last_run_timestamp_seconds` / `bailinghub_background_work_last_run_age_seconds` | 最近 started / completed / failed 时间及距今秒数;从未观察到时 timestamp=0,age 不输出 |
|
|
127
|
+
| `bailinghub_background_draining` / `bailinghub_background_drain_timeouts_total` | Usage/通知 tracker 的关闭排空状态及耗尽预算的 drain 调用次数 |
|
|
128
|
+
| `bailinghub_maintenance_last_page_records` / `bailinghub_maintenance_last_page_has_more` | 当前/最近一页 usage、审批续执行处理进度;usage 达到固定扫描页大小时 has_more=1 |
|
|
129
|
+
| `bailinghub_usage_maintenance_consecutive_failures` / `bailinghub_usage_maintenance_retry_after_seconds` | Usage 核对的有界连续失败数和退避剩余秒数 |
|
|
124
130
|
| `bailinghub_metrics_collector_available` | 状态库/控制面采集器是否实现 |
|
|
125
131
|
| `bailinghub_metrics_collector_success` | 对应采集器在本次抓取中是否成功 |
|
|
126
132
|
| `bailinghub_metrics_scrape_duration_seconds` | 本次聚合和渲染耗时 |
|
|
127
133
|
|
|
128
134
|
指标标签是固定、低基数集合,不包含 `job_id`、租户、主体、路由参数或业务载荷。单个可选采集器超时或失败时,端点仍返回其余指标,并把对应 `bailinghub_metrics_collector_success` 置为 0;日志只记录采集器类别和失败类型,不记录异常正文或业务数据。JSONL 状态后端可提供任务指标,但没有 MySQL 控制面聚合时,`control_plane` 会标记为不可用。
|
|
129
135
|
|
|
136
|
+
`maintenance` 采集器只读当前 owner 内存,不查询明细、不触发核对或模型请求。固定 source 为 `usage`、`notification`、`approval`;kind 只包含现有模型完成、结算、响应清理、usage 核对、价格刷新、回调、通知送达、审批通知、告警、送达 DLQ 和审批续执行。工作完成数统计 Promise/continuation 的终态,不等于接收方确认送达次数;一轮审批核对可完成但保留失败记录,应同时看 last_page 的 `failed`。进程/owner 重建会重置这些计数。last_page 不是数据库里 pending/unknown 的总数或最老年龄,`has_more=1` 也不是精确积压量;不可用的可选模块不输出伪造零数据。
|
|
137
|
+
|
|
130
138
|
建议至少告警:
|
|
131
139
|
|
|
132
140
|
- 任一已启用采集器的 `bailinghub_metrics_collector_success == 0`。
|
|
133
141
|
- `bailinghub_jobs_expired_leases > 0`。
|
|
134
142
|
- `bailinghub_queue_oldest_queued_age_seconds` 持续超过本业务的最大等待目标。
|
|
135
143
|
- `bailinghub_audit_write_failures_total` 增长。
|
|
144
|
+
- `bailinghub_background_work_finished_total{outcome="failed"}` 或 drain timeout 增长,后台在途年龄持续超出关闭/任务目标;使用最近运行 age 和 last_page 失败数判断维护是否持续推进。
|
|
136
145
|
- 预期在线的执行器进入 `offline`,或近期错误/拒绝终态占比异常升高。
|
|
137
146
|
|
|
138
147
|
指标是外部监控输入,不替代 `/health/ready`、业务系统最终授权、审计账本或控制台诊断。
|
|
@@ -208,6 +217,9 @@ scrape_configs:
|
|
|
208
217
|
- 审批等待:审批意图在数据库中持久化,不依赖实例内存。
|
|
209
218
|
- 外部工具或模型失败:任务记录错误与 trace,是否重试由路由和错误类型决定。
|
|
210
219
|
- 审计写入失败:安全关键工具调用按 fail-closed 处理;非关键运行事件不阻塞业务,但应进入运维告警与指标。
|
|
220
|
+
- 正常关闭:Kernel 按同一关闭预算等待已接受的回调、送达派生、审批通知、告警和 DLQ 插入,再释放数据库/渠道资源;排空超时保留资源,宿主可在工作完成后重试 `close()`。后台失败日志只报告固定工作类别。
|
|
221
|
+
- 送达死信重投:内置渠道继续通过渠道凭证发送;自定义 `X-notify` 死信只重排原失败通知子任务,回复 `queued` 表示已进入执行器队列。永久 DLQ 重投标记与原子入队一起保存,重复请求或 resolve 回包丢失不会重复入队,业务父任务不会重跑。旧死信按原 Job 验证承接器,绑定不符返回 409,旧扩展缺少重投端口返回 503;人工可检查原通知子任务。
|
|
222
|
+
- 上述排空不提供 SIGKILL 后的全量通知 outbox:已创建的执行器任务仍由持久队列恢复;直接 webhook 和父终态到通知子任务创建之间的持久补投仍是独立边界。接收方需要按原事件 ID 去重,部分或未知送达不能盲目重发。
|
|
211
223
|
|
|
212
224
|
## 8. 安全基线
|
|
213
225
|
|