Repository navigation
fix(http): resolve the turn catalogue inside the authority lease - #130
Open
omkarjainak wants to merge 3 commits into
Open
omkarjainak wants to merge 3 commits into
omkarjainak wants to merge 3 commits into
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
Fixes #125.
POST /v1/turnsno longer pre-lists tools outside the turn's authority lease, so a transient authority outage cannot run the turn with an empty tool list and reportsucceeded.Changes
ExecutionRequest.toolsis now optional. Omitting it means "use the whole catalogue resolved inside the lease"; an explicit list still narrows it, and an explicit empty list still means no tools.RuntimeTurnRequest.toolsremains required at runtime.SharedOSExecutornormalizes an omitted catalogue to an array before the rest of the turn, while remembering that it was unspecified, so the executor takes the whole catalogue the lease resolves instead of treating it as "no tools".createKernelSharedOSApi.executeTurnno longer callskernel.listToolsbefore the turn, removing the redundant authority load and its audit event.docs/http-api.md.Rationale
The pre-turn lookup ran without a lease and failed closed by returning
[]. The executor then intersected that empty set with its in-lease catalogue, yielding zero tools while the turn still succeeded. Resolving the catalogue inside the lease makes the outage fail closed consistently.Testing
pnpm checkpnpm pack:checkpnpm typecheckpnpm vitest run packages/http/src/http.test.ts packages/runtime/src/runtime.test.ts(50 tests)Security
Compatibility