Describe the bug
Tracking #1450, work package B. This follows the direct tool/command boundary fix in #1451 / #1452.
The registered DSH agent/pre-step path does not consistently report or isolate automatic failures:
- Scope resolution can fail into a silent catch, before prepare/capture diagnostics run.
- A debug/warning writer failure can discard an otherwise valid PreparedContext.
- The automatic Scope call does not receive the hook's cancellation signal; later stages may start after cancellation.
- Successful recalled content lacks the DSH snapshot metadata (
form and sections) needed for inspectable presentation.
- Rebuilding the downstream enter decision drops fields such as DSH's
startsRequestSeries.
Steps to reproduce
Baseline: PowerContext commit c776cddf564cc2b4c9b45d79a3e056fea26ddad8 (PR #1452).
- Load the plugin with its normal
apply registration and send a user message through the registered agent/pre-step callback.
- Return HTTP 404 from
/v1/scope-bindings/resolve, once without a business code and once with scope_not_found. Observe that the original messages continue but the Scope failure is not reported through the plugin logger.
- Return a valid Scope and a valid ready PreparedContext containing a UTF-8 fixture. Make either the ready debug writer or the capture-failure warning writer throw. Observe the prepared content is lost.
- Cancel during Scope resolution or a later automatic stage. Inspect outgoing requests and appended messages.
- On success, inspect the injected message source and a downstream decision containing
startsRequestSeries: true.
A new registered-entry regression suite was run against that unchanged implementation: 28 tests, 8 passed, 20 failed. It uses controlled HTTP responses and a host registration fixture; it is code-level reproduction, not reproduction of the original reporting user's deployment. The implementation PR will include these tests and real-host qualification.
Expected behavior
- Automatic Scope/prepare/capture/flush failures remain fail-open for normal host work and use the existing bounded, content-free plugin logger.
- Scope failure stops subsequent PowerContext operations, without binding creation or Scope fallback. Preserve typed classification and public error-code filtering from A.
- With a valid Scope and active overall signal, prepare failure still permits independent capture. Capture/flush/logging failure cannot discard already prepared content.
- Cancellation propagates through Scope and the remaining requests; no subsequent operation or injection starts after cancellation. Preserve host rejection/cancellation/exception semantics.
- Successful content is appended at most once per preparation as a supported snapshot with exact text, untrusted-evidence framing, and complete downstream decision fields. Empty/failure results create no success snapshot or model-facing failure notice.
- Preserve Source idempotency, user-only capture, privacy checks, byte limits, request/flush budgets, Scope isolation and A's direct-operation behavior.
Actual behavior
Scope errors and message-construction errors are silently swallowed. Automatic resolution lacks signal forwarding. Logging can change the data result, and injected messages contain only a plugin source without snapshot sections. The wrapper returns a new { kind, messages } object, losing downstream metadata.
The status code alone does not establish a wrong version, endpoint or process in the original user's environment.
Environment
- PowerContext:
c776cddf, based on upstream f0f288ab.
- DSH source reference:
deepseek-ai/deepseek-harness@76fda729 (0.1.2-rc.1).
- Separately installed DSH:
0.1.0-rc.6; compatibility must be tested separately.
- Windows, Node
24.14.1, Vitest 3.2.7.
- The regression baseline uses controlled HTTP responses, not a real model.
Implementation and acceptance
One fix PR, developed on A's branch. Since A is a fork branch, the upstream PR will identify its dependency and provide a B-only comparison; remove inherited A changes after #1452 merges.
Required evidence: registered-entry regressions, real PowerContext Server e2e, real DSH loading the built plugin with durable-message/model-request assertions, and actual DSH Web usage with a real model. Verify Source → processing → Memory → later-session recall separately, plus failure/recovery, cancellation, snapshot inspection/replay, Scope isolation, and direct tool/command regressions. Missing real-usage validation must remain explicitly incomplete.
Reuse #1360 diagnostics and #1371 service registration. Leave HTTP transport/API extensions (#1438), access control (#1398), explainable PreparedContext receipts (#1356 / #1435), new lifecycle coverage (#1362), default Scope onboarding (#1449 / #1453), and Tracking C–F to their respective work. No new HTTP contract or diagnostic UI channel is proposed.
Are you willing to submit a PR to fix this bug?
AI assistance: OpenAI Codex assisted with investigation, regression test preparation and this report. Test results above come from executed tests; implementation and real-host acceptance remain to be completed.
Describe the bug
Tracking #1450, work package B. This follows the direct tool/command boundary fix in #1451 / #1452.
The registered DSH
agent/pre-steppath does not consistently report or isolate automatic failures:formandsections) needed for inspectable presentation.startsRequestSeries.Steps to reproduce
Baseline: PowerContext commit
c776cddf564cc2b4c9b45d79a3e056fea26ddad8(PR #1452).applyregistration and send a user message through the registeredagent/pre-stepcallback./v1/scope-bindings/resolve, once without a business code and once withscope_not_found. Observe that the original messages continue but the Scope failure is not reported through the plugin logger.startsRequestSeries: true.A new registered-entry regression suite was run against that unchanged implementation: 28 tests, 8 passed, 20 failed. It uses controlled HTTP responses and a host registration fixture; it is code-level reproduction, not reproduction of the original reporting user's deployment. The implementation PR will include these tests and real-host qualification.
Expected behavior
Actual behavior
Scope errors and message-construction errors are silently swallowed. Automatic resolution lacks signal forwarding. Logging can change the data result, and injected messages contain only a plugin source without snapshot sections. The wrapper returns a new
{ kind, messages }object, losing downstream metadata.The status code alone does not establish a wrong version, endpoint or process in the original user's environment.
Environment
c776cddf, based on upstreamf0f288ab.deepseek-ai/deepseek-harness@76fda729(0.1.2-rc.1).0.1.0-rc.6; compatibility must be tested separately.24.14.1, Vitest3.2.7.Implementation and acceptance
One fix PR, developed on A's branch. Since A is a fork branch, the upstream PR will identify its dependency and provide a B-only comparison; remove inherited A changes after #1452 merges.
Required evidence: registered-entry regressions, real PowerContext Server e2e, real DSH loading the built plugin with durable-message/model-request assertions, and actual DSH Web usage with a real model. Verify Source → processing → Memory → later-session recall separately, plus failure/recovery, cancellation, snapshot inspection/replay, Scope isolation, and direct tool/command regressions. Missing real-usage validation must remain explicitly incomplete.
Reuse #1360 diagnostics and #1371 service registration. Leave HTTP transport/API extensions (#1438), access control (#1398), explainable PreparedContext receipts (#1356 / #1435), new lifecycle coverage (#1362), default Scope onboarding (#1449 / #1453), and Tracking C–F to their respective work. No new HTTP contract or diagnostic UI channel is proposed.
Are you willing to submit a PR to fix this bug?
AI assistance: OpenAI Codex assisted with investigation, regression test preparation and this report. Test results above come from executed tests; implementation and real-host acceptance remain to be completed.