You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(storage): remove or quarantine legacy session-product payload paths #609
Session-product storage still carries old payload_json compatibility paths even though current fresh DDL uses typed payload columns.
Evidence from current master:
Fresh DDL for session profiles/work events/phases uses typed payload columns such as evidence_payload_json, inference_payload_json, and enrichment_payload_json.
Sync writers in polylogue/storage/products/session/storage.py detect whether payload_json exists and write a reconstructed legacy payload when present.
Async writers in polylogue/storage/backends/queries/session_product_profile_writes.py and session_product_timeline_writes.py repeat that legacy-column detection.
Row mappers in mappers_product_profiles.py and mappers_product_timelines.py fall back to payload_json through mappers_product_legacy.py.
tests/unit/storage/test_session_product_mapper_fallbacks.py protects rows with missing/empty typed payload columns and old payload_json data.
The project documentation says the database is fresh-only, and the repo working rules favor decisive replacement over indefinite compatibility branches. If old session-product rows are still supported, that policy should be explicit and isolated. If they are not, this is dead compatibility code spread across hot storage paths.
Acceptance criteria
Decide whether old session-product payload_json rows are a supported input.
If unsupported: remove legacy-column detection, legacy payload reconstruction, legacy row hydrators, and the fallback tests.
If supported: document the compatibility policy and isolate it in a migration/repair/import path rather than the normal sync/async write and read mappers.
Add a storage/schema test asserting the chosen policy.
Run focused storage product tests plus devtools verify --quick.
Superseded by #618. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.
Activity
Sinity commentedon May 1, 2026
Superseded by #618. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.