System Design Atlas

Development platform for builds and artifacts

10 / 10Worked example

Design and evidence

Which tests establish valid worker completion and identical approved bytes at the target?

The final design reuses the complete runtime topology from step 6. Test markers connect key decisions to expected results and earlier steps to revisit. The following items form a test plan; measured evidence is still outstanding.

Starting point Limit write access to the worker's own attempt and final digest record.

Assumptions for the example case

A fictional example design with one repository, a precisely specified build job, an isolated worker, an immutable artifact identified by digest and explicit release approval. Figures and quality goals are illustrative test assumptions. Full software supply-chain certification, production orchestration and arbitrary privileged builds are outside the scope.

Overall architecture with evidence

Runtime architecture · Scheduler, isolated worker and digest path

  1. 1 · Fix job inputs
  2. 2 · Assign the attempt
  3. 3 · Validate the digest
  4. 4 · Deliver the approved artifact
Development interfaceRequest a build
Source controlC-151

Build platform

Build APIJob intake
Job and authorisation datastoreB-151 · Generation · Evidence
SchedulerGrant a lease
Isolated build workersBuild + upload
Artifact storageA-151 · H-151 · Provenance
Validation workerAssess the digest
Release APIRead the approval record
Delivery adapterTransfer the digest
Target systemConfirm the digest
Development interface → Build APIC-151 + D-5
Build API → job and authorisation storeB-151
Job and authorisation store → SchedulerQueued job
Scheduler → Build workerAttempt + generation
Build worker → Source controlRead C-151
Build worker → Artifact storageA-151 + provenance
Artifact storage → Validation workerCheck H-151
Validation worker → Job and authorisation storeValidation record
Release API → Job and authorisation storeRead F-151
Release API → Delivery adapterApprove H-151
Delivery adapter → Target systemDeliver the digest
Target system → release APIH-151 confirmed
Lease · Step 3/5Digest-Replay · Step 4Upload loss · Step 7/9

The scheduler assigns generations; workers read source and write artifacts with provenance; the release path reads the digest-bound approval record.

Source code may contain arbitrary build steps. Run workers without platform-wide permissions. Each build receives only necessary inputs and restricted output paths.

Test plan with review loops

ValidationExpected resultReturn to an earlier step
Concurrency in both ordersTwo workers claim B-151. In either commit order, one receives current execution authorisation. After expiry, a new attempt may start; the old worker can no longer publish a valid completion.Steps 3 and 5
Identical and changed retriesRepeating the build request with the same key, C-151 and D-5 returns B-151. The same key with a different source revision is rejected. Uploading identical bytes to H-151 twice returns the same object; different bytes under H-151 are rejected.Step 4
Exact value or time limitWorker authorisation expires at 60,000 ms, exclusively: finalisation at 59,999 ms is permitted; at 60,000 and 60,001 ms it is rejected. A new worker receives a higher generation; the old completion remains invalid.Steps 2 and 5
Lost response and restartThe worker fully uploads A-151 and loses connectivity before the completion message. The platform checks digest and authorisation; an expired attempt cannot become successful retroactively. A new attempt may reuse identical bytes but requires its own valid provenance record.Steps 7 and 9

Concurrency in both orders

Expected result
Two workers claim B-151. In either commit order, one receives current execution authorisation. After expiry, a new attempt may start; the old worker can no longer publish a valid completion.
Return to an earlier step
Steps 3 and 5

Identical and changed retries

Expected result
Repeating the build request with the same key, C-151 and D-5 returns B-151. The same key with a different source revision is rejected. Uploading identical bytes to H-151 twice returns the same object; different bytes under H-151 are rejected.
Return to an earlier step
Step 4

Exact value or time limit

Expected result
Worker authorisation expires at 60,000 ms, exclusively: finalisation at 59,999 ms is permitted; at 60,000 and 60,001 ms it is rejected. A new worker receives a higher generation; the old completion remains invalid.
Return to an earlier step
Steps 2 and 5

