Repository navigation
docs: specify moderation and true-delete transitions #12397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,8 +139,32 @@ Comments attach to the exact version ID. **V3 social projection** carries ancest | |
|
|
||
| Keep four distinct states: `DeleteRequested` (author/group request), `ModerationQueued` (review workflow), `HiddenInProjection` (policy/view outcome), and `TrueDeletedOnThisServer` (storage lifecycle). Requests and decisions are append-only signed evidence. Server admins may true-delete under published server policy; GC may remove only when reference graph says unreferenced under a named retention/replication horizon; owner/group users can request deletion for next batch. A request never deletes immediately. `please_delete` / `please_moderate` is a bounded, rate-limited queue with stable ticket ID and audit status. | ||
|
|
||
| The terms are orthogonal: `DeleteRequested` is an intent, `ModerationQueued` is a work item, and `HiddenInProjection` is a local serving decision; none implies another. `TrueDeletedOnThisServer` records local storage lifecycle only and never claims global erasure. Request processing is batched (bounded count/bytes/time per pass); enqueue is immediate and bounded, while approval, hiding, and physical collection are separate actions. | ||
|
|
||
| | Current state / condition | Actor + action | Result | Required authority / evidence | | ||
| | --- | --- | --- | --- | | ||
| | No request | Author or authorized group member marks own item for deletion | `DeleteRequested`; eligible for next bounded batch | Valid signed request, target scope, idempotency key | | ||
| | No request | Any permitted reporter submits `please_delete` or `please_moderate` | `ModerationQueued` ticket; object is not thereby deleted | Rate-limited ticket with stable ID, reporter, reason/category, target, status | | ||
| | `DeleteRequested` | Batch processor evaluates request | Remains requested, or creates/links `ModerationQueued` when policy requires review | Idempotent batch receipt; never directly removes bytes | | ||
| | `ModerationQueued` | Authorized reviewer approves/rejects | Decision is appended; approval may schedule a policy action; rejection closes ticket | Signed reviewer decision with policy revision and ticket ID | | ||
| | Any non-deleted state | Server policy or authorized moderator hides from a named local projection | `HiddenInProjection` for that projection; underlying evidence and bytes remain | Signed/local auditable policy decision; scope and expiry/recheck policy | | ||
| | `HiddenInProjection` | Authorized reviewer/policy clears hide | Projection returns to its prior eligible state; no request or evidence is erased | Append-only clear decision; re-evaluate current access and moderation policy | | ||
| | `DeleteRequested` or approved `ModerationQueued` | GC evaluates an object whose references have cleared | Eligible for fenced collection, then `TrueDeletedOnThisServer` | Current reference generation is empty and retention/replication horizon has elapsed; #9084 fence required | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The only successful ordinary-GC transition requires Useful? React with 👍 / 👎. |
||
| | Any non-deleted state | Server admin orders policy true-delete | Fenced policy deletion; `TrueDeletedOnThisServer` on this server | Published policy authorizes this action; signed decision and receipt; references ordinarily block it | | ||
| | Referenced object | GC attempts ordinary collection | **No transition**; retain bytes and state, report referenced/deferred | A fresh check is not enough; must pass #9084 generation fence and retention checks | | ||
| | Referenced object | Server admin invokes explicit policy override | May proceed to local true-delete with dangling references | Override conditions below; never represented as ordinary GC success | | ||
| | `TrueDeletedOnThisServer` | Any actor requests restore, approve, hide, or ordinary GC | **No transition**; retain receipt/tombstone and return `MissingObject` for unavailable content | Restoration, if supported later, is a new generation/new object operation, not reversal of deletion | | ||
|
|
||
| Unlisted actor/action pairs are denied and produce no state mutation. In particular, a request, queue ticket, hide, or reviewer approval alone cannot reach `TrueDeletedOnThisServer`; only the explicit server-policy path or successful fenced GC path can do so. Group members can request only within their own authority; reviewer/admin permissions are evaluated at the committing authority frontier, not when a ticket was first opened. | ||
|
|
||
| **Referenced-object override.** The default is strict: a referenced object is not GC-deleted even if marked. It becomes collectible only after references clear and the retention/replication horizon elapses. The sole exception is an explicit server-admin decision permitted by the server's published policy (for example a legally required local removal). That decision must be signed or equivalently authenticated in the server's durable audit log and record actor/key, target and tenant, policy ID/revision, reason code plus human-readable rationale, ticket/request ID, reference-index generation and the fact that references remain, timestamp, and affected projections/stores. The deletion receipt retains those fields where retention law permits. The executor still uses the #9084 fence so new references cannot race the operation. Dangling references resolve as `MissingObject`; no substitute is silently served. If policy forbids retaining the receipt, retain only the minimum non-content proof allowed by that policy and make the evidence-retention exception explicit. | ||
|
|
||
| **Worked example.** Alice marks image `I` for next-batch deletion. The batch records `DeleteRequested`; the item remains available unless policy separately hides it. A GC pass finds live reference `R -> I`, so ordinary collection returns `Referenced/Deferred`, leaves the bytes and reference intact, and does not advance to true-deleted. When `R` is removed, the collector waits through the configured replication/retention horizon, fences the current generation, confirms the reference set is still empty, then deletes only that fenced physical generation and records `TrueDeletedOnThisServer`. Alternatively, if a published legal-removal policy permits an override while `R` remains, a server admin records the full override decision above; the object is locally deleted under the fence and reads of `R` return `MissingObject`. The latter is a policy override, not a GC inference, and does not claim remote replicas or downloaded copies were erased. | ||
|
|
||
| True deletion procedure uses a fencing protocol shared with #9137 GC and #9084 content references: create durable `Deleting(object_id, generation, policy_id)` tombstone with a monotonic fence; stop new reads and reference creation through that fence; atomically validate reference-index generation + retention horizon and claim the delete generation; delete bytes/caches only after compare-and-swap confirms no write/reference can cross the fence. A fresh reference check alone is racy. Stale workers with older fences cannot delete a newly retained object. Unresolved #9084 ref-vs-copy semantics must be consumed before enabling physical GC of shared content. Version deletion can remove serving bytes only under policy; it cannot erase signed/evidence records whose retention policy requires them. Keep a non-content deletion receipt where allowed. This cannot revoke bytes already downloaded, erase unknown copies, or prove global deletion. A host must not advertise global revocation as fact. `Referenced` blocks ordinary GC; admin override must record reason and may leave dangling refs, returned as `MissingObject` not silently substituted. Tenant boundary is checked at reference traversal and GC scope; do not let a cross-tenant pointer authorize access. | ||
|
|
||
| **Part C coordination (reciprocal contract):** Part C owns GC scheduling, storage-adapter mechanics, and physical-generation deletion. This section owns the object-state/policy decision and the required reference predicate. Part C must consume the preceding rule—only an unreferenced object after its retention/replication horizon is ordinarily collectible, and a referenced object is protected absent an explicit audited server-admin override—while this section relies on Part C's fenced generation/key non-reuse contract. See [Part C's GC design](../part-c/versioned-design.md#9137-gc-s214-s215-s219). The two sides do not settle #9084's reference-versus-copy authority. | ||
|
|
||
| ## 10. #9131 — signer-bound spaces and petnames | ||
|
|
||
| Address derivation uses an explicit signed profile: `SpaceBindingV1 = [null, typed_public_key_bytes]` in the namespace address core; it does not imply a UUID. Well-known control lookup is a typed array path, e.g. `[typed_text("id"), typed_text("space-control"), typed_object_ref(space_id), typed_text("events")]`, not an untyped string path or guessed UUID. Client recomputes/decodes under the exact profile version, verifies signature and namespace rules, and checks the designated signer key. The address binding is immutable: rotating/transferring control cannot replace the key at the same coordinates. A successor either proves a signed chain at the original address (without changing the original binding) or creates a new address and publishes an explicitly signed redirect/transfer link from old to new. Client-side validation proves only key control over that binding record. A server may store, index, or serve it but cannot manufacture proof. Petnames are local client mappings `(local_owner, canonical_object_ref -> display_label)`; they are not globally unique and never affect equality, authorization, or signature validation. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When policy requires review, the batch transition retains
DeleteRequestedwhile creating aModerationQueuedticket, since these states are explicitly orthogonal. This row nevertheless permits collection fromDeleteRequestedbased only on reference clearance and the retention horizon—even while review is pending or after rejection closes the ticket. Require the applicable review/policy authorization before making a requested object collectible, so GC cannot bypass the required review.Useful? React with 👍 / 👎.