Restore self-modification loop (deleted in Operation Darling Purge) #983

Closed
opened 2026-03-22 19:10:53 +00:00 by perplexity · 15 comments
Collaborator

Parent

  • #982 — Session Crystallization & Operational Playbook

Background

Commit 584eeb679e88 (Operation Darling Purge) deleted self_coding/self_modify/loop.py. This was Timmy's ability to: create branches, generate edits, run tests, commit on success, revert on failure.

Objective

Restore self-modification capability using a modern execution engine.

Scope

  • Evaluate execution engines: Goose v1.20.1 (primary, free, local) or mini-swe-agent v2 (100-line reference)
  • Implement branch→edit→test→commit/revert loop
  • Integrate with Gitea for PR creation (see #911)
  • Guard with test suite: no commit unless pytest tests/ -x -q passes

Key Design Notes

  • This is critical for Timmy's autonomy — without it, code changes require human intervention
  • Must respect constraint: no direct pushes to main, all changes via PR
  • Goose is brew install goose — already in the sovereign tech stack
  • #905 — Clone karpathy/autoresearch, run baseline (similar self-improvement pattern)
  • #906 — Refactor to SystemExperiment class
  • #911 — Wire Gitea API for PR creation
## Parent - #982 — Session Crystallization & Operational Playbook ## Background Commit `584eeb679e88` (Operation Darling Purge) deleted `self_coding/self_modify/loop.py`. This was Timmy's ability to: create branches, generate edits, run tests, commit on success, revert on failure. ## Objective Restore self-modification capability using a modern execution engine. ## Scope - Evaluate execution engines: **Goose v1.20.1** (primary, free, local) or **mini-swe-agent v2** (100-line reference) - Implement branch→edit→test→commit/revert loop - Integrate with Gitea for PR creation (see #911) - Guard with test suite: no commit unless `pytest tests/ -x -q` passes ## Key Design Notes - This is critical for Timmy's autonomy — without it, code changes require human intervention - Must respect constraint: no direct pushes to main, all changes via PR - Goose is `brew install goose` — already in the sovereign tech stack ## Related - #905 — Clone karpathy/autoresearch, run baseline (similar self-improvement pattern) - #906 — Refactor to SystemExperiment class - #911 — Wire Gitea API for PR creation
claude was assigned by Rockachopa 2026-03-22 23:30:27 +00:00
claude added the harnessheartbeatp0-critical labels 2026-03-23 13:52:54 +00:00
Timmy added the claude-ready label 2026-03-23 23:19:18 +00:00
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Owner

🤖 Vassal dispatch → routed to Claude

Priority score: 70
Rationale: high-complexity keywords detected
Label: claude-ready

🤖 **Vassal dispatch** → routed to **Claude** Priority score: 70 Rationale: high-complexity keywords detected Label: `claude-ready`
Collaborator

PR created: http://143.198.27.163:3000/Rockachopa/Timmy-time-dashboard/pulls/1270

Restored the self-modification loop as src/self_coding/self_modify/loop.py:

  • SelfModifyLoop.run(slug, description, edit_fn) — branch → edit → test gate (pytest -x -q) → commit/revert → Gitea PR
  • GiteaClient — thin REST wrapper for PR creation and issue comments; graceful degradation when token absent or server unreachable
  • Protected-branch guard prevents direct commits to main/master/develop
  • 15 unit tests, all passing; 451-test suite green; lint clean
PR created: http://143.198.27.163:3000/Rockachopa/Timmy-time-dashboard/pulls/1270 Restored the self-modification loop as `src/self_coding/self_modify/loop.py`: - `SelfModifyLoop.run(slug, description, edit_fn)` — branch → edit → test gate (`pytest -x -q`) → commit/revert → Gitea PR - `GiteaClient` — thin REST wrapper for PR creation and issue comments; graceful degradation when token absent or server unreachable - Protected-branch guard prevents direct commits to `main`/`master`/`develop` - 15 unit tests, all passing; 451-test suite green; lint clean
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#983