ENGINEERING INDEX / ENTRY 10
CASE 10 / BUILDER / RECOVERABLE CHANGE
The edit needs a way back.
A builder that can change files needs a narrower contract than 'write what the model suggests.' J-Bot's builder session tracks read files, protected paths, and snapshots before edits.
What keeps an assistant's file edit from silently breaking the workspace?
Where the handoffs happen.
The handler rejects unread and never-touch targets when the relevant session is active. A Python syntax failure restores the earlier file in the focused test.
- 01Read target
- 02Check protected paths
- 03Snapshot and edit
- 04Verify or roll back
What the record earns.
Read-first, never-touch, syntax verification, and rollback paths tested.
- Observed receipt
- On September 25, 2026, the builder safety-rails suite passed within a 49-test J-Bot batch, including handler-level refusal, successful edit, and bad-Python rollback cases.
- Source and scope
- J-Bot jbot_core/builder/builder_agent.py, jbot_core/handlers.py, and tests/test_builder_safety_rails.py; inspected dirty checkout at HEAD 9f94d83.
What this does not prove.
Several handler tests deliberately stub the trust gate to isolate the safety rail. This is not proof that every builder operation is safe or that arbitrary edits can always be rolled back.
Where the work goes next.
Pin a revision and walk one approved edit through trust, read, write, verification, and recovery without weakening any gate.