# Change and validation Follow the behavior being changed through the state and consumers that depend on it. Diff size does not determine the scope: replacing invalid fixture bytes can stay local, while changing a persisted editor attribute may affect the editor, renderer, public site, and existing documents. ## Establish the compatibility obligation bland is a collaborative document application whose editor defines the structure of saved content as well as the editing UI. Its BlockNote-to-Tiptap migration sought maintained, permissively licensed building blocks, collaboration support, and more control over block editing. At that point the product was still in development. Rachel explicitly accepted churn and allowed local and remote development data to be wiped, making replacement practical without preserving a schema no user depended on. Once the product held live documents, the same change reached existing content and every surface that read it. Compatibility now protected something people relied on: the ability to reopen, collaborate on, and publish their documents. The earlier permission to discard development data did not make those later obligations disappear. The decisive question is who needs the old meaning to survive. Disposable development state can obstruct a better foundation without protecting anyone. A live format can still change, but handling its consumers and persisted data becomes part of the change itself. ## Change the source of the contract In bland, a document node's attributes are persisted content, not merely component props. The client editor writes them; client adapters attach editing behavior; presentation components display them; and Sites, the application's public publishing feature, renders the same document on a Cloudflare Worker. Adding an attribute only to the interactive editor can leave published output missing its meaning or exposing an internal value that should never appear in HTML. The shared schema therefore has to carry the meaning across those consumers while remaining usable in the server runtime. It cannot import the browser editor's React, DOM, CSS, or collaboration behavior just to reuse a node definition. A local menu's open state can remain local; a saved callout kind or page reference has consequences wherever the document is read. Generated files have an equivalent ownership boundary. The database schema sources in anvil and the identity service tessera feed migration or authentication-schema generators. Changing only an output can make the next generation undo the fix, or leave consumers compiled against a different contract. Changing the owning input and regenerating the derived files preserves the relationship that the build already relies on. anvil's login migration made the distinction between identities especially concrete. anvil runs users' CI projects; tessera authenticates people through OpenID Connect (OIDC), while anvil still decides which projects a local user may access. Existing users already owned projects but did not yet have provider identities. A separate binding table lets those accounts acquire a login identity without replacing their application identity: it maps tessera's stable subject identifier, `sub`, to the existing `user_id`. A primary key on `sub` and a unique constraint on `user_id` enforce the intended one-to-one binding. First sign-in can bind an existing unbound user through the provider's verified email. New users and their bindings are inserted together, while conflicting bindings have explicit outcomes. Projects continue to refer to the same local user identity. A different identity provider can change authentication without requiring every application-owned relationship to adopt its identifier. ## Locate the recovery boundary anvil introduced OIDC and disabled password login in one change, then removed legacy password storage in a later change. These are different recovery boundaries. While the old credential tables remain, redeploying the old application can restore password access for users who still have credentials. Once those tables are dropped, redeploying old code alone cannot recover that access; it also needs restored data. Users first created through OIDC have no old password credentials in either case. The migration guide consequently puts identity binding and user access before removal of the old tables. The relevant checks include existing users seeing their projects, accepted identities receiving valid application sessions, and access still working after the old login surface is removed. Rendering the sign-in page exercises little of that chain. The split migration preserves a recovery opportunity, but that opportunity applies to the users and data actually retained; it is not made complete by calling the first step reversible. The Cloudflare docs-MCP service exposes documentation search to coding tools. Its refresh downloads a corpus and builds a search database in staging, then replaces the working database and corpus. A failed indexing run had produced zero pages, documents, and chunks yet proceeded to publish them. That could turn a useful existing search service into an empty one even though the refresh reported success. The repair validates the staged build's counts before recording success or replacing the working artifacts. Its focused test seeds a searchable database and corpus, supplies a successful HTTP response with an empty body, expects the build to fail, and confirms the old artifacts survive. A test that merely expected an error, without starting with useful old data, would miss the preservation requirement. This guard protects against a failed build before replacement. Publication still removes the active files and renames the two staged files separately, so a crash during that sequence can leave them absent or mismatched. Requiring the pair to survive such a crash together would be a further publication guarantee with a different mechanism. The empty-build fix earns its scope by preserving the working service at the boundary implicated in that failure. ## Make checks encounter the changed mechanism Specter's Chord ring assigns key ranges to nodes, and membership changes move those ranges and their stored values. A write overlapping transfer can reach a node whose routing view still says it owns the key even though ownership has changed. The repair performed transfer under an ownership lock and made storage operations reject stale ownership. Its tests wrote while nodes joined and left, retried that specific outcome, and then verified the expected values. Waiting for the ring to settle before writing would bypass the timing window being fixed. The same idea applies to topology. Specter's tunnel integration fixture grew from three nodes to five specifically to force use of proxied streams, where traffic crosses an intermediate node. A successful direct connection would not establish that the forwarding path worked. Five was a property of that fixture's routing setup, not an inherently sufficient cluster size for distributed tests. anvil's OIDC route tests stubbed the exchange of an authorization code for identity claims. That let them exercise local binding, conflicting identities, rejected cookies, and session behavior under controlled inputs. It did not exercise the real provider's signed tokens or its exchange protocol. A provider integration check covers that boundary, while local route tests can cover application decisions without repeating a complete browser login for every case. The right scope follows the obligation: concurrency for ownership transfer, forwarding for tunnel routing, and real protocol exchange for provider interoperability. Existing project checks still apply. Additional checks are useful when a changed behavior or observed failure gives them something specific to establish. ## Diagnose a failing test before repairing the system bland's public Sites HTML had an accepted cache policy that could return a request-keyed cache hit before consulting D1, its database of publication and access metadata. That removed a database read from the warm response path at the price of bounded stale HTML. A test and repository instruction still required D1 resolution first so unpublishing would take effect on the next request. An attempted runtime repair would have restored that older policy and its latency cost. Rachel pointed to the accepted cache behavior and asked to update the test and guidance. The stale expectation was the defect. This decision applied to HTML: public asset requests still had to check the requested page, upload ownership, publication, and reachability in D1 before reading the blob. Treating “stale cache is acceptable” as a rule for every resource would erase a separate access requirement. A later pair of browser-test failures involved malformed PNG fixture bytes used in image flows. The existing persistence wait helper had no reproduced defect. Replacing that helper and expanding unrelated assertions changed synchronization behavior without explaining why the image input was invalid. The finished repair replaced the two fixtures and retained the helper. A reproduced persistence race could justify changing the wait, but an invalid image does not establish one. These failures call for different repairs: update an obsolete expectation, fix invalid test input, or change a faulty implementation. Comparing the observed failure with the accepted behavior and the actual input keeps a test repair from silently redesigning the product. ## Finish with the result made usable Specter's package upgrade request included a policy to stop affected services before replacing their binaries and restart only those that had been running. Restarting every installed service would also activate ones the operator had left stopped, so the package scripts recorded the active services and used those records after replacement. The RPC socket needed a location and permissions usable by both sides, and the requested configuration instructions had to explain how to operate the result. Shell syntax checks and inspection of the staged package layout supported those script and layout changes. Final Debian/RPM package builds were not performed because the packaging tool was unavailable, so installation and upgrade behavior on a real system remained unverified. That is a concrete boundary to report, distinct from leaving the requested scripts or configuration explanation unfinished. Completion follows the requested behavior and its necessary consequences, with the checks required by the project and the changed mechanism. A failed check, another code change, or a specific unresolved issue can justify continuing. A stronger guarantee imagined after the work is complete does not create another requirement on its own.