System Design Atlas

Construction change orders, drawing revisions and cost impact

10 / 10Worked example

Final design

Which tests verify concurrency protection and change-order completion in the overall architecture?

The final design reuses the complete topology from step 6. Inside the boundary: interface → change order API → change-order revisions, drawing references, approvals and cost records. Document and notification processing reads durable work from this store. The drawing archive is external. Processing receives or sends the business messages in the main flow; results reach the interface through the change order API. The plan tests concurrency, retries, limits and terminal completion for N-32. The table lists expected results; execution evidence is still outstanding.

Starting point Project roles govern document access and decisions.

Assumptions for the example case

Original fictional design: an internal approval workflow for a change order with frozen drawings and costs. The illustrative internal threshold is 500000 cents. Up to and including this amount, one approver is sufficient; above it, this case requires a second approver. All figures and test targets are illustrative assumptions.

Overall architecture with checks and review loops

Runtime topology

  1. 1 · Contractors → Change order API
  2. 2 · External drawing archive → Document processing
  3. 3 · Document processing → Change order API
  4. 4 · Change order API → Change-order datastore
ContractorsChange order and scope of work
External drawing archiveImmutable drawing hash

Change-order system

Construction change order APICheck drawing and costs together
Change-order datastoreReferences, revisions and approvals
Document processingRetrieval outside the transaction
Notification processingDelivery after commit
Approval interfaceConstruction management and approval
Contractors → Construction change order APIScope of work and costs
External drawing archive → Document processingDrawing bytes and hash
Document processing → Construction change order APIStable reference
Construction change order API → Change-order datastoreCommit shared prerequisites
Approval interface → Construction change order APIConfirm the exact content
Change-order datastore → Notification processingApproval event
Replay 4 · State 5 · Flow 7 · Operations 9≤ 500,000 cents: one approval · Above: two

Approval binds the drawing revision, scope of work and cost revision.

Contractors send change orders and scope descriptions to the API; large drawings reside in the external drawing archive. The API stores immutable document references, cost revisions and approvals relationally. Construction management checks drawing references, cost control reads approved amounts, and approvers confirm the same content. Document and notification processing handles retrieval and delivery outside the short approval transaction. Drawing and cost evidence are prerequisites for approval. Components and arrows match step 6. Test markers: API/commit → concurrency and replay (4/5/7); limit validation → exact boundary (2); domain role/completion → terminal evidence (9).

Test plan for the complete design

ComponentTest and expected resultReturn to an earlier step
Construction change order APIA new drawing revision and approval both expect version 6. If the drawing change wins, the old approval request is invalidated. If approval wins, it binds the old scope; the new drawing creates a new change order requiring review and leaves the approval unchanged.Steps 3 and 5
Command journalIdentical retries take effect once; changed content produces a conflict.Steps 4 and 7
Domain boundary checkTest 499999, 500000 and 500001 cents. Expected result: the illustrative internal review threshold is 500000 cents. One approver is sufficient up to and including this amount; above it, this case requires a second.Step 2
Change order revisions, drawing references, approvals and cost recordsCompleted change orders receive no cost changes; rejected change orders are resubmitted under a new identity.Steps 5 and 9
Document and notification processingApprovers confirm a frozen change order. The API checks its version and content bindings before commit. Uploading a new drawing after this commit creates a new revision awaiting review; the existing approval remains traceable in history.Steps 6 and 7

Construction change order API

Test and expected result
A new drawing revision and approval both expect version 6. If the drawing change wins, the old approval request is invalidated. If approval wins, it binds the old scope; the new drawing creates a new change order requiring review and leaves the approval unchanged.
Return to an earlier step
Steps 3 and 5

Command journal

Test and expected result
Identical retries take effect once; changed content produces a conflict.
Return to an earlier step
Steps 4 and 7

Domain boundary check

Test and expected result
Test 499999, 500000 and 500001 cents. Expected result: the illustrative internal review threshold is 500000 cents. One approver is sufficient up to and including this amount; above it, this case requires a second.
Return to an earlier step
Step 2

Change order revisions, drawing references, approvals and cost records

Test and expected result
Completed change orders receive no cost changes; rejected change orders are resubmitted under a new identity.
Return to an earlier step
Steps 5 and 9

Document and notification processing

Test and expected result
Approvers confirm a frozen change order. The API checks its version and content bindings before commit. Uploading a new drawing after this commit creates a new revision awaiting review; the existing approval remains traceable in history.
Return to an earlier step
Steps 6 and 7

First end-to-end test and outstanding evidence

End-to-end path
Test the exact threshold amount and a drawing revision change end to end. Approvers confirm a frozen change order. The API checks version and content bindings before commit. Uploading a new drawing after this commit creates a new revision awaiting review; the existing approval remains traceable in history.
Clarify before extending the scope
Agree the real drawing-archive contract, retention periods, recovery targets and assigned roles. Every limit here is a design assumption. The evidence table describes tests to execute; technical integration, browser checks and comprehension checks with readers follow separately.

Test the exact threshold amount and a drawing revision change end to end

Test the exact threshold amount and a drawing revision change end to end

Test the exact threshold amount and a drawing revision change end to end.

A new drawing revision is submitted while a change order awaits approval. An earlier approval screen must not approve the new scope. Completion requires technical and business evidence.

A new drawing revision and approval both expect version 6. If the drawing change wins, the old approval request is invalidated. If approval wins, it binds the old scope; the new drawing creates a new change order requiring review and leaves the approval unchanged. The exercise specifies the input and expected result.

Alternative considered
An initial end-to-end path limited to lists and forms postpones the critical state checks.
Trade-off
The first end-to-end path needs controlled concurrency and failure points.
Reassess
Passing the counterexample tests and checks with readers provides grounds for extending the case.

Try it yourself

Choose two architectural decisions: concurrency protection and evidence-backed completion. For each, name the test, expected result and step to revisit.

A hint for your attempt

Link the markers of the overall architecture with the associated design steps.

Compare with a possible solution
Concurrency control
A new drawing revision and approval both expect version 6. If the drawing change wins, the old approval request is invalidated. If approval wins, it binds the old scope; the new drawing creates a new change order requiring review and leaves the approval unchanged. The invariant must hold: approval binds the exact drawing revision, scope of work and cost revision, and every business change creates a new version requiring review. A failure leads back to step 5 and the command contract in step 4.
Test completion and retries
Starting point: an approved change order binds the drawing revision, scope of work, amount in cents and required distinct approvers. Complete it after documented implementation; submit a cost change under the same identity and replay the old completion command. Expected result: the cost change receives a conflict; replay returns the same completion record; the amount and approval bindings stay unchanged. A changed scope requires a new linked change order. Failures lead back to step 9 for responsibility and step 7 for the failure sequence.

Apply to your project

Which two counterexample tests will you run first in your own end-to-end implementation?

Transfer the architecture and counterexamples to the editable Markdown design template.

Start your own design

Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.

Download design template (.md)
Compare the ten tasks with the example case
  1. Purpose and boundary

    Which evidence for a change order would originate outside the application in your own project?

    In the example: Approval binds an immutable scope of work. A fictional internal approval workflow for a change order with a frozen set of drawings and costs.

  2. Requirements

    Which rule of your project remains binding even with slow processing?

    In the example: The cost threshold explicitly defines equality. The illustrative internal review threshold is 500000 cents; up to and including this amount, one approval authority suffices; above it, this case requires a second.

  3. Scale estimates

    Which individual entity concentrates more load than the daily average suggests when approving drawing changes?

    In the example: Test document size and concurrent approvals separately. An average of 0.025 events/s says little about two approvals and a drawing change on the same change order.

  4. Interfaces

    Which input fields make two change intentions different in your project?

    In the example: Approval specifies three concrete content references. The change order version, drawing hash, scope hash, cost revision and amount in cents must remain identical on replay.

  5. Data and states

    Which states must remain protected in your model against late replay?

    In the example: A drawing change creates a new revision requiring review. Completed change orders receive no cost changes; rejected change orders are resubmitted under a new identity.

  6. Overall architecture

    Which planned service boundary would distribute a currently local guarantee across the network?

    In the example: The drawing archive remains outside the approval commit. Change order revisions, drawing references, approvals and cost records must express the same valid state.

  7. Critical flow

    What feedback could be missing even though the underlying action has already taken place?

    In the example: Approval and drawing changes follow a definite order. Approval applies to the exact drawing revision, scope of work and cost revision; every business change creates a new version requiring review.

  8. Bottlenecks and trade-offs

    Which similar display could have two different causes in your project?

    In the example: Separate pending business review from retrieval latency. Long processing times may result from a missing drawing reference, a pending second approval or slow document retrieval. State age and technical retrieval duration are measured separately.

  9. Operations and security

    Which open state in your project needs a domain specialist as well as technical operations?

    In the example: Project roles govern document access and decisions. Completed change orders receive no cost changes; rejected change orders are resubmitted under a new identity.

  10. Final design

    Which two counterexample tests will you run first in your own end-to-end implementation?

    In the example: Test the exact threshold amount and a drawing revision change end to end. A new drawing version and approval both expect version 6. If the drawing change wins, the old approval request is invalidated. If approval wins, it binds the old version; the new drawing creates a new change order requiring review and leaves the approval unchanged.