SYSE.33:4.6 - Choose a fidelity boundary and make reconstruction converge
Construct the environment from the question the task must answer. For each interaction that could change that answer, choose whether the task needs the actual dependency, a controlled substitute or no dependency at all. A substitute is adequate only for the behavior it represents. An in-memory data store can make a transformation test fast while omitting collation, isolation or persistence behavior that a migration test needs. Identify those omitted questions and send them to the environment that can exercise them; do not require production duplication for a test whose answer does not depend on it.
Develop supported environment profiles when several tasks share the same consequential conditions. Each profile states what its users may infer: for example local functional feedback, real-database integration, or representative performance. Generate these profiles from shared configuration where feasible, but retain their intentional differences. A single universal environment can become slow and expensive; uncontrolled differences between ad hoc environments can invalidate comparisons. The deciding question is which differences affect the receiving claim.
Treat reconstruction as convergence from a known starting condition. Establish how the mechanism identifies an existing resource, inspects its actual state and chooses create, change, leave, or stop. Declarative desired state is useful only when those operations are supported for the relevant resource and state. A tool’s state record can help associate resources with requests, but it is not the resource itself. If the record is lost while the resource survives, recover that association before creating another resource with the same business purpose.
Choose how to handle drift. Replacing a disposable worker is often simpler than understanding every manual change it accumulated. A shared stateful dependency may require an in-place repair that retains information and service continuity. Reconcile only the resources the mechanism is authorized and responsible for managing. When emergency work deliberately changes a managed value, either adopt the new intended value through the supported change path or restore the former value after mitigation; two competing controllers must not keep undoing one another. Continuing reconciliation adds value when ongoing drift matters; an observed one-shot construction is sufficient for many short-lived tests.
Information and access make this more than infrastructure recreation. A usable retained-data environment needs a recoverable data source, a restore/import procedure, compatible schema and a way to verify the required state. Credentials need valid scope and availability at use time. Provisioned capacity needs to last through the promised task. Keep the machine-reconstruction procedure when another prerequisite for the task is missing. Identify what it reconstructs and what still blocks the task.
In a changed ParcelWorks use, a fast local substitute treats text comparison differently from the production database. Keep it for pure split/join feedback whose contract is unaffected. Move the persistence comparison to a profile using the relevant database semantics, and include the differing text case. If the new purpose is a latency guarantee, neither profile is sufficient merely because it uses the right database version: reproduce or justify the relevant load and resource envelope through SYSE.40. The action changes with the test question, while independently useful environments remain usable.