Create a local CI-style pipeline that runs checks, produces an artifact only after success and records the exact source revision.
A fictional calculator project has three gates: syntax, unit checks and package creation. The artifact must not be produced if a required check fails. The exercise runs locally and provides an optional workflow sketch; it does not configure a remote repository.
| Gate | Required outcome |
|---|---|
| Syntax | valid Python |
| Behavior | all assertions pass |
| Package | created only after success |
| Revision | recorded in report |
Continuous integration makes frequent changes subject to repeatable checks. Choose checks that catch meaningful errors and define what blocks the pipeline. A green signal only covers the checks that actually ran. This case focuses on a local repeatable build, not a claim that a hosted service has been installed.
Write the three gates and their failure behavior.
Pipeline contract
Record your result and evidence here or in a separate file.
Required gates cannot be skipped while reporting success.
Name the actual checks instead of a generic quality passed label.
A useful test compares behavior against a requirement. The sample function calculates a nonnegative seat total and rejects invalid counts. Include a boundary and an invalid case so the check can detect a real defect. Avoid testing only that a file exists or that the program prints a success message.
Run the sample tests and introduce a defect that one catches.
Behavior check evidence
Record your result and evidence here or in a separate file.
The intentional defect makes the process exit nonzero.
Choose a requirement the defect violates.
Use explicit failure handling so a failed command stops the pipeline. Build outputs in a separate directory and record the source revision when available. A run outside Git should say revision unavailable rather than invent a commit hash. Do not let stale artifacts make a failed run appear successful.
Implement the local runner and a manifest for a successful artifact.
Pipeline runner
Record your result and evidence here or in a separate file.
A fresh failed run produces no success artifact.
Clear only the task-owned output path or use a new run directory.
An artifact ready for review is different from a change running in production. A later deployment needs its own environment, permissions and verification. The exercise stops at packaging. Explain what would need approval and what can remain automatic in a real workflow without embedding credentials in the project.
Write a handoff note describing the boundary after packaging.
Delivery boundary note
Record your result and evidence here or in a separate file.
No cloud deployment or remote workflow run is claimed.
Label the optional workflow as a template until it actually runs.
Run from a clean copy and compare the report with the source and artifact. Save the actual command exit status and outputs. Reproducibility also needs dependency information; this case uses Python’s standard library to keep that burden small. A reviewer should be able to make the same deliberate failure occur.
Perform one passing and one intentionally failing run.
Two-run verification record
Record your result and evidence here or in a separate file.
The success and failure reports are distinguishable and correctly linked to their inputs.
Do not overwrite a failed report with a later success.
Deliver the project, local runner, successful artifact manifest and intentional-failure evidence. Explain which checks a future hosted pipeline should run unchanged.
No successful artifact is reported after a required check fails, and remote execution is not invented.
| Criterion | Points | Evidence |
|---|---|---|
| Evidence and correctness | 30 | Calculations, source use and results match the supplied case; limitations are honest. |
| Required artifacts | 30 | All five stage outputs and the capstone handoff are present and inspectable. |
| Reasoning and decisions | 20 | Choices, assumptions, alternatives and the case-specific critical condition are explained. |
| Reproducibility | 10 | A reviewer can follow the stated steps and distinguish expected from observed results. |
| Clear communication | 10 | Labels, units, structure and evidence references make the work easy to review. |
Score at least 80/100, supply every required artifact, and satisfy the path-specific critical condition. Rework missing evidence before marking complete.
The contract is syntax → behavior → package. If behavior fails, package is not reached. The reference runner records commands and statuses; it demonstrates local CI mechanics without claiming a GitHub Actions, Jenkins or other hosted run.
This is a local integration workflow, not a configured hosted runner or production deployment.