Repository navigation
perf(model): converge late execution success projection - #765
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
run_shellsuccess while retaining runtime-selected shell/cwd/SSH context and meaningful outputrun_shelloutput schema so impossible lifecycle/recovery fragments cannot appear in the sparse success branchProjection convergence
The existing success shapes for:
run_processrun_scriptrun_skill_resourceproject_validatecargo_fmtcargo_checkcargo_testgo_testremain model-facing equivalent. Their compaction now runs only after canonical Session/evidence consumers and pre-projection telemetry/audit capture.
Normal Job handoff remains:
{ "execution_state": "pending", "continuation": { "... exact existing fallback continuation ..." } }No retry/redispatch/authority/Runner protocol semantics change.
run_shell terminal success
Compaction requires proven:
execution_state=completedexit_code=0promoted_to_job=falseexecutor=agentandexecution_source=run_shellThe sparse result removes lifecycle/Job/timing bookkeeping but retains:
command_summarycwdshellssh_resource, when anyRepresentative real fixture:
Recovered terminal snapshots remain rich.
Audit / telemetry
Late projection no longer forces ActionAudit/model ergonomics to infer execution state from an already-sparse model result.
The review follow-up
8fafd7b9 review(model): preserve compact execution evidenceadditionally keeps privacy-safe validation evidence that ActionAudit had before this refactor:It never persists raw command/script/stdout/stderr, diagnostic bodies, or source-fence identity.
Validation
Reviewed on
specialafter rebase onto currentorigin/main7301186b98527cb4ebc0191f6033474e9abf7c20.cargo test -p webcodex-tool-runtime-contracts canonical_execution_audit_projection_tests -- --nocapture— 3 passedcargo test -p webcodex execution_projection -- --nocapture— 6 passedcargo test -p webcodex-tool-contracts— 250 passedcargo test -p webcodex long_run_shell_fast_terminal_returns_ordinary_result_without_visible_job -- --nocapture— 1 passed, 851 -> 431 bytescargo test -p webcodex run_shell_recovered_terminal_snapshot_stays_rich_after_projection -- --nocapture— 1 passedcargo test -p webcodex api_execution_compaction_preserves_canonical_action_audit_and_telemetry -- --nocapture— 1 passedcargo test -p webcodex http_mcp_execution_compaction_keeps_sparse_serialization -- --nocapture— 1 passedcargo fmt --all -- --checkgit diff --checkCommits
a8ae875f refactor(model): converge execution success projectioncc0a9ea5 perf(model): compact run_shell terminal success4421f822 fix(model): tighten run_shell sparse schema8fafd7b9 review(model): preserve compact execution evidenceValidation-success evidence deduplication is intentionally left for a focused follow-up: it changes semantic proof presentation (test counts, zero-test assertions, diagnostics and source-state evidence) rather than execution lifecycle projection.