Capstone recovery + M11 lab honesty (#8,#14,#15,#30) (#60)

Co-authored-by: claude <claude@jpaul.io>
Co-committed-by: claude <claude@jpaul.io>
This commit was merged in pull request #60.
This commit is contained in:
2026-06-22 16:16:09 -04:00
committed by Claude (agent)
parent 391df7fc6d
commit 8830e91846
2 changed files with 70 additions and 23 deletions
+30 -12
View File
@@ -46,7 +46,7 @@ already standing; it doesn't re-pour the foundation.
Pick something small enough to finish in one sitting and real enough to touch the whole stack. We'll
add **due dates**:
- A task can carry an optional due date: `python cli.py add "file taxes" --due 2026-07-15`.
- A task can carry an optional due date: `python cli.py add "file taxes" --due <YYYY-MM-DD>`.
- A new `overdue` command lists pending tasks whose due date has already passed.
- The deployed service grows a matching `GET /overdue` endpoint, so the change is visible in the
running container, not just the CLI.
@@ -113,10 +113,12 @@ image from your `Dockerfile` (M16), tags it with the new commit SHA (immutable,
rolls back to the previous SHA. Hit `GET /overdue` on the running container. The feature is live, in a
reproducible artifact, behind a health check that can undo itself.
**If it goes wrong (M12).** Something slips past every gate eventually. A bad merge reverts cleanly
with `git revert -m 1 <merge-sha>` — a new commit, safe on shared history, no rewriting what teammates
pulled (M12). A bad deploy is already handled by `deploy.sh`'s rollback to the last good SHA. Recovery
is a discipline you rehearsed, not a panic.
**If it goes wrong (M12).** Something slips past every gate eventually. Because you squash-merged (one
commit on `main`, not a two-parent merge), a bad change reverts cleanly with plain
`git revert <squash-sha>` — a new commit, safe on shared history, no rewriting what teammates pulled
(M12). Skip the `-m 1` you saw in Module 12: that flag is only for true merge commits, the kind
`git merge --no-ff` makes, and a squash merge isn't one. A bad deploy is already handled by
`deploy.sh`'s rollback to the last good SHA. Recovery is a discipline you rehearsed, not a panic.
That's the whole motion. Notice what carried it: not the model. **The model wrote the diff; the
workflow is everything that made the diff safe to merge and trivial to undo.** Swap the model next
@@ -164,14 +166,18 @@ account, and a working Docker install.
committed instructions file (M5). If the agent reaches for a date library or hand-edits the JSON,
your file needs a line; that's signal, not failure.
4. Run it by hand to confirm it's real:
4. Run it by hand to confirm it's real. Choose the two dates relative to *your* today — one comfortably
in the future, one safely in the past — so the assertion below holds whenever you run this:
```bash
python cli.py add "file taxes" --due 2026-07-15
python cli.py add "renew domain" --due 2020-01-01
python cli.py add "file taxes" --due <a date a few months out> # future → NOT overdue
python cli.py add "renew domain" --due 2020-01-01 # past → overdue
python cli.py overdue # should list "renew domain", not "file taxes"
```
> *Verify-before-publish: refresh the example due dates so the "future" one is still in the future
> at publish time — a hardcoded near-future date silently inverts this assertion once it passes.*
### Part C — Tests (M13)
5. Have the AI extend `test_tasks.py`, then **read the test names** and confirm the boundaries are
@@ -226,16 +232,28 @@ account, and a working Docker install.
### Part F — Rehearse recovery (M12)
11. Prove you can undo it. Find the merge commit and revert it on a throwaway branch, just to watch it
work, then delete the branch:
11. **Sync local `main` first.** The squash-merge in step 9 happened on the forge, so the new commit
lives only on the remote — your local `main` is one behind. Pull it down and capture the SHA of
the squash commit you're about to rehearse undoing:
```bash
git switch main && git pull # bring the squash-merge commit into local main
git log --oneline -1 # the top line IS your squash commit — note its SHA
```
12. Prove you can undo it. Cut a throwaway branch off the freshly-synced `main` and revert that squash
commit, just to watch it work, then delete the branch:
```bash
git switch -c throwaway-revert-test
git revert -m 1 <merge-sha> # clean undo of the whole feature, as a new commit
git revert <squash-sha> # plain revert: a squash merge is one ordinary commit, so no -m 1
pytest && git switch main && git branch -D throwaway-revert-test
```
You just confirmed the escape hatch is real *before* you ever need it in anger.
No `-m 1` here, and nothing to "find": that flag is only for the two-parent merge commits Module 12
rehearsed with `git merge --no-ff`. A squash merge produces a single-parent commit, so plain
`git revert <squash-sha>` is the right undo. You just confirmed the escape hatch is real *before*
you ever need it in anger.
---