Skip to content

memory_edit: a long range removal is quoted by both ends and names the defs it took - #389

Merged
dp-web4 merged 1 commit into
mainfrom
memory-edit-removed-tail
Oct 8, 2026
Merged

dp-web4 merged 1 commit into
mainfrom
memory-edit-removed-tail

Conversation

@dp-web4

@dp-web4 dp-web4 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

What happened

At 2026-10-07 19:03Z cbp-being was told to delete a 13-line duplicate decoder block in scratch/train-autoencoder-latent5.py. It sent start_line 75, end_line 107 with new "". That removed 33 lines: the block, plus AutoEncoder.forward and the start of train_model (its def, optimizer, criterion, scheduler, and for epoch loop).

The receipt quoted removed[:400] + "...". Those 400 chars were exactly the block the being meant to delete. The lines it should not have removed were all past the cut, so the being had nothing to tell it the delete went too far. It then "fixed" the orphaned return by replacing it with pass. The file parsed again, and the next run (seat seq 7178) raised NameError: train_loader inside __init__.

Change

  • _head_and_tail: a removal longer than 400 chars is now quoted as its first lines, then [... N more removed lines not shown ...], then its last lines. When a range overreaches, the extra lines are at the end, so the end is what has to be shown.
  • _defs_removed: the receipt now names every def or class line the removal took, e.g. This removed 'def forward', 'def train_model'. A list of names is short enough that it doesn't get cut.

Test

  • Added test_memory_edit_long_range_receipt_shows_the_end_and_names_removed_defs. It fails on main and passes here.
  • All 64 tests in test_reference_f1a.py pass.

🤖 Generated with Claude Code

…e defs it took

cbp-being 2026-10-07 19:03Z deleted lines 75-107 (33) meaning to delete a 13-line
duplicate block; it also took AutoEncoder.forward and train_model's start. The
receipt quoted only the first 400 chars (the intended block) then '...', so the
overreach was invisible. The being then swapped the orphaned return for 'pass'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dp-web4
dp-web4 merged commit 15df9a7 into main Oct 8, 2026
1 check passed
dp-web4 added a commit that referenced this pull request Oct 9, 2026
127 commits; code: #379 (proprioception: the machine-body line, ON by default), #383, #384
(main's copy of the carrier's headline-keeping pointer), #385, #386, #389, #391, #392, #394,
#397/#398/#400/#401 (dashboard + sage-tui), #402 (ear wake mode), #404 (a wait's door is the beat).

Conflicts, by hand:
- heartbeat.py: main's _build_state (the _state_head and proprioception arguments), keeping
  the carrier's fitter comment and _template_guess, which the carrier's fitter below reads.
- test_being_tool_loop.py: the union (carrier's retry-cause / composition / window-retry /
  answer-reserve tests + main's).

On Legion the proprioception line reads: "NVIDIA GPU 98% · VRAM 14.5/16.0 GiB · 64°C; Intel GPU:
no readings | CPU 17% · 76°C · RAM 6.8/31.1 GiB | disk 39% (277 GiB free)".

sage/gateway/tests: 1371 passed, 29 skipped. sage/embodiment: 102. sage/irp: 13.

Seat: legion-claude
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUXakYuzHiCPNerwojpYPJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant