Maintain a codebase Exercise 7 of 9
Detect documentation drift
Make a clean lab copy by repeating the setup commands. Open the new copy in your agent. The earlier retry implementation belongs to your first lab copy.
- Read
docs/current/delivery.md. Write down what it predicts for events A, B, and C when the sender fails on B. - Select
egm-drift-reportand give itdocs/current/. Ask it to compare the documents with the current source and identify divergences. Keep the dated report path. - Verify the report against
src/delivery/deliver-batch.mjsand runnode --test test/deliver-batch.test.mjs. Treat the passing tests and current code as the intended contract for this exercise. Correct the stale sentence, then rerun drift detection on the same directory.
You're done when you can show the original mismatch, evidence for
correcting it, and a follow-up report with no remaining divergence in
docs/current/delivery.md. Save the first report outside
docs/current/ before the second run if the skill reuses its filename.
Reference answer
The current documentation says failure stops the batch. In
deliverBatch, the catch block adds a failed result inside the loop.
The next event still reaches send. The starter test verifies the call
order ["a", "b", "c"] and results
["delivered", "failed", "delivered"].
Replace the last paragraph of docs/current/delivery.md with:
If sending an event fails, its result is recorded as
failedand delivery continues with the next event.
Your second report should show no drift for that document. If it cites another discrepancy, trace it back to the actual source before editing anything. Drift report skill