Review the prerequisites
Suitable for: Backend developers learning Agent applications.
- Revoke memories, clean up derivatives, and prevent stale data from returning
- Deleting the text and prohibiting its reuse are separate steps. The authoritative revocation state must participate in reads and writebacks before the old replica, otherwise old checkpoints, backfills, or caches will reintroduce deleted facts.
How does the mechanism work?
Step-by-step explanation
- How should the product commitment be defined if the removal coincides with tool shipping?
After deleting copies, examine the race between revocation and dispatch.
- How to prevent tombstone loss during backup and restore?
Recovery may restore stale knowledge of revocations even after physical cleanup.
- What are the costs of the full-scope epoch and the itemized versions?
Move from preventing revoked memory from reappearing to implementable performance trade-offs.
Design · Explain the trade-offs
Explain design trade-offs · Revoke memories, clean up derivatives, and prevent stale data from returning
Objectives of this level: Specify revocation/write ordering and truthful cleanup claims under new constraints, beyond the pure-function lab.
Visual guide · Restore through current authority
Deleting one payload does not invalidate its copies. This local view checks dependencies; atomic cross-service revocation and cleanup are separate design work. Select the figure to open it at full size.
Change the contract, not just the ID
Start with this fixed timeline and constraints. These integer sequence positions are logical ordering, not measured duration:
{
"scope": [
"tenant-a",
"user-1",
"project-1"
],
"events": [
{
"at": 1,
"event": "worker_read",
"epoch": 1,
"source": "s-email",
"source_version": 1
},
{
"at": 2,
"event": "revoke_committed",
"epoch": 2,
"source": "s-email",
"source_version": 2
},
{
"at": 3,
"event": "worker_write",
"epoch": 1
},
{
"at": 4,
"event": "old_backup_restore",
"backup_epoch": 1
}
],
"constraints": {
"cleanup_worker": "unavailable",
"already_sent_remote_request": true,
"new_explicit_consent_workflow": "not_implemented"
}
}
The current source state is s-email version 2, revoked; current scoped epoch is 2. The old worker’s epoch-1 write must be denied. A restored epoch-1 backup may not serve reads before it has merged current authoritative revocations. A renamed source cannot be treated as new authorization without an explicit provenance and consent policy.
Deliver an architecture decision record
In revocation-design.md, define the authority and linearization point for revocation and write/dispatch commits; say how the source-version comparison and effect commit share coordination. A Python check followed by an unrelated write still has a race. Compare scope-wide epoch rebuilding with per-source dependency invalidation: list rebuilt data, metadata retained without payload, cleanup targets, retry state, and unavailable-authority behavior. Use one failure sequence to justify the cost tradeoff rather than inventing throughput numbers.
The first changed constraint is that cleanup is unavailable for an hour: future-use blocking must remain effective and cleanup remains pending. The second is a request for new explicit consent: design a new authorized generation with auditable scope and lineage, without resurrecting the old tombstone; this is not implemented by admit_write. Record which components would need implementation and validation if connecting this standalone exercise to the main project.
Give precise product commitments
For an already-sent remote request, state that this system cannot recall its content; provider-side handling and backup retention remain separate work. Do not report physical erasure from a filtered context. Include two acceptance traces: the old worker rejected after revocation and old backup reads blocked until current revocations merge. A proposed transaction/coordinator is design evidence only; this lab has no database, multi-process dispatcher, cleanup system or real model.
For the executable local contract, save revocation_lab.py as revocation_lab.py; implementation uses restore_context(authority, checkpoint) and admit_write(authority, candidate). Its reports can support these local decisions, not prove the unimplemented architecture.
Continue to do advanced research experiments
Why can’t the old context continue to be used after the policy changes?
Transferring pre-retrieval filtered ideas to memory versions and recovery. Observe how existing drafts become invalid after cancellation.
Read full text and fault analysis → · Download experiment package ↓
python3 cli.py memory-put --db memory.sqlite
python3 cli.py submit --db memory.sqlite
python3 cli.py run --db memory.sqlite --lease-seconds 2 --fault after_draft
python3 cli.py memory-forget --db memory.sqlite
# 等待至少 2 秒后分别执行
python3 cli.py run --db memory.sqlite
python3 cli.py inspect --db memory.sqliteKeep evidence and check item by item
- The draft checkpoint already exists after the first exit.
- Recovery after memory-forget gets failed with memory_changed_or_expired.
- No publish checkpoint; explain the difference between fail blocking and complete deletion.
Verify local scope, version, and undo blocking; old checkpoints remain, no complete deletion of logs, backups, or checkpoints is provided.
code example
Do not restore authoritative tombstones from only the old backup
Restoring yesterday’s source rows and calling them current authority erases today’s revocation knowledge. Merge current revocation records before serving; if they are unavailable, deny sensitive recovery rather than guess.
Acceptance task for this level
Deliver a decision record and two ordering traces for cleanup outage and explicit new consent; identify implementation gaps and the exact product deletion claim.
Reading this browser’s record…
Hide the answer and check your understanding
Can a successful source-version check guarantee the next remote dispatch is ordered after revocation?
Expand reference derivation
No. A separate check and dispatch leave a race. Strong ordering requires a common commit/coordinator boundary or a deliberately weaker documented guarantee. The pure-function lab verifies neither remote coordination nor recall.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (1 )
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.