Repository navigation
Use caplinks' AttemptGuard and JsonRecords for the review gate - #91
Merged
Merged
Conversation
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.
Part of i2mint/caplinks#3: heed's review gate now uses caplinks 0.0.4 (
AttemptGuard,JsonRecords,FileTexts) instead of its own copies. Behaviour unchanged: the gated-page tests pass as they were._JsonRecordsand the hand-rolled_lockeddict / two-limiter logic (net 29 lines in, 56 out); the guard is built lazily on the first unlock, so caplinks is still imported only when a record exists.heed[gate]anddevnow needcaplinks>=0.0.4.Adversarial review (fresh Opus agent): ship. Checked: no valid heed id rejected by caplinks' stricter token rule, no fail-open path, lock-out equivalent, thread-safe, no dead code. It found that a dangling symlink at
access/<id>.jsonwas served open before (now 404, sinceFileTextsrefuses symlinks) and thatheed review revokecrashed on such a record (fixed: it is replaced, closed); test added; comment corrected; one-use helper inlined. Side effect: the records folder is now 0700 and writes are fsynced.