Repository navigation
ledger_write_gate: allow removing an event log no remote has ever held - #306
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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