feat(strategy-state): persist instance-scoped slot maps

This commit is contained in:
Hermes Agent
2026-08-29 15:11:43 +09:00
parent 3f94c19162
commit 4699de61cc
18 changed files with 301 additions and 646 deletions
@@ -0,0 +1,18 @@
-- REQ-0009: state is one opaque map per slot, keyed by strategy_instance_id.
-- The old strategy_id/occupancy-scoped rows cannot be assigned an instance ID;
-- no mapping or backfill is permitted by this contract.
DO $$
BEGIN
IF EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'slot_strategy_state'
AND column_name = 'strategy_id'
) THEN
DROP TABLE slot_strategy_state;
END IF;
END $$;
CREATE TABLE slot_strategy_state (
slot_id UUID PRIMARY KEY,
data JSONB NOT NULL DEFAULT '{}'::jsonb
);