Rename prohibitAllSharing -> containsRestrictedData - #381
Conversation
Preview:
|
|
@Maximo-Guk Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
325daa6 to
dbddb79
Compare
|
|
Submitted 2 actionable inline findings. |
dbddb79 to
7b44daa
Compare
|
Submitted 1 actionable inline finding. |
A schema property name is also the KV key it maps to, so renaming a property
in code is a storage migration. Give a singleton slot somewhere to say
otherwise: `singleton(defaultValue, {storageKey})` declares the key on disk
explicitly, and a bare default value stays the shorthand for the common case
and behaves exactly as before. Collections get the same option as
`storageName`, which prefixes the records and every index alike.
This is the schema-level version of what would otherwise be a special case at
each call site, and it keeps the old name on disk with no migration.
The flag's real meaning is "this observation contains restricted data". What the platform does about that is policy, which shouldn't be baked into the name -- the next commits replace the all-or-nothing lockdown with per-collaborator observer verification. ObservationDescription.prohibitAllSharing and GadgetMetadata.sharingProhibited both become containsRestrictedData. No alias: this is a hard rename, so the gatekeeper call sites move in the same commit. The overseer's durable singleton is renamed too, and declares its old name as its `storageKey` so nothing on disk moves. Without that, every workspace that has already observed restricted data would silently unlatch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
7b44daa to
a8442aa
Compare
|
We are ok with this risk
storageName and storageKey exist only to alias keys that already exist, and no existing schema in the repo has/had a property name containing . or : |
|
Rename
prohibitAllSharingtocontainsRestrictedData, with a typed-storage option ( as @kentonv suggested in this comment #340 (comment) ) so the rename does not need to migrate anything. Once #382 lands, reads off persisted records go through a helper that accepts both names.I'm not planning on landing this PR until #382 is ready for review