Repository navigation
fix(dsh): defer automatic work until step admission - #1856
Merged
Merged
Conversation
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Addresses the hook-ordering part of #1785.
Rationale for this change
The DSH automatic pre-step hook previously performed PowerContext work before the downstream hook had admitted the step. Scope resolution, context preparation, prompt capture, and flushing could therefore occur even when a later hook rejected the step or failed.
This change defers all PowerContext side effects until the downstream decision returns
kind: "enter".What changes are included in this PR?
downstream_failedanddownstream_rejectedin runtime observations.Are there any user-facing changes?
Yes. Rejected or failed DSH steps no longer trigger PowerContext requests or automatic capture side effects.
There are no breaking changes to public APIs or persisted formats.
How was this change tested?
pnpm --dir integrations/dsh/plugins/powercontext test:allpnpm --dir integrations/dsh/plugins/powercontext build503 inference_unavailableduring flush.AI usage statement
OpenAI Codex was used for source-code tracing, implementation, regression-test design, and validation. The changes were verified using the repository test suite and build process.