Authoritative data and states
What prevents an expired worker from finalising late?
The interfaces require authoritative state. Approval and delivery refer to the same immutable artifact digest. A worker cannot finalise successfully after authorisation expires, and incomplete artifacts cannot be approved. The table separates current states from the evidence that established them.
Starting point Keep a stable job identity and a new identity for each attempt.
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.
Data relationships and permitted transitions
Build job, attempt generation and immutable artifact
B-151 references C-151 and D-5; attempt generation 2 records A-151/H-151; F-151 binds that exact digest.
Entities and relationships
| Entity | Authoritative data | Responsibility |
|---|---|---|
| Build job B-151 | Source revision, build definition, input digest and state | A job may have several separate execution attempts. |
| Build attempt | Worker, start, expiry and result | The attempt result remains immutable. |
| Artifact A-151 | H-151, size and storage reference | Bytes under digest are immutable. |
| Provenance record | Source, definition, worker identity, input | Binds the artifact to the actual build. |
| Approval F-151 | Digest, validation results and authorised person | Does not apply to a branch. |
Build job B-151
- Authoritative data
- Source revision, build definition, input digest and state
- Responsibility
- A job may have several separate execution attempts.
Build attempt
- Authoritative data
- Worker, start, expiry and result
- Responsibility
- The attempt result remains immutable.
Artifact A-151
- Authoritative data
- H-151, size and storage reference
- Responsibility
- Bytes under digest are immutable.
Provenance record
- Authoritative data
- Source, definition, worker identity, input
- Responsibility
- Binds the artifact to the actual build.
Approval F-151
- Authoritative data
- Digest, validation results and authorised person
- Responsibility
- Does not apply to a branch.
Permitted state transitions
| Starting point | Target | Condition |
|---|---|---|
| angenommen | wartend | Build job durably queued. |
| wartend | läuft | A worker receives a time-limited execution permission. |
| läuft | erfolgreich | Artifact and provenance record fully stored. |
| läuft | fehlgeschlagen | The build reports an evidenced failure. |
| läuft | abgebrochen | Execution terminated and worker authorization withdrawn. |
| erfolgreich | freigegeben | Release owners confirm the digest and validation evidence. |
| freigegeben | ausgeliefert | The target system confirms the same digest. |
| fehlgeschlagen or abgebrochen or ausgeliefert | terminal | A retry creates a new attempt or job with an explicit reference. |
angenommen
- Target
- wartend
- Condition
- Build job durably queued.
wartend
- Target
- läuft
- Condition
- A worker receives a time-limited execution permission.
läuft
- Target
- erfolgreich
- Condition
- Artifact and provenance record fully stored.
läuft
- Target
- fehlgeschlagen
- Condition
- The build reports an evidenced failure.
läuft
- Target
- abgebrochen
- Condition
- Execution terminated and worker authorization withdrawn.
erfolgreich
- Target
- freigegeben
- Condition
- Release owners confirm the digest and validation evidence.
freigegeben
- Target
- ausgeliefert
- Condition
- The target system confirms the same digest.
fehlgeschlagen or abgebrochen or ausgeliefert
- Target
- terminal
- Condition
- A retry creates a new attempt or job with an explicit reference.
Fence out the old worker
Bind completion to the current generation and deadline.
An expired worker reports success.
Only the current attempt can complete validly.
- Alternative considered
- Scheduler reassignment alone does not stop an old worker.
- Trade-off
- The datastore must check authorisation atomically.
- Reassess
- Other execution models change the contract.
Terms in this step
- Fence out the old worker
- Only the current attempt can complete validly.
Try it yourself
An old worker reports success at 60,000 ms, when its authorisation has expired. Determine the datastore response and requirements for a new attempt.
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
- Finalisation is rejected because authorisation is valid only before 60,000 ms.
- Second part of the solution
- A new worker needs a higher current generation. Existing artifact bytes do not permit the old process to record a valid completion.
Apply to your project
Which corresponding assumption would you test first in your project? Consider this trigger: Other execution models change the contract.