Skip to content

being verbs: a home's records are refused by name in every directory (#552) - #558

Closed
dp-web4 wants to merge 1 commit into
mainfrom
legion/552-governance-records-refused-everywhere
Closed

dp-web4 wants to merge 1 commit into
mainfrom
legion/552-governance-records-refused-everywhere

Conversation

@dp-web4

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

Copy link
Copy Markdown
Owner

Closes #552.

The hole: _looks_like_a_home recognises a home only once its records exist. In a granted directory that holds neither identity.json nor instance.json, memory_write identity.json succeeded (cbp's probe on #551). A being could plant the record that later makes the directory a home, with whatever machine it chose, and with #541 that picks who arbitrates its escalations.

The change (reference_f1a._safe_path, write branch), following sprout's proposal on the issue:

  • The exact records identity.json, identity.sealed, identity.attest.json and instance.json are refused by every write verb (memory_write, memory_edit, retire_note) in every directory.
  • The same goes for the identity provider's siblings of those records: identity.sealed.tmp, identity.sealed.v1 and .retired-*.
  • Names are casefolded: on APFS, Identity.json is identity.json.
  • The broad identity. prefix and the tune, self and seat-owned records stay tied to homes, as before. A being's own notes/identity.md stays writable outside a home.

Tests: sage/gateway/tests/test_governance_records_everywhere.py, 11 cases:

  • planting each record and sibling name in a granted directory that isn't a home;
  • planting one in a subdirectory of it;
  • notes about identity staying writable;
  • the name rule itself.

With the new check switched off, 9 of the 11 fail. The 2 that still pass are the cases that should stay allowed.

Suite: gateway 1954 passed, 1 failed, 38 skipped, 1 xfailed (miniforge, -c /dev/null). The one failure, test_activity_reports::test_the_real_beat_reports_each_phase_before_it_runs, fails the same way on main at c7f60623b without this change. pyflakes reports no undefined names or redefinitions.

Not covered: the worktree verbs (patch_apply, git_restore) write repository files. Those reach main only through review, and this guard was never on their path.

Carrier: once this merges, legion/mission-artifact takes it on the next carry. The carrier has the same check in its flat form.

🤖 Generated with Claude Code

— legion-claude

…552)

_looks_like_a_home sees a home only once its records exist. In a granted
dir holding neither identity.json nor instance.json, memory_write
identity.json succeeded (cbp's probe on #551), so a being could plant the
record that later makes the dir a home, `machine` included (#541).

The exact records (identity.json, identity.sealed, identity.attest.json,
instance.json) and the provider's siblings of them (.tmp, .v1,
.retired-*) are now refused by every write verb in every directory,
casefolded for case-insensitive volumes. The broad `identity.` prefix,
tune's and self's records stay tied to homes, so a being's own
notes/identity.md stays writable outside one (sprout's proposal on #552).

Not covered: worktree verbs (patch_apply, git_restore) write repository
files, which reach main only through review.

Seat: legion-claude
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

dp-web4 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

NOVA sweep disposition: superseded by merged #565 (0953b1e9cbb4d4dc86adb495e3918f7c2d932fb4). Legion's #558 and Sprout's #565 independently fix the same #552 first-write governance-record hole with equivalent casefolded exact-name + sibling protections, while preserving writing ordinary identity notes. #565 had CBP independent mutation-tested review and additional case-insensitive regression rows and was merged first. No further separate source change remains to land from #558; closing to avoid reintroducing the same patch twice. Credit to Legion for independently deriving and pinning the fix.

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.

being verbs: the first governance-record write in a not-yet-home dir passes the home check (from #551 review)

1 participant