diff options
| author | tv <tv@krebsco.de> | 2026-11-15 23:34:11 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-15 23:34:11 +0000 |
| commit | 3827195e784999c772357e547d3d4efc9bb8d627 (patch) | |
| tree | 0f0806ee290bfb779b5dcf15c9936f44da3b75d2 /src/document/sync | |
| parent | cc998c1d45939d170bcf8a6512817405ed2b44a3 (diff) | |
policy: read only as continuum writes it
A swarm turns strict only at its start or through a strict remake, and
a change writing a strict policy where the policy isn't strict is
refused, found by its operations: `"signed"` put at the policy's
`values`, or an envelope asking for it put at its place. But the policy
was read in plain JSON, where an Automerge text reads as a string, and
writing a text is no such operation: `{"$text": "signed"}` at `values`,
through the typed API, turned a swarm strict that nothing refused, with
a time before it nothing closes.
The policy is read in typed JSON now (`store::read_plain_as`): what
continuum writes there reads as it is, plain JSON or an envelope, and a
text, a counter or bytes as itself, tagged; a setting that isn't a
string makes a policy no node knows (`policy::read`), as a version it
doesn't know does. So no text turns a swarm strict, and the operations
`rules::turns_strict` asks of are the only ways to. A policy holding none of these reads
as before.
Diffstat (limited to 'src/document/sync')
0 files changed, 0 insertions, 0 deletions
