Repository navigation
Move Item, Subagent and Artifact reads and Artifact staging into sessions and sessionpg - #331
Merged
Merged
Conversation
…ions and sessionpg The pooled sessions.Service and sessions.Reader skeleton lands with the Artifact family: StageTurnArtifacts and DeleteSessionArtifact are Service use cases on sessionpg.Store, and the Item, Subagent and Artifact reads are sessionpg.Store methods behind sessions.Reader. Execution stages a Turn's export through the required Dispatcher.Sessions; StartWorker also requires Dispatcher.SessionsReader. cmd/server builds one sessionpg.Store for the Dispatcher and the api Items, Subagents, Artifacts and ArtifactsReader fields. Staging keeps its single pooled transaction: the Environment is authorized before the export is read, content streams into large objects that roll back with a rejected or failed export, and the Session lock is taken through sessionpg.LockSession only after the transfer to recheck the Turn. LoadPublicSubagent and LoadChildTurn move to sessionpg/subagents.go with their store signatures. The store read, capture and cursor files are deleted, and the capture rejection test moves to sessionpg.
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.
Item, Subagent and Artifact reads, and Artifact staging, move out of
storeintosessionsandsessionpg. This PR also introduces the public Session skeleton that the remaining Session PRs extend.What changes
sessionsskeleton:Service{storage Storage}withNewService.Storage, which embedsArtifactStorage.Reader, which embedsArtifactReader,ItemReaderandSubagentReader.sessionpg:Store{units}withNew(units).LoadPublicSubagentandLoadChildTurnare shared participants.sessions.Service.StageTurnArtifactsis a pooled use case.CompleteExecutionstays the only fence that publishes or discards them.execution.Dispatchergains the required fieldsSessionsandSessionsReader, andStartWorkervalidates both.sessionpg.Storeand delete throughsessions.Service.writeSessionsError.store:item_reads.go,session_artifacts.go,artifact_capture.go,subagent_reads.go,subagent_item_reads.goandlist_cursors.go.IMPLEMENTATION.mdnames the new owners.Behavior
Public behavior is unchanged: pagination, ordering, visibility, the cursor errors and the export shape. There are small internal differences:
ErrNotFoundinstead of a raw driver error.Checks
go build ./...andgo vet ./services/core/....sessionsandsessionpgin full.-run 'StartWorker|Artifact|WorkerRun|Owner'.cmd/serverin full, and providers-run Configuration.make openapiproduces no diff.scripts/check-names.py.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.