Skip to content

Add guarded stored-value decoding and safe schedule display - #134

Merged
PhiLily merged 1 commit into
mainfrom
stored-value-decoding
Oct 10, 2026
Merged

PhiLily merged 1 commit into
mainfrom
stored-value-decoding

Conversation

@PhiLily

@PhiLily PhiLily commented Oct 10, 2026

Copy link
Copy Markdown
Member

What and why:

Add a private reader that decodes stored values by field, plus public django_ox.exceptions.StoredValueUnreadable. Database-raised errors propagate unchanged; reads take no savepoints.

Use one decoding policy across drivers. Reject non-text values in text columns, PostgreSQL infinity and MySQL zero dates. Also reject a maximum boundary_generation.

Make str(schedule) return pk N when the name cannot be read as text, including deferred names. The fallback does not alter stored data.

Worker, pruning and write-API integration are outside this change. Existing dispatch behaviour is unchanged here. No migration is required.

Tests: reader tests added in tests/test_stored_read.py (217 passed with the command and monitoring docs tests on SQLite); ruff and format are clean. Two new CI jobs run the reader's tests on psycopg2 and mysqlclient. They have not run on GitHub before, so this pull request is their first run.

Changelog: not user-visible yet; the user-facing entry arrives with the changes that use the reader.

Add field-by-field stored-value decoding and StoredValueUnreadable.
Propagate database-raised errors unchanged without read savepoints.
Apply one decoding policy across drivers, including rejection of
non-text text-column values and maximum boundary counts.

Return pk N from str(schedule) when its name cannot be read as text.
Keep this fallback out of stored fields.

Add reader tests and psycopg2 and mysqlclient CI jobs. This change does
not integrate the reader into dispatch, pruning or write operations.
@PhiLily
PhiLily merged commit 149f66a into main Oct 10, 2026
38 checks passed
@PhiLily
PhiLily deleted the stored-value-decoding branch October 10, 2026 19:03
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