Repository navigation
perf(runtime): reduce Host Code Mode polling turns - #696
Merged
Merged
Conversation
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
Make Host-native Code Mode the effective model-guidance default when the MCP Host is configured for it, and make normal pending Job handoff explicitly de-polling without changing canonical Job execution or recovery semantics.
This PR contains three commits:
fix(workflow): inherit model guidance from MCP host profileperf(jobs): make pending observation continuation fallback-onlyfix(jobs): keep passive pending guidance conditionalEffective guidance profile
work_on_project.guidance_profilenow preserves omission instead of collapsing it todirectduring deserialization. The effective profile follows one rule:Therefore:
direct+ omitted request ->Directhost_code_mode+ omitted request ->HostCodeModedirect->Directhost_code_mode->HostCodeModeDirectcode_modekeeps existing behaviorThe implementation reuses
McpHostRuntimePolicy::effective_guidance_profile; it adds no second Host capability flag or environment variable.WEBCODEX_MCP_HOST_PROFILEremains the MCP Host profile source.The same resolver feeds startup guidance, requested
webcodex.workflowcontext projection, and model-ergonomics profile reporting. Explicit JSONnullremains invalid rather than being treated as omission.Pending Job execution economy
Canonical Job receipts, durable identity, observation tokens, Runner ownership, and passive Job-attention authority are unchanged.
Normal model-facing same-execution handoff remains sparse, but now carries a short strategy:
The exact parser-ready
observe_jobscontinuation is retained for recovery and explicit detail inspection; it is no longer presented as the default next action. No automatic durable wait or App continuation is created.Review fix
Independent review found two contract issues and fixed them in
2007452f:passive_terminal_attention: trueover-promised delivery even when the current call lacks the exact Window/Project/business-Session/auth eligibility required by passive attention. It now sayssame_scope_may_surface, preserving the existing authority boundary.cargo_checkpending-output fixture had not been propagated with the new requiredpending_strategy, causing the full tool-contract output-schema suite to fail. The fixture now represents the actual model-facing pending shape; the schema was not weakened.Validation
Implementation session reported focused validation of 25/25 relevant tests, affected checks, fmt and diff-check, with no full root-suite rerun by design.
Independent review additionally verified:
webcodex-tool-contracts --lib: 239/239 passedcargo check --all-targets --features experimental-code-modeforwebcodexandwebcodex-tool-contracts: passedcargo fmt --all -- --check: passedgit diff --check: passedExisting unrelated test warning about
ObservedRunnerRequest.loginremains.Non-goals
This PR does not:
observe_jobsrecovery;CodingGuidanceProfile::default()away from Direct;