Part 4 — Build the Harness Chapter 11
Building Your Harness: A Strategic Overview
In this chapter
The registration route could return 400 and still consume an ID. You caught that in a later request. In the outage exercise, a single trace helped explain a timeout, and the request counter showed how often callers saw it. Both exercises gave you something you could check yourself.
OpenCode already connects the model to files, commands, and permissions. You can put additional controls around that work. Start with a test that reproduces a costly failure. Decide who owns the control and how a second person can tell it ran.
Put the check where it can see the failure
| Evidence from the exercises | Control to add | How you can tell it works |
|---|---|---|
| After a rejected registration, the next ID changed | A focused test and an HTTP regression test | The test fails on the defective snapshot and passes on the fix |
| A plan sounded complete while a requirement was still missing | A versioned spec, a review prompt, and a second review session | A finding names a criterion, the affected line, and a reproducible input |
| You had to correlate a deployment with errors by hand | Request telemetry and an alert with a runbook | A synthetic failure reaches the local notification receiver and links to evidence |
| A different checkout changed what the reviewer saw | A named base and head, plus CI on a fresh checkout | The change under review and its required check identify the same revision |
A requirement belongs in the spec. A test expresses the part you can observe automatically. A permission decides whether the agent can reach a tool or resource. Each layer gives you a different kind of evidence. Put repository guidance in versioned files and review tool access separately.
Choose one change to make repeatable
Stay on incident-postmortem, where you saved notes/postmortem.md. Bring the fix note from the earlier branch into this working tree.
git show debug-registration:notes/registration-fix.md > notes/registration-fix.md
If you called your fix branch something else, use that name in the command. Read both notes and start a Plan session.
Read notes/registration-fix.md and notes/postmortem.md.
Suggest one check for each failure the notes confirm. Name the existing
file or signal it could use, give a negative case that would prove the
check works, and tell me who would act on the result. Keep the files
unchanged.
Keep the answers you can trace to the source. Save any notes you want to carry forward on their own branch or outside the working tree so you can start each later exercise from a clean checkpoint. A suggestion to count failed registrations is plausible, but it will miss the original bug if the status is already 400. Test the state after the rejected request. If the agent suggests an alert on one slow span, check your postmortem for the signal you used to measure impact.
Save the approved rows in notes/harness.md or keep them in your exercise notes. Use them to decide which changes to take forward. The next chapter starts with the regression you can reproduce on demand.
References
- OpenCode maintainers. Instructions and Permissions. Official OpenCode 2 documentation.
- William Oliveira. Introducing Geremmyas. Technical article on keeping task specifications and verification with a change.