Final design
Which tests establish contention protection and completion for the analysis run in the overall architecture?
The final design carries forward the complete topology from step 6. Inside the system boundary: interface → analysis API → run manifest and immutable artifact store; isolated computation reads durable work from these stores. Outside: publication archive. Processing receives or sends the domain messages defined in the main workflow; results reach the interface through the analysis API. Tests for analysis run L-28 cover contention, retries, boundary values and terminal completion. Table entries are expected outcomes; the tests remain to be executed.
Starting point Publication permission remains separate from submission.
Assumptions for the example case
An original fictional design for a deterministic tabular analysis run with frozen input, recipe and environment. A compute job has a runtime budget of 600 seconds; at the limit it stops accepting new computation steps and is marked timed out. All figures and test targets are illustrative assumptions.
Overall architecture with checks and review loops
Runtime topology · External entities, processes and datastores
- 1 · Researchers → Analysis API
- 2 · Analysis API → Run manifest store
- 3 · Isolated computing → Artifact storage
- 4 · Isolated computation → Analysis API
Reproducible evaluation
Published results bind immutable hashes for input, recipe, and environment.
Test plan for the complete design
| Component | Test and expected result | Return to an earlier step |
|---|---|---|
| Analysis API | Two publication commands expect version 5. Exactly one creates the publication job; the other receives a conflict. In the reverse order, the first commit still wins; identical content remains unchanged. | Steps 3 and 5 |
| Command journal | Identical retries take effect once; changed content produces a conflict. | Steps 4 and 7 |
| Domain boundary check | Check 599, 600 and 601 seconds. Expected result: a compute job has a runtime budget of 600 seconds; at the limit it stops accepting new computation steps and is marked timed out. | Step 2 |
| Run manifest and immutable artifact store | New inputs do not modify published runs; a failed run restarts under a new run identifier. | Steps 5 and 9 |
| Isolated processing | The compute process first writes the complete result to a temporary artifact area. The API commits the final reference only after verifying the hash. A crash beforehand leaves an incomplete attempt; a crash afterwards is reconciled against the same manifest. | Steps 6 and 7 |
Analysis API
- Test and expected result
- Two publication commands expect version 5. Exactly one creates the publication job; the other receives a conflict. In the reverse order, the first commit still wins; identical content remains 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
- Check 599, 600 and 601 seconds. Expected result: a compute job has a runtime budget of 600 seconds; at the limit it stops accepting new computation steps and is marked timed out.
- Return to an earlier step
- Step 2
Run manifest and immutable artifact store
- Test and expected result
- New inputs do not modify published runs; a failed run restarts under a new run identifier.
- Return to an earlier step
- Steps 5 and 9
Isolated processing
- Test and expected result
- The compute process first writes the complete result to a temporary artifact area. The API commits the final reference only after verifying the hash. A crash beforehand leaves an incomplete attempt; a crash afterwards is reconciled against the same manifest.
- Return to an earlier step
- Steps 6 and 7
First end-to-end test and outstanding evidence
- End-to-end path
- Corrected input starts a new complete run. The compute process first writes the complete result to a temporary artifact area. The API commits the final reference only after hash verification. A crash beforehand leaves an incomplete attempt; a crash afterwards is reconciled against the same manifest.
- Clarify before extending the scope
- Before extending the design, agree the real publication archive contract, retention, recovery targets and roles. All limits here are design assumptions. The test table describes planned checks; technical integration, browser checks and reader comprehension tests follow separately.
Corrected input receives a new complete run
Corrected input receives a new complete run.
A result is ready for publication while researchers upload corrected input. Completion requires technical and domain evidence.
Two publication commands expect version 5. Exactly one creates the publication job; the other receives a conflict. In the reverse order, the first commit still wins; identical content remains unchanged. The exercise specifies input and expected outcome.
- 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
- Two publication commands expect version 5. Exactly one creates the publication job; the other receives a conflict. In the reverse order, the first commit still wins; identical content remains unchanged. The expected invariant is: a published result references immutable hashes of input, recipe and environment; new files create a new revision. A failure leads back to step 5 and the command contract in step 4.
- Test completion and retries
- Initial state: a published run references the stored hashes of input, recipe, environment and complete result. Submit changed input under the same run identifier and replay the old publication command. Expected result: modifying the terminal run is rejected; replay returns the original publication evidence; all four hash references stay unchanged. A new run with its own identifier may use the changed input. Failures lead back to step 9 for ownership 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?
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
Purpose and boundary
Which evidence about a run would originate outside the application in your project?
In the example: Provenance connects data, processing recipe and environment. A deterministic analysis run on tabular data, with frozen inputs, processing recipe and environment.
Requirements
Which rule of your project remains binding even with slow processing?
In the example: Publication requires a reviewed result version. A computation job has a runtime budget of 600 seconds; upon reaching it, the job stops accepting new computation steps and is marked timed out.
Scale estimates
Which object in your analysis system concentrates more load than the daily average suggests?
In the example: Size job volume and compute budget separately. An average of 0.00833333 events/s says little about 20 start requests for the same immutable run manifest.
Interfaces
Which input fields make two change intentions different in your project?
In the example: A start key binds the complete manifest. The input hash, recipe hash, environment hash and budget must remain identical on replay.
Data and states
Which states must remain protected in your model against late replay?
In the example: Artifacts remain immutably addressable. New inputs do not modify published runs; a failed run is restarted under a new run identifier.
Overall architecture
Which planned service boundary would distribute a currently local guarantee across the network?
In the example: Isolate computation processes from the metadata core. The run manifest and immutable artifact store must express the same valid state.
Critical flow
What feedback could be missing even though the underlying action has already taken place?
In the example: Publish the final reference after hash verification. A published result references immutable hashes of input, recipe and environment; new files create a new revision.
Bottlenecks and trade-offs
Which similar display could have two different causes in your project?
In the example: Waiting time and compute time call for different measures. Measure waiting time before job start separately from runtime within the job. More workers help queued jobs, while large inputs need a different partitioning approach.
Operations and security
Which open state in your project needs a domain specialist as well as technical operations?
In the example: Publication permission remains separate from submission. New inputs do not modify published runs; a failed run is restarted under a new run identifier.
Final design
Which two counterexample tests will you run first in your own end-to-end implementation?
In the example: Corrected input receives a new complete run. Two publication commands expect version 5. Exactly one creates the publication job; the other receives a conflict. With the order reversed, whichever commit is first wins, while identical content stays the same.