Skip to case
TWILIGHT TECH LABSTHE ENGINEERING PROJECT BOOK

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.

Source project: J-BotFocused handler tests passedReviewed September 25, 2026
01 / THE ENGINEERING QUESTION

What keeps an assistant's file edit from silently breaking the workspace?

02 / THE SYSTEM

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.

  1. 01Read target
  2. 02Check protected paths
  3. 03Snapshot and edit
  4. 04Verify or roll back
03 / THE CLAIM LEDGER

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.
04 / THE LIMIT

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.

05 / NEXT PROOF

Where the work goes next.

Pin a revision and walk one approved edit through trust, read, write, verification, and recovery without weakening any gate.