feat(dsh): add durable supervision, scheduling and operations dock
This commit is contained in:
1 parent
f861a3d386
commit
736b582bc1
46 files changed
+4122
-93
No files matched your search
@@ -0,0 +1,46 @@
|
||||
# DSH Operations Implementation Plan
|
||||
|
||||
> **For agentic workers:** Use executing-plans for integration and dispatching-parallel-agents for the independent domain modules. Track the items below and verify each deliverable before integration.
|
||||
|
||||
**Goal:** Implement all seven approved operations improvements in the existing DSH assistant.
|
||||
|
||||
**Architecture:** Qt owns execution and confirmation. Independent Qt-free stores own durable state and read-only analyses. Harness schemas and native slots expose bounded capabilities without changing the business persona.
|
||||
|
||||
**Tech Stack:** Python 3, SQLite/atomic JSON, PySide6, Node 24 and official Harness 0.2.1-rc.5.
|
||||
|
||||
**Spec:** `docs/superpowers/specs/2026-10-30-dsh-operations.md`.
|
||||
|
||||
## Constraints
|
||||
|
||||
- Work only in `.worktrees/codex-dsh`; retain shared checkout and other branches.
|
||||
- Never log credentials, stage bootstrap/provider files, invent CAD counts or weaken interruption/confirmation gates.
|
||||
- Native right dock, model tools and parent-process protocol must expose each completed feature; domain-only code is insufficient.
|
||||
|
||||
## Deliverables and interfaces
|
||||
|
||||
- [x] `dsh/run_journal.py`: `RunJournal(data_root).begin(run_id, task_ids, plan_hashes, *, schedule_id=None) -> dict`, `.finish(run_id, result)`, `.list_runs(limit=20)`, `.get(run_id)`, `.inspect(service, run_id) -> dict`. Records contain `run_id`, `queue_id=run_id`, ordered `task_ids`, `plan_hashes`, `status`, UTC timestamps and `result`. Inspect returns actual counters/blockers and resume scope without starting work.
|
||||
- [x] `dsh/scheduling.py`: `ScheduleStore(data_root).save(spec, plan_hashes) -> dict`, `.list_schedules()`, `.get(schedule_id)`, `.cancel(schedule_id)`, `.claim(schedule_id)`, `.finish(schedule_id, status, **values)`, `.evaluate(service, *, now=None, busy=False) -> list[dict]`. Spec uses `task_ids`, `priority` (`low/normal/high/urgent`), `not_before`, optional `due_at`, `dependencies`, `auto_start`, and optional `title`. No external calls or actual execution from this module.
|
||||
- [x] `dsh/experience.py`: `ExperienceStore(data_root).refresh() -> list[dict]`, `.search(issue_code='', *, limit=5) -> list[dict]`, `.summary() -> dict`. Derive entries from existing incidents and preserve explicit verification and evidence identity.
|
||||
- [x] `dsh/ticket_tracking.py`: `TicketTracker(data_root).refresh(incident_id) -> dict`, `.list_tickets() -> list[dict]`. Use `GitIssuePublisher.connection()` and protected fixed-target read requests; no arbitrary URL or writing capability.
|
||||
- [x] `dsh/impact.py`: `execution_impact(service, task_ids, *, limit=100) -> dict`. Exact selected component rows for saved target plans; mapping-only rows with `component_count=None`, `coverage='mapping_only'`. Include totals, omitted-row count and fingerprint/hash references.
|
||||
- [x] Integrate run journal/resume and checkpoint reservation into `task_queue.py` and `ui/dsh_task_lifecycle.py`; keep all execution receipt counts and existing safety gates.
|
||||
- [x] `ui/dsh_operations.py` owns scheduling, recovery/history, impact, experience and ticket requests and native dialogs. Initialize it on desktop startup without loading Chromium; publish data when Harness opens. Timer uses existing worker lane, preserves model turns and does not invoke model APIs on each tick.
|
||||
- [x] Runtime usage module records native session events and honors configurable response timeout/cancel without cancelling confirmed CAD writes. Bound and cache unchanged task reads while preserving audit evidence.
|
||||
- [x] Extend context, tool schemas, guard roster, right dock, tool settings and direct UI actions. Keep automatic agents snapshot-only. Expose usage limits as tool settings with explicit units and unknown price handling.
|
||||
- [x] Verify tests first for each domain, integrate, run regressions and real CLI/Qt/CDP acceptance, document actual results and commit to `codex/dsh`.
|
||||
|
||||
## Verification recipes
|
||||
|
||||
Each new domain test starts by exercising a missing module/API (expected failure), then verifies durable behavior against temporary real stores and fixture services. Integration tests use existing `tests/ui/conftest.py` controlled executor and actual Qt confirmation clicks. Run:
|
||||
|
||||
```powershell
|
||||
pytest -q tests/dsh tests/ui tests/v1_1/test_task_queue.py tests/packaging/test_dx_part_replace_build.py
|
||||
pytest -q tests/v1_1/test_execution_feedback.py
|
||||
node tools/verify_dsh_runtime.mjs
|
||||
```
|
||||
|
||||
Complete real-model acceptance with isolated fixtures and existing Qt/CDP driver, including reload/restart, known versus unknown impact, due scheduling, safe pause and ticket refresh. Report controlled-executor limits explicitly.
|
||||
|
||||
## Verified result
|
||||
|
||||
All seven operations are integrated in the native dock and schema surface. Final regression: 277 passed across three processes (193 + 2 + 82); same-name test modules run separately. CLI runtime, dock startup, bounded model results, native usage/compaction and real two-process Qt/CDP acceptance passed. The acceptance resumed the original queue and dispatched one explicitly authorized schedule exactly once using controlled no-match fixtures. See docs/testing/2026-10-30-dsh-operations.md for evidence and limits. No release EXE was built.
|
||||
@@ -0,0 +1,35 @@
|
||||
# DSH operations and planning
|
||||
|
||||
The user approved all seven previously proposed features: realtime supervision, restart recovery, execution impact lists, incident experience, ticket tracking, model usage/response improvements, and task scheduling. Continue on the existing isolated `codex/dsh` worktree. Existing native Harness and service confirmation gates remain authoritative.
|
||||
|
||||
## Runtime supervision and recovery
|
||||
|
||||
Publish live owner, current project, stage, elapsed time, saved/failed/no-match counts and safe-stop request independently of the selected task. Root task status must not claim draft or paused while an active worker is executing. Retain the last execution receipt separately from subsequent catalog reads.
|
||||
|
||||
Persist each confirmed execution in a `RunJournal(data_root)` before entering the executor. Reserve its queue checkpoint ID before launch. After restart, inspect saved journal rows and existing task evidence, display recoverable/interrupted work, and never replay automatically. Resume reconfirms the original order and frozen plan, reuses the checkpoint and skips completed entries. Uncertain results still require the existing reconciliation workflow.
|
||||
|
||||
## Impact lists
|
||||
|
||||
Build a pure read-only impact report from saved contexts. For explicit target plans, show project, sheet, RefDes, stable UID, old/new part, old/proposed Value, Cell policy and NC policy. For mapping mode without collected targets, show mapping scope and clearly state that the number and identities of matching components are unknown. Never invent component counts. Include the report in preflight and native execution confirmation. Full report is available through the authenticated local UI, with bounded summaries for the model.
|
||||
|
||||
## Incident experience and ticket tracking
|
||||
|
||||
Index local existing incident evidence with `ExperienceStore(data_root)`. Mark an experience verified only when persisted verification proves complete, no failures, no interruption and no pause. Evidence-less suggestions, closed tickets and model claims are never verified repairs. Match by issue code and diagnostic context; suggestions cannot grant execution authority or bypass one-retry budgets. Incorporate bounded related experiences as data into diagnosis and show evidence references.
|
||||
|
||||
`TicketTracker(data_root)` refreshes only an existing incident's bound server/repository/issue number through the existing issue publisher authentication. Read status and bounded comments, store a scrubbed cache and expose last sync/errors. Validate the ticket URL/marker against the configured repository before transmitting credentials. No model-controlled arbitrary URL or write/comment operation is exposed. Issue closure is feedback rather than proof that local CAD was fixed. Manual refresh is available without a Git installation; periodic refresh stays quiet on unchanged data.
|
||||
|
||||
## Model efficiency and usage
|
||||
|
||||
Retain the official native token display and add bounded per-session usage, duration and error/timeout state through backend runtime events. Unknown provider pricing must display unavailable rather than invented money. Repeated task reads within an unchanged revision may be cached; full evidence remains on disk, model results are bounded, and all relevant safeguards and identity fields survive compaction. Expose a bounded configurable response timeout and a stop-generation action using the native session cancel API. Cancelling model generation never falsely cancels an already confirmed task mutation or CAD operation.
|
||||
|
||||
## Scheduling
|
||||
|
||||
`ScheduleStore(data_root)` persists selected tasks, frozen plan hashes, priority, optional due time, not-before time, dependency task IDs and idle-only state. Save/cancel pass through native confirmation. Datetimes use ISO 8601 with timezone offsets; timestamps are stored in UTC. Reject unknown fields, invalid priorities, self-dependencies and invalid IDs. Dependencies must be actually completed with no unresolved evidence. Priority then scheduled time determine order.
|
||||
|
||||
The scheduler runs only while the desktop app is open. Due tasks are shown on the right dock. Automatic idle execution requires a native confirmation explicitly authorizing the saved engineering scope for that future run; otherwise the task remains awaiting manual confirmation. Before dispatch it repeats preflight, dirty-plan checks and the frozen plan comparison. Busy workers, CAD/resource blockers, changed plans and uncertainty prevent dispatch. Claiming a schedule is durable and exclusive. Interrupted dispatch is not retried automatically after restart.
|
||||
|
||||
## Integration and verification
|
||||
|
||||
All new business capabilities are exposed as backend schemas; do not put tool names or routing recipes into the persona/user prompts. Automatic incident sessions remain event-snapshot-only. Reuse authenticated context/action routes and bounded parent-process request/results. Add native right-dock sections and direct actions within the existing three-column UI.
|
||||
|
||||
Verify domain state transitions, crash/restart receipts, stale plans, truthful impact counts, dependency and schedule gates, ticket authentication confinement, experience verification and generation cancellation. Run real CLI policy checks, real-model natural-language actions and Qt/CDP clicks using isolated fixture projects and a controlled executor. No release EXE or real user engineering mutation is included.
|
||||
@@ -0,0 +1,80 @@
|
||||
# 2026-10-30 DSH 监管与排期验证记录
|
||||
|
||||
本次在隔离的 `codex/dsh` 工作树验证七项增量:实时执行监管、重启恢复、执行影响、本地异常经验、只读工单跟踪、模型用量与响应控制、任务排期。原生 Qt 确认、原任务执行门禁和官方 Harness 三栏界面继续负责交互与执行边界。
|
||||
|
||||
本文只记录已落盘报告。七页签两进程桌面验收已通过,包含实际模型请求、Qt 原生确认点击和 Chromium CDP 点击。
|
||||
|
||||
## 已确认的实测证据
|
||||
|
||||
### 默认模型自然语言任务闭环
|
||||
|
||||
报告:[desktop-report.json](../../build/dsh-operations-lifecycle-v2/desktop-report.json)。驱动为真实提供方 API、Qt QTest 和 Chromium CDP,报告 `status=passed`、`cleanShutdown=true`、`unexpectedUiErrors=false`;记录 26 次模型工具调用。用户提示未包含显式工具名。
|
||||
|
||||
实测包括查找并切换工程任务、修改名称和备注、修改同批已有料号规则、预检、原生窗口确认执行、另一段真实对话请求安全暂停、确认后继续处理、复制配置到新工程、只归档副本,以及在原生窗口取消修改。模型实际遇到忙碌、拒绝、暂停和取消状态后继续依据回执处理,未将它们计作写入成功。跨进程复用原检查点的独立证据见下一节。
|
||||
|
||||
执行器为 `controlled_no_match`,完成两个真实队列项,报告实际未命中而非替换成功;报告明确 `realCadStarted=false`。SQLite 配置和共享规则得到核对,三个源 fixture 文件哈希保持一致。该证据验证任务路由、原生确认和队列状态闭环,不证明真实 CAD 已连接或保存替换成功。
|
||||
|
||||
### 两次实际启动的七页签与恢复验收
|
||||
|
||||
报告:[report.json](../../build/dsh-operations-verified/20261030-180748/report.json),分阶段记录为 [initial-web.json](../../build/dsh-operations-verified/20261030-180748/initial-web.json) 和 [resume-web.json](../../build/dsh-operations-verified/20261030-180748/resume-web.json)。总报告 `status=passed`,两个应用进程均正常退出,源 fixture 哈希保持不变。
|
||||
|
||||
首次启动通过自然语言读取 Board-A 的影响、运行历史和经验,点击核对映射模式未知数量、精确位号的 UID/RefDes/Value/Cell/NC,以及已验证与无证据经验的不同标记;实际输入并保存用量设置。模型经原生确认开始执行,运行页安全暂停等待第一项收尾后保留原队列。
|
||||
|
||||
第二次完整启动后,实际点击恢复并原生确认,执行第二项且跳过第一项;两项执行日志的队列路径相同、工作项编号不同。随后先取消排期窗口确认未保存,再实际点击未来自动执行授权复选框、核对勾选状态并确认。排期只执行一次并保存 `auto_start=true`、`status=completed`。设置跨进程保留,既有工单仍能只读同步。
|
||||
|
||||
全程共三次 `controlled_no_match` 执行器调用:Board-A 暂停前第一项、重启后剩余第二项、Board-C 授权排期一项。`realCadStarted=false`、`remoteIssuesCreated=false`,不表示真实 CAD 替换成功。早期失败尝试未计入通过结果。
|
||||
|
||||
界面截图:[暂停与原队列记录](../../build/dsh-operations-verified/20261030-180748/paused-before-restart.png)、[精确影响](../../build/dsh-operations-verified/20261030-180748/exact-impact.png)、[工单同步](../../build/dsh-operations-verified/20261030-180748/after-restart-operations.png)。
|
||||
|
||||
### 原生用量、取消、超时与上下文压缩
|
||||
|
||||
报告:[report.json](../../build/dsh-native-usage-verification/report.json)。报告 `status=passed`、`nativeHarness=true`、`controlledAdapter=true`、`externalModel=false`。
|
||||
|
||||
实际运行官方 Harness,验证认证路由、提供方用量事件、同一响应重复用量不重复累计、未知价格保持不可用、原生取消、每次流式响应超时、设置持久化、原生上下文压缩,以及从原生会话历史恢复已记录用量。该报告中的提供方为受控适配器;它与上节真实默认模型 API 验收分别提供证据,不将受控响应称为外部模型回复。
|
||||
|
||||
响应超时范围为 15–600 秒,默认 90 秒。计时只覆盖提供方流式响应,提供方结束后等待业务工具或原生确认不继续占用该定时器。取消调用原生会话接口,不调用任务停止或 CAD 接口。
|
||||
|
||||
上下文设置范围为 2,000–128,000 Token,默认 16,000;模式为 `native_compaction_threshold`。它触发原生压缩检查,不是输入 Token 的硬上限。没有安全压缩区间时保留实际状态。历史 Token 可恢复,历史响应耗时不可重建时为未知,价格未提供时仍为未知。
|
||||
|
||||
### 真实固定目标工单只读同步
|
||||
|
||||
缓存:[2e47a924ef8463bb43da2ec9.json](../../build/dsh-real-ticket-tracking/dsh/ticket-cache/2e47a924ef8463bb43da2ec9.json)。实测读取既有 [工单 #8](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/issues/8),使用预填上报身份,缓存记录 `status=synced`、`state=closed`、`credential_source=prefilled_issue_token`、`locally_verified=false`,评论数量为零。
|
||||
|
||||
此检查没有创建工单、写评论或修改远端状态。工单关闭不作为本地修复证明。缓存与事件编号匹配,真实数据保存于 `dsh/ticket-cache/`;凭据内容未进入报告。
|
||||
|
||||
## 实现与验收范围
|
||||
|
||||
| 能力 | 当前行为与必须保留的边界 |
|
||||
| --- | --- |
|
||||
| 实时监管 | 右侧运行页显示活动队列真实所有者、阶段、耗时、暂停请求和保存/失败/未命中计数;切换选中任务不改变活动所有者;最近执行回执独立于后续任务查询。 |
|
||||
| 重启恢复 | 进入执行器前保存运行日志并预留检查点。恢复核对原任务顺序、冻结哈希和证据,复用原检查点、跳过已完成项。启动不自动重放;不确定状态仍走原核验流程。 |
|
||||
| 执行影响 | 保存位号计划展示工程、图页、RefDes、UID、料号、Value、Cell、NC 和启用状态,精确计数只统计启用目标。映射模式数量和身份未知;`part_label` 最终 Value 未知。默认及最大 100 行,省略数量与全范围哈希并存;最多 20 个任务。 |
|
||||
| 本地经验 | 保留有界诊断/复盘、尝试、处理结果、下一步与证据。仅独立持久化核验及证据证明完成、零失败、无中断、无暂停时标记验证通过。模型建议及关闭工单仍不构成修复证明;经验数据不授予动作权限或增加重试额度。 |
|
||||
| 工单跟踪 | 只读取本地既有事件绑定的固定服务器、仓库、编号及标记;认证前校验目标;有限评论、脱敏缓存、上次同步与错误可查看。不开放任意 URL、写入或评论接口。 |
|
||||
| 用量与响应 | 原生提供方用量保持未知值与实际值的区别,未知价格不估算。保存有界设置,原生取消与工程安全暂停独立,压缩使用原生机制。 |
|
||||
| 排期 | 保存优先级、不早于时间、可选截止时间、依赖和冻结范围。优先级后按时间排序;依赖须实际完成且无未核验结果。原生确认保存/取消,未来自动执行须在原生窗口明确授权;仅应用打开且空闲时检查和执行。 |
|
||||
|
||||
排期启动前再次核对预检、未保存编辑、计划哈希和资源状态。手动暂停任务、忙碌、依赖未完成或计划变化等会阻断;截止时间不会强制结束当前工程步骤。领取持久且互斥,已领取的中断执行重启后不自动再次领取或重放。定时检查不调用模型,不应在不变状态下持续打扰对话。
|
||||
|
||||
原生当前任务执行、20 个以内的原生批次和助手确认的队列纳入 DSH 运行日志。超过 20 个任务的原生分组保留原分组检查点,没有合并到这套日志,因此不承诺从 DSH 合并运行恢复它。
|
||||
|
||||
右侧页签为概览、运行、影响、排期、经验、工单、用量。原概览默认显示、原有选择器与 Harness slots 保留。普通会话共有七项业务能力,包括新增的综合监管工具;自动异常会话仍仅允许事件快照。新增能力不通过 persona 提示教授工具路由。
|
||||
|
||||
## 最终检查命令
|
||||
|
||||
最终 DSH、界面、队列与打包回归为 193 项通过,另运行同名执行反馈测试 2 项通过;存储、服务、执行监管协议及恢复门禁另有 82 项通过,共 277 项。两个目录含同名测试模块,须分进程运行,避免 pytest 默认导入模式的模块名冲突;`importlib` 模式不兼容现有测试间的直接导入。
|
||||
|
||||
```powershell
|
||||
python -X utf8 -m pytest -q tests/dsh tests/ui tests/v1_1/test_task_queue.py tests/packaging/test_dx_part_replace_build.py
|
||||
python -X utf8 -m pytest -q tests/v1_1/test_execution_feedback.py
|
||||
python -X utf8 -m pytest -q tests/trial_task_center/test_store.py tests/trial_task_center/test_store_read_model.py tests/trial_task_center/test_service.py tests/v1_1/test_supervisor_protocol.py tests/v1_1/test_supervisor_result.py tests/v1_1/test_batch_supervisor.py tests/v1_1/test_startup_recovery.py tests/v1_1/test_service_plan_safety.py
|
||||
node tools/verify_dsh_runtime.mjs
|
||||
node tools/verify_dsh_dock_startup.mjs
|
||||
node tools/verify_dsh_model_results.mjs
|
||||
```
|
||||
|
||||
以上三个 Node 验证命令均返回 `status=passed`。原生工具名单为七项,认证、禁止能力、过期上下文与非法动作门禁通过;首次无会话时自动接入本工具工作区,同一会话更新不反复重开右侧停靠页,已有选中会话保持;模型回执保留真实提交编号且展示有界。八个相关 JavaScript 文件语法检查及 `git diff --check` 通过。对 46 个待提交文件逐字节检查本机提供方密钥与预填工单令牌,匹配数为零。
|
||||
|
||||
七页签、原生排期授权、执行历史与重启恢复的真实 Qt/CDP 验收使用 `tools/accept_dsh_operations.py` 和 `tools/verify_dsh_operations_ui.mjs`,本次通过产物为 `build/dsh-operations-verified/20261030-180748/`。
|
||||
|
||||
本轮未构建或发布新 EXE,未执行真实用户工程 CAD 写入。fixture 的未命中结果、模拟提供方用量和实际外部模型对话分别说明,不合并推断为真实替换成功。
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
“检查这个任务能否执行”会核对保存的配置、工程文件可用性、启用规则或位号、失败/中断证据和待释放后台资源,返回具体阻断原因。预检不连接 CAD,不代表许可、备份、替换或保存已经成功。
|
||||
|
||||
“按顺序执行这几个任务”或“继续这个任务未完成的部分”会展示真实任务编号、工程路径、启用范围,并等待原生确认。一次最多选择 20 个不同任务;执行计划在进入原队列租约后再次核对。继续使用原任务保存的执行进度,重新确认本次范围与顺序,创建本次队列检查点;不重复已经收尾的步骤。未保存的位号编辑、待核验中断和未准备的失败重试会阻断执行。
|
||||
“按顺序执行这几个任务”或“继续这个任务未完成的部分”会展示真实任务编号、工程路径、启用范围与执行影响,并等待原生确认。一次最多选择 20 个不同任务;执行计划在进入原队列租约后再次核对。新执行在进入执行器前保存运行回执和队列检查点;恢复原运行时重新核对原顺序、冻结计划和已有证据,复用原检查点,不重复已经收尾的项。未保存的位号编辑、待核验中断和未准备的失败重试会阻断执行。
|
||||
|
||||
执行中可请求“安全暂停当前执行”,程序只设置当前运行的 StopControl,等待当前项安全收尾;“已请求暂停”与“已经暂停”分别返回。执行回执包含真实保存、失败、未命中和待核验状态。未命中不是已替换保存;确认后中止模型等待也不会撤销已经提交的配置事务,最终结果以持久回执和任务证据为准。
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
未解决时,AI 再做一轮复盘,保存结论、依据、未知项和后续验证方法,并尝试提交 Git 工单。事件以任务、原执行轮次和错误码去重;同一任务同一原执行轮次的不同错误码共享一次重试额度,执行前持久记录,重启不重置。未知错误、未授权执行和未核验状态仅诊断取证,不自动重放工程写入。
|
||||
|
||||
- 普通对话开放快照、创建、任务列表及详情、预检、任务管理、受控执行六项能力;自动异常诊断会话只允许事件快照,其他调用在执行前被拒绝。Shell、通用文件访问、插件安装、子智能体及模型直接 CAD 写入工具均未注册;额外工具会被 guard 阻断。
|
||||
- 普通对话开放快照、创建、任务列表及详情、预检、任务管理、受控执行、综合监管七项能力;综合监管包含影响、运行恢复、排期、经验与工单查询。自动异常诊断会话仍只允许事件快照,其他调用在执行前被拒绝。Shell、通用文件访问、插件安装、子智能体及模型直接 CAD 写入工具均未注册;额外工具会被 guard 阻断。
|
||||
- **刷新任务上下文**重新发布当前任务快照。
|
||||
- 手动点击 **准备失败项重试**须在任务中心确认,并通过现有重试按钮的状态检查;该按钮只准备重试。自动介入使用上文限定的一次重试闭环。
|
||||
- **安全暂停**须确认且当前确有执行控制器,使用原队列的安全边界暂停。
|
||||
@@ -53,6 +53,50 @@
|
||||
|
||||
Harness 使用任务中心数据目录下独立的 `dsh/harness-home` 保存会话和设置,浏览器偏好在 `dsh/browser`;不加载个人 Harness profile 或 Codex 凭据。服务只监听回环地址,遥测关闭;关闭主工具时先结束所属运行时。上述限制由应用的插件组合和 guard 实现,不是操作系统沙箱。
|
||||
|
||||
## 右侧任务监管
|
||||
|
||||
右侧保留官方三栏界面,在“任务监管”内部提供 **概览、运行、影响、排期、经验、工单、用量** 七个页签。默认进入概览。各页按钮直接请求任务中心,原生窗口负责需要确认的操作;不需要发送特定模型提示或记忆工具名。
|
||||
|
||||
### 运行与重启恢复
|
||||
|
||||
**运行**页显示实际执行所属任务、运行编号、阶段、耗时、当前进度、已保存/失败/未命中数量及安全暂停请求。即使左侧选中其他任务,活动执行仍显示真实所有者。请求暂停后,执行器在当前项安全收尾后停止;等待期间仍显示执行中。
|
||||
|
||||
最近一次执行回执独立保留,随后查看任务列表不会覆盖它。执行历史根据本地持久记录和任务证据判断可否恢复;重启只展示记录,不自动重放。点击 **核对并恢复原队列** 后仍须原生确认。计划变化、缺少或损坏检查点、未核验中断、失败项等会阻断恢复;待核验结果从任务中心原流程处理。
|
||||
|
||||
原生任务中心的当前任务执行,以及不超过 20 个任务的原生批次,也写入这套运行记录。超过 20 个任务的原生分组继续使用原分组检查点,不加入 DSH 合并运行历史;不要把该分组当作可以从本页恢复的合并运行。
|
||||
|
||||
### 影响范围
|
||||
|
||||
**影响**页只读取保存的计划,不连接 CAD 或重新采集。精确位号计划逐行显示工程、图页、RefDes、稳定 UID、新旧料号、旧与拟议 Value、Cell 和 NC 策略;禁用行明确标记,元件数量只统计已启用目标。
|
||||
|
||||
仅有料号映射时显示映射范围,匹配元件数量、位号和 UID 均为未知;规则数量不能当作元件数量。“保留 Value”和自定义 Value 展示已知值;“复制元件库标签”需要执行时读取,预览不会把新料号冒充实际 Value。预检和执行确认也包含这个范围说明。
|
||||
|
||||
一次报告最多 20 个任务、显示 100 行,超过部分列出省略数量。完整范围指纹和计划哈希仍包含省略行;截断展示不缩小实际执行范围。
|
||||
|
||||
### 排期
|
||||
|
||||
**排期**页可为当前任务打开原生排期窗口,设置优先级、不早于时间、可选截止时间和依赖任务。时间必须带时区,保存为 UTC、界面按本机时区显示;截止时间用于展示计划要求,不表示到时强制中断。依赖须实际完成且无失败、暂停或待核验证据。调度先比较优先级,再比较执行时间。
|
||||
|
||||
保存和取消均经原生确认。未勾选未来执行授权的排期等待手动确认;只有在原生窗口明确勾选“授权到时空闲自动执行并保存以上工程”后,才可在主工具打开、执行器空闲时自动执行冻结范围。定时检查不调用模型,也不是关闭应用后的后台服务。
|
||||
|
||||
启动前重新检查预检、未保存编辑、冻结计划和资源门禁;忙碌、手动暂停任务、依赖未完成、计划变化或不确定结果都会阻断。排期领取持久且互斥,执行中断或重启后不自动重新领取并重放。需要继续时核对运行历史与原任务证据。
|
||||
|
||||
### 经验与工单
|
||||
|
||||
**经验**页按异常代码或诊断关键词检索本地事件,展示诊断/复盘、尝试次数、处理结果、后续建议和证据引用。优先呈现已验证经验,再比较异常代码精确匹配和记录新旧。只有独立持久化核验及证据证明队列完成、失败为零、无中断且无暂停,才显示“已验证”。模型声称修复、工单关闭或无证据建议保持未验证。
|
||||
|
||||
相关经验以有界数据提供给诊断,不授予执行权限,也不增加一次重试额度。建议中的下一步仍需核对当前工程和已有门禁。
|
||||
|
||||
**工单**页只读同步既有事件绑定工单的状态和有限评论,显示上次同步、错误和证据入口;无需安装 Git。请求先核对固定服务器、仓库、工单编号及事件标记,再使用对应身份。不提供任意 URL、写评论或修改远端工单操作。工单关闭仅表示服务端反馈,不等于本地 CAD 已修复。定期同步不变时不打扰对话。
|
||||
|
||||
### 模型用量与响应设置
|
||||
|
||||
**用量**页保留官方 Token 显示,并列出各会话由实际提供方事件报告的输入、输出、缓存及总 Token、生成耗时和错误/超时状态。未报告的用量显示“未报告”,未知价格显示“未提供”;不会按零费用估算。重启可从原生会话历史恢复已记录 Token,历史生成耗时无法重建时保持未知。
|
||||
|
||||
响应超时可配置为 **15–600 秒**,默认 90 秒,针对每一次提供方流式响应;等待原生确认或业务工具执行的时间不计入该响应定时器。**停止生成**使用原生会话取消接口,只停止模型生成,不会假装已撤销确认过的配置事务或工程执行;工程安全暂停仍使用运行页的按钮。
|
||||
|
||||
模型上下文设置范围为 **2,000–128,000 Token**,默认 16,000。这是触发 Harness 原生上下文压缩的阈值,不是请求大小的硬上限;有安全可压缩区间时由原生逻辑压缩,保留任务身份、工具调用配对和可重建的记录。无法安全压缩或缺少原生能力时保留实际状态,不承诺强制截断。当前版本读取可在未变化的修订内复用缓存,完整审计依据仍保留在本地。
|
||||
|
||||
## 诊断证据与 Git 工单
|
||||
|
||||
每次自动介入在数据目录 `dsh/incidents/<事件编号>/` 保存:前后任务快照、脱敏诊断包、事件时间线、规则门禁明细、模型可见会话、尝试动作、实际核验结果、工单草稿和带 SHA256 清单的 `evidence.zip`。保留可审阅的诊断说明,不要求模型输出隐藏思维过程;“取证”只收集本工具已有的日志与运行记录,不扫描无关网络流量、工程源文件或用户文件。
|
||||
@@ -87,4 +131,6 @@ python tools/accept_dsh_desktop.py --provider-config "$env:LOCALAPPDATA/DxProduc
|
||||
|
||||
2026-10-30 已完成默认模型的真实对话、`dx_task_snapshot` 调用和完整流式回复验证,记录见 `docs/testing/2026-10-30-dsh-native-integration.md`。此验收没有执行 CAD 修改,也不代表已构建发布 EXE。
|
||||
|
||||
七项监管能力、重启恢复、用量与真实只读工单的验证范围见 [DSH 监管与排期验证记录](../testing/2026-10-30-dsh-operations.md)。其中执行验收使用隔离 fixture 与受控未命中执行器;不据此声称真实用户工程完成替换。
|
||||
|
||||
专用工单身份的权限检查:`python tools/verify_dsh_issue_reporter.py`。该命令清空进程 PATH,验证无 Git 环境仍使用预填令牌,并要求代码、发布、建仓库与管理接口被拒绝。维护者首次配置使用 `tools/provision_dsh_issue_reporter.py`;最终用户不运行该脚本。免 Git 的真实桌面验收可运行 `tools/accept_dsh_desktop.py --incident --without-git --provider-config '<模型配置目录>'`。
|
||||
Reference in new issue
Block a user