---
title: "Chapter 20. The Responsibility Boundary"
url: "https://www.mikefluff.com/en/read/from-closures-to-autonomous-systems/ch20"
locale: "en"
author: "Mikhail Savchenko (Mike Fluff)"
updated: "2026-11-18T12:24:57.879Z"
book: "https://www.mikefluff.com/en/books/from-closures-to-autonomous-systems"
access: "lead-in"
purchase: "https://www.mikefluff.com/en/books/from-closures-to-autonomous-systems"
alternates:
  - locale: "ru"
    url: "https://www.mikefluff.com/ru/read/from-closures-to-autonomous-systems/ch20"
    markdown: "https://www.mikefluff.com/ru/read/from-closures-to-autonomous-systems/ch20.md"
  - locale: "en"
    url: "https://www.mikefluff.com/en/read/from-closures-to-autonomous-systems/ch20"
    markdown: "https://www.mikefluff.com/en/read/from-closures-to-autonomous-systems/ch20.md"
  - locale: "pt"
    url: "https://www.mikefluff.com/pt/read/from-closures-to-autonomous-systems/ch20"
    markdown: "https://www.mikefluff.com/pt/read/from-closures-to-autonomous-systems/ch20.md"
---

# Chapter 20. The Responsibility Boundary

*[JavaScript: From Closures to Autonomous Systems](https://www.mikefluff.com/en/books/from-closures-to-autonomous-systems)*

When I was learning to program on Meteor, it never occurred to me to ask who stores my function’s continuation while it waits for the database, who decides what to re-render on screen, and who checks what the client is allowed to see. Someone else did all of this, and did it well, until they stopped. In this book I have tried to work out who exactly, and what happens when they stop. It is time to put the answers together.

**Ch.** **Taken by the runtime** **Left to the programmer** **How to see it** 3, 8 freeing memory references to what is no longer needed heap snapshot, experiments 02 and 07 5–7 choosing machine code stable object shapes `–trace-deopt`, IRHydra 10, 11 storing the continuation places where a function yields control `await` in the text 12 process time (Temporal) cancellation, determinism the process log 13 what depends on what dependency lists in hooks Vue and React devtools 14, 15 delivering data and guessing the answer stub matching the server, idempotency Kadira 16 removing inaccessible data from the copy permission model, what to send at all subscription log 17 the merge rule (CRDT) invariants that need coordination version history 18, 19 checking an agent’s step, its memory what to give the agent, idempotency keys, sign-offs the agent’s log

The table looks like a one-way story: more and more work passes from the programmer to the runtime. That is what I thought when I sat down to write this book. But looking closely, the table has rows that do not fit this story, and they deserve a separate word.

* * *

First, what repeats. In the second part V8 watched the program, bet that it would keep behaving the same way, checked the bet on every call and rolled back to slow code if the bet lost. In the fourth part Meteor watched a method, bet that the server would do the same as the stub, checked the server’s answer and rolled back the stub’s changes. In the fifth the agent harness bets that a proposed action is safe, checks it against the schema, permissions and data provenance, and holds dangerous steps until a human signs off. The cycle «observe, bet, check, roll back» appears in this book so many times that it is unlikely to be a coincidence. Three of its parts carry over from one field to another almost unchanged: watching what the executor does, a rule that must not be broken, and a way back to a safe state.

---

The rest of this chapter is free on the site once the reader confirms an email address: https://www.mikefluff.com/en/read/from-closures-to-autonomous-systems/ch20
