Killing the binary mid-investigation and restarting it failed the run: the first model request after the resume didn't match the recorded one. The tool schemas pinned in a step reached the live attempt as written but the resume as stored, and both the v2 encoder (compacting raw JSON) and jsonb (reordering keys) rewrite them. Step now returns the decoded recorded value on the live path too, and runs.steps.output is json, which keeps the text as written.
9 lines
405 B
SQL
9 lines
405 B
SQL
-- +goose Up
|
|
-- A step's output must replay byte for byte: jsonb reorders keys and drops
|
|
-- whitespace, so a pinned value (a tool schema) read back differed from the
|
|
-- one a live attempt used, and a resumed agent diverged from its journal.
|
|
ALTER TABLE runs.steps ALTER COLUMN output TYPE json USING output::json;
|
|
|
|
-- +goose Down
|
|
ALTER TABLE runs.steps ALTER COLUMN output TYPE jsonb USING output::jsonb;
|