Give a subscription share a shape that survives a rollback - #9
Conversation
Extra captures fields written by a newer schema version and re-emits them, so a server reading a record it does not fully understand cannot silently delete the parts it did not recognize. Additive migration is the release law; this is what makes it true in the record rather than only in the process. A known field always beats a same-named Extra entry, so an edit the caller just made cannot be shadowed by whatever an older decode stashed. That case has its own test because the merge direction is easy to get backwards and the symptom -- a write that appears to succeed and then reads back stale -- looks like a caching bug rather than a serialization one. Tested: go test -race ./... (model, plugin); gofmt; go vet ./...
|
A second commit landed on Recording it here rather than opening a second PR for one model file, per rules/01 §8.5's requirement that a landing not go unreported. The snapshot is held by the core, not the plugin, and the reason is worth keeping with the model: a plugin cannot reach bolt, and its runtime working directory is deleted by Consumers: |
First task of design-16 sub-project 1. Model only — no behaviour, no consumers yet.
Extracaptures fields written by a newer schema version and re-emits them, so a server reading a record it does not fully understand cannot silently delete the parts it did not recognize. Additive migration is the release law (rules/01 §8); this is what makes it true in the record rather than only in the process.A known field always beats a same-named
Extraentry. That has its own test because the merge direction is easy to get backwards and the symptom — a write that appears to succeed then reads back stale — looks like a caching bug rather than a serialization one.Gates:
gofmtclean ·go vet ./...·go test -race ./...green (model, plugin).