From Edit to Production¶
Run the From Edit to Production MicroSim Fullscreen
This MicroSim belongs to Chapter 17: Rules That Enforce Themselves.
About This MicroSim¶
This MicroSim follows one change from an agent's edit to production in seven steps. Each step is a clickable box. Clicking it shows what runs there and whether that step can be skipped.
The colors carry the main idea. Steps 1 to 3 (edit, commit, push) can be skipped: a fresh clone without the opt-in, a cloud agent's copy or --no-verify all go around the hooks. Steps 4 and 5 (CI at the pull request, and branch protection at the merge) can't be skipped by a contributor. Steps 6 and 7 come after the merge.
Four questions then ask you to use what you read: which step runs on every change, which one a flag can skip, where the secret scan belongs, and what turns a failing check into a blocked merge.
How to Use¶
- Click each of the seven steps in the diagram and read its details on the right. The counter shows how many steps you have read.
- Answer the four questions in order. Each question allows two attempts.
- After each answer, the step the question is about is outlined in red in the diagram.
- Press Next question to go on. Start over resets the questions.
You can also reach the steps with the Tab key and open one with Enter.
Iframe Embed Code¶
You can add this MicroSim to any web page by adding this to your HTML:
<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/edit-to-production-checks/main.html"
height="504px"
width="100%"
scrolling="no"></iframe>
Lesson Plan¶
Learning Objective¶
Interpret a change's path from an agent's edit to production, identifying at which step each check runs, which steps can be skipped, and which step turns a failing check into a blocked change.
Grade Level¶
Adult professional (Good Enough Engineering)
Duration¶
10-15 minutes
Prerequisites¶
Commit, push, pull request, main branch and deploy (Chapters 5 and 14); formatter, linter, pre-commit hook, pre-commit secret scan, CI pipeline, one-line CI gate, branch protection and continuous deployment (Chapter 17).
Activities¶
- Exploration (5 min): Click all seven steps. Note which ones can be skipped and how.
- Guided Practice (5 min): Answer the four questions. After each one, look at the highlighted step and say why it is the answer.
- Assessment (5 min): Without the sim, list the steps a change passes through and mark the first one that nobody can skip.
Common Misconceptions¶
- A hook in the repository protects every copy.
- A CI check that fails stops a merge by itself.
- The secret scan only needs to run once, in one place.
Assessment¶
Mastery is 4 of 4 questions correct. Clicking steps to read their details is exploration, not evidence.
References¶
- GitHub Actions documentation - GitHub Docs. How workflows in
.github/workflows/run on every push and pull request. - About protected branches - GitHub Docs. Required status checks and who can change them.
- githooks documentation - Git. The pre-commit and pre-push hooks.
- Mermaid flowchart syntax - Mermaid. The library that draws the diagram.