Files
dxdesigner-part-replacement/docs/testing/2026-10-30-dsh-task-lifecycle.md

5.1 KiB

DSH conversational task lifecycle acceptance

Implemented on codex/dsh: real task lookup and selection, metadata and existing mapping edits with native batch-impact preview, configuration copy through the native project selector, recycle-bin archive, execution preflight, confirmed serial execution/continuation and safe StopControl pause.

The model receives six bounded backend schemas. Business prompts contain no tool names or routing instructions. Automatic incident sessions remain limited to their event-bound snapshot; management, catalog, preflight, creation and execution requests are denied before desktop emission.

Automated verification

Targeted tests cover real SQLite records, shared-rule propagation, persistent duplicate-request receipts, stale previews, missing projects, deleted tasks, native cancellation, cancellation while reading, retention of receipts during confirmed writes, disabled rule copying, StopControl scope and real controlled queue results. Queue tests reject changed confirmed plan hashes inside the queue lease before the executor runs. Derived target Cell resets and custom Value enablement are included in the preview and committed from the same normalized patch.

The complete relevant regression command is:

pytest -q tests/dsh tests/ui tests/packaging/test_dx_part_replace_build.py tests/trial_task_center/test_application.py tests/trial_task_center/test_quick_run.py tests/v1_1/test_task_queue.py tests/v1_1/test_diagnostics_bundle.py tests/v1_1/test_project_context.py
node tools/verify_dsh_runtime.mjs

tools/verify_dsh_auto_runtime.mjs was run with the configured test provider. It verified a real model turn, immutable incident binding and rejection of every new capability in an automatic session. CLI policy checks verified the exact six-tool roster, desktop-only operations, unauthorized tools, authentication and stale/cross-task routes.

Final verification in the isolated codex/dsh worktree: 160 passed in 63.80 seconds; the real Harness CLI check returned status: passed. A credential scan of all 25 changed files found neither the configured model API key nor the prefilled issue token. Runtime dependencies are reused through an ignored local junction; the token bootstrap remains ignored.

Real model and desktop acceptance

Command:

python tools/accept_dsh_lifecycle.py --output build/dsh-lifecycle-accepted --provider-config "$env:LOCALAPPDATA/DxProductivity/trial-task-center/dsh" --port 9235

Provider: skyworth-deepseek-v4.1-flash through the previously configured test API. Credentials were passed through the existing local encrypted configuration, never through the prompt or report.

The passing run used the real main window, official Harness page, Chromium Input events and Qt QTest mouse clicks. Eight natural-language messages triggered 20 real backend calls. The run:

  1. Found and selected Board-A, changed its name and note, and modified a shared mapping after confirming both affected tasks.
  2. Read execution readiness without claiming a CAD connectivity check.
  3. Confirmed execution scope in Qt, opened another conversation and requested a safe pause through natural language. The actual StopControl stopped after the current queue item.
  4. Confirmed continuation and executed the remaining item exactly once. The receipts reported saved 0, failed 0, no-match 2; no-match was not presented as a replacement save.
  5. Copied configuration to a newly selected Board-C project through the real directory scan and confirmation controls; received a new persisted task ID.
  6. Archived only the copy, preserving the original task.
  7. Clicked Cancel on a proposed rename and confirmed that the original database name remained unchanged.

Final database metadata, shared rules, task bindings, archive target and executor call count were independently checked. All three source fixture hashes were unchanged. Clean shutdown was recorded without uncaught or unexpected UI errors.

Artifacts are under build/dsh-lifecycle-accepted/: desktop-report.json, report.json, native confirmation captures, dsh-execution-results.png, dsh-lifecycle-in-tool.png and the isolated SQLite data directory. The full passing artifacts were generated in the shared checkout before moving the same verified source into the isolated codex/dsh worktree.

Limits and review

The executor was controlled to produce two no-match results; no real DxDesigner process or user engineering file was modified. This verifies integration and control flow, not CAD connectivity or successful part replacement. No release EXE was built.

Independent read-only review found a cancellation receipt race and an omitted derived Cell reset in previews. Both were corrected and covered by tests. The final review reported no remaining Critical or Important findings.

Configuration copy deliberately confirms a displayed draft; later edits to the source do not rewrite that draft. A continuation reconfirms the requested scope and order and starts a queue checkpoint over the same tasks' saved execution progress. It preserves completed task steps rather than reusing an unrelated native group checkpoint.