Skip to content

ledger_write_gate: allow removing an event log no remote has ever held - #306

Merged
plur9 merged 1 commit into
mainfrom
fix/gate-unpublished-log-removal
Nov 8, 2026
Merged

plur9 merged 1 commit into
mainfrom
fix/gate-unpublished-log-removal

Conversation

@plur9

@plur9 plur9 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

A promise-eval fixture log leaked into a host's real 2-datacore and was only ever committed locally. The relay refused every push from that host ("chain fails verification") until the log was gone, and the commit gate refused removing it ("log deleted (the ledger is append-only)"). The two guards blocked each other and held 115 commits back.

Change: the pre-commit gate now accepts removing a log only when remote-tracking refs exist and none has ever held it (git log --remotes -- <path> is empty). Everything else is unchanged: a published log, including one later removed on origin, still can't be deleted, edits to an unpublished log are still checked line by line, and with no remote refs nothing counts as unpublished.

Tests: 5 new tests in test_write_gate_unpublished_log_removal.py (the one acceptance failed before the fix). The existing gate, ledger-upgrade, hub, ownership and LED3/AGT10 promise tests pass: 147 passed.

Owner approved the guard change in session.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MrfsFu7NLgapPn6yUcNxE5

A promise-eval fixture log leaked into a host's real 2-datacore, committed
locally only. The relay refused every push until it was gone, and this gate
refused removing it, deadlocking 115 commits. A log no remote-tracking ref
has ever held is not shared history. Published logs (even ones later removed
on origin) stay undeletable, and with no remote refs nothing counts as
unpublished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MrfsFu7NLgapPn6yUcNxE5
@plur9
plur9 merged commit 67391de into main Nov 8, 2026
9 of 10 checks passed
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