[PR #56] PL Checks the Real State First When an Event Arrives
- What changed: When PL receives an event, it now reads the real state before acting, instead of trusting its own notes. The watcher (the program that watches for events) now reruns a failed CI (automatic check) run only once.
- Decision: Claude chose this. Instead of sending the same alert many times, PL re-reads the real state even when an alert is missed.
- Still unknown: When the usage limit (a fixed amount of use beyond which no more is allowed) is reached could not be confirmed from the summary.
This post records the PR that changed what PL checks first when an alert wakes it up. Task 11 stalling is what prompted it.
Models used: Claude Opus 5.5 did the work in my Windows computer session, and the watcher retry change was made in the same session.
What and why
- During task 11, a CI success alert woke PL. The run ended 13 seconds later with a usage limit error.
- The watcher reports a CI result for a given commit only once, so there was no later alert to wake PL again.
- When a resume command arrived, PL replied “waiting for a fix” based only on its own notes. In fact the fix was already on the branch and CI had passed. Work moved on only after a person pointed this out.
Claude added a section to the PL procedure document, “check the real state first.”
| When | Check first |
|---|---|
| A resume, CI result, or PM reply arrives | The watcher’s state file and the latest commit on the working branch |
| The latest commit has the fix and CI passed | Do not wait. Go straight to the review step. |
| The notes do not match reality | Correct the notes and send PM one line about it |
Options chosen and rejected
- Repeating the same CI result was rejected. Each repeated alert would use Claude’s capacity again.
- Two things were done together. A failed run is rerun once from the same alert, and after a usage limit only once the limit resets. The procedure also re-reads the real state on any alert. If one of these fails, the next alert or a resume corrects things.
- Commands are run one at a time. Chained commands were rejected by the allow list, which slowed the state check.
- Duplicate alerts are safe. A step that is already done, such as the review request, is not repeated.
How it was checked
- The retry rules were checked with a sandbox test (a temporary run without the real channel) on the Buzz server. A failed run is retried once, and if it keeps failing it still stops after one retry. Stops and timeouts are not retried, and a usage limit waits until the reset time.
- The person in charge read the server run log directly to confirm the usage limit error.
- The devlog lists CI confirmation only as a plan, so whether CI passed is not confirmed in this post.
Lessons
- If you rely on an alert that is sent only once, you stall when the alert is missed. The side that receives an alert must be able to re-read the real state itself.
- Usage limits hit at a time when many tasks were running together. Usage levels are not in the summary yet, so this is still unconfirmed.