Tool Library: The Contract an Upgrade Starts From One seal for the whole tree Every module's memory was declared in a version file. That file fixes what is saved and how it is read. Think of it as a seal on the vault. The file that selects the current version is two lines. Once a version has shipped, its file is locked. It is never edited again. A parent's seal includes the child versions its declaration allows. Shelf folds into Branches once. Both branches use that same Shelf version. Branches, Members, Loans and Policy fold into the root. The S D K and compiler the app was built with also join the root seal. The canister remembers this seal as its saved-memory contract. It covers the shape of those types and the rules they declare for reading that data. Our tests still have to check the lending rules and the actual values. Admitted or turned away A new build arrives. It changes one refusal message in Desk. The build carries the seal it was compiled to expect. The gate compares it with the seal the canister holds. They match. The build is admitted, the services are bound again, and every value is where it was. Another build. Someone tidied up and renamed a field in Shelf's version one file. It looks harmless. But that file is part of the contract, so this build expects a different seal. The gate turns it away, before any saved data is opened. The old release keeps running. Nothing was touched. The gate matches the build's declared starting contract to the saved one. We still test what the build does with that data. A different S D K or compiler can change the seal even when the app files stay the same. The app decides when A late fee for loan three is being charged. The payment canister still owes us an answer. Tool Library's readiness rule forbids an upgrade while any loan is charging. Try it now. The installed release refuses the upgrade before it reaches the gate. The operator pauses new fee requests. The payment that already left can finish. If the reply leaves the outcome unclear, keep that loan on the pending list until you can establish what happened. That is the release condition the app needs. The answer arrives. Loan three is charged. The readiness rule is satisfied, and the same build goes through. Two design points. Readiness is your rule, about your work. And it runs in the release already installed, so it must ship before the upgrade that needs it.