Skip to content

Move the Session vocabulary and errors out of store into sessions - #329

Merged
SaladDay merged 1 commit into
mainfrom
refactor/sessions-vocabulary
Sep 30, 2026
Merged

SaladDay merged 1 commit into
mainfrom
refactor/sessions-vocabulary

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1 (dissolve store). Wave 3, foundation PR 11b: the Session vocabulary and errors move out of store into sessions in one scripted change, so the later Session PRs move only operations. Behavior doesn't change.

What changes

  • Moved into sessions with 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, following skills.CursorError.

  • api/errors_sessions.go adds writeSessionsError, which holds the Session cases with the same status, code, message and precedence as before. writeStoreError keeps only the sandbox reset and in-use errors, which PR 3 moves.

  • api interfaces are split by operation family:

    • Sessions keeps get, list, metadata, delete and audit.
    • SessionCreation is new.
    • Execution.SessionAdmission and Execution.InputAdmission replace Execution.Admission.
    • Turns and Items replace SessionHistory.

    Each field has its own line in cmd/server, in required(...) and in the fixtures, and each has a strict fake.

  • Deleted: AdminValidationError and its api mapping, which had no producer left after Move sandbox deployment configuration and nodes into deployment and deploymentpg #328.

  • make openapi: core.openapi.yaml renames the schemas store.ExecutorCredential, store.IssuedExecutorCredential and store.ManagedSessionArchive to their sessions.* names. Nothing else changes.

Checks

  • go build ./... and go vet ./services/core/... (whole module)
  • api, cmd/server and sessions in full: 351 top-level tests passed, 0 skipped
  • store -run for the error-mapping, cursor, unstorable-text, Session lifecycle, input-conflict and self-hosted creation tests: all passed, 0 skipped
  • providers -run TestAdditionalConfigurationProviderUsesCommonAPIAndStore: passed
  • python3 scripts/check-names.py

This is a pure move, so it had no blind review. I spot-checked it: sessions imports no persistence or store package, the error precedence is unchanged, and the interface split is as described.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@SaladDay
SaladDay merged commit 13f6550 into main Sep 30, 2026
1 check passed
@SaladDay
SaladDay deleted the refactor/sessions-vocabulary branch September 30, 2026 19:41
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant