refactor(engine): collapse tile-lane lock boilerplate; document mutex-poison policy - #399
Merged
Merged
Conversation
…-poison policy
lane.rs: lock_queue / lock_in_flight helpers replace 9 repeated
.lock().expect("tile worker mutex poisoned") sites.
design.md: new "Mutex poison = process death" section — rationale,
scope (internal worker mutexes crash; loss-tolerable data like help
entries may skip), and the grep-able message convention. Replaces the
error-boundary section's "out of scope, #86 owns it" placeholder.
Site audit: lua api/map.rs zoom/center mirrors keep expect (policy);
host.rs help-entry skip stays as the documented exception.
Closes #310
Closes #86
There was a problem hiding this comment.
This PR successfully consolidates mutex-locking boilerplate and documents the mutex-poison policy. The refactoring correctly replaces 9 repeated .lock().expect() sites with two helper methods (lock_queue and lock_in_flight), and the new documentation section clearly explains the rationale for crashing on mutex poisoning. All changes are consistent with the documented policy. No blocking issues found.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
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.
Closes #310, closes #86.
lane.rs:lock_queue/lock_in_flighthelpers onSharedStatereplace 9 repeated.lock().expect("tile worker mutex poisoned")sites (tests included).docs/design.md: new Mutex poison = process death section — rationale, scope, and the grep-able"<tag> mutex poisoned"message convention. The error-boundary section's "out of scope — Document mutex-poison policy in design.md #86 owns it" placeholder now links here.ttymap-lua/src/api/map.rszoom/center mirrors keep.expect(internal view state → policy applies);ttymap-lua/src/host.rshelp-entry skip stays as the documented loss-tolerable exception.🤖 Generated with Claude Code
https://claude.ai/code/session_019Ktx7C4Zf26MhQABaPNYze