Move the Session vocabulary and errors out of store into sessions - #329
Merged
Merged
Conversation
Sessions, Turns, inputs, Environments and their provisioning failures, function calls, Item and Artifact reads, executor credentials and the Session errors move from store to sessions. api maps them in writeSessionsError, cursor errors become sessions.CursorError, and the Sessions, Admission and SessionHistory interfaces split into SessionCreation, SessionAdmission, InputAdmission, Turns and Items. AdminValidationError had no producer and is deleted.
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.
Part of #1 (dissolve
store). Wave 3, foundation PR 11b: the Session vocabulary and errors move out ofstoreintosessionsin one scripted change, so the later Session PRs move only operations. Behavior doesn't change.What changes
Moved into
sessionswith go/ast, with no aliases and every caller updated: the Session, Environment, Input, Turn, execution, provisioning and executor-credential types, their constants, and the Session sentinel errors. The stutter is dropped where a name repeated the package:CreateSession,Page,Creation,ManagedArchive,Artifact,ExecutionBinding,ErrInputPending,ErrNotIdle.List cursor errors are now
sessions.CursorError, followingskills.CursorError.api/errors_sessions.goaddswriteSessionsError, which holds the Session cases with the same status, code, message and precedence as before.writeStoreErrorkeeps only the sandbox reset and in-use errors, which PR 3 moves.api interfaces are split by operation family:
Sessionskeeps get, list, metadata, delete and audit.SessionCreationis new.Execution.SessionAdmissionandExecution.InputAdmissionreplaceExecution.Admission.TurnsandItemsreplaceSessionHistory.Each field has its own line in
cmd/server, inrequired(...)and in the fixtures, and each has a strict fake.Deleted:
AdminValidationErrorand its api mapping, which had no producer left after Move sandbox deployment configuration and nodes into deployment and deploymentpg #328.make openapi:core.openapi.yamlrenames the schemasstore.ExecutorCredential,store.IssuedExecutorCredentialandstore.ManagedSessionArchiveto theirsessions.*names. Nothing else changes.Checks
go build ./...andgo vet ./services/core/...(whole module)api,cmd/serverandsessionsin full: 351 top-level tests passed, 0 skipped-runfor the error-mapping, cursor, unstorable-text, Session lifecycle, input-conflict and self-hosted creation tests: all passed, 0 skipped-run TestAdditionalConfigurationProviderUsesCommonAPIAndStore: passedpython3 scripts/check-names.pyThis is a pure move, so it had no blind review. I spot-checked it:
sessionsimports no persistence or store package, the error precedence is unchanged, and the interface split is as described.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.