Skip to content

Delete stored compatibility encodings - #508

Merged
SaladDay merged 1 commit into
mainfrom
refactor/stored-compat
Oct 7, 2026
Merged

SaladDay merged 1 commit into
mainfrom
refactor/stored-compat

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three pre-release compatibility paths are deleted. None of them has a producer any more. This is part of the AGENTS.md alignment (T3c in the architecture audit).

  • {"text": …} stored input.
    • Production stores the public agent.session.input.message event (api/inputs.go).
    • The only writer of the legacy shape was a test fixture, which now submits the public event.
    • items/inputs.go and execution/message_input.go drop their Text branches.
  • Item.MarshalStored.
    • Stored Item payloads now use the wire encoding (MarshalJSON), so there is one Item encoding.
    • Replayed child Items still compare equal, because both sides use the same encoder (payload = candidate::jsonb).
  • Sessions stored without a model provider.
    • Creation already rejects these Sessions, and every row carries the provider flag.
    • The three execution guards are deleted, with ErrModelProviderRequired, its worker outcome and failure branches, and its 400 mapping.
    • The sessions-events.md sentence is removed (en and zh).

Behaviour

  • Child Item rows written before this change use the old encoding and compare unequal on replay. There is no migration (pre-release, no compatibility).
  • A stored {"text"} input no longer projects or dispatches. Nothing writes it.
  • The stored model_provider_required failure code stays readable for existing rows. Only its producers are gone.

Checks

  • go build ./..., module vet and gofmt.
  • DB tests:
    • items 28, sessions 287, sessionpg 98, v1 53 and execution 220;
    • api 120, with -run limited to the diagnostics, session and error-mapping tests;
    • tests/integration 738 passed, plus the fixed tests and the official-client tests rerun with the pinned SDK.
  • official_client.py, check-names.py, and the website translation and build tests.

Net: non-test −57 lines, test −97 lines.

🤖 Generated with Claude Code


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

Session message inputs are stored only as the public
agent.session.input.message event, so the {"text"} branches in Item
projection and Runtime dispatch go, and the recovery fixture and tests
submit the public shape.

Items are stored with their wire encoding: MarshalStored folds into
MarshalJSON, and replayed child Items compare against the same bytes.

Sessions always freeze a model provider at creation, so the execution
guards for Sessions stored without one, ErrModelProviderRequired and its
handlers are deleted.
@SaladDay
SaladDay merged commit 6452a45 into main Oct 7, 2026
25 checks passed
@SaladDay
SaladDay deleted the refactor/stored-compat branch October 7, 2026 17:31
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