Lost response and restart

Expected result
The worker fully uploads A-151 and loses connectivity before the completion message. The platform checks digest and authorisation; an expired attempt cannot become successful retroactively. A new attempt may reuse identical bytes but requires its own valid provenance record.
Return to an earlier step
Steps 7 and 9

First end-to-end validation

End-to-end path
Cancel B-151, start a new attempt and submit the old completion. The old success remains invalid; only the evidenced digest is approved.
Open decision
Next, add parallel build graphs. Full software supply-chain certification, production orchestration and arbitrary privileged builds require a separate follow-up design.

Reject superseded success reports

Reject superseded success reports

Cancel B-151, start a new attempt and submit the old completion.

Worker handover is the critical failure point.

Old success remains invalid; only the evidenced digest is approved.

Alternative considered
A normal green build does not test execution authorisation.
Trade-off
Tests require a controllable clock and two workers.
Reassess
Next, add parallel build graphs.

Terms in this step

Reject superseded success reports
Old success remains invalid; only the evidenced digest is approved.

Try it yourself

Define two final tests and steps to revisit: an old worker and a substituted artifact.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
After a generation change, the old worker reports success: reject it. On failure, revisit steps 5/7.
Second part of the solution
Compare approved H-151 with different bytes at the target: delivery remains unconfirmed. On failure, revisit steps 2/9. A green build status alone replaces neither check.

Apply to your project

Which corresponding assumption would you test first in your project? Consider this trigger: Next, add parallel build graphs.

Transfer the system boundary, evidence and open decisions 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 corresponding assumption would you test first in your project? Consider this trigger: Several repositories need a joint input contract.

    In the example: Store an immutable source revision and build definition. B-151 remains traceable to C-151 and D-5.

  2. Requirements

    Which corresponding assumption would you test first in your project? Consider this trigger: Composite releases require a manifest digest.

    In the example: Bind approval to H-151. Delivery verifies exactly the bytes that were assessed.

  3. Scale estimates

    Which corresponding assumption would you test first in your project? Consider this trigger: Build duration or parallelizability change.

    In the example: Plan for at least 10 fully utilised workers plus a separate reserve. 600 worker-minutes fit into 10 worker-hours.

  4. Interfaces

    Which corresponding assumption would you test first in your project? Consider this trigger: Very short builds allow for simpler display.

    In the example: Keep a stable job identity and a new identity for each attempt. The first failure remains visible and the new attempt is unambiguous.

  5. Data and states

    Which corresponding assumption would you test first in your project? Consider this trigger: Other execution models change the contract.

    In the example: Bind completion to the current generation and deadline. Only the current attempt can complete validly.

  6. Overall architecture

    Which corresponding assumption would you test first in your project? Consider this trigger: An explicitly privileged build requires its own security boundary.

    In the example: Run workers without platform-wide permissions. A build receives only the necessary inputs and restricted output paths.

  7. Critical flow

    Which corresponding assumption would you test first in your project? Consider this trigger: An atomic storage contract replaces multipart finalisation.

    In the example: Check artifact completeness and provenance completeness separately. The presence of bytes alone does not make the attempt successful.

  8. Bottlenecks and trade-offs

    Which corresponding assumption would you test first in your project? Consider this trigger: A common cache becomes a hotspot.

    In the example: Measure queue time, source retrieval and build time separately. More workers help only with a queue bottleneck.

  9. Operations and security

    Which corresponding assumption would you test first in your project? Consider this trigger: The tenancy model expands.

    In the example: Limit write access to the worker's own attempt and final digest record. Immutable objects remain protected from other builds.

  10. Final design

    Which corresponding assumption would you test first in your project? Consider this trigger: Next, add parallel build graphs.

    In the example: Cancel B-151, start a new attempt and submit the old completion. The old success remains invalid; only the evidenced digest is approved.