Repository navigation
agent: pin the memory lock's old-binary interop and the legacy file's held mark - #160
Merged
Merged
Conversation
… held mark Two test gaps from #158's audit, each failing with its mutant: - the_store_lock_and_an_old_binarys_flock_exclude_each_other: an old-binary stand-in's flock on .memory.lock makes StoreLock time out, and while we hold it their non-blocking flock is refused (kills Target::File -> Itself). - a_hard_link_to_a_held_legacy_lock_file_is_not_replaced: a hard link to the held legacy `lock` under a non-lock name is refused by write_atomic while held, written once released (kills dropping the legacy file's mark). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
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.
This adds tests for two gaps the #158 audit found. It changes no behaviour.
Each test fails with the mutant that previously survived:
memory::file::tests::the_store_lock_and_an_old_binarys_flock_exclude_each_otherflockon.memory.lock. While it holds the lock, ourStoreLocktimes out. While we holdStoreLock, itsflockis refused. Once we release, itsflocksucceeds.Target::Filechanged toTarget::ItselfinStoreLock::acquire, so no legacy flock is taken. Fails with "the old binary's flock holds the store".file_lock::tests::a_hard_link_to_a_held_legacy_lock_file_is_not_replacedwrite_atomicrefuses a hard link to the legacylockunder a name that doesn't look like a lock (notes.txt). After release, the link is written.marks.mark(&file)removed fromtake_legacy_flock.Local checks:
mcp_*,serve_*andrun_*suites: 2404 passed.--workspace --all-targets -D warningsandcargo fmt --checkare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk