Repository navigation
A stored row has one decode, and a column it predates reads as absent: her learning runs again - #5907
Conversation
…bsent: her learning runs again
Every reader of a DataRecord decoded it itself (serde_json::from_value(row.data), 15 production
sites). A field an entity gained later with #[serde(default)] is NULL in every older row, which
serde reads as a present null, so it failed: on the M5 (2026-11-10) the training trigger's
recovery died every 30 s on 380 submissions with `learned` NULL ("invalid type: null, expected
u32", 279 training.serving_wake.failed in 4 h), and no resident's in-place learning ran.
DataRecord::decode (orm/record_decode.rs) is the one owner: strict first, borrowing the row, so a
null a type can hold (Option, serde_json::Value) reads as written; only when that fails and the
row holds NULLs are they read as columns the row predates, absent, so the field's default answers
and a required field still refuses. All 15 sites migrate to it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ard zero) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…on its own row - record_decode: an older row and a written null are separate cases; a row holding both refuses (documented: telling the two NULLs apart needs the field types). - orm/store.rs: find_all and find_eq are the verbs themselves, each caller counted where it reads (bounded: exemption); a failure without a message says so. - lived_examples: a call with no message yields no example, never an empty prompt. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Preliminary source review on exact62a1d6617d53d5c4bd83762d5f501be0deedc266: changes requested before merge. No local tests run.
record_decode.rs falls back by removing every null field when strict decoding fails. This does not preserve explicit nulls if another field needs a legacy default: for a row {learned:null,payload:null}, learned:u32 with serde(default) triggers the fallback; payload:Value with a non-null serde default then changes from the valid explicit null to that default. The existing test uses the implicit Value::Null default and therefore cannot distinguish preservation from removal. The same issue applies to an Option with a custom Some default.
Keep the shared decoder owner, but normalize only fields that cannot accept null and whose schema permits the legacy default, preserving unrelated explicit nulls. Add the mixed legacy-null plus valid explicit-null/non-null-default regression. An unrelated strict decoding error must not silently rewrite valid field semantics. This is source feedback, not a formal submission verdict or live learning acceptance.
Serves learning (path step 3). The training trigger's recovery has failed on every tick since #5882, so no resident's in-place learning ran.
The defect
Every reader of a
DataRecorddecoded it with its ownserde_json::from_value(row.data)(15 production sites).#[serde(default)], is NULL in every row written before it.null, not a missing field, so the default never applies and the decode fails.training.serving_wake.failedfired 279 times in 4 h, every oneinvalid type: null, expected u32.training_trigger_submissionsholds 381 rows;learnedis NULL on 380 of them (read withcontinuum data/list).The fix
DataRecord::decodeinorm/record_decode.rsis the one owner:Option,serde_json::Value) reads as written.source-hygiene::row_decodekeeps hand decodes of.dataat zero.Measured
training.serving_wake.failedat 0, and in-place learning probes) follows in a comment.record_decodepins an older row decoding with its default, a written null staying null, and a NULL required field still refusing. The ratchet's predicate test pins the shape. Local test run in the next serving-down window; CI confirms.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo