Deterministic 3-Step Workflow
Tenant-Bound Checkpointing
Jump & context
Week 6: MCP Proxy Hardening, LangGraph Checkpoints, OAuth2 Delegation & Inter-Agent Bus
The five hours
- 01
Concepts & system design
60 min· read · map the mechanismR24 — LangGraph persistence, checkpointing & interrupts
R41 — Agentic workflow risks
R09 — PostgreSQL transaction isolation
Read the assigned sections; map the mechanism, threat model and trade-offs.
- 02
Project implementation
120 min· build · integrate · debugImplement
P3's deterministic workflow (extract facts -> parallel generation -> score/select) separate from free-form agent loops. Define strict state-transition invariants. *Lab:* Test invalid state transitions and state-replay attempts.Add LangGraph (or equivalent) durable checkpointing. Cryptographically bind every checkpoint to
user_id,tenant_id,workflow_id, andauth_scopes. *Lab:* Attempt cross-user checkpoint restoration and prove it fails closed.Build, integrate, debug and improve the increment in the active project.
- 03
Security lab
60 min· attack your own systemNo separate task text for this block on day 34 — the sourced work sits in the block above. Keep the time box.
Test the abuse case, failure path, authorization bypass or resource limit.
- 04
Verification & evidence
30 min· test · record evidenceWorkflow state-invariant tests + cross-tenant checkpoint isolation tests.
Add or run regression tests; record the 9-point evidence record.
- 05
Deliberate practice & Socratic review
30 min· explain aloud · update gapsAnswer the 8 Socratic questions without notes: What? Why? How? What if? Why not? How can I prove it? Where can it break? What have I learned?
Re-explain the hardest concept aloud, inspect one edge case, update the gap log.
- total5 h
Read today · inside the concepts block
R09 R24 R41Foreign-key constraints, indexes, ACID transactions, row-level security (RLS), and query planning.
State graphs, durable checkpointing, human-in-the-loop interrupts, retries, and resumability.
Agentic threat taxonomy: tool misuse, excessive agency, memory poisoning, inter-agent trust, and human oversight.
Read only the named sections needed for today's task. Reading sits inside the 60-minute concepts block; it is not extra time.
Free resources for this day
5 curated- docsLangChain · ~25 min readCheckpointers - Docs by LangChain
Documents thread-scoped checkpoints, the three durability modes and `EncryptedSerializer`, which are the primitives for binding a checkpoint record to a thread plus its owning identity.
R24checked 2026-11-11 - videoLangChain · ~12 minLangGraph: Persistence
Shows a checkpointer writing graph state at every super-step and resuming by thread ID, the mechanism you must gate on user_id and tenant_id before restore.
R24checked 2026-11-11 - videoRenjith KN · ~15 minPostgreSQL Row-Level Security for Multi-Tenancy
Demonstrates enabling RLS and writing a policy against a session tenant variable, the database-level backstop when a checkpoint restore is attempted across tenants.
R09checked 2026-11-11 - articleCrunchy Data · 3 min readRow Level Security for Tenants in Postgres
Shortest complete walkthrough of ENABLE ROW LEVEL SECURITY plus a tenant policy keyed to a per-request session variable, so replay of another tenant's checkpoint returns zero rows.
R09checked 2026-11-11 - labCrunchy Data · ~20 min browser labRow Level Security | Tutorials | Crunchy Data
Interactive single-node Postgres where you SET ROLE and watch policies filter rows, letting you reproduce the cross-tenant restore attempt and see it fail closed.
R09checked 2026-11-11
Evidence record · 9-point standard
A lab is complete only when it produces evidence. Installing PyRIT, Garak, Presidio or TransformerLens is not completion. Saved on this device only.
Day notes
emptyThe two source formulations
verbatim · nothing summarisedProject & Stage Target
P3 (C5) | S6, M6
Focus 1 (Deterministic 3-Step Workflow — Orig. Day 43)
Implement P3's deterministic workflow (extract facts -> parallel generation -> score/select) separate from free-form agent loops. Define strict state-transition invariants. *Lab:* Test invalid state transitions and state-replay attempts.
Focus 2 (Tenant-Bound Checkpointing — Orig. Day 44)
Add LangGraph (or equivalent) durable checkpointing. Cryptographically bind every checkpoint to user_id, tenant_id, workflow_id, and auth_scopes. *Lab:* Attempt cross-user checkpoint restoration and prove it fails closed.
Verification & Evidence
Workflow state-invariant tests + cross-tenant checkpoint isolation tests.
Read Today (60m Concepts Block)
R24 (LangGraph persistence, checkpointing & interrupts), R41 (Agentic workflow risks), R09 (PostgreSQL transaction isolation).
---