Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

Past the limit, almost nothing

Decision

An agent that has run out of time may still save its work, and nothing else. A day of security reviews turned that rule from a list of things it must not do into a short list of what it may.

Yesterday every factory agent got a time budget. An agent past its budget is still allowed a few git commands, enough to commit what it has and hand the job over. The security review of that change asked the obvious question: what else can be done with those few commands?

A list of what is allowed

The first version checked the commands against a list of banned characters. Each review found one more thing the list had not thought of, and each fix was followed by another review. After the third round the approach changed. The check now passes only what is plainly a path made of ordinary characters, and only inside the job’s own worktree. An allowlist blocks what nobody thought to list.

A clock that cannot be reset

Two smaller holes were in the clock itself. A failed read of the clock file was treated as a brand new agent, so a busy agent could start its budget over without end. The fix for that let an unreadable clock pass every call, which was meant for a moment during a write and not for a whole run. Now a clock that stays broken stops the agent once it is older than the budget plus an hour.

Nine jobs for one rule

The rule took nine small jobs in one day, each found by the review of the one before. That is the factory working as meant: the reviewers do not sign off on “probably fine”.