GeezerVison is showing github.com — mcpx: prompt hooks — effect: ask (#15809) by developing-today-fleet[bot] · Pull Request #15831 · developing-today/code
Conversation
Closes #15809
1837-J — implements effect: ask for prompt hooks (#1929 Approach C slice 2):
- Validation (
hooks.go): ask is allowed at the before phase only; any other phase is refused at declaration validation in the existing refusal style. Frame gains ask/refuse fields; hookRun gains a Refusal carrier.
- Execution (
prompt_hooks.go): ask system text; reply must be a JSON object with exactly one of ask / refuse (keys above the effect dropped+named). A refuse reply ends the run with that reason. An ask reply raises the question through the new Service.PromptAsk elicitation-broker callback; approval passes the run unchanged.
- Fail-closed (deliberate exception to the advise/propose skipped-with-warning contract, stated in the file header): no provider, provider error, unparseable reply, no broker, broker error, or an unanswered/declined question all refuse the run, with the reason in the hook frame.
- Gate (
execsvc.go): RunWith honours a before-phase refusal before runner.Run — the script never starts (no result frame, no calls), the refusal is the run's error, suffix hooks still run.
Oracle (tests in prompt_hooks_test.go): an ask hook can only stop or pass the run — never alter its value. Covers refuse reply, ask+approval, ask unanswered (no broker / declined / broker error), no provider, unparseable replies, explicit pass, validation phases, and a byte-identical pass-through result.
Refs #1929
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-27T00:51:57Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
1837-J: pkgs/mcpx/internal/execsvc/prompt_hooks.go
1837-J: pkgs/mcpx/internal/execsvc/hooks.go
1837-J: pkgs/mcpx/internal/execsvc/execsvc.go
1837-J: pkgs/mcpx/internal/execsvc/prompt_hooks_test.go
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c91f4270-9437-4320-b140-d802b7d46932
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|