refactor(runtime-host): remove the uncalled execution.inspect.resolve operation - #3936
Open
liuxiaocs7 wants to merge 1 commit into
Open
Conversation
Member
Author
|
Pushed a follow-up (8900bd2) extending the removal to the parts of the reachable set the first pass missed:
Also correcting the first revision's note: the |
liuxiaocs7
force-pushed
the
liuxiaocs7/refactor-runtime-host-remove-the-uncalled-execut
branch
3 times, most recently
from
August 26, 2026 16:28
d89c04c to
be9417e
Compare
… operation execution.inspect exposed two operations, but Desktop calls only execution.inspect.query. execution.inspect.resolve was registered in the protocol, the operation table, and the coordinator, yet had no non-test caller anywhere in the repository, leaving a second inspection contract that no shipped surface reads. Remove resolve end to end across every layer that maintained it: - Protocol: the operation spec with its input/output decoders and assertions, the ExecutionInspectCandidate / ExecutionInspectEntityKind types, the candidate decoder, and the EXECUTION_INSPECT_CANDIDATE_MAX_ITEMS limit. - Operation table: the execution.inspect.resolve entry; ExecutionInspectOperationKey collapses to just query automatically. - Coordinator: the handler entry, #resolve, its #findSession / #findRunInSession / compareCandidates helpers, and the now single-value failure() helper (type assertion dropped). - Storage: ExecutionAgentRunReader.findRunsById -- the only reader reachable exclusively from resolve -- and the resolve-only core_agent_runs_identity SQLite index. AgentRunIdentitySearchResult and assertIdentitySearchLimit stay; listSessionRunsBounded shares them. - Compatibility epoch: bump RUNTIME_HOST_COMPATIBILITY_EPOCH to 53 so a peer that still knows resolve fails the handshake instead of sending a removed operation mid-connection. - Retired credential grant: register execution.inspect.resolve as a retired operation grant so an access file issued before the removal releases the grant on decode rather than throwing RuntimeHostAccessInputError and blocking Host startup. - Storage schema: bump the core-execution schema version to 6 so existing databases drop the obsolete index on upgrade. execution.inspect.query and all four of its result kinds (session, agent_run, turn_trace, session_trace_page), including the Turn/Session trace paths Desktop renders, are untouched. Adds protocol, retired-grant, and schema-migration regression tests. Fixes apache#3932 Generated-by: Claude Opus
liuxiaocs7
force-pushed
the
liuxiaocs7/refactor-runtime-host-remove-the-uncalled-execut
branch
from
August 26, 2026 18:00
be9417e to
b3fd88e
Compare
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
execution.inspectexposed two operations, but Desktop calls onlyexecution.inspect.query(withkind: 'turn_trace'and the Session/Turn trace kinds).execution.inspect.resolvewas registered in the protocol, the operation table, and the coordinator, yet had no non-test caller anywhere in the repository — a second inspection contract that no shipped surface reads.This removes
resolveend to end across every layer that maintained it:execution-inspect.ts): the operation spec, its input/output decoders and assertions, theExecutionInspectCandidate/ExecutionInspectEntityKindtypes, the candidate decoder, and theEXECUTION_INSPECT_CANDIDATE_MAX_ITEMSlimit.operations.ts): theexecution.inspect.resolveentry.ExecutionInspectOperationKeycollapses to justqueryautomatically.execution-inspect-coordinator.ts): the handler entry,#resolve, its#findSession/#findRunInSession/compareCandidateshelpers, and the now single-valuefailure()helper (assertion dropped).ExecutionAgentRunReader.findRunsById— the only reader reachable exclusively fromresolve— plus the resolve-onlycore_agent_runs_identitySQLite index.AgentRunIdentitySearchResult/assertIdentitySearchLimitstay;listSessionRunsBoundedshares them.RUNTIME_HOST_COMPATIBILITY_EPOCH53 → 54 (rebased onto main, which claimed 52 for the durable steering echo and 53 for Message admission) so a peer that still knowsresolvefails the handshake rather than sending a removed operation mid-connection (same treatmentoauth.account.usage.fetchreceived).execution.inspect.resolveas a retired operation grant so an access file issued before the removal releases the grant on decode instead of throwingRuntimeHostAccessInputErrorand blocking Host startup.execution.inspect.queryand all four of its result kinds (session,agent_run,turn_trace,session_trace_page) — including the Turn/Session trace paths Desktop renders — are untouched.Fixes #3932
Verification
@maka/core,@maka/storage, and@maka/runtimebuild clean;@maka/storageand@maka/runtime-hostboth passtsc --noEmitwith zero errors. (An earlier run reported aworkhub-coordination-action-gate.test.tstype error; that was a stale-dependency-dist artifact from building out of order and does not reproduce on a clean full build — noted here for transparency since the first revision's description mentioned it.)node --teston built output):execution-inspect-protocol,execution-inspect-coordinator,execution-inspect-uds,protocol(incl. the new epoch-54 test),access-credential-metadata(incl. the new retired-grant regression test),handshake-compatibility.sqlite-core-execution-store(incl. the new "drops the obsolete AgentRun identity index on upgrade" migration test).biome checkclean on all changed files.Migration / Rollout
Removing
resolveis a wire-contract change, so the compatibility epoch is bumped (mixed-version peers fail the handshake by design) and the core-execution schema version is bumped so an upgraded Host drops the obsolete index on first open. Both paths have regression tests. Access files that recorded theresolvegrant now decode cleanly with the grant released.AI use
Select exactly one:
Tool(s) and scope: Claude Opus (via Claude Code) — traced the reachable set, performed the end-to-end deletion, added the epoch/credential/schema retirements and their tests. Both commits carry a
Generated-by: Claude Opustrailer.Checklist
resolvetests are removed and the retainedquerysuites still pass.Does this PR entail a change in behavior?