Skip to content

Fix result handoff and deferred action continuations - #3073

Merged
George Ng (GeorgeNgMsft) merged 4 commits into
mainfrom
georgengmsft-result-entity-handoff-fixes
Sep 25, 2026
Merged

George Ng (GeorgeNgMsft) merged 4 commits into
mainfrom
georgengmsft-result-entity-handoff-fixes

Conversation

@GeorgeNgMsft

@GeorgeNgMsft George Ng (GeorgeNgMsft) commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

This standalone product fix addresses intermediate-result handoff failures surfaced by the GHCP evaluation. Successful actions no longer fail simply because translation assigned a result label without an entity, deferred requests remain in the execution queue, and concrete result references are resolved before their consumers run. The PR targets main directly, without eval-harness changes or a dependency on #3072.

  • Separate optional entity-name references, explicit resultValue references, and deferred translation context. Missing consumed data still fails; display text and structured display rawData are not silently substituted as typed values.
  • Preserve request-local completed-action snapshots across deferred continuations, even without conversation history/memory extraction. Translate only the remaining request without replaying producers or automatically switching to reasoning.
  • Restore concrete-value lookup and strictly validate substituted values against the consumer schema. Preserve empty values and treat reference-looking returned strings as data. Reject undeclared/duplicate references.
  • Stop remaining legacy actions while a user choice is pending, including independent and returned additional actions. Keep the choice available, explicitly report that remaining steps will not resume automatically, and disable reasoning fallback. Preserve standalone choices and structured execution's awaited choice handling.
  • Bound deferred context to a 64 KiB serialized UTF-8 envelope containing the remaining request and full history. Project result data without execution metadata, display alternates, or identical representations; retain distinct display data even when history text is only a summary. Oversized context stops before continuation translation without truncation, summarization, or replay. This is not a total model-token budget; schema prompts are separate. Concrete $result substitution remains lossless and outside this limit.
  • Preserve the caller's active-schema/schema-family scope during deferred translation. Recheck execution eligibility before enqueueing translated continuations; unavailable scope, unknown actions, and execution-disabled actions cannot silently continue or trigger producer replay.
  • Document the contracts and add 29 handoff cases, 17 bounded-context cases, 7 deferred-scope cases, and 11 schema-validation cases.

Evidence and scope

The recorded evaluation contains nine explicit missing-result-entity errors across readFile, getList, clearList, prFiles, and prChecks, each after handler success. One clearList mutation persisted before the failure. Full translated plans were not retained, so the traces do not establish which labels were unused versus consumed. This PR fixes the eager invariant and independently reproduced queue/resolver defects without inventing handler entities or claiming all nine workflows now complete. No live eval was rerun and no success-rate improvement is claimed.

Automatic queue resumption after a legacy choice and large-output retrieval/chunking are intentionally not implemented.

Validation and review

  • The original product patch was isolated onto main without changing its contents; eval commits were removed. The original isolated head passed the full dispatcher suite (135 suites / 2,152 tests, 12 existing skips) and action-schema suite (4 suites / 332 tests, 62 existing skips).
  • Two independent adversarial reviews examined base 5d5e23fa6 through bounded-fix head 725a624a6. Two newly exposed deferred-path issues were independently validated: missing execution-eligibility checks and dropped caller schema restrictions. Both were then corrected in 2029d4fc1; six regression failures were reproduced before the corrections. Review comments were not posted or resolved.
  • The latest dependency-aware build and 136 targeted tests across five suites pass, covering handoffs, size boundaries, scope restrictions, structured execution, and chained choices. Pinned formatting and all four ratchets (lint, complexity, circular dependencies, test debt) pass against origin/main.
  • Size tests cover exactly 64 KiB, one byte over, UTF-8 encoding, aggregate/inherited context, empty values, and no producer replay. Scope tests stop at an offline translator boundary; no model calls are needed.
  • Hosted verification for 2029d4fc1029cf4e9e34872a076f5943c88f5983: build-ts run 36187276971 passed all six Windows/Linux/macOS × Node 22/24 jobs. All applicable PR checks also pass, including Linux/Windows Shell & CLI smoke tests, shell packaging on all three operating systems, .NET, CodeQL, formatting, repository policy, and documentation generation. The fork-only formatting check is skipped as expected.

The original Linux/macOS CI failures were inherited eval portability issues, fixed separately in #3072 (b47f8bacd), whose six-job OS/Node matrix is green. #3072 and #3077 remain in their own eval stack.

Comment thread ts/packages/dispatcher/dispatcher/src/execute/actionHandlers.ts Outdated
Comment thread ts/packages/dispatcher/dispatcher/src/translation/pendingRequest.ts
Separate optional entity names from concrete result values and deferred translation context. Preserve completed outputs without replaying producers, reject missing or invalid consumers, and add offline regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@GeorgeNgMsft
George Ng (GeorgeNgMsft) force-pushed the georgengmsft-result-entity-handoff-fixes branch from 964c682 to 73d9e68 Compare September 25, 2026 19:21
@GeorgeNgMsft
George Ng (GeorgeNgMsft) removed this pull request from stack #3074 September 25, 2026 19:26
@GeorgeNgMsft
George Ng (GeorgeNgMsft) changed the base branch from georgengmsft-ghcp-eval-implementation to main September 25, 2026 19:26
Report unexecuted remaining steps without automatic continuation, reasoning fallback, or replay. Preserve standalone choices and structured choice handling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Project result data without execution metadata or duplicate representations and enforce a 64 KiB serialized UTF-8 context limit before deferred translation. Preserve distinct data and fail explicitly instead of replaying producers or translating from truncated results.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Recheck translated continuations before enqueueing effects and preserve active schema/family restrictions. Stop explicitly without replay when scope is unavailable or actions are disabled.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@GeorgeNgMsft
George Ng (GeorgeNgMsft) added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit fff27a2 Sep 25, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants