Skip to content

gateway: an edit miss and a fresh create name the same-name file one directory away - #739

Merged
dp-web4 merged 1 commit into
mainfrom
claude/edit-absence-names-same-name
Nov 16, 2026
Merged

dp-web4 merged 1 commit into
mainfrom
claude/edit-absence-names-same-name

Conversation

@dp-web4

@dp-web4 dp-web4 commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Measured 2026-11-16 06:23Z, cbp-being beat heartbeat-5d75f0a150eb. The seat (15966) asked for two memory_edit range deletions on scratch/xor_not_linearly_separable.py (401 lines). The being sent the bare name:

  1. memory_edit xor_not_linearly_separable.py → "nothing to edit: ... does not exist. ... memory_write creates a file; memory_edit changes one that is there."
  2. It did exactly that: memory_write xor_not_linearly_separable.py → "created xor_not_linearly_separable.py with 2059 chars"
  3. Then it edited, read and ran the new 66-line top-level file as if it were the one it had been asked to trim. The scratch/ file did not change (sha 4e775ecbbfc1), and that is the file xor-mlp-4-vs-64-32.py imports.

The absence text pointed it straight at making the duplicate. memory_read already names a same-name file on a miss (#140); memory_edit and the create receipt did not.

Change (reference_f1a.py, reusing _same_name_elsewhere):

  • memory_edit absence: when a same-name file exists one level away, name it with the exact path to resend, and leave out the memory_write route. A true absence keeps the old text.
  • memory_write created receipt: add "A file with this name already exists elsewhere: '...'. It was NOT changed; this write made a separate new file."

Same family as #727 (an absence on a retired name names the retired copy) and the 11-13/11-14 bare-name vs scratch/ cases.

Tests: new test_edit_absence_names_same_name.py (4 tests). On main source, 2 fail (the two new behaviours) and 2 pass (true absence, no namesake). Full sage/gateway/tests: 2490 passed, 44 skipped, 1 xfailed (pre-existing).

🤖 Generated with Claude Code

…directory away

cbp-being 2026-11-16 06:23Z: memory_edit on the bare name of
scratch/xor_not_linearly_separable.py got "does not exist ... memory_write
creates a file"; it did that, the receipt said "created ...", and the rest of
the beat edited/read/ran a new 66-line top-level copy while the 401-line
scratch/ file (the one an importing script reads) stayed unchanged.

memory_read already names a same-name file on a miss (#140). memory_edit's
absence now names it with the exact path to resend (and drops the route to
memory_write when one exists); memory_write's "created" receipt says a
same-name file exists elsewhere and was NOT changed. Matches listed neutrally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dp-web4
dp-web4 merged commit 6a03f1b into main Nov 16, 2026
3 checks passed
dp-web4 added a commit that referenced this pull request Nov 19, 2026
…same-name notes

Main's #739 added _same_name_note at the same two places (memory_edit absence, fresh
create receipt). The facts are independent: a retired copy beside the name, and a file
with the same name one directory away. Both are kept, retired copy first; the generic
'memory_write creates a file' line is used only when neither applies. New test covers a
home with both.

Docstrings now describe the being's stored memory and journal entry instead of quoting
them (dp's 11-10 rule, as raised by Nomad on #746).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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