fix(capsule-pipeline): guard escalation choices by canonical key - #354
Merged
Merged
Conversation
Route each existing human-gate option only when the gate succeeded and its canonical selected key matches that option. The guarded edges retain their existing labels, targets, and ordering, while failed or unanswered gates have no eligible outgoing escalation edge. Add source-only static coverage for all eight original options and their native condition expressions. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
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.
Summary
Part of dot-runner #78. After the canonical human-choice metadata fix landed in dot-runner PR95 (
85ad35a1341022fcfe6e39b188338d29b9a7df9c, with E0bb8bfdf8b726e0633553c8196dbd5525fd9268cas an ancestor), guard the capsule escalation edges by the native human-gate result.For unattended escalation, a failed or unanswered gate has no eligible escalation edge instead of choosing Abandon. For a successful gate, each existing edge is selected only when
context.human.gate.selectedmatches its canonical key:A,C, orK. The eight native per-key conditions preserve every original option, prompt/label, target, and ordering. This is source-owned graph guarding, not a new engine extension.The freeform path and engine/core contracts are unchanged. This PR changes only the three capsule DOT graphs and a static guard test; no engine, core, frozen contract, dependency, or platform source is changed.
Verification checklist
Verification evidence
e6d14fdca3d2548ee8d793a89d375134a6ad6646.0bb8bfdf8b726e0633553c8196dbd5525fd9268c, now merged in dot-runner PR95 at85ad35a1341022fcfe6e39b188338d29b9a7df9c.Scope and limitations
Source S depends on the now-merged engine metadata behavior from PR95, but this PR owns only the graph conditions and their static coverage. It does not alter engine dispatch, choice options, prompts, targets, status vocabulary, freeform behavior, or any frozen contract.
This remains PART OF #78. It intentionally does not use
FixesorCloses; follow-up work and parent review remain open and are not closed automatically.Notes for reviewers
The repository's AGENTS.md and PR template were reviewed. Required commit trailers and original authorship are preserved. This is publication of source S only; port P remains unpublished. Resolver PR148 is unrelated and untouched.