A raise limit of 1.0 was quietly converting every raise into a HOLD that never reached the log, and an engine that stopped 23 times in 30 hours raised no alarm. I now record limit-blocked judgments and surface engine stops through an operator alert and on-screen copy.
What was wrong?
After PR #22 shipped, the engine finally started running for the first customer in prod, but the practice log still showed zero records. A read-only look at prod showed why. The customer's raise limit (raiseLimit) was 1, the same as the default, and at 1.0 the engine can't bid above the original bid (ORIG). The estimate for the rank the rule targeted was more than double the original bid. The engine wanted to raise, as it should, and every time the safety layer turned that judgment into a HOLD RAISE_LIMIT_CLAMP.
That HOLD never reached the change log (the LOG# items), so neither the advertiser's screen nor the operator's showed what the engine had tried to do.
Before this there had been a worse problem. The engine cycle stopped 23 times over 30 hours on a Naver 400, and nothing alerted anyone or showed it on screen. I only found out because the advertiser reported it.
I set two goals. First, show what the engine tried to do and why it couldn't. Second, show whether the engine has stopped. In both cases you should be able to tell who has to do what to unblock it.
What changed?
The work touched three layers.
- bidder: when
applySafetyblocks or trims a judgment (RAISE_LIMIT_*,HARD_CAP_*), it now writes that judgment to LOG# as a dry-run record, with the target price from before the safety layer inwantedand the limit it hit inlimit. Nothing is PUT, even for a live keyword. - worker: when stats-cycle ends in a
FatalError, it writes oneENGINE_ERRORrow per customer and sends the operator anENGINE_FAILEDalert, suppressed for six hours. The row write and the alert are attempted separately, so if one fails the other still goes through. The next successful cycle that gets through bidder deletes the row. - web: the change log table, the CSV, and the engine card read the safety suffix and turn it into a readable sentence:
Tried to raise but hit the limit (target X won, limit Y won) — the account manager changes the limit
On the engine card, the operator sees the time, job, HTTP status, and request path. The advertiser sees only "The engine is stopped; the account manager is looking into it."
Which choices did I make?
I only record HOLDs that the safety layer produced. If WITHIN_10 and RULE_OFF went in too, every cycle would add entries and bury the judgments that matter. For the same reason, a block is recorded once per keyword per hourly slot. Cycles run every five to ten minutes, so otherwise the same block would be logged several times an hour.
I could have put the target and the limit into the reason string, but then the screen would have to parse them back out. I split them into optional fields instead, which also keeps old rows compatible.
Errors get their own row instead of going into META. META holds settings and is synced with the registry, and I didn't want hourly writes mixed into it.
The error text carries only the job, the status, and METHOD /path -> status, because a Naver response body can contain keys.
Alerts go only to the operator; the advertiser hears about a stop through the screen text. Only stats-cycle raises an alert for now, and fatal errors in estimate and catalog are left for the next piece of work.
The public contract only gained additions and there was no new module, so I skipped plan-eng-review and judged the slice review gates to be enough.
What did the review gates catch?
The run went 01-plan, 02-implement, review, security-scan, qa, ship, land, and harvest, 1 call each.
All three slice reviews passed, and I applied the three Important findings they raised. The final review combined /review --full on Opus with a cross-model pass on Sonnet and came back with zero Critical and one Important, which asked me to replace a type assertion in the worker with an in check. In the same commit I made sure that an UNREACHABLE judgment (one that can't reach the target rank) keeps that meaning in its text when a limit also blocks it.
security-scan came back SECURE with one Low: an advertiser can see the wanted and limit amounts on their own keywords. Telling them "the account manager changes the limit" is the whole point of this work, so I left it.
Browser QA passed all four pages with no auto-fix and no horizontal overflow at 1280px or 375px.
What did it cost?
Seven sessions, 646 lines added and 30 removed, about $17.69 in total. Nearly all of it was Opus; Sonnet came to $0.18.
What is left?
Deploying this PR does not unblock raises. The block now leaves a record and readable text, and that's all. Whether to raise this customer's limit is a separate call I have to make as the operator. No prod data was written in this work.
A couple of things still bother me.
- The full e2e run ended in exit 1 on two occasions. Both ran inside verify-check, so no output survived. I tried to reproduce it four times in the same order and got 164 passed every time, so I couldn't tell whether this diff caused it or it's an existing flaky test.
- A cycle that skips bidder because of a date mismatch doesn't clear the error row, and that branch has no test yet.
Build stats
| Model | Input | Output | Cache read | Cache write | USD |
|---|---|---|---|---|---|
| claude-opus-5-5 | 554 | 152,368 | 51,334,236 | 634,865 | $17.52 |
| claude-sonnet-5-5 | 12 | 3,202 | 172,900 | 50,418 | $0.18 |
| Total | 566 | 155,570 | 51,507,136 | 685,283 | $17.70 |
Counted from 7 session transcripts at 2026-11-16T01:35Z (PR #23, sessions 2026-11-13 to 2026-11-13). Tokens include subagents; USD is list price. Code: +646 / −30 lines